1 #include "SUIT_ActionOperation.h"
3 #include "SUIT_Application.h"
7 SUIT_ActionOperation::SUIT_ActionOperation( SUIT_Application* app )
8 : SUIT_Operation( app ),
13 SUIT_ActionOperation::~SUIT_ActionOperation()
17 QtxAction* SUIT_ActionOperation::action() const
22 void SUIT_ActionOperation::setAction( const QString& text, const QIconSet& icon,
23 const QString& menuText, QKeySequence accel,
24 QObject* parent, const char* name, bool toggle )
26 setAction( new QtxAction( text, icon, menuText, accel, parent, name, toggle ) );
29 void SUIT_ActionOperation::setAction( const QString& text, const QString& menuText,
30 QKeySequence accel, QObject* parent, const char* name, bool toggle )
32 setAction( new QtxAction(text, menuText, accel, parent, name, toggle ) );
35 void SUIT_ActionOperation::setAction( QtxAction* a )
43 myAction->setEnabled( application()->activeStudy() );
44 connect( myAction, SIGNAL( activated() ), SLOT( start() ) );
47 bool SUIT_ActionOperation::addTo( QWidget* wid )
52 return action()->addTo( wid );
55 bool SUIT_ActionOperation::addTo( QWidget* wid, int idx )
60 return action()->addTo( wid, idx );
63 void SUIT_ActionOperation::setStatusTip( const QString& tip )
66 action()->setStatusTip( tip );