[4] | 1 | #ifndef _QDESIGNVIEWWINDOW_H_ |
---|
| 2 | #define _QDESIGNVIEWWINDOW_H_ |
---|
| 3 | |
---|
| 4 | #include <QtGui> |
---|
| 5 | #include <QtXml> |
---|
| 6 | #include <QDir> |
---|
| 7 | |
---|
| 8 | #include "ui_qdesignviewwindow.h" |
---|
| 9 | |
---|
| 10 | namespace projection |
---|
| 11 | { |
---|
| 12 | class ProjectionModel; |
---|
| 13 | class QDesignViewWidget; |
---|
| 14 | class QPanelWidget; |
---|
| 15 | class Channel; |
---|
| 16 | |
---|
| 17 | class QDesignViewWindow : public QMainWindow |
---|
| 18 | { |
---|
| 19 | Q_OBJECT |
---|
| 20 | |
---|
| 21 | public: |
---|
| 22 | |
---|
| 23 | QDesignViewWindow(QWidget* pParent=0, Qt::WFlags flag=0); |
---|
| 24 | ~QDesignViewWindow(); |
---|
| 25 | |
---|
| 26 | void setModel(ProjectionModel* pModel); |
---|
| 27 | |
---|
| 28 | QGLWidget* getGLWidget() const; |
---|
| 29 | QDesignViewWidget* getDesignView() const; |
---|
| 30 | QPanelWidget* getPanel() const; |
---|
| 31 | |
---|
| 32 | bool loadFile(const QString& fileName); |
---|
| 33 | bool saveFile(const QString& fileName); |
---|
| 34 | |
---|
| 35 | void initFromDOMElement(const QDomElement& element); |
---|
| 36 | QDomElement domElement(const QString& name, QDomDocument& doc) const; |
---|
| 37 | |
---|
| 38 | private slots: |
---|
| 39 | |
---|
| 40 | void on_actionFileNew_triggered(); |
---|
| 41 | void on_actionFileOpen_triggered(); |
---|
| 42 | void on_actionFileSave_triggered(); |
---|
| 43 | void on_actionFileSaveAs_triggered(); |
---|
| 44 | void on_actionFileExportDataset_triggered(); |
---|
| 45 | void on_actionFileSyncClients_triggered(); |
---|
| 46 | void on_actionFileExit_triggered(); |
---|
| 47 | void on_actionFileExitAll_triggered(); |
---|
| 48 | void on_actionEditDesignDistortionMap_triggered(); |
---|
| 49 | void on_actionEditDesignBlendMap_triggered(); |
---|
| 50 | void on_actionEditPreference_triggered(); |
---|
| 51 | void on_menuEdit_aboutToShow(); |
---|
| 52 | void on_actionViewPerspective_triggered(); |
---|
| 53 | void on_actionViewCenter_triggered(); |
---|
| 54 | void on_actionViewTop_triggered(); |
---|
| 55 | void on_actionViewSide_triggered(); |
---|
| 56 | void on_actionViewFront_triggered(); |
---|
| 57 | void on_menuView_aboutToShow(); |
---|
| 58 | void on_actionViewAxis_triggered(bool checked); |
---|
| 59 | void on_designViewWidget_axisVisibilityChanged(bool bVisible); |
---|
| 60 | void on_actionViewGrid_triggered(bool checked); |
---|
| 61 | void on_designViewWidget_gridVisibilityChanged(bool bVisible); |
---|
| 62 | void on_actionViewInfo_triggered(bool checked); |
---|
| 63 | void on_designViewWidget_infoVisibilityChanged(bool bVisible); |
---|
| 64 | void on_actionViewViewAll_triggered(); |
---|
| 65 | void on_actionWindowSceneViewer_triggered(); |
---|
| 66 | void on_actionWindowSceneDialog_triggered(); |
---|
| 67 | void on_actionWindowScreenDialog_triggered(); |
---|
| 68 | void on_actionWindowChannelManager_triggered(); |
---|
| 69 | void on_actionHelpHelp_triggered(); |
---|
| 70 | void on_actionHelpAbout_triggered(); |
---|
| 71 | void on_actionHelpAbout_Qt_triggered(); |
---|
| 72 | void on_actionHelpPlugins_triggered(); |
---|
| 73 | |
---|
| 74 | void setCurrentFile(const QString& fileName); |
---|
| 75 | void updateRecentFileActions(); |
---|
| 76 | void openRecentFile(); |
---|
| 77 | |
---|
| 78 | void activateDesignView(); |
---|
| 79 | |
---|
| 80 | protected: |
---|
| 81 | virtual void closeEvent (QCloseEvent* pEvent); |
---|
| 82 | |
---|
| 83 | private: |
---|
| 84 | |
---|
| 85 | Ui::QDesignViewWindow ui; |
---|
| 86 | |
---|
| 87 | // file history management |
---|
| 88 | QString m_fileName; |
---|
| 89 | enum { MAX_RECENT_FILES = 5 }; |
---|
| 90 | QAction* m_pRecentFileActs[MAX_RECENT_FILES]; |
---|
| 91 | QAction* m_pSeparatorAct; |
---|
| 92 | |
---|
| 93 | ProjectionModel* m_pModel; |
---|
| 94 | }; |
---|
| 95 | |
---|
| 96 | }; // projection |
---|
| 97 | |
---|
| 98 | #endif // _QDESIGNVIEWWINDOW_H_ |
---|