Salome HOME
Fix for selection with 'N' key and update documentation
[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  * \ingroup GUI\r
27  * Description of operation from XML\r
28  */\r
29 class MODULEBASE_EXPORT ModuleBase_OperationDescription\r
30 {\r
31  public:\r
32   /// Constructor\r
33   /// \param theId - the operation identifier\r
34   ModuleBase_OperationDescription(const QString& theId = "");\r
35   /// Destructor\r
36   virtual ~ModuleBase_OperationDescription();\r
37 \r
38   /// Unique name of the operation\r
39   /// \return string name of the operation.\r
40   const QString& operationId() const;\r
41 \r
42   /// Returns a short description of operation (will be\r
43   /// inserted in title of property panel)\r
44   const QString& description() const;\r
45 \r
46   /// Sets a short description of operation (will be\r
47   /// inserted in title of property panel)\r
48   void setDescription(const QString& theDescription);\r
49 \r
50   /// Returns XML representation of the operation's widget.\r
51   /// \return XML QString\r
52   const QString& xmlRepresentation() const;\r
53 \r
54   /// Sets XML representation of the operation's widget.\r
55   /// \param theXMLRepresentation - XML QString\r
56   void setXmlRepresentation(const QString& theXMLRepresentation);\r
57 \r
58   /// Returns true if there are no model widgets\r
59   /// \return the boolean value\r
60   bool hasXmlRepresentation() const;\r
61 \r
62  private:\r
63   //!< Next fields could be extracted into a subclass;\r
64    /// the operation identifier\r
65   QString myOperationId;  \r
66 \r
67   /// the short description of the opertaion\r
68   QString myDescription;  \r
69 \r
70   /// the xml definition\r
71   QString myXmlRepresentation;  \r
72 };\r
73 \r
74 #endif //ModuleBase_OperationDescription_H\r