Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / ModuleBase / ModuleBase_PropPanelOperation.h
1 /*
2  * ModuleBase_PropPanelOperation.h
3  *
4  *  Created on: Apr 2, 2014
5  *      Author: sbh
6  */
7
8 #ifndef MODULEBASE_PROPPANELOPERATION_H
9 #define MODULEBASE_PROPPANELOPERATION_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_PropPanelOperation
21  *
22  */
23 class MODULEBASE_EXPORT ModuleBase_PropPanelOperation: public ModuleBase_Operation
24 {
25
26   Q_OBJECT
27
28 public:
29   ModuleBase_PropPanelOperation(const QString& theId = "", QObject* parent = 0);
30   virtual ~ModuleBase_PropPanelOperation();
31
32   /*!
33    *  \brief Returns XML representation of the operation's widget.
34    *  \return XML QString
35    *
36    *  Returns XML representation of the operation's widget.
37    */
38   const QString& xmlRepresentation() const
39   {
40     return myXmlRepr;
41   }
42
43   /*!
44    *  \brief Sets XML representation of the operation's widget.
45    *  \param xmlRepr - XML QString
46    *
47    *  Sets XML representation of the operation's widget.
48    */
49   void setXmlRepresentation(const QString& xmlRepr)
50   {
51     this->myXmlRepr = xmlRepr;
52   }
53
54
55   /*
56    *  Returns a short description of operation (will be
57    *  inserted in title of property panel)
58    */
59   const QString& description() const
60   {
61     return myDescription;
62   }
63
64   /*
65    *  Sets a short description of operation (will be
66    *  inserted in title of property panel)
67    */
68   void setDescription(const QString& theDescription)
69   {
70     this->myDescription = theDescription;
71   }
72
73 private:
74   //!< Next fields could be extracted into a subclass;
75   QString myXmlRepr;
76   QString myDescription;
77 };
78
79 #endif //MODULEBASE_PROPPANELOPERATION_H