]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_Command.cpp
Salome HOME
Auto-formatting according to the defined code standard.
[modules/shaper.git] / src / XGUI / XGUI_Command.cpp
index 3ba1689a3b5168c44bb828a7f22de419154429ee..5ec79621fd4abcbbd44c5270f9b9c28d4a5bc12e 100644 (file)
@@ -2,61 +2,61 @@
 
 #include <QPushButton>
 
-XGUI_Command::XGUI_Command(const QString& theId, QObject * parent) :
-    QWidgetAction(parent), myId(theId)
+XGUI_Command::XGUI_Command(const QString& theId, QObject * parent)
+    QWidgetAction(parent), myId(theId)
 {
 }
 
-XGUI_Command::XGUI_Command(const QString& theId, const QIcon& icon, const QString& text, QObject* parent):
-    QWidgetAction(parent), myId(theId)
+XGUI_Command::XGUI_Command(const QString& theId, const QIcon& icon, const QString& text,
+                           QObject* parent)
+    : QWidgetAction(parent), myId(theId)
 {
-    setIcon(icon);
-    setText(text);
+  setIcon(icon);
+  setText(text);
 }
 
-
 XGUI_Command::~XGUI_Command()
 {
 }
 
 QWidget* XGUI_Command::createWidget(QWidget* theParent)
 {
-    if (theParent->inherits("XGUI_MenuGroupPanel")) {
-        QPushButton* aBtn = new QPushButton(theParent);
-        aBtn->setIcon(icon());
-        aBtn->setText(text());
-        QKeySequence aKeys = shortcut();
-        QString aToolTip = toolTip();
-        if (!aKeys.isEmpty())
-            aToolTip = aToolTip + " (" + aKeys.toString() + ")";
-        if (!aToolTip.isEmpty())
-            aBtn->setToolTip(aToolTip);
-
-        aBtn->addAction(this);
-        connect(aBtn, SIGNAL(clicked()), this, SLOT(trigger()));
-        aBtn->setFlat(true);
-        aBtn->setMinimumSize(MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT);
-        return aBtn;
-    }
-    return QWidgetAction::createWidget(theParent);
+  if (theParent->inherits("XGUI_MenuGroupPanel")) {
+    QPushButton* aBtn = new QPushButton(theParent);
+    aBtn->setIcon(icon());
+    aBtn->setText(text());
+    QKeySequence aKeys = shortcut();
+    QString aToolTip = toolTip();
+    if (!aKeys.isEmpty())
+      aToolTip = aToolTip + " (" + aKeys.toString() + ")";
+    if (!aToolTip.isEmpty())
+      aBtn->setToolTip(aToolTip);
+
+    aBtn->addAction(this);
+    connect(aBtn, SIGNAL(clicked()), this, SLOT(trigger()));
+    aBtn->setFlat(true);
+    aBtn->setMinimumSize(MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT);
+    return aBtn;
+  }
+  return QWidgetAction::createWidget(theParent);
 }
 
 bool XGUI_Command::enabled() const
 {
-    return isEnabled();
+  return isEnabled();
 }
 
 void XGUI_Command::enable()
 {
-    setEnabled(true);
+  setEnabled(true);
 }
 
 void XGUI_Command::disable()
 {
-    setEnabled(false);
+  setEnabled(false);
 }
 
 void XGUI_Command::connectTo(const QObject* theResiver, const char* theSlot)
 {
-    connect(this, SIGNAL(triggered()), theResiver, theSlot);
-}
\ No newline at end of file
+  connect(this, SIGNAL(triggered()), theResiver, theSlot);
+}