Salome HOME
Workaround for bug #25637
[modules/shaper.git] / src / XGUI / XGUI_PropertyPanel.cpp
index b94bb1903f708438fc9b5d236f214a084930b816..c3d200d41ae5f130f517a4802598062eafcd772e 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
 /*
  * XGUI_PropertyPanel.cpp
  *
@@ -77,6 +79,7 @@ void XGUI_PropertyPanel::cleanContent()
   myWidgets.clear();
   qDeleteAll(myCustomWidget->children());
   myActiveWidget = NULL;
+  setWindowTitle(tr("Property Panel"));
 }
 
 void XGUI_PropertyPanel::setModelWidgets(const QList<ModuleBase_ModelWidget*>& theWidgets)
@@ -218,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();
+}
+
+