1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File: QtxWorkstackAction.h
23 // Author: Sergey TELKOV
25 #ifndef QTXWORKSTACKACTION_H
26 #define QTXWORKSTACKACTION_H
28 #include "QtxActionSet.h"
33 #pragma warning( disable:4251 )
36 class QTX_EXPORT QtxWorkstackAction : public QtxActionSet
41 //! Actions (menu items) ID
42 enum { SplitVertical = 0x0001, //!< "Split window vertically" operation
43 SplitHorizontal = 0x0002, //!< "Split window horizontally" operation
44 Windows = 0x0010, //!< A list of child windows menu items
45 Split = SplitVertical | SplitHorizontal,
46 Standard = Split | Windows };
48 QtxWorkstackAction( QtxWorkstack*, QObject* = 0 );
49 virtual ~QtxWorkstackAction();
51 QtxWorkstack* workstack() const;
53 int menuActions() const;
54 void setMenuActions( const int );
56 QIcon icon( const int ) const;
57 QString text( const int ) const;
58 int accel( const int ) const;
59 QString statusTip( const int ) const;
61 void setAccel( const int, const int );
62 void setIcon( const int, const QIcon& );
63 void setText( const int, const QString& );
64 void setStatusTip( const int, const QString& );
66 void perform( const int );
70 void onTriggered( int );
73 virtual void addedTo( QWidget* );
74 virtual void removedFrom( QWidget* );
80 void splitHorizontal();
81 void activateItem( const int );
84 QtxWorkstack* myWorkstack; //!< parent workstack
85 bool myWindowsFlag; //!< "show child windows items" flag
89 #pragma warning( default:4251 )