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