]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModuleBase/ModuleBase_OperationDescription.h
Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationDescription.h
1 /*
2  * ModuleBase_OperationDescription.h
3  *
4  *  Created on: Apr 2, 2014
5  *      Author: sbh
6  */
7
8 #ifndef MODULEBASE_OPERATIONDESCRIPTION_H
9 #define MODULEBASE_OPERATIONDESCRIPTION_H
10
11 #include <ModuleBase.h>
12 #include <ModuleBase_Operation.h>
13
14 #include <QObject>
15 #include <QString>
16 #include <QList>
17
18 #include <memory>
19
20 //class ModuleBase_ModelWidget;
21
22 /*!
23  * \class ModuleBase_OperationDescription
24  *
25  */
26 class MODULEBASE_EXPORT ModuleBase_OperationDescription
27 {
28 public:
29   /// Constructor
30   /// \param theId - the operation identifier
31   ModuleBase_OperationDescription(const QString& theId = "");
32   /// Destructor
33   virtual ~ModuleBase_OperationDescription();
34
35   /// Unique name of the operation
36   /// \return string name of the operation.
37   const QString& operationId() const;
38
39   /// Returns XML representation of the operation's widget.
40   /// \return XML QString
41   //const QString& xmlRepresentation() const;
42
43   /// Returns a short description of operation (will be
44   /// inserted in title of property panel)
45   const QString& description() const;
46
47   /// Sets a short description of operation (will be
48   /// inserted in title of property panel)
49   void setDescription(const QString& theDescription);
50
51   /// Sets a list of model widgets, according to the operation feature xml definition
52   /// \param theWidgets a list of widgets
53   //void setModelWidgets(const std::string& theXmlRepresentation,
54   //                     const QList<ModuleBase_ModelWidget*>& theWidgets);
55
56   /// Sets a list of model widgets, according to the operation feature xml definition
57   /// \param theWidgets a list of widgets
58   //const QList<ModuleBase_ModelWidget*>& modelWidgets() const;
59
60    /// Returns XML representation of the operation's widget.
61    /// \return XML QString
62   const QString& xmlRepresentation() const;
63
64   /// Sets XML representation of the operation's widget.
65   /// \param theXMLRepresentation - XML QString
66   void setXmlRepresentation(const QString& theXMLRepresentation);
67
68   /// Returns true if there are no model widgets
69   /// \return the boolean value
70   bool hasXmlRepresentation() const;
71
72 private:
73   //!< Next fields could be extracted into a subclass;
74   QString myOperationId; /// the operation identifier
75   QString myDescription; /// the short description of the opertaion
76   QString myXmlRepresentation; /// the xml definition
77   //QList<ModuleBase_ModelWidget*> myWidgets; /// the list of operation widgets
78 };
79
80 #endif //ModuleBase_OperationDescription_H