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