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: QtxActionSet.h
23 // Author: Sergey TELKOV
25 #ifndef QTXACTIONSET_H
26 #define QTXACTIONSET_H
28 #include "QtxAction.h"
33 #pragma warning( disable:4251 )
36 class QTX_EXPORT QtxActionSet : public QtxAction
41 QtxActionSet( QObject* = 0 );
42 virtual ~QtxActionSet();
44 QList<QAction*> actions() const;
45 void setActions( const QList<QAction*>& );
47 void insertActions( const QList<QAction*>&, const int = -1 );
49 int insertAction( QAction*, const int id = -1, const int = -1 );
50 int insertAction( const QString&, const int id = -1, const int = -1 );
51 int insertAction( const QString&, const QIcon&, const int id = -1, const int = -1 );
53 void removeAction( QAction* );
54 void removeAction( const int );
59 void triggered( int );
60 void triggered( QAction* );
64 void onActionTriggered( bool = false );
67 virtual void addedTo( QWidget* );
68 virtual void removedFrom( QWidget* );
70 virtual void actionAdded( QAction* );
71 virtual void actionRemoved( QAction* );
73 QAction* action( int ) const;
74 int actionId( QAction* ) const;
75 void setActionId( QAction*, const int );
77 virtual bool isEmptyAction() const;
79 virtual void updateAction();
80 virtual void updateAction( QWidget* );
83 int generateId() const;
86 typedef QList<QAction*> ActionList;
89 ActionList mySet; //!< actions list
93 #pragma warning( default:4251 )