Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SUIT_VIEWWINDOW_H
00026 #define SUIT_VIEWWINDOW_H
00027
00028 #include "SUIT.h"
00029
00030 #include <QMainWindow>
00031 #include <QList>
00032 #include <QMap>
00033
00034 class SUIT_Desktop;
00035 class SUIT_ViewManager;
00036 class QtxActionToolMgr;
00037 class QtxMultiAction;
00038 class QImage;
00039
00040 class SUIT_EXPORT SUIT_ViewWindow: public QMainWindow
00041 {
00042 Q_OBJECT
00043
00044 public:
00045
00046 SUIT_ViewWindow( SUIT_Desktop* );
00047 virtual ~SUIT_ViewWindow();
00048
00049 virtual void setViewManager( SUIT_ViewManager* );
00050 SUIT_ViewManager* getViewManager() const;
00051
00052 bool event(QEvent*);
00053
00054 virtual QImage dumpView();
00055 bool dumpViewToFormat( const QString& fileName, const QString& format );
00056
00057 bool onAccelAction( int );
00058
00059 bool closable() const;
00060 bool setClosable( const bool );
00061
00062 virtual QString getVisualParameters();
00063 virtual void setVisualParameters( const QString& parameters );
00064
00065 void setDestructiveClose( const bool );
00066
00067 int getId() const;
00068
00069 QtxActionToolMgr* toolMgr() const;
00070
00071 virtual void setDropDownButtons( bool );
00072 bool dropDownButtons() const;
00073
00074 public slots:
00075 virtual void onDumpView();
00076
00077 signals:
00078 void tryClosing( SUIT_ViewWindow* );
00079 void closing( SUIT_ViewWindow* );
00080 void mousePressed( SUIT_ViewWindow*, QMouseEvent* );
00081 void mouseReleased( SUIT_ViewWindow*, QMouseEvent* );
00082 void mouseDoubleClicked( SUIT_ViewWindow*, QMouseEvent* );
00083 void mouseMoving( SUIT_ViewWindow*, QMouseEvent* );
00084 void wheeling( SUIT_ViewWindow*, QWheelEvent* );
00085 void keyPressed( SUIT_ViewWindow*, QKeyEvent* );
00086 void keyReleased( SUIT_ViewWindow*, QKeyEvent* );
00087 void contextMenuRequested( QContextMenuEvent *e );
00088
00089 protected:
00090 void closeEvent( QCloseEvent* );
00091 virtual void contextMenuEvent( QContextMenuEvent* );
00092 virtual QString filter() const;
00093 virtual bool action( const int );
00094 virtual bool dumpViewToFormat( const QImage&, const QString& fileName, const QString& format );
00095
00096 SUIT_Desktop* myDesktop;
00097 SUIT_ViewManager* myManager;
00098
00099 private:
00100 typedef QMap< int, QList<QtxMultiAction*> > ActionsMap;
00101
00102 QtxActionToolMgr* myToolMgr;
00103 bool myIsDropDown;
00104 ActionsMap myMultiActions;
00105 };
00106
00107 #endif // SUIT_VIEWWINDOW_H