X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_ModelWidget.cpp;h=130e8940476f581a582483dffa5778fbacc0968d;hb=872ac5e3e0196ad70c2a01a79bd070c9a7d4a2e6;hp=2085e690202290fa5c6e6457f5bccaa6d4587ee5;hpb=4637d06f671c4748c8af8318bb50065c6f66860e;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index 2085e6902..130e89404 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -20,6 +20,7 @@ #include #include #include +#include ModuleBase_ModelWidget::ModuleBase_ModelWidget(QWidget* theParent, const Config_WidgetAPI* theData, @@ -123,6 +124,11 @@ void ModuleBase_ModelWidget::activate() activateCustom(); } +void ModuleBase_ModelWidget::setDefaultValue(const std::string& theValue) +{ + myDefaultValue = theValue; +} + bool ModuleBase_ModelWidget::storeValue() { emit beforeValuesChanged(); @@ -150,6 +156,11 @@ bool ModuleBase_ModelWidget::eventFilter(QObject* theObject, QEvent *theEvent) { QWidget* aWidget = qobject_cast(theObject); if (theEvent->type() == QEvent::FocusIn) { + #ifdef _DEBUG + // The following two lines are for debugging purpose only + QFocusEvent* aFocusEvent = dynamic_cast(theEvent); + bool isWinFocus = aFocusEvent->reason() == Qt::ActiveWindowFocusReason; + #endif if (getControls().contains(aWidget)) { emit focusInWidget(this); }