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 QTXWORKSTACKACTION_H
00027 #define QTXWORKSTACKACTION_H
00028
00029 #include "QtxActionSet.h"
00030
00031 class QtxWorkstack;
00032
00033 #ifdef WIN32
00034 #pragma warning( disable:4251 )
00035 #endif
00036
00037 class QTX_EXPORT QtxWorkstackAction : public QtxActionSet
00038 {
00039 Q_OBJECT
00040
00041 public:
00043 enum { SplitVertical = 0x0001,
00044 SplitHorizontal = 0x0002,
00045 Windows = 0x0010,
00046 Split = SplitVertical | SplitHorizontal,
00047 Standard = Split | Windows };
00048
00049 QtxWorkstackAction( QtxWorkstack*, QObject* = 0 );
00050 virtual ~QtxWorkstackAction();
00051
00052 QtxWorkstack* workstack() const;
00053
00054 int menuActions() const;
00055 void setMenuActions( const int );
00056
00057 QIcon icon( const int ) const;
00058 QString text( const int ) const;
00059 int accel( const int ) const;
00060 QString statusTip( const int ) const;
00061
00062 void setAccel( const int, const int );
00063 void setIcon( const int, const QIcon& );
00064 void setText( const int, const QString& );
00065 void setStatusTip( const int, const QString& );
00066
00067 void perform( const int );
00068
00069 private slots:
00070 void onAboutToShow();
00071 void onTriggered( int );
00072
00073 protected:
00074 virtual void addedTo( QWidget* );
00075 virtual void removedFrom( QWidget* );
00076
00077 private:
00078 void updateContent();
00079 void updateWindows();
00080 void splitVertical();
00081 void splitHorizontal();
00082 void activateItem( const int );
00083
00084 private:
00085 QtxWorkstack* myWorkstack;
00086 bool myWindowsFlag;
00087 };
00088
00089 #ifdef WIN32
00090 #pragma warning( default:4251 )
00091 #endif
00092
00093 #endif