2 * ModuleBase_OperationDescription.h
4 * Created on: Apr 2, 2014
8 #ifndef MODULEBASE_OPERATIONDESCRIPTION_H
9 #define MODULEBASE_OPERATIONDESCRIPTION_H
11 #include <ModuleBase.h>
12 #include <ModuleBase_Operation.h>
20 class ModuleBase_ModelWidget;
23 * \class ModuleBase_OperationDescription
26 class MODULEBASE_EXPORT ModuleBase_OperationDescription
30 /// \param theId - the operation identifier
31 ModuleBase_OperationDescription(const QString& theId = "");
33 virtual ~ModuleBase_OperationDescription();
35 /// Unique name of the operation
36 /// \return string name of the operation.
37 const QString& operationId() const;
39 /// Returns XML representation of the operation's widget.
40 /// \return XML QString
41 //const QString& xmlRepresentation() const;
43 /// Returns a short description of operation (will be
44 /// inserted in title of property panel)
45 const QString& description() const;
47 /// Sets a short description of operation (will be
48 /// inserted in title of property panel)
49 void setDescription(const QString& theDescription);
51 /// Sets a list of model widgets, according to the operation feature xml definition
52 /// \param theWidgets a list of widgets
53 void setModelWidgets(const std::string& theXmlRepresentation,
54 const QList<ModuleBase_ModelWidget*>& theWidgets);
56 /// Sets a list of model widgets, according to the operation feature xml definition
57 /// \param theWidgets a list of widgets
58 const QList<ModuleBase_ModelWidget*>& modelWidgets() const;
60 /// Returns true if there are no model widgets
61 /// \return the boolean value
62 bool hasXmlRepresentation() const;
65 //!< Next fields could be extracted into a subclass;
66 QString myOperationId; /// the operation identifier
67 QString myDescription; /// the short description of the opertaion
68 std::string myXmlRepresentation; /// the xml definition
69 QList<ModuleBase_ModelWidget*> myWidgets; /// the list of operation widgets
72 #endif //ModuleBase_OperationDescription_H