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