1 // Copyright (C) 2007-2012 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
23 // File: QtxWorkstackAction.h
24 // Author: Sergey TELKOV
26 #ifndef QTXWORKSTACKACTION_H
27 #define QTXWORKSTACKACTION_H
29 #include "QtxActionSet.h"
34 #pragma warning( disable:4251 )
37 class QTX_EXPORT QtxWorkstackAction : public QtxActionSet
42 //! Actions (menu items) ID
43 enum { SplitVertical = 0x0001, //!< "Split window vertically" operation
44 SplitHorizontal = 0x0002, //!< "Split window horizontally" operation
45 Windows = 0x0010, //!< A list of child windows menu items
46 Split = SplitVertical | SplitHorizontal,
47 Standard = Split | Windows };
49 QtxWorkstackAction( QtxWorkstack*, QObject* = 0 );
50 virtual ~QtxWorkstackAction();
52 QtxWorkstack* workstack() const;
54 int menuActions() const;
55 void setMenuActions( const int );
57 QIcon icon( const int ) const;
58 QString text( const int ) const;
59 int accel( const int ) const;
60 QString statusTip( const int ) const;
62 void setAccel( const int, const int );
63 void setIcon( const int, const QIcon& );
64 void setText( const int, const QString& );
65 void setStatusTip( const int, const QString& );
67 void perform( const int );
71 void onTriggered( int );
74 virtual void addedTo( QWidget* );
75 virtual void removedFrom( QWidget* );
81 void splitHorizontal();
82 void activateItem( const int );
85 QtxWorkstack* myWorkstack; //!< parent workstack
86 bool myWindowsFlag; //!< "show child windows items" flag
90 #pragma warning( default:4251 )