1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 * ModuleBase_OperationDescription.h
23 * Created on: Apr 2, 2014
27 #ifndef MODULEBASE_OPERATIONDESCRIPTION_H
28 #define MODULEBASE_OPERATIONDESCRIPTION_H
30 #include <ModuleBase.h>
31 #include <ModuleBase_Operation.h>
39 //class ModuleBase_ModelWidget;
42 * \class ModuleBase_OperationDescription
44 * Description of operation from XML
46 class MODULEBASE_EXPORT ModuleBase_OperationDescription
50 /// \param theId - the operation identifier
51 ModuleBase_OperationDescription(const QString& theId = "");
53 virtual ~ModuleBase_OperationDescription();
55 /// Unique name of the operation
56 /// \return string name of the operation.
57 const QString& operationId() const;
59 /// Returns a short description of operation (will be
60 /// inserted in title of property panel)
61 const QString& description() const;
63 /// Sets a short description of operation (will be
64 /// inserted in title of property panel)
65 void setDescription(const QString& theDescription);
67 /// Returns XML representation of the operation's widget.
68 /// \return XML QString
69 const QString& xmlRepresentation() const;
71 /// Sets XML representation of the operation's widget.
72 /// \param theXMLRepresentation - XML QString
73 void setXmlRepresentation(const QString& theXMLRepresentation);
75 /// Returns true if there are no model widgets
76 /// \return the boolean value
77 bool hasXmlRepresentation() const;
80 //!< Next fields could be extracted into a subclass;
81 /// the operation identifier
82 QString myOperationId;
84 /// the short description of the opertaion
85 QString myDescription;
87 /// the xml definition
88 QString myXmlRepresentation;
91 #endif //ModuleBase_OperationDescription_H