Salome HOME
#1658 New widget supporting nested option buttons
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetMultiSelector.h
index ee15240eddb5c033c2d59421d58b76c04b216c26..5a9382a0dedcee423850054742383f08a9ffdd2a 100755 (executable)
@@ -89,6 +89,10 @@ public slots:
   /// Slot is called on selection type changed
   void onSelectionTypeChanged();
 
+  /// Slot which is called on selection event. Redefined to process XML state about
+  /// clear selection in neutral point
+  virtual void onSelectionChanged();
+
 protected slots:
   /// Slot for copy command in a list pop-up menu
   void onCopyItem();
@@ -105,7 +109,7 @@ protected:
 
   /// Saves the internal parameters to the given feature
   /// \return True in success
-  virtual bool storeValueCustom() const;
+  virtual bool storeValueCustom();
 
   virtual bool restoreValueCustom();
 
@@ -117,10 +121,10 @@ protected:
 
   /// Retunrs a list of possible shape types
   /// \return a list of shapes
-  virtual QIntList getShapeTypes() const;
+  virtual QIntList shapeTypes() const;
 
   /// Set current shape type for selection
-  void setCurrentShapeType(const TopAbs_ShapeEnum theShapeType);
+  void setCurrentShapeType(const int theShapeType);
 
   /// Return the attribute values wrapped in a list of viewer presentations
   /// \return a list of viewer presentations, which contains an attribute result and
@@ -148,7 +152,8 @@ protected:
 
   /// Iterates throgh the model attribute list and remove elements which do not present in the list
   /// \param theValues the wrapped selection values
-  virtual void removeUnusedAttributeObjects(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
+  /// \return true if at least one object is removed
+  virtual bool removeUnusedAttributeObjects(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
 
   /// Converts viewer presentation selection list to objects and shapes map
   /// \param theValues the wrapped selection values
@@ -175,12 +180,17 @@ protected:
   /// Provides correspondance between Result object and its shape
   typedef QPair<ResultPtr, GeomShapePtr> GeomSelection;
 
-  /// An action for pop-up menu in a list control
+  /// A copy action for pop-up menu in a list control
   QAction* myCopyAction;
+
+  /// A delete action for pop-up menu in a list control
   QAction* myDeleteAction;
 
   /// A flag to store use_choice parameter state
   bool myIsUseChoice;
+
+  /// A flag to clear selection by click in empty place in the viewer
+  bool myIsNeutralPointClear;
 };
 
 #endif /* MODULEBASE_WIDGETFILESELECTOR_H_ */