X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_WidgetShapeSelector.h;h=7d0a453f6931e4c25646fd6aac9bc739c57e5942;hb=9585dccdd4d56657ced8ef9b25797979ea237f76;hp=5defe3a2e492b6ef677d894515d8eee4433204c4;hpb=b669a9a22a6cde038878f727af42e3f27e52e0d6;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h index 5defe3a2e..7d0a453f6 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h @@ -9,6 +9,7 @@ #include "ModuleBase_ModelWidget.h" #include +#include #include @@ -26,6 +27,8 @@ class MODULEBASE_EXPORT ModuleBase_WidgetShapeSelector : public ModuleBase_Model { Q_OBJECT public: + static TopAbs_ShapeEnum shapeType(const QString& theType); + ModuleBase_WidgetShapeSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop, const Config_WidgetAPI* theData, const std::string& theParentId); @@ -55,7 +58,12 @@ Q_OBJECT return mySelectedObject; } - public slots: + /// Set the given wrapped value to the current widget + /// This value should be processed in the widget according to the needs + /// \param theValue the wrapped widget value + virtual bool setValue(ModuleBase_WidgetValue* theValue); + +public slots: /// Activate or deactivate selection void activateSelection(bool toActivate); @@ -70,8 +78,10 @@ private: void updateSelectionName(); void raisePanel() const; bool isAccepted(const ObjectPtr theObject) const; + bool isAccepted(boost::shared_ptr theShape) const; - static TopAbs_ShapeEnum shapeType(const QString& theType); + // Set the given object as a value of the widget + void setObject(ObjectPtr theObj, boost::shared_ptr theShape = boost::shared_ptr()); QWidget* myContainer; QLabel* myLabel; @@ -81,8 +91,13 @@ private: ModuleBase_IWorkshop* myWorkshop; ObjectPtr mySelectedObject; + boost::shared_ptr myShape; + QStringList myShapeTypes; + /// If true then local selector has to be activated in context + bool myUseSubShapes; + QPalette myBasePalet; QPalette myInactivePalet;