1 // File: QtxWorkstackAction.h
2 // Author: Sergey TELKOV
4 #ifndef QTXWORKSTACKACTION_H
5 #define QTXWORKSTACKACTION_H
12 #pragma warning( disable:4251 )
15 class QTX_EXPORT QtxWorkstackAction : public QtxAction
20 enum { VSplit = 0x0001,
23 Split = VSplit | HSplit,
24 Standard = Split | Windows };
27 QtxWorkstackAction( QtxWorkstack*, QObject* = 0, const char* = 0 );
28 virtual ~QtxWorkstackAction();
30 QtxWorkstack* workstack() const;
33 void setItems( const int );
34 bool hasItems( const int ) const;
36 int accel( const int ) const;
37 QIconSet iconSet( const int ) const;
38 QString menuText( const int ) const;
39 QString statusTip( const int ) const;
41 void setAccel( const int, const int );
42 void setIconSet( const int, const QIconSet& );
43 void setMenuText( const int, const QString& );
44 void setStatusTip( const int, const QString& );
46 virtual bool addTo( QWidget* );
47 virtual bool addTo( QWidget*, const int );
48 virtual bool removeFrom( QWidget* );
50 void perform( const int );
54 void onItemActivated( int );
55 void onPopupDestroyed( QObject* );
58 void checkPopup( QPopupMenu* );
59 void updatePopup( QPopupMenu* );
61 int clearPopup( QPopupMenu* );
62 void fillPopup( QPopupMenu*, const int );
65 typedef QMap<QPopupMenu*, QIntList> MenuMap;
66 typedef QMap<int, QtxAction*> ItemMap;
72 QtxWorkstack* myWorkstack;
76 #pragma warning( default:4251 )