#include "PartSet.h"
#include "PartSet_Tools.h"
#include "PartSet_OverconstraintListener.h"
+#include "XGUI_SelectionFilterType.h"
#include "PartSet_SketcherMgr.h"
#include <ModuleBase_IModule.h>
//#include <StdSelect_FaceFilter.hxx>
#include <TopoDS_Shape.hxx>
#include <SelectMgr_ListOfFilter.hxx>
+#include <SelectMgr_Filter.hxx>
#include <QMap>
#include <QMenu>
#include <QObject>
#include <QModelIndex>
-#include <string>
-
+#include <map>
#include <memory>
+#include <string>
class ModuleBase_Operation;
class ModuleBase_IViewWindow;
class PartSet_CustomPrs;
class PartSet_SketcherMgr;
class PartSet_SketcherReentrantMgr;
+class PartSet_RootNode;
class ModelAPI_Result;
class QAction;
virtual void moduleSelectionModes(int theModesType, QIntList& theModes);
/// Appends into container of filters module filters corresponded to the modes type
- /// \param theModesType combination of available selection filters
+ /// \param theFilterTypes container of available selection filters
/// \param theSelectionFilters [out] container to be extend by elements
- virtual void moduleSelectionFilters(int theModesType,
+ virtual void moduleSelectionFilters(const QIntList& theFilterTypes,
SelectMgr_ListOfFilter& theSelectionFilters);
+ /// Returns types of registered module selection filters
+ /// \param theSelectionFilters [out] container of type value
+ virtual QIntList selectionFilters();
+
+ /// Append selection filter into the module and type of the filter in internal container
+ /// \param theFilterType selection filter type
+ /// \param theFilter added filter
+ void registerSelectionFilter(const XGUI_SelectionFilterType theFilterType,
+ const Handle(SelectMgr_Filter)& theFilter);
+
+ /// Returns selection filter
+ /// \param theType selection filter type
+ /// \param theFilter instance of filter
+ virtual Handle(SelectMgr_Filter) selectionFilter(const int theType);
+
/// Returns whether the mouse enter the viewer's window
/// \return true if items are added and there is no necessity to provide standard menu
bool isMouseOverWindow();
/// \param theMessage a message of reentrant operation
virtual void setReentrantPreSelection(const std::shared_ptr<Events_Message>& theMessage);
+ /// Returns root tree node which represents a data model
+ virtual ModuleBase_ITreeNode* rootNode() const;
+
/// Returns the workshop
XGUI_Workshop* getWorkshop() const;
+ /// Reads description of features from XML file
+ virtual void createFeatures();
+
public slots:
/// Slolt called on object display
/// \param theObject a data object
private:
bool myIsOperationIsLaunched; /// state of application between launch and stop operation
- SelectMgr_ListOfFilter mySelectionFilters;
+ std::map<XGUI_SelectionFilterType, Handle(SelectMgr_Filter)> mySelectionFilters;
PartSet_SketcherMgr* mySketchMgr;
PartSet_SketcherReentrantMgr* mySketchReentrantMgr;
/// redisplay and restore it after
PartSet_SketcherMgr::FeatureToSelectionMap myCurrentSelection;
QModelIndex myActivePartIndex;
+
+ PartSet_RootNode* myRoot;
};
#endif