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
00026 #ifndef QTXWORKSPACEACTION_H
00027 #define QTXWORKSPACEACTION_H
00028
00029 #include "QtxActionSet.h"
00030
00031 class QtxWorkspace;
00032
00033 #ifdef WIN32
00034 #pragma warning( disable:4251 )
00035 #endif
00036
00037 class QTX_EXPORT QtxWorkspaceAction : public QtxActionSet
00038 {
00039 Q_OBJECT
00040
00041 public:
00043 enum { Cascade = 0x0001,
00044 Tile = 0x0002,
00045 VTile = 0x0004,
00046 HTile = 0x0008,
00047 Windows = 0x0010,
00048 Standard = Cascade | Tile | Windows,
00049 Operations = Cascade | Tile | VTile | HTile,
00050 All = Standard | HTile | VTile };
00051
00052 public:
00053 QtxWorkspaceAction( QtxWorkspace*, QObject* = 0 );
00054 virtual ~QtxWorkspaceAction();
00055
00056 QtxWorkspace* workspace() const;
00057
00058 int menuActions() const;
00059 void setMenuActions( const int );
00060
00061 QIcon icon( const int ) const;
00062 QString text( const int ) const;
00063 int accel( const int ) const;
00064 QString statusTip( const int ) const;
00065
00066 void setAccel( const int, const int );
00067 void setIcon( const int, const QIcon& );
00068 void setText( const int, const QString& );
00069 void setStatusTip( const int, const QString& );
00070
00071 void perform( const int );
00072
00073 public slots:
00074 void tile();
00075 void cascade();
00076 void tileVertical();
00077 void tileHorizontal();
00078
00079 private slots:
00080 void onAboutToShow();
00081 void onTriggered( int );
00082
00083 protected:
00084 virtual void addedTo( QWidget* );
00085 virtual void removedFrom( QWidget* );
00086
00087 private:
00088 void updateContent();
00089 void updateWindows();
00090 void activateItem( const int );
00091
00092 private:
00093 QtxWorkspace* myWorkspace;
00094 bool myWindowsFlag;
00095 };
00096
00097 #ifdef WIN32
00098 #pragma warning( default:4251 )
00099 #endif
00100
00101 #endif