| VRS - The Virtual Rendering System |
| version 3.3 |
00001 #ifndef KEYFRAMELISTWIDGET_H 00002 #define KEYFRAMELISTWIDGET_H 00003 00004 #include <qt/qobject.h> 00005 #include <qt/qtreewidget.h> 00006 #include <vrs/sg/camerapatheditor.h> 00007 00008 #include "../../../../src/qt4/CameraPathEditorWidget/resource/ui_keyFrameProperties.h" 00009 #include <vrs/container/array.h> 00010 00011 // class KeyFrameListWidget 00012 00013 // Widget contains information about the Keyframes 00014 00015 class KeyFrameListWidget: public QTreeWidget { 00016 Q_OBJECT 00017 00018 public: 00019 KeyFrameListWidget(QWidget* parent = NULL); 00020 virtual ~KeyFrameListWidget(); 00021 00022 void addItem(); 00023 void setCameraEditor(VRS::SO<VRS::CameraPathEditor> cam){ 00024 _camera = cam; } 00025 void setContextMenu(QMenu* contextMenu){ 00026 _contextMenu = contextMenu; } 00027 void loadKeyFrames(); 00028 void setIcons(); 00029 00030 public slots: 00031 void onItemDoubbleClicked(QTreeWidgetItem* item, int column); 00032 void onItemClicked(QTreeWidgetItem* item, int column); 00033 void itemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous); 00034 void showPropertiesMenu(); 00035 void markAsCirclePoint(bool mark); 00036 void deleteCurrentPathnode(); 00037 void changeCurrentPosition(); 00038 00039 signals: 00040 void showCircleProperties(bool); 00041 void showSpeedmarkProperties(bool); 00042 void activeKeyFrame(); 00043 00044 00045 protected: 00046 void keyPressEvent(QKeyEvent *e); 00047 void mousePressEvent(QMouseEvent *event); 00048 void dropEvent(QDropEvent *event); 00049 void resizeEvent(QResizeEvent* event); 00050 00051 private: 00052 static Qt::ItemFlags _parentItemFlags; 00053 VRS::SO<VRS::CameraPathEditor> _camera; 00054 QMenu* _contextMenu; 00055 QIcon* _activeIcon; 00056 QIcon* _inactiveIcon; 00057 QIcon* _speedoIcon; 00058 QIcon* _circleIcon; 00059 QIcon* _checkedIcon; 00060 int _numberOfKeyFrames; 00061 int _currentSelectionIndex; 00062 int _previousSelectionIndex; 00063 00064 00065 }; // class KeyFrameListWidget 00066 00067 00068 // class KeyFrameProperties 00069 00070 // Dialogform for the properties of the current Keyframe 00071 00072 class KeyFrameProperties : public QDialog 00073 { 00074 Q_OBJECT 00075 public: 00076 KeyFrameProperties(VRS::SO<VRS::CameraPathEditor> cam); 00077 ~KeyFrameProperties(){}; 00078 00079 private: 00080 Ui::KeyFrameProperties _ui; 00081 VRS::SO<VRS::CameraPathEditor> _camera; 00082 VRS::CameraPathEditor::KeyFrame _kf; 00083 00084 private: 00085 bool setProperties(); 00086 00087 public slots: 00088 void okButtonClicked(); 00089 void applyButtonClicked(); 00090 00091 }; 00092 00093 #endif // KEYFRAMELISTWIDGET_H