Salome HOME
Code documentation update
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 26 Jan 2015 13:07:38 +0000 (16:07 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 26 Jan 2015 13:07:38 +0000 (16:07 +0300)
doc/doxyfile.in
src/ModuleBase/ModuleBase_FilterMulti.h
src/ModuleBase/ModuleBase_SelectionValidator.h
src/ModuleBase/ModuleBase_WidgetDoubleValue.h
src/ModuleBase/ModuleBase_WidgetShapeSelector.h
src/XGUI/XGUI_Displayer.h
src/XGUI/XGUI_Selection.h

index 5ca8b8a0da0f20053acf404b0197392b5437b56f..c44dbe6f01411a6fd6d061215e4326bb7af707fc 100644 (file)
@@ -861,7 +861,7 @@ VERBATIM_HEADERS       = YES
 # of all compounds will be generated. Enable this if the project
 # contains a lot of classes, structs, unions or interfaces.
 
-ALPHABETICAL_INDEX     = NO
+ALPHABETICAL_INDEX     = YES
 
 # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
 # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
index e7ba0f175d37c99e1de47b3cb12879abad756467..2d5b7edaad3e9c31b5f4257a68ac50963e3d8715 100644 (file)
@@ -13,6 +13,9 @@
 
 #include <StdSelect_TypeOfFace.hxx>
 
+/**
+* An implementation of filter which support using of several filters according to OR statement
+*/
 class ModuleBase_FilterMulti: public ModuleBase_Filter
 {
   /**
index 180d59936a37308129a606c3f15429a1d883ec5e..4863146bcd644d75c9e6fe92c23daa869b95c714 100644 (file)
 #include <list>
 #include <string>
 
+/**
+* \class A validator of selection
+*/
 class ModuleBase_SelectionValidator : public ModelAPI_Validator
 {
  public:
+   /// \fn Returns True if selection is valid
+   /// \param theSelection selection instance
   virtual bool isValid(const ModuleBase_ISelection* theSelection) const = 0;
+
+   /// \fn Returns True if selection is valid
+   /// \param theSelection selection instance
+   /// \param theArguments list of arguments
   virtual bool isValid(const ModuleBase_ISelection* theSelection,
                        const std::list<std::string>& theArguments) const
   {
index 5c1ef4bb9f84e3923a386d52fbe78e3b9f0d0e4a..d956662a5d9e77c2609307081d2f294153b1c038 100644 (file)
@@ -19,7 +19,9 @@ class QTimer;
 /**
 * A class of property panel widget for double value input
 * It can be defined with "doublevalue" keyword. For example:
-* "<doublevalue id="x" label="X:" icon=":pictures/x_point.png" tooltip="X coordinate"/>"
+* \code
+* <doublevalue id="x" label="X:" icon=":pictures/x_point.png" tooltip="X coordinate"/>
+* \endcode
 */
 class MODULEBASE_EXPORT ModuleBase_WidgetDoubleValue : public ModuleBase_ModelWidget
 {
index 7757d3141070cc520073ac17c7d3a7e7f4d971cd..755714ffdfdd04fcc509a5bc8914eba30a00d8e6 100644 (file)
@@ -25,12 +25,46 @@ class QLineEdit;
 class QToolButton;
 class ModuleBase_IWorkshop;
 
+/**
+* Implementation of widget for shapes selection.
+* This type of widget can be defined in XML file with 'shape_selector' keyword.
+* For example:
+* \code
+*   <shape_selector id="main_object" 
+*    label="Main object" 
+*    icon=":icons/cut_shape.png" 
+*    tooltip="Select an object solid"
+*    shape_types="solid shell"
+*    concealment="true"
+*  />
+* \endcode
+* It can use following parameters:
+* - id - name of object attribute
+* - label - content of widget's label
+* - icon - icon which can be used instead label
+* - tooltip - the witget's tooltip text
+* - shape_types - list of shape types for selection. 
+*       Possible values: face, vertex, wire, edge, shell, solid
+* - object_types - types of selectable objects. 
+*       For today it supports only one type "construction" 
+*        which corresponds to ModelAPI_ResultConstruction object type
+* - concealment - hide or not hide selected object after operation
+*/
 class MODULEBASE_EXPORT ModuleBase_WidgetShapeSelector : public ModuleBase_ModelWidget
 {
 Q_OBJECT
  public:
+
+   /// Converts string value (name of shape type) to shape enum value
+   /// \param theType - string with shape type name
+   /// \return TopAbs_ShapeEnum value
   static TopAbs_ShapeEnum shapeType(const QString& theType);
 
+  /// Constructor
+  /// \param theParent the parent object
+  /// \param theWorkshop instance of workshop interface
+  /// \param theData the widget configuation. The attribute of the model widget is obtained from
+  /// \param theParentId is Id of a parent of the current attribute
   ModuleBase_WidgetShapeSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
                             const Config_WidgetAPI* theData, const std::string& theParentId);
 
@@ -52,6 +86,7 @@ Q_OBJECT
   /// \return a control list
   virtual QList<QWidget*> getControls() const;
 
+  /// Returns currently selected data object
   ObjectPtr selectedFeature() const
   {
     return mySelectedObject;
@@ -76,29 +111,34 @@ Q_OBJECT
   void activateSelection(bool toActivate);
 
  private slots:
+   /// Slot which is called on selection event
   void onSelectionChanged();
 
  protected:
+   /// Computes and updates name of selected object in the widget
   void updateSelectionName();
-  void raisePanel() const;
 
-  /// Returns true if shape of given object corresponds to requested shape type
-  /// This method is called only in non sub-shapes selection mode
-  //virtual bool acceptObjectShape(const ObjectPtr theObject) const;
+  /// Raise panel which contains this widget
+  void raisePanel() const;
 
   /// Returns true if selected shape corresponds to requested shape types
-  /// This method is called only in sub-shapes selection mode
+  /// \param theShape a shape
   virtual bool acceptSubShape(std::shared_ptr<GeomAPI_Shape> theShape) const;
 
   /// Returns true if selected object corresponds to requested Object type
   /// Thid method is used in any selection mode
+  /// \param theObject an object 
   virtual bool acceptObjectType(const ObjectPtr theObject) const;
 
 
   // Set the given object as a value of the widget
+  /// \param theObj an object 
+  /// \param theShape a shape
   void setObject(ObjectPtr theObj, std::shared_ptr<GeomAPI_Shape> theShape = std::shared_ptr<GeomAPI_Shape>());
 
   /// Check the selected with validators if installed
+  /// \param theObj the object for checking
+  /// \param theShape the shape for checking
   virtual bool isValid(ObjectPtr theObj, std::shared_ptr<GeomAPI_Shape> theShape);
 
   /// Clear attribute
@@ -106,20 +146,35 @@ Q_OBJECT
 
   //----------- Class members -------------
  protected:
+
+   /// Container of the widget's control
   QWidget* myContainer;
+
+  /// Label of the widget
   QLabel* myLabel;
+
+  /// Input control of the widget
   QLineEdit* myTextLine;
 
+  /// Reference to workshop
   ModuleBase_IWorkshop* myWorkshop;
 
+  /// Pointer to selected object
   ObjectPtr mySelectedObject;
-  std::shared_ptr<GeomAPI_Shape> myShape;
 
+  /// Pointer to selected shape
+  GeomShapePtr myShape;
+
+  /// List of accepting shapes types
   QStringList myShapeTypes;
+
+  /// List of accepting object types
   QStringList myObjectTypes;
 
+  /// Active/inactive flag
   bool myIsActive;
 
+  /// Filter by objects types
   Handle(ModuleBase_ObjectTypesFilter) myObjTypeFilter;
 };
 
index 75f424311721f4573a9f8535fe50b70e80a5a66d..09a880ecf0221e25cddb3ff9271bf71dc05d2e40 100644 (file)
@@ -35,11 +35,14 @@ class XGUI_Workshop;
 class XGUI_EXPORT XGUI_Displayer
 {
  public:
-   /// Enumeration of possible display mode
+   /// \enum display mode
    enum DisplayMode { 
-     NoMode = -1, /// Mode is not defined
-     Wireframe,   /// Wireframe display mode
-     Shading      /// Shading display mode
+     /// Mode is not defined
+     NoMode = -1, 
+     /// Wireframe display mode
+     Wireframe, 
+     /// Shading display mode
+     Shading      
    };
 
   /// Constructor
index 5dcd44ee157adbb11a40f159d0425ab29682efd0..5c3eb4a41309299f28ba1b538dc54e750b50385f 100644 (file)
 
 class XGUI_Workshop;
 
+/**
+* Implementation of \ref ModuleBase_ISelection interface.
+*/
 class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection
 {
  public:
+   /// Constructor
+   /// \param theWorkshop reference to workshop instance
   XGUI_Selection(XGUI_Workshop* theWorkshop);
 
   /// Returns a list of viewer selected presentations