The initial implementation.
ADD_SUBDIRECTORY (src/ModuleBase)
ADD_SUBDIRECTORY (src/PartSet)
ADD_SUBDIRECTORY (src/PartSetPlugin)
+ADD_SUBDIRECTORY (src/SketchPlugin)
ADD_SUBDIRECTORY (src/PyConsole)
ADD_SUBDIRECTORY (src/PyEvent)
ADD_SUBDIRECTORY (src/PyInterp)
SET(XML_RESOURCES
plugin-PartSet.xml
+ plugin-Sketch.xml
plugins.xml
)
--- /dev/null
+<plugin>
+ <workbench id="Sketch">
+ <group id="Basic">
+ <feature id="Sketch" text="New sketch" tooltip="Create a new sketch or edit an existing sketch" icon=":icons/sketch.png"/>
+ </group>
+ <group id="Operations">
+ <feature id="Point" text="New point" tooltip="Create a new point" icon=":icons/point.png">
+ <doublevalue id="x" label="X:" min="0" max="" step="0.1" default="0"
+ icon=":pictures/x_point.png" tooltip="Set X"/>
+ <doublevalue id="y" label="Y:" min="0" max="" step="0.1" default="1"
+ icon=":pictures/y_point.png" tooltip="Set Y"/>
+ <doublevalue id="z" label="Z:" min="0" max="10" step="0.1" default="2"
+ icon=":pictures/z_point.png" tooltip="Set Z"/>
+ </feature>
+ <feature id="Line" text="New line" tooltip="Create a new line" icon=":icons/line.png"/>
+ </group>
+ </workbench>
+</plugin>
<plugins module="PartSet">
<plugin library="PartSetPlugin" configuration="plugin-PartSet.xml"/>
+ <plugin library="SketchPlugin" configuration="plugin-Sketch.xml"/>
</plugins>
static const std::string CONSTRUCTIONS_GROUP = "Construction";
/// Group of parts
static const std::string PARTS_GROUP = "Parts";
+/// Group of sketches
+static const std::string SKETCHS_GROUP = "Sketchs";
/**\class Model_Document
* \ingroup DataModel
return myOperationId;
}
+std::shared_ptr<ModelAPI_Feature> ModuleBase_Operation::feature() const
+{
+ return myFeature;
+}
+
/*!
* \brief Gets state of operation
* \return Value from OperationState enumeration
enum OperationState
{
Waiting, //!< Operation is not used (it is not run or suspended)
- Running, //!< Operation is started
+ Running //!< Operation is started
};
/*!
// Operation processing.
virtual QString operationId() const;
+ std::shared_ptr<ModelAPI_Feature> feature() const;
+
OperationState state() const;
bool isRunning() const;
virtual bool isValid(ModuleBase_Operation* theOtherOp) const;
INCLUDE(Common)
+INCLUDE(FindCAS)
+
SET(CMAKE_AUTOMOC ON)
SET(PROJECT_HEADERS
PartSet.h
PartSet_Module.h
+ PartSet_OperationSketchBase.h
+ PartSet_OperationSketch.h
)
SET(PROJECT_SOURCES
PartSet_Module.cpp
+ PartSet_OperationSketchBase.cpp
+ PartSet_OperationSketch.cpp
)
SET(PROJECT_RESOURCES
ModuleBase
Config
${QT_LIBRARIES}
+ ${CAS_KERNEL}
)
SET(PROJECT_AUTOMOC
${CMAKE_SOURCE_DIR}/src/Config
${CMAKE_SOURCE_DIR}/src/Event
${CMAKE_SOURCE_DIR}/src/ModuleBase
+ ${CMAKE_SOURCE_DIR}/src/ModelAPI
+ ${CMAKE_SOURCE_DIR}/src/SketchPlugin
+ ${CAS_INCLUDE_DIRS}
)
-ADD_DEFINITIONS(-DPARTSET_EXPORTS)
+ADD_DEFINITIONS(-DPARTSET_EXPORTS ${CAS_DEFINITIONS})
ADD_LIBRARY(PartSet SHARED
${PROJECT_SOURCES}
${PROJECT_HEADERS}
)
# The Qt5Widgets_LIBRARIES variable also includes QtGui and QtCore
-TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES})
+TARGET_LINK_LIBRARIES(PartSet ${PROJECT_LIBRARIES} XGUI ModelAPI SketchPlugin)
ADD_DEPENDENCIES(PartSet ModuleBase)
#include <PartSet_Module.h>
-#include <ModuleBase_PropPanelOperation.h>
+#include <PartSet_OperationSketch.h>
+
+#include <ModuleBase_Operation.h>
+
+#include <XGUI_MainWindow.h>
+#include <XGUI_Displayer.h>
#include <Config_PointerMessage.h>
#include <Config_ModuleReader.h>
//TODO(sbh): Implement static method to extract event id [SEID]
static Event_ID aModuleEvent = Event_Loop::eventByName("PartSetModuleEvent");
Config_PointerMessage aMessage(aModuleEvent, this);
- ModuleBase_PropPanelOperation* aPartSetOp = new ModuleBase_PropPanelOperation(aCmdId, this);
+ ModuleBase_PropPanelOperation* aPartSetOp;
+ if (aCmdId == "Sketch" )
+ aPartSetOp = new PartSet_OperationSketch(aCmdId, this);
+ else
+ aPartSetOp = new ModuleBase_PropPanelOperation(aCmdId, this);
+
+ PartSet_OperationSketchBase* aPreviewOp = dynamic_cast<PartSet_OperationSketchBase*>(aPartSetOp);
+ if (aPreviewOp)
+ connect(aPreviewOp, SIGNAL(visualizePreview()), this, SLOT(onVisualizePreview()));
+
aPartSetOp->setXmlRepresentation(QString::fromStdString(aXmlCfg));
aPartSetOp->setDescription(QString::fromStdString(aDescription));
aMessage.setPointer(aPartSetOp);
Event_Loop::loop()->send(aMessage);
}
+
+void PartSet_Module::onVisualizePreview()
+{
+ ModuleBase_Operation* anOperation = myWorkshop->currentOperation();
+ if (!anOperation)
+ return;
+
+ PartSet_OperationSketchBase* aPreviewOp = dynamic_cast<PartSet_OperationSketchBase*>(anOperation);
+ if (!aPreviewOp)
+ return;
+
+ myWorkshop->displayer()->Display(anOperation->feature(), aPreviewOp->preview());
+}
public slots:
void onFeatureTriggered();
+ void onVisualizePreview();
private:
XGUI_Workshop* myWorkshop;
--- /dev/null
+#include <PartSet_OperationSketch.h>
+
+#include <SketchPlugin_Feature.h>
+
+#ifdef _DEBUG
+#include <QDebug>
+#endif
+
+using namespace std;
+
+PartSet_OperationSketch::PartSet_OperationSketch(const QString& theId,
+ QObject* theParent)
+: PartSet_OperationSketchBase(theId, theParent)
+{
+}
+
+/*!
+ * \brief Destructor
+ */
+PartSet_OperationSketch::~PartSet_OperationSketch()
+{
+}
--- /dev/null
+#ifndef PartSet_OperationSketch_H
+#define PartSet_OperationSketch_H
+
+#include "PartSet.h"
+
+#include <PartSet_OperationSketchBase.h>
+#include <QObject>
+
+/*!
+ \class PartSet_OperationSketch
+ * \brief The operation for the sketch creation
+ *
+ * Base class for all operations. If you perform an action it is reasonable to create
+*/
+class PARTSET_EXPORT PartSet_OperationSketch : public PartSet_OperationSketchBase
+{
+Q_OBJECT
+public:
+ PartSet_OperationSketch(const QString& theId, QObject* theParent);
+ virtual ~PartSet_OperationSketch();
+};
+
+#endif
--- /dev/null
+#include <PartSet_OperationSketchBase.h>
+
+#include <SketchPlugin_Feature.h>
+
+#ifdef _DEBUG
+#include <QDebug>
+#endif
+
+using namespace std;
+
+/*!
+ \brief Constructor
+ \param theId an feature index
+ \param theParent the object parent
+ */
+PartSet_OperationSketchBase::PartSet_OperationSketchBase(const QString& theId,
+ QObject* theParent)
+: ModuleBase_PropPanelOperation(theId, theParent)
+{
+}
+
+/*!
+ * \brief Destructor
+ */
+PartSet_OperationSketchBase::~PartSet_OperationSketchBase()
+{
+}
+
+/**
+ * Returns the feature preview shape
+ */
+const TopoDS_Shape& PartSet_OperationSketchBase::preview() const
+{
+ shared_ptr<SketchPlugin_Feature> aFeature = dynamic_pointer_cast<SketchPlugin_Feature>(feature());
+ return aFeature->preview();
+}
+
+/*!
+ * Perform the operation start and emit signal about visualization of the operation preview
+ */
+void PartSet_OperationSketchBase::startOperation()
+{
+ ModuleBase_PropPanelOperation::startOperation();
+
+ emit visualizePreview();
+}
--- /dev/null
+#ifndef PartSet_OperationSketchBase_H
+#define PartSet_OperationSketchBase_H
+
+#include "PartSet.h"
+
+#include <TopoDS_Shape.hxx>
+
+#include <ModuleBase_PropPanelOperation.h>
+#include <QObject>
+
+/*!
+ \class PartSet_OperationSketchBase
+ * \brief The base operation for the sketch features.
+ *
+ * Base class for all sketch operations. It provides an access to the feature preview
+*/
+class PARTSET_EXPORT PartSet_OperationSketchBase : public ModuleBase_PropPanelOperation
+{
+Q_OBJECT
+public:
+ PartSet_OperationSketchBase(const QString& theId, QObject* theParent);
+ virtual ~PartSet_OperationSketchBase();
+
+ const TopoDS_Shape& preview() const;
+
+signals:
+ void visualizePreview();
+
+protected:
+ virtual void startOperation();
+};
+
+#endif
<file>icons/revol.png</file>
<file>icons/common.png</file>
<file>icons/import.png</file>
+ <file>icons/line.png</file>
+ <file>icons/sketch.png</file>
</qresource>
</RCC>
--- /dev/null
+INCLUDE(Common)
+INCLUDE(FindCAS)
+
+SET(PROJECT_HEADERS
+ SketchPlugin.h
+ SketchPlugin_Feature.h
+ SketchPlugin_Plugin.h
+ SketchPlugin_Sketch.h
+)
+
+SET(PROJECT_SOURCES
+ SketchPlugin_Feature.cpp
+ SketchPlugin_Plugin.cpp
+ SketchPlugin_Sketch.cpp
+)
+
+SET(PROJECT_LIBRARIES
+ ${CAS_KERNEL}
+ ${CAS_MODELER}
+)
+
+ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS ${BOOST_DEFINITIONS} ${CAS_DEFINITIONS})
+ADD_LIBRARY(SketchPlugin SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES} ModelAPI)
+
+INCLUDE_DIRECTORIES(
+ ${CAS_INCLUDE_DIRS}
+ ../ModelAPI
+)
+
+INSTALL(TARGETS SketchPlugin DESTINATION plugins)
--- /dev/null
+#ifndef SKETCHPLUGIN_H
+#define SKETCHPLUGIN_H
+
+#if defined SKETCHPLUGIN_EXPORTS
+#if defined WIN32
+#define SKETCHPLUGIN_EXPORT __declspec( dllexport )
+#else
+#define SKETCHPLUGIN_EXPORT
+#endif
+#else
+#if defined WIN32
+#define SKETCHPLUGIN_EXPORT __declspec( dllimport )
+#else
+#define SKETCHPLUGIN_EXPORT
+#endif
+#endif
+
+#endif
--- /dev/null
+#include "SketchPlugin_Feature.h"
+
+/**
+ * Returns the sketch preview
+ */
+const TopoDS_Shape& SketchPlugin_Feature::preview()
+{
+ return myPreview;
+}
+
+/**
+ * Set the shape to the internal preview field
+ * \param theShape a preview shape
+ */
+void SketchPlugin_Feature::setPreview(const TopoDS_Shape& theShape)
+{
+ myPreview = theShape;
+}
--- /dev/null
+// File: SketchPlugin_Feature.h
+// Created: 27 Mar 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef SketchPlugin_Feature_HeaderFile
+#define SketchPlugin_Feature_HeaderFile
+
+#include "SketchPlugin.h"
+#include <ModelAPI_Feature.h>
+
+#include "TopoDS_Shape.hxx"
+
+/**\class SketchPlugin_Feature
+ * \ingroup DataModel
+ * \brief Feature for creation of the new part in PartSet.
+ */
+class SketchPlugin_Feature: public ModelAPI_Feature
+{
+public:
+ SKETCHPLUGIN_EXPORT virtual const TopoDS_Shape& preview() = 0;
+
+protected:
+ void setPreview(const TopoDS_Shape& theShape); ///< the preview shape
+
+private:
+ TopoDS_Shape myPreview; ///< the preview shape
+};
+
+#endif
--- /dev/null
+#include "SketchPlugin_Plugin.h"
+#include "SketchPlugin_Sketch.h"
+#include <ModelAPI_PluginManager.h>
+#include <ModelAPI_Document.h>
+
+using namespace std;
+
+// the only created instance of this plugin
+static SketchPlugin_Plugin* MY_INSTANCE = new SketchPlugin_Plugin();
+
+SketchPlugin_Plugin::SketchPlugin_Plugin()
+{
+ // register this plugin
+ ModelAPI_PluginManager::get()->registerPlugin(this);
+}
+
+shared_ptr<ModelAPI_Feature> SketchPlugin_Plugin::createFeature(string theFeatureID)
+{
+ if (theFeatureID == "Sketch") {
+ return shared_ptr<ModelAPI_Feature>(new SketchPlugin_Sketch);
+ }
+ /*else if (theFeatureID == "Point") {
+ return shared_ptr<ModelAPI_Feature>(new SketchPlugin_Point);
+ }*/
+ // feature of such kind is not found
+ return shared_ptr<ModelAPI_Feature>();
+}
--- /dev/null
+// File: SketchPlugin_Plugin.hxx
+// Created: 31 Mar 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef SketchPlugin_Plugin_HeaderFile
+#define SketchPlugin_Plugin_HeaderFile
+
+
+#include "SketchPlugin.h"
+#include "ModelAPI_Plugin.h"
+
+class SKETCHPLUGIN_EXPORT SketchPlugin_Plugin: public ModelAPI_Plugin
+{
+public:
+ /// Creates the feature object of this plugin by the feature string ID
+ virtual std::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID);
+
+public:
+ /// Is needed for python wrapping by swig
+ SketchPlugin_Plugin();
+};
+
+#endif
--- /dev/null
+// File: SketchPlugin_Sketch.cxx
+// Created: 27 Mar 2014
+// Author: Mikhail PONIKAROV
+
+#include "SketchPlugin_Sketch.h"
+#include "ModelAPI_Data.h"
+#include "ModelAPI_AttributeDocRef.h"
+
+using namespace std;
+#include <gp_Pln.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Vec.hxx>
+
+#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
+
+#include <BRep_Tool.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+
+const double PLANE_U_MIN = -100;
+const double PLANE_U_MAX = 100;
+const double PLANE_V_MIN = -100;
+const double PLANE_V_MAX = 100;
+
+SketchPlugin_Sketch::SketchPlugin_Sketch()
+{
+}
+
+void SketchPlugin_Sketch::initAttributes()
+{
+ data()->addAttribute(PART_ATTR_DOC_REF, ModelAPI_AttributeDocRef::type());
+}
+
+void SketchPlugin_Sketch::execute()
+{
+ shared_ptr<ModelAPI_AttributeDocRef> aDocRef = data()->docRef(PART_ATTR_DOC_REF);
+ if (!aDocRef->value()) { // create a document if not yet created
+ shared_ptr<ModelAPI_Document> aPartSetDoc = ModelAPI_PluginManager::get()->rootDocument();
+ aDocRef->setValue(aPartSetDoc->subDocument(data()->getName()));
+ }
+}
+
+shared_ptr<ModelAPI_Document> SketchPlugin_Sketch::documentToAdd() {
+ return ModelAPI_PluginManager::get()->rootDocument();
+}
+
+const TopoDS_Shape& SketchPlugin_Sketch::preview()
+{
+ if (SketchPlugin_Feature::preview().IsNull())
+ {
+ gp_Pnt anOrigin(0, 0, 0);
+ gp_Dir aDir(gp_Vec(gp_Pnt(0,0,0), gp_Pnt(1,0,0)));
+ gp_Pln aPlane(anOrigin, aDir);
+ BRepBuilderAPI_MakeFace aFaceBuilder(aPlane, PLANE_U_MIN, PLANE_U_MAX, PLANE_V_MIN,
+ PLANE_V_MAX);
+ setPreview(aFaceBuilder.Face());
+ }
+ return SketchPlugin_Feature::preview();
+}
--- /dev/null
+// File: SketchPlugin_Sketch.h
+// Created: 27 Mar 2014
+// Author: Mikhail PONIKAROV
+
+#ifndef SketchPlugin_Sketch_HeaderFile
+#define SketchPlugin_Sketch_HeaderFile
+
+#include "SketchPlugin.h"
+#include <SketchPlugin_Feature.h>
+
+#include <TopoDS_Shape.hxx>
+
+/// part reference attribute
+const std::string PART_ATTR_DOC_REF = "SketchDocument";
+
+/**\class SketchPlugin_Sketch
+ * \ingroup DataModel
+ * \brief Feature for creation of the new part in PartSet.
+ */
+class SketchPlugin_Sketch: public SketchPlugin_Feature
+{
+public:
+ /// Returns the kind of a feature
+ SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
+ {static std::string MY_KIND = "Sketch"; return MY_KIND;}
+
+ /// Returns to which group in the document must be added feature
+ SKETCHPLUGIN_EXPORT virtual const std::string& getGroup()
+ {static std::string MY_GROUP = "Sketchs"; return MY_GROUP;}
+
+ /// Creates a new part document if needed
+ SKETCHPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ SKETCHPLUGIN_EXPORT virtual void initAttributes();
+
+ SKETCHPLUGIN_EXPORT virtual std::shared_ptr<ModelAPI_Document> documentToAdd();
+
+ /// Returns the sketch preview
+ SKETCHPLUGIN_EXPORT virtual const TopoDS_Shape& preview();
+
+ /// Use plugin manager for features creation
+ SketchPlugin_Sketch();
+};
+
+#endif
SET(PROJECT_HEADERS
XGUI.h
XGUI_Command.h
+ XGUI_Displayer.h
XGUI_MainMenu.h
XGUI_MainWindow.h
XGUI_MenuGroupPanel.h
SET(PROJECT_SOURCES
XGUI_Command.cpp
+ XGUI_Displayer.cpp
XGUI_MainMenu.cpp
XGUI_MainWindow.cpp
XGUI_MenuGroupPanel.cpp
--- /dev/null
+#include "XGUI_Displayer.h"
+#include "XGUI_Tools.h"
+#include "XGUI_Viewer.h"
+
+#include <ModelAPI_Document.h>
+
+#include <AIS_InteractiveContext.hxx>
+#include <AIS_Shape.hxx>
+
+/*!
+ \brief Constructor
+ */
+XGUI_Displayer::XGUI_Displayer(XGUI_Viewer* theViewer)
+: myViewer(theViewer)
+{
+}
+
+/*!
+ \brief Destructor
+ */
+XGUI_Displayer::~XGUI_Displayer()
+{
+}
+
+/*!
+ * Display the feature
+ * \param theFeature a feature instance
+ */
+void XGUI_Displayer::Display(std::shared_ptr<ModelAPI_Feature> theFeature)
+{
+}
+
+/*!
+ * Display the feature and a shape. This shape would be associated to the given feature
+ * \param theFeature a feature instance
+ * \param theFeature a shape
+ */
+void XGUI_Displayer::Display(std::shared_ptr<ModelAPI_Feature> theFeature,
+ const TopoDS_Shape& theShape)
+{
+ Handle(AIS_InteractiveContext) aContext = myViewer->AISContext();
+
+ Handle(AIS_Shape) anAIS = new AIS_Shape(theShape);
+ aContext->Display(anAIS, Standard_False);
+
+ aContext->UpdateCurrentViewer();
+}
--- /dev/null
+#ifndef XGUI_Displayer_H
+#define XGUI_Displayer_H
+
+#include "XGUI.h"
+
+#include <QString>
+
+#include <TopoDS_Shape.hxx>
+
+class XGUI_Viewer;
+class ModelAPI_Feature;
+
+/**\class XGUI_Displayer
+ * \ingroup GUI
+ * \brief Displayer. Provides mechanizm of displa/erase of objects in viewer
+ */
+class XGUI_EXPORT XGUI_Displayer
+{
+public:
+ XGUI_Displayer(XGUI_Viewer* theViewer);
+ virtual ~XGUI_Displayer();
+
+ void Display(std::shared_ptr<ModelAPI_Feature> theFeature);
+
+ void Display(std::shared_ptr<ModelAPI_Feature> theFeature, const TopoDS_Shape& theShape);
+
+protected:
+ XGUI_Viewer* myViewer; ///< the viewer
+};
+
+#endif
#include <Prs3d_LineAspect.hxx>
#include <V3d_View.hxx>
#include <Visual3d_View.hxx>
+#include <AIS_ListOfInteractive.hxx>
+
+#include <QMouseEvent>
#ifdef WIN32
#include <WNT_Window.hxx>
this, SIGNAL(tryCloseView(XGUI_ViewWindow*)));
connect(aWindow, SIGNAL(mousePressed(XGUI_ViewWindow*, QMouseEvent*)),
- this, SIGNAL(mousePress(XGUI_ViewWindow*, QMouseEvent*)));
+ this, SLOT(onMousePressed(XGUI_ViewWindow*, QMouseEvent*)));
connect(aWindow, SIGNAL(mouseReleased(XGUI_ViewWindow*, QMouseEvent*)),
this, SIGNAL(mouseRelease(XGUI_ViewWindow*, QMouseEvent*)));
// connect(aWindow, SIGNAL(contextMenuRequested( QContextMenuEvent* )),
// this, SLOT (onContextMenuRequested( QContextMenuEvent* )));
+ connect(aWindow, SIGNAL(mouseMoving(XGUI_ViewWindow*, QMouseEvent*)),
+ this, SLOT(onMouseMove(XGUI_ViewWindow*, QMouseEvent*)));
+
+ connect(aWindow, SIGNAL(mouseReleased(XGUI_ViewWindow*, QMouseEvent*)),
+ this, SLOT(onMouseReleased(XGUI_ViewWindow*, QMouseEvent*)));
+
myViews.append(theView);
}
}
}
}
+
+/*!
+ SLOT: called on mouse move, processes hilighting
+*/
+void XGUI_Viewer::onMouseMove(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent)
+{
+ XGUI_ViewPort* aViewPort = theWindow->viewPort();
+ Handle(V3d_View) aView3d = aViewPort->getView();
+
+ if ( !aView3d.IsNull() )
+ myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView3d);
+}
+
+/*!
+ SLOT: called on mouse button release, finishes selection
+*/
+void XGUI_Viewer::onMouseReleased(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent)
+{
+ myAISContext->Select();
+
+ emit selectionChanged();
+}
void keyPress(XGUI_ViewWindow* theWindow, QKeyEvent* theEvent);
void keyRelease(XGUI_ViewWindow* theWindow, QKeyEvent* theEvent);
void activated(XGUI_ViewWindow* theWindow);
+ void selectionChanged();
public slots:
void onWindowMinimized(QMdiSubWindow*);
private slots:
void onViewClosed(QMdiSubWindow*);
+ void onMouseMove(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent);
+ void onMouseReleased(XGUI_ViewWindow* theWindow, QMouseEvent* theEvent);
private:
void addView(QMdiSubWindow* theView);
#include "XGUI_WidgetFactory.h"
#include "XGUI_SelectionMgr.h"
#include "XGUI_ObjectsBrowser.h"
+#include "XGUI_Displayer.h"
#include <ModelAPI_PluginManager.h>
#include <ModelAPI_Feature.h>
#include <Event_Loop.h>
#include <ModuleBase_PropPanelOperation.h>
+#include <ModuleBase_Operation.h>
#include <Config_FeatureMessage.h>
#include <Config_PointerMessage.h>
{
myMainWindow = new XGUI_MainWindow();
mySelector = new XGUI_SelectionMgr(this);
+ myDisplayer = new XGUI_Displayer(myMainWindow->viewer());
}
//******************************************************
class XGUI_Module;
class XGUI_Workbench;
class XGUI_SelectionMgr;
+class XGUI_Displayer;
class ModuleBase_Operation;
class ModuleBase_PropPanelOperation;
//! Returns selection manager object
XGUI_SelectionMgr* selector() const { return mySelector; }
+ //! Returns displayer
+ XGUI_Displayer* displayer() const { return myDisplayer; }
+
//! Creates and adds a new workbench (menu group) with the given name and returns it
XGUI_Workbench* addWorkbench(const QString& theName);
+ //! Returns the current operation or NULL
+ ModuleBase_Operation* currentOperation() { return myCurrentOperation; }
+
//! Redefinition of Event_Listener method
virtual void processEvent(const Event_Message* theMessage);
XGUI_Module* myPartSetModule;
XGUI_SelectionMgr* mySelector;
+ XGUI_Displayer* myDisplayer;
ModuleBase_Operation* myCurrentOperation;
};