#include <GeomAPI_Shape.h>
#include <TopAbs_ShapeEnum.hxx>
+#include <SelectMgr_ListOfFilter.hxx>
#include <QStringList>
class ModuleBase_IWorkshop;
/**
+* \ingroup GUI
* Implementation of widget for shapes selection.
* This type of widget can be defined in XML file with 'shape_selector' keyword.
* For example:
virtual ~ModuleBase_WidgetShapeSelector();
- /// Saves the internal parameters to the given feature
- virtual bool storeValue() const;
-
virtual bool restoreValue();
- /// Returns the internal parent wiget control, that can be shown anywhere
- /// \returns the widget
- QWidget* getControl() const
- {
- return myContainer;
- }
+ /// Defines if it is supposed that the widget should interact with the viewer.
+ virtual bool isViewerSelector() { return true; }
/// Returns list of widget controls
/// \return a control list
virtual bool setSelection(ModuleBase_ViewerPrs theValue);
- /// The methiod called when widget is activated
- virtual void activate();
-
/// The methiod called when widget is deactivated
virtual void deactivate();
void onSelectionChanged();
protected:
- /// Computes and updates name of selected object in the widget
+ /// Saves the internal parameters to the given feature
+ /// \return True in success
+ virtual bool storeValueCustom() const;
+
+ /// The methiod called when widget is activated
+ virtual void activateCustom();
+
+ /// Computes and updates name of selected object in the widget
void updateSelectionName();
/// Raise panel which contains this widget
/// Clear attribute
void clearAttribute();
+ /// Fills the given list with all widget filters. It can be used by activation widget for the viewer
+ /// or by checking the selection parameter in addition to check validity of the selection argument
+ /// It creates an object type filter if it has not been created yet and save it in the class field
+ /// \param theFilters a list of filter
+ void selectionFilters(SelectMgr_ListOfFilter& theFilters);
+
//----------- Class members -------------
protected:
-
- /// Container of the widget's control
- QWidget* myContainer;
-
/// Label of the widget
QLabel* myLabel;