Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom.git into Dev_0.7.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  * Description of operation from XML\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 a short description of operation (will be\r
42   /// inserted in title of property panel)\r
43   const QString& description() const;\r
44 \r
45   /// Sets a short description of operation (will be\r
46   /// inserted in title of property panel)\r
47   void setDescription(const QString& theDescription);\r
48 \r
49   /// Returns XML representation of the operation's widget.\r
50   /// \return XML QString\r
51   const QString& xmlRepresentation() const;\r
52 \r
53   /// Sets XML representation of the operation's widget.\r
54   /// \param theXMLRepresentation - XML QString\r
55   void setXmlRepresentation(const QString& theXMLRepresentation);\r
56 \r
57   /// Returns true if there are no model widgets\r
58   /// \return the boolean value\r
59   bool hasXmlRepresentation() const;\r
60 \r
61  private:\r
62   //!< Next fields could be extracted into a subclass;\r
63    /// the operation identifier\r
64   QString myOperationId;  \r
65 \r
66   /// the short description of the opertaion\r
67   QString myDescription;  \r
68 \r
69   /// the xml definition\r
70   QString myXmlRepresentation;  \r
71 };\r
72 \r
73 #endif //ModuleBase_OperationDescription_H\r