Back to index

salome-gui  6.5.0
QtxAction.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // File:      QtxAction.h
00024 // Author:    Sergey TELKOV
00025 //
00026 #ifndef QTXACTION_H
00027 #define QTXACTION_H
00028 
00029 #include "Qtx.h"
00030 
00031 #include <QWidgetAction>
00032 
00033 class QIcon;
00034 
00035 #ifdef WIN32
00036 #pragma warning ( disable:4251 )
00037 #endif
00038 
00039 class QTX_EXPORT QtxAction : public QWidgetAction
00040 {
00041   Q_OBJECT
00042 
00043   class ActionNotify;
00044 
00045 public:
00046   QtxAction( QObject* = 0, bool = false, const QString& = QString() );
00047   QtxAction( const QString&, const QString&, int, QObject*, bool = false, const QString& = QString() );
00048   QtxAction( const QString&, const QIcon&, const QString&, int, QObject*, bool = false, const QString& = QString() );
00049   virtual ~QtxAction();
00050 
00051   virtual bool eventFilter( QObject*, QEvent* );
00052 
00053   QString shortcutActionName() const;
00054   void setShortcutActionName( const QString& );
00055 
00056 protected:
00057   virtual void addedTo( QWidget* );
00058   virtual void removedFrom( QWidget* );
00059 
00060   virtual void customEvent( QEvent* );
00061 
00062 private:
00063   QString myShortcutActionName;
00064 };
00065 
00066 #ifdef WIN32
00067 #pragma warning ( default:4251 )
00068 #endif
00069 
00070 #endif