From: sbh Date: Mon, 5 May 2014 08:58:04 +0000 (+0400) Subject: Merge branch 'master' of newgeom:newgeom.git X-Git-Tag: V_0.2~94^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ab453e930becb984af924565b2bf477628b91be0;p=modules%2Fshaper.git Merge branch 'master' of newgeom:newgeom.git Conflicts: src/ModuleBase/ModuleBase_WidgetFactory.cpp src/XGUI/CMakeLists.txt src/XGUI/XGUI_Workshop.cpp src/XGUI/XGUI_Workshop.h --- ab453e930becb984af924565b2bf477628b91be0 diff --cc src/ModuleBase/ModuleBase_WidgetFactory.cpp index 2fcce7cbe,9437d5de6..d89f27de4 --- a/src/ModuleBase/ModuleBase_WidgetFactory.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFactory.cpp @@@ -6,11 -6,12 +6,14 @@@ */ #include + -#include -#include - +#include + #include ++#include +#include #include +#include + #include #include diff --cc src/ModuleBase/ModuleBase_WidgetFactory.h index 5193be3db,3241bfb2f..c5b8ef598 --- a/src/ModuleBase/ModuleBase_WidgetFactory.h +++ b/src/ModuleBase/ModuleBase_WidgetFactory.h @@@ -45,9 -37,9 +45,9 @@@ protected private: Config_WidgetAPI* myWidgetApi; - ModuleBase_PropPanelOperation* myOperation; + ModuleBase_Operation* myOperation; - + QList myWidgets; }; #endif /* ModuleBase_WidgetFactory_H_ */ diff --cc src/XGUI/CMakeLists.txt index 407752997,805e7673a..5a8818935 --- a/src/XGUI/CMakeLists.txt +++ b/src/XGUI/CMakeLists.txt @@@ -28,7 -28,8 +28,9 @@@ SET(PROJECT_HEADER XGUI_SalomeConnector.h XGUI_ActionsMgr.h XGUI_ErrorDialog.h + XGUI_SalomeViewer.h + XGUI_ViewerProxy.h + XGUI_PropertyPanel.h ) SET(PROJECT_AUTOMOC @@@ -56,7 -57,7 +58,8 @@@ SET(PROJECT_SOURCE XGUI_SelectionMgr.cpp XGUI_ActionsMgr.cpp XGUI_ErrorDialog.cpp + XGUI_ViewerProxy.cpp + XGUI_PropertyPanel.cpp ) SET(PROJECT_RESOURCES diff --cc src/XGUI/XGUI_Workshop.cpp index c14efc4ee,e07178ec3..c80c8a7ae --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@@ -14,11 -14,11 +14,13 @@@ #include "XGUI_Displayer.h" #include "XGUI_OperationMgr.h" #include "XGUI_SalomeConnector.h" + #include "XGUI_SalomeViewer.h" #include "XGUI_ActionsMgr.h" #include "XGUI_ErrorDialog.h" + #include "XGUI_ViewerProxy.h" +#include "XGUI_PropertyPanel.h" +#include #include #include #include @@@ -179,18 -190,13 +183,18 @@@ void XGUI_Workshop::processEvent(const addFeature(aFeatureMsg); return; } + static Events_ID aFeatureUpdatedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_UPDATED); + if (theMessage->eventID() == aFeatureUpdatedId) + { + myPropertyPanel->updateContentWidget(); + } const Config_PointerMessage* aPartSetMsg = dynamic_cast(theMessage); if (aPartSetMsg) { - ModuleBase_PropPanelOperation* anOperation = - (ModuleBase_PropPanelOperation*)(aPartSetMsg->pointer()); + ModuleBase_Operation* anOperation = + (ModuleBase_Operation*)(aPartSetMsg->pointer()); if (myOperationMgr->startOperation(anOperation)) { - if (anOperation->xmlRepresentation().isEmpty()) { + if (anOperation->getDescription()->xmlRepresentation().isEmpty()) { anOperation->commit(); updateCommandStatus(); } @@@ -210,18 -221,18 +214,17 @@@ //****************************************************** void XGUI_Workshop::onOperationStarted() { - ModuleBase_PropPanelOperation* aOperation = - (ModuleBase_PropPanelOperation*)(myOperationMgr->currentOperation()); + ModuleBase_Operation* aOperation = myOperationMgr->currentOperation(); - if(!aOperation->xmlRepresentation().isEmpty()) { //!< No need for property panel + if(!aOperation->getDescription()->xmlRepresentation().isEmpty()) { //!< No need for property panel connectWithOperation(aOperation); - QWidget* aPropWidget = myPropertyPanelDock->findChild(XGUI::PROP_PANEL_WDG); - qDeleteAll(aPropWidget->children()); showPropertyPanel(); ModuleBase_WidgetFactory aFactory = ModuleBase_WidgetFactory(aOperation); - aFactory.createWidget(aPropWidget); - setPropertyPannelTitle(aOperation->getDescription()->description()); + aFactory.createWidget(myPropertyPanel->contentWidget()); + myPropertyPanel->setModelWidgets(aFactory.getWrappedWidgets()); - myPropertyPanel->setWindowTitle(aOperation->description()); ++ myPropertyPanel->setWindowTitle(aOperation->getDescription()->description()); } } diff --cc src/XGUI/XGUI_Workshop.h index 7daa43ea1,de7dc670b..0d6c8ff3d --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@@ -20,9 -20,10 +20,11 @@@ class XGUI_SalomeConnector class XGUI_ObjectsBrowser; class XGUI_ActionsMgr; class XGUI_ErrorDialog; + class XGUI_SalomeViewer; + class XGUI_ViewerProxy; +class XGUI_PropertyPanel; + class ModuleBase_Operation; - class ModuleBase_PropPanelOperation; class Config_FeatureMessage; class Config_PointerMessage; @@@ -60,6 -61,12 +62,12 @@@ public //! ! Returns operation manager. XGUI_OperationMgr* operationMgr() const { return myOperationMgr; } + //! ! Returns an actions manager + XGUI_ActionsMgr* actionsMgr() const { return myActionsMgr; }; + + //! Returns property panel widget - QDockWidget* propertyPanel() const { return myPropertyPanelDock; } ++ XGUI_PropertyPanel* propertyPanel() const { return myPropertyPanel; } + //! Creates and adds a new workbench (menu group) with the given name and returns it XGUI_Workbench* addWorkbench(const QString& theName);