+
+void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget)
+{
+ // Avoid activation of already actve widget. It could happen on focusIn event many times
+ if (theWidget == myActiveWidget)
+ return;
+ if(myActiveWidget) {
+ myActiveWidget->deactivate();
+ myActiveWidget->setHighlighted(false);
+ }
+ if(theWidget) {
+ theWidget->activate();
+ theWidget->setHighlighted(true);
+ }
+ myActiveWidget = theWidget;
+ if (myActiveWidget)
+ emit widgetActivated(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();
+}
+
+