Salome HOME
Workaround for bug #25637
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.cpp
index e788d15da4cee0b63b2ff942a069a4e3c4142e29..c3d200d41ae5f130f517a4802598062eafcd772e 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
 /*
  * XGUI_PropertyPanel.cpp
  *
@@ -219,3 +221,29 @@ void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget)
   else if (!isEditingMode())
     emit noMoreWidgets();
 }
+
+void XGUI_PropertyPanel::setOkEnabled(bool theEnabled)
+{
+  QPushButton* anOkBtn = findChild<QPushButton*>(PROP_PANEL_OK);
+  anOkBtn->setEnabled(theEnabled);
+}
+
+bool XGUI_PropertyPanel::isOkEnabled() const
+{
+  QPushButton* anOkBtn = findChild<QPushButton*>(PROP_PANEL_OK);
+  return anOkBtn->isEnabled();
+}
+
+void XGUI_PropertyPanel::setCancelEnabled(bool theEnabled)
+{
+  QPushButton* anCancelBtn = findChild<QPushButton*>(PROP_PANEL_CANCEL);
+  anCancelBtn->setEnabled(theEnabled);
+}
+
+bool XGUI_PropertyPanel::isCancelEnabled() const
+{
+  QPushButton* anCancelBtn = findChild<QPushButton*>(PROP_PANEL_CANCEL);
+  return anCancelBtn->isEnabled();
+}
+
+