umbrello  2.32.3
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
enumliteral.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This program is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU General Public License as published by *
4  * the Free Software Foundation; either version 2 of the License, or *
5  * (at your option) any later version. *
6  * *
7  * copyright (C) 2003-2020 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef ENUMLITERAL_H
12 #define ENUMLITERAL_H
13 
14 #include "classifierlistitem.h"
15 
26 {
27 public:
28  UMLEnumLiteral(UMLObject* parent,
29  const QString& name, Uml::ID::Type id = Uml::ID::None,
30  const QString& v = QString());
31  explicit UMLEnumLiteral(UMLObject* parent);
32 
33  bool operator==(const UMLEnumLiteral &rhs) const;
34 
35  virtual void copyInto(UMLObject *lhs) const;
36 
37  virtual UMLObject* clone() const;
38 
39  virtual ~UMLEnumLiteral();
40 
41  QString value() const;
42  void setValue(const QString &v);
43 
44  QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false);
45 
46  virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
47 
48  virtual bool showPropertiesDialog(QWidget* parent = 0);
49 
50 protected:
51  bool load1(QDomElement& element);
52 
59  QString m_Value;
60 
61 };
62 
63 #endif
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
Sets up attribute information.
Definition: enumliteral.h:26
virtual UMLObject * clone() const
Definition: enumliteral.cpp:120
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: enumliteral.cpp:131
void setValue(const QString &v)
Definition: enumliteral.cpp:65
bool operator==(const UMLEnumLiteral &rhs) const
Definition: enumliteral.cpp:94
virtual void copyInto(UMLObject *lhs) const
Definition: enumliteral.cpp:109
UMLEnumLiteral(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None, const QString &v=QString())
Definition: enumliteral.cpp:24
virtual ~UMLEnumLiteral()
Definition: enumliteral.cpp:46
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: enumliteral.cpp:79
QString value() const
Definition: enumliteral.cpp:55
bool load1(QDomElement &element)
Definition: enumliteral.cpp:142
QString m_Value
Definition: enumliteral.h:59
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: enumliteral.cpp:151
The base class for UML objects.
Definition: umlobject.h:74
QString name() const
Definition: umlobject.cpp:211
std::vector< std::string > v
Definition: cxx11-initializer-lists.h:19
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
std::string Type
Definition: basictypes.h:351
Enum
Definition: basictypes.h:162
@ NoSig
Definition: basictypes.h:163