*/
#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>
#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>
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());
}
}
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;
//! ! 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);