Salome HOME
Copyright update 2022
[modules/shaper.git] / src / ModuleBase / ModuleBase_OperationDescription.cpp
1 // Copyright (C) 2014-2022  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
18 //
19
20 #include <ModuleBase_OperationDescription.h>
21 #include <QString>
22
23 ModuleBase_OperationDescription::ModuleBase_OperationDescription(const QString& theId)
24     : myOperationId(theId)
25 {
26 }
27
28 ModuleBase_OperationDescription::~ModuleBase_OperationDescription()
29 {
30 }
31
32 const QString& ModuleBase_OperationDescription::operationId() const
33 {
34   return myOperationId;
35 }
36
37 const QString& ModuleBase_OperationDescription::description() const
38 {
39   return myDescription;
40 }
41
42 void ModuleBase_OperationDescription::setDescription(const QString& theDescription)
43 {
44   myDescription = theDescription;
45 }
46
47 /*void ModuleBase_OperationDescription::setModelWidgets(const std::string& theXmlRepresentation,
48  const QList<ModuleBase_ModelWidget*>& theWidgets)
49  {
50  myWidgets.clear();
51  QList<ModuleBase_ModelWidget*>::const_iterator anIt = theWidgets.begin(), aLast = theWidgets.end();
52  for (; anIt != aLast; anIt++)
53  myWidgets.push_back(*anIt);
54  myXmlRepresentation = theXmlRepresentation;
55  }*/
56
57 /*const QList<ModuleBase_ModelWidget*>& ModuleBase_OperationDescription::modelWidgets() const
58  {
59  return myWidgets;
60  }*/
61
62 const QString& ModuleBase_OperationDescription::xmlRepresentation() const
63 {
64   return myXmlRepresentation;
65 }
66
67 void ModuleBase_OperationDescription::setXmlRepresentation(const QString& theXMLRepresentation)
68 {
69   myXmlRepresentation = theXMLRepresentation;
70 }
71
72 bool ModuleBase_OperationDescription::hasXmlRepresentation() const
73 {
74   return /*!myWidgets.empty() || */!myXmlRepresentation.isEmpty();
75 }