From: vsv Date: Thu, 21 Apr 2016 15:18:52 +0000 (+0300) Subject: Issue #1427: set header of modal dialog box X-Git-Tag: V_2.3.0~147 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=583f262a90ef72931e77c63fc7d5d05be2d336c7;p=modules%2Fshaper.git Issue #1427: set header of modal dialog box --- diff --git a/src/ModuleBase/ModuleBase_Dialog.cpp b/src/ModuleBase/ModuleBase_Dialog.cpp index 0ac6a72b1..67e374280 100644 --- a/src/ModuleBase/ModuleBase_Dialog.cpp +++ b/src/ModuleBase/ModuleBase_Dialog.cpp @@ -11,6 +11,9 @@ #include #include +#include +#include + #include #include #include @@ -26,6 +29,9 @@ ModuleBase_Dialog::ModuleBase_Dialog(ModuleBase_IWorkshop* theParent, const QStr myActiveWidget(0) { ModuleBase_WidgetFactory aFactory(myDescription, myWorkshop); + std::string aTitle = aFactory.widgetAPI()->getProperty(FEATURE_TEXT); + + setWindowTitle(aTitle.c_str()); SessionPtr aMgr = ModelAPI_Session::get(); std::shared_ptr aDoc = aMgr->activeDocument(); diff --git a/src/ModuleBase/ModuleBase_WidgetFactory.h b/src/ModuleBase/ModuleBase_WidgetFactory.h index b8ae7b465..8fddaa4dd 100644 --- a/src/ModuleBase/ModuleBase_WidgetFactory.h +++ b/src/ModuleBase/ModuleBase_WidgetFactory.h @@ -68,6 +68,9 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFactory /// \param theAttributeId an outpup parameter with attribute void getGreedAttribute(std::string& theAttributeId); + /// Returns widget API from XML + const Config_WidgetAPI* widgetAPI() const { return myWidgetApi; } + protected: /// check if ModuleBase_Widget has expandable widgets in getControls bool hasExpandingControls(QWidget* theParent);