Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[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
17 #include <memory>
18
19 /*!
20  * \class ModuleBase_OperationDescription
21  *
22  */
23 class MODULEBASE_EXPORT ModuleBase_OperationDescription
24 {
25 public:
26   /// Constructor
27   /// \param theId - the operation identifier
28   ModuleBase_OperationDescription(const QString& theId = "");
29   /// Destructor
30   virtual ~ModuleBase_OperationDescription();
31
32   /// Unique name of the operation
33   /// \return string name of the operation.
34   const QString& operationId() const;
35
36   /// Returns XML representation of the operation's widget.
37   /// \return XML QString
38   const QString& xmlRepresentation() const;
39
40   /// Sets XML representation of the operation's widget.
41   /// \param xmlRepr - XML QString
42   void setXmlRepresentation(const QString& xmlRepr);
43
44   /// Returns a short description of operation (will be
45   /// inserted in title of property panel)
46   const QString& description() const;
47
48   /// Sets a short description of operation (will be
49   /// inserted in title of property panel)
50   void setDescription(const QString& theDescription);
51
52 private:
53   //!< Next fields could be extracted into a subclass;
54   QString myOperationId; /// the operation identifier
55   QString myXmlRepr; /// the XML representation of the operation's widget
56   QString myDescription; /// the short description of the opertaion
57 };
58
59 #endif //ModuleBase_OperationDescription_H