X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetMultiSelector.h;h=a456a10dc30f68e4cca4dcea030596e6160fecdf;hb=fc6da0810f1fa783b09e5a41f11dfb43ba9c7e02;hp=d631f35ef09a3c9c2e43bfa0ed401e4231b7885e;hpb=87c2d038fe6feaae3951850cbfb43313015aa1f7;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h index d631f35ef..a456a10dc 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h @@ -11,20 +11,30 @@ #include #include +#include +#include + +#include +#include + #include #include #include +#include class QWidget; -class QTextEdit; +class QListWidget; +class QComboBox; +class ModuleBase_IWorkshop; class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_ModelWidget { Q_OBJECT public: ModuleBase_WidgetMultiSelector(QWidget* theParent, - const Config_WidgetAPI* theData, - const std::string& theParentId); + ModuleBase_IWorkshop* theWorkshop, + const Config_WidgetAPI* theData, + const std::string& theParentId); virtual ~ModuleBase_WidgetMultiSelector(); /// Saves the internal parameters to the given feature @@ -41,11 +51,34 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Model /// \return a control list virtual QList getControls() const; - //public slots: + virtual bool eventFilter(QObject* theObj, QEvent* theEvent); + + public slots: + void activateSelection(bool toActivate); + void onSelectionTypeChanged(); + void onSelectionChanged(); + + protected: + void filterShapes(const NCollection_List& theShapesToFilter, + NCollection_List& theResult); + void setCurrentShapeType(const TopAbs_ShapeEnum theShapeType); private: - QTextEdit* myListControl; + void updateSelectionList(); + + QListWidget* myListControl; + QComboBox* myTypeCombo; QWidget* myMainWidget; + + //TODO: Move into the base of selectors + ModuleBase_IWorkshop* myWorkshop; + + /// If true then local selector has to be activated in context + bool myUseSubShapes; + bool myIsActive; + + typedef QPair GeomSelection; + QList mySelection; }; #endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */