AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
CameraListWidget.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXQT_CAMERALISTWIDGET_H
18#define AGXQT_CAMERALISTWIDGET_H
19
20#include <agx/TimeStamp.h>
21#include <agx/agx.h>
22#include <agxQt/export.h>
23#include <iostream>
24#include <agx/Vector.h>
25#include <agx/String.h>
26
27#include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
28#include <QWidget>
29#include <agxQt/ui_CameraList.h>
30#include <QCloseEvent>
31#include <agx/PopDisableWarnings.h> // End of disabled warnings.
32
33#include <agxQt/CameraViewSet.h>
34
35namespace agxQt
36{
40 class CameraViewModel : public QAbstractListModel
41 {
42 Q_OBJECT
43
44 public:
45 CameraViewModel(CameraDescriptionSet * cameraSet, QObject *parent = 0)
46 : QAbstractListModel(parent), m_cameraSet(cameraSet) {}
47
48 int rowCount(const QModelIndex &parent = QModelIndex()) const;
49
50 QVariant data(const QModelIndex &index, int role) const;
51
52 QVariant headerData(int section, Qt::Orientation orientation,
53 int role = Qt::DisplayRole) const;
54
55 Qt::ItemFlags flags(const QModelIndex &index) const;
56
57 bool setData(const QModelIndex &index, const QVariant &value,
58 int role = Qt::EditRole);
59
61
62 private:
63 CameraDescriptionSet * m_cameraSet;
64 };
65
69 class AGXQT_EXPORT CameraListWidget : public QWidget
70 {
71 Q_OBJECT
72
73 public:
74
75 explicit CameraListWidget(QWidget *parent = 0);
76
78
81
82public slots:
84
85signals:
89
90 protected slots:
94
95 protected:
96 virtual void closeEvent( QCloseEvent * event );
97
99 // Variables
101 private:
102 Ui::CameraViewList * m_ui;
103 CameraViewModel * m_model;
104 };
105}
106
107#endif
#define AGXQT_EXPORT
CameraViewSet is a class that handles and manages a set of cameras that the user should be able to sw...
Class used for showing and manipulating data regarding loaded camera views.
void signalShowCameraList(bool)
virtual void closeEvent(QCloseEvent *event)
void setupFromCameraDescriptionSet(CameraDescriptionSet *cameraSet)
Setup the view widget from a CameraDescriptionSet.
CameraListWidget(QWidget *parent=0)
Model used to access data from the camera view set (Model-view Design pattern)
int rowCount(const QModelIndex &parent=QModelIndex()) const
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
QVariant data(const QModelIndex &index, int role) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
CameraViewModel(CameraDescriptionSet *cameraSet, QObject *parent=0)
Qt::ItemFlags flags(const QModelIndex &index) const
CameraDescriptionSet * getCameraDescriptionSet()
Contains classes/utility functions for connecting AGX to QT with OSG.