]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
authorsbh <sergey.belash@opencascade.com>
Mon, 5 May 2014 08:58:04 +0000 (12:58 +0400)
committersbh <sergey.belash@opencascade.com>
Mon, 5 May 2014 08:58:04 +0000 (12:58 +0400)
Conflicts:
src/ModuleBase/ModuleBase_WidgetFactory.cpp
src/XGUI/CMakeLists.txt
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

1  2 
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_WidgetFactory.cpp
src/ModuleBase/ModuleBase_WidgetFactory.h
src/XGUI/CMakeLists.txt
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

Simple merge
index 2fcce7cbe53bc3e3898c8f7f7a82c73a22339031,9437d5de6d5f1bf32588b65e32e4606539f0cc16..d89f27de4855c7bf3ef765bd546f33ed05434312
@@@ -6,11 -6,12 +6,14 @@@
   */
  
  #include <ModuleBase_WidgetFactory.h>
 -#include <ModuleBase_WidgetSwitch.h>
 -#include <ModuleBase_OperationDescription.h>
 -
 +#include <ModuleBase_MetaWidget.h>
+ #include <ModuleBase_Operation.h>
++#include <ModuleBase_OperationDescription.h>
 +#include <ModuleBase_PropPanelOperation.h>
  #include <ModuleBase_WidgetPoint2D.h>
 +#include <ModuleBase_WidgetSwitch.h>
 +
  #include <Config_Keywords.h>
  #include <Config_WidgetAPI.h>
  
index 5193be3dbcf01bf874ef7f17d8687c37ddf790e3,3241bfb2f12e7450af0415e5a5ae2a3345cee84e..c5b8ef59881f46a86a6d8b541eda092422cf4dd0
@@@ -45,9 -37,9 +45,9 @@@ protected
  
  private:
    Config_WidgetAPI* myWidgetApi;
-   ModuleBase_PropPanelOperation*   myOperation;
+   ModuleBase_Operation*   myOperation;
  
 -
 +  QList<ModuleBase_IModelWidget*> myWidgets;
  };
  
  #endif /* ModuleBase_WidgetFactory_H_ */
index 4077529979cee04914dfc31c6732d64ff6089aa3,805e7673ab758cfce29f6daa011936bae785d2b5..5a8818935af0283f9e8d86f186663c62dd36a74d
@@@ -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 
Simple merge
index c14efc4ee539c0dd820ee08433404cfb8f6661d1,e07178ec3ae422fd26a930d09a59823d7dd89043..c80c8a7aefc0f02908614c0abc7b7857f0f1b5b6
  #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 <Model_Events.h>
  #include <ModelAPI_PluginManager.h>
  #include <ModelAPI_Feature.h>
  #include <ModelAPI_Data.h>
@@@ -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<const Config_PointerMessage*>(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();
        }
  //******************************************************
  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<QWidget*>(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());
    }
  }
  
index 7daa43ea1a0d1d34b2cc79410a7ce2509f6d186c,de7dc670bb3f5207df99edcb0bb041f589520fd8..0d6c8ff3da9a1a6a34725130e07a7b243e5da08e
@@@ -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; }
  
 -  QDockWidget* propertyPanel() const { return myPropertyPanelDock; }
+   //! ! Returns an actions manager
+   XGUI_ActionsMgr* actionsMgr() const { return myActionsMgr; };
+   //! Returns property panel widget
++  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);