Salome HOME
Update Delete operation in pop-up
[modules/shaper.git] / src / XGUI / XGUI_Command.cpp
index ffd6ab103f7338b833a05020b60e635534532867..220e04f474b5007c1b2dabd60722aeca78c5ac1d 100644 (file)
@@ -3,16 +3,18 @@
 #include <QPushButton>
 
 XGUI_Command::XGUI_Command(const QString& theId, QObject * parent, bool isCheckable)
-    : QWidgetAction(parent), myId(theId), myCheckable(isCheckable)
+    : QWidgetAction(parent), myCheckable(isCheckable)
 {
+  setData(theId);
 }
 
 XGUI_Command::XGUI_Command(const QString& theId, const QIcon& icon, const QString& text,
                            QObject* parent, bool isCheckable)
-    : QWidgetAction(parent), myId(theId), myCheckable(isCheckable)
+    : QWidgetAction(parent), myCheckable(isCheckable)
 {
   setIcon(icon);
   setText(text);
+  setData(theId);
 }
 
 XGUI_Command::~XGUI_Command()
@@ -46,24 +48,9 @@ QWidget* XGUI_Command::createWidget(QWidget* theParent)
   return QWidgetAction::createWidget(theParent);
 }
 
-bool XGUI_Command::enabled() const
-{
-  return isEnabled();
-}
-
-void XGUI_Command::enable()
-{
-  setEnabled(true);
-}
-
-void XGUI_Command::disable()
-{
-  setEnabled(false);
-}
-
 void XGUI_Command::connectTo(const QObject* theResiver, const char* theSlot)
 {
-    connect(this, SIGNAL(triggered()), theResiver, theSlot);
+    connect(this, SIGNAL(triggered(bool)), theResiver, theSlot);
 }
 
 const QStringList& XGUI_Command::unblockableCommands() const