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