]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModuleBase/ModuleBase_OperationDescription.h
Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationDescription.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
18 //
19
20 /*
21  * ModuleBase_OperationDescription.h
22  *
23  *  Created on: Apr 2, 2014
24  *      Author: sbh
25  */
26
27 #ifndef MODULEBASE_OPERATIONDESCRIPTION_H
28 #define MODULEBASE_OPERATIONDESCRIPTION_H
29
30 #include <ModuleBase.h>
31 #include <ModuleBase_Operation.h>
32
33 #include <QObject>
34 #include <QString>
35 #include <QList>
36
37 #include <memory>
38
39 //class ModuleBase_ModelWidget;
40
41 /*!
42  * \class ModuleBase_OperationDescription
43  * \ingroup GUI
44  * Description of operation from XML
45  */
46 class MODULEBASE_EXPORT ModuleBase_OperationDescription
47 {
48  public:
49   /// Constructor
50   /// \param theId - the operation identifier
51   ModuleBase_OperationDescription(const QString& theId = "");
52   /// Destructor
53   virtual ~ModuleBase_OperationDescription();
54
55   /// Unique name of the operation
56   /// \return string name of the operation.
57   const QString& operationId() const;
58
59   /// Returns a short description of operation (will be
60   /// inserted in title of property panel)
61   const QString& description() const;
62
63   /// Sets a short description of operation (will be
64   /// inserted in title of property panel)
65   void setDescription(const QString& theDescription);
66
67   /// Returns XML representation of the operation's widget.
68   /// \return XML QString
69   const QString& xmlRepresentation() const;
70
71   /// Sets XML representation of the operation's widget.
72   /// \param theXMLRepresentation - XML QString
73   void setXmlRepresentation(const QString& theXMLRepresentation);
74
75   /// Returns true if there are no model widgets
76   /// \return the boolean value
77   bool hasXmlRepresentation() const;
78
79  private:
80   //!< Next fields could be extracted into a subclass;
81    /// the operation identifier
82   QString myOperationId;
83
84   /// the short description of the opertaion
85   QString myDescription;
86
87   /// the xml definition
88   QString myXmlRepresentation;
89 };
90
91 #endif //ModuleBase_OperationDescription_H