Salome HOME
Updated copyright comment
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationDescription.h
1 // Copyright (C) 2014-2024  CEA, EDF
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
18 //
19
20 #ifndef MODULEBASE_OPERATIONDESCRIPTION_H
21 #define MODULEBASE_OPERATIONDESCRIPTION_H
22
23 #include <ModuleBase.h>
24 #include <ModuleBase_Operation.h>
25
26 #include <QObject>
27 #include <QString>
28 #include <QList>
29
30 #include <memory>
31
32 //class ModuleBase_ModelWidget;
33
34 /*!
35  * \class ModuleBase_OperationDescription
36  * \ingroup GUI
37  * Description of operation from XML
38  */
39 class MODULEBASE_EXPORT ModuleBase_OperationDescription
40 {
41  public:
42   /// Constructor
43   /// \param theId - the operation identifier
44   ModuleBase_OperationDescription(const QString& theId = "");
45   /// Destructor
46   virtual ~ModuleBase_OperationDescription();
47
48   /// Unique name of the operation
49   /// \return string name of the operation.
50   const QString& operationId() const;
51
52   /// Returns a short description of operation (will be
53   /// inserted in title of property panel)
54   const QString& description() const;
55
56   /// Sets a short description of operation (will be
57   /// inserted in title of property panel)
58   void setDescription(const QString& theDescription);
59
60   /// Returns XML representation of the operation's widget.
61   /// \return XML QString
62   const QString& xmlRepresentation() const;
63
64   /// Sets XML representation of the operation's widget.
65   /// \param theXMLRepresentation - XML QString
66   void setXmlRepresentation(const QString& theXMLRepresentation);
67
68   /// Returns true if there are no model widgets
69   /// \return the boolean value
70   bool hasXmlRepresentation() const;
71
72  private:
73   //!< Next fields could be extracted into a subclass;
74    /// the operation identifier
75   QString myOperationId;
76
77   /// the short description of the opertaion
78   QString myDescription;
79
80   /// the xml definition
81   QString myXmlRepresentation;
82 };
83
84 #endif //ModuleBase_OperationDescription_H