1 #include "SUIT_ActionOperation.h"
3 #include "SUIT_Application.h"
10 SUIT_ActionOperation::SUIT_ActionOperation( SUIT_Application* app )
11 : SUIT_Operation( app ),
19 SUIT_ActionOperation::~SUIT_ActionOperation()
26 QtxAction* SUIT_ActionOperation::action() const
32 * Create new instance of QtxAction and set.
34 void SUIT_ActionOperation::setAction( const QString& text, const QIconSet& icon,
35 const QString& menuText, QKeySequence accel,
36 QObject* parent, const char* name, bool toggle )
38 setAction( new QtxAction( text, icon, menuText, accel, parent, name, toggle ) );
42 * Create new instance of QtxAction and set.
44 void SUIT_ActionOperation::setAction( const QString& text, const QString& menuText,
45 QKeySequence accel, QObject* parent, const char* name, bool toggle )
47 setAction( new QtxAction(text, menuText, accel, parent, name, toggle ) );
52 void SUIT_ActionOperation::setAction( QtxAction* a )
60 myAction->setEnabled( application()->activeStudy() );
61 connect( myAction, SIGNAL( activated() ), SLOT( start() ) );
64 /*! Add action to widget \a wid.
65 *\retval TRUE - successful, FALSE - not successful.
67 bool SUIT_ActionOperation::addTo( QWidget* wid )
72 return action()->addTo( wid );
75 /*! Add action to widget \a wid.
76 *\retval TRUE - successful, FALSE - not successful.
78 bool SUIT_ActionOperation::addTo( QWidget* wid, int idx )
83 return action()->addTo( wid, idx );
86 /*! Set status tip for action.
88 void SUIT_ActionOperation::setStatusTip( const QString& tip )
91 action()->setStatusTip( tip );