umbrello: umbrello/uml1model/enum.h Source File

umbrello 2.31.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

enum.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 ENUM_H
12 #define ENUM_H
13
14 #include "classifier.h"
15
16 class UMLEnumLiteral;
17
28 class UMLEnum : public UMLClassifier
29 {
30 Q_OBJECT
31 public:
32 explicit UMLEnum(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None);
33
34 virtual ~UMLEnum();
35
36 bool operator==(const UMLEnum& rhs) const;
37
38 virtual void copyInto(UMLObject *lhs) const;
39
40 virtual UMLObject* clone() const;
41
42 UMLObject* createEnumLiteral(const QString& name = QString());
43
44 UMLObject* addEnumLiteral(const QString &name,
45 Uml::ID::Type id = Uml::ID::None,
46 const QString& value = QString());
47
48 bool addEnumLiteral(UMLEnumLiteral* literal, IDChangeLog* Log = 0);
49 bool addEnumLiteral(UMLEnumLiteral* literal, int position);
50
51 int removeEnumLiteral(UMLEnumLiteral* literal);
52
53 int enumLiterals();
54
55 void signalEnumLiteralRemoved(UMLClassifierListItem *elit);
56
57 virtual void saveToXMI1(QDomDocument & qDoc, QDomElement & qElement);
58
59 virtual UMLClassifierListItem* makeChildObject(const QString& xmiTag);
60
61 signals:
62 void enumLiteralAdded(UMLClassifierListItem*);
63 void enumLiteralRemoved(UMLClassifierListItem*);
64
65 protected:
66 bool load1(QDomElement & element);
67
68 private:
69 void init();
70
71 };
72
73 #endif // ENUM_H
74
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:425
UMLEnum::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: enum.cpp:240
UMLEnum::load1
bool load1(QDomElement &element)
Definition: enum.cpp:256
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLCanvasObject::uniqChildName
virtual QString uniqChildName(const UMLObject::ObjectType type, const QString &prefix=QString())
Definition: umlcanvasobject.cpp:180
UMLEnum::enumLiteralAdded
void enumLiteralAdded(UMLClassifierListItem *)
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:370
UMLEnumLiteral
Sets up attribute information.
Definition: enumliteral.h:25
UMLEnum::makeChildObject
virtual UMLClassifierListItem * makeChildObject(const QString &xmiTag)
Definition: enum.cpp:295
UMLObject::emitModified
void emitModified()
Definition: umlobject.cpp:385
Uml::ID::Type
std::string Type
Definition: basictypes.h:368
UMLEnum::operator==
bool operator==(const UMLEnum &rhs) const
Definition: enum.cpp:47
UMLObject
The base class for UML objects.
Definition: umlobject.h:73
UMLEnum::createEnumLiteral
UMLObject * createEnumLiteral(const QString &name=QString())
Definition: enum.cpp:85
UMLEnum::clone
virtual UMLObject * clone() const
Definition: enum.cpp:64
UMLEnum::enumLiterals
int enumLiterals()
Definition: enum.cpp:224
UMLEnum::enumLiteralRemoved
void enumLiteralRemoved(UMLClassifierListItem *)
UMLEnum::init
void init()
Definition: enum.cpp:75
UMLObject::ot_EnumLiteral
@ ot_EnumLiteral
Definition: umlobject.h:94
UMLDoc::signalUMLObjectCreated
void signalUMLObjectCreated(UMLObject *o)
Definition: umldoc.cpp:1983
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
UMLClassifier::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: classifier.cpp:642
IDChangeLog::removeChangeByNewID
void removeChangeByNewID(Uml::ID::Type OldID)
Definition: idchangelog.cpp:124
UMLObject::setStereotypeCmd
void setStereotypeCmd(const QString &_name)
Definition: umlobject.cpp:534
IDChangeLog
Definition: idchangelog.h:26
UMLCanvasObject::operator==
bool operator==(const UMLCanvasObject &rhs) const
Definition: umlcanvasobject.cpp:274
uniqueid.h
UMLEnum::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: enum.cpp:56
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLObject::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlobject.cpp:833
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:844
UMLEnum::removeEnumLiteral
int removeEnumLiteral(UMLEnumLiteral *literal)
Definition: enum.cpp:205
i18n
#define i18n
Definition: main.cpp:39
UMLEnum::UMLEnum
UMLEnum(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: enum.cpp:31
uDebug
#define uDebug()
Definition: debug_utils.h:122
UMLEnumLiteral::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: enumliteral.cpp:151
UMLObject::modified
void modified()
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
UMLDoc
Definition: umldoc.h:74
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:88
UMLCanvasObject::findChildObject
virtual UMLObject * findChildObject(const QString &n, UMLObject::ObjectType t=UMLObject::ot_UMLObject)
Definition: umlcanvasobject.cpp:238
UniqueID::gen
Uml::ID::Type gen()
Definition: uniqueid.cpp:34
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3548
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:26
UMLEnum::signalEnumLiteralRemoved
void signalEnumLiteralRemoved(UMLClassifierListItem *elit)
Definition: enum.cpp:232
classifier.h
UMLObject::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &element)
Definition: umlobject.cpp:954
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:88
uml.h
enumliteral.h
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
debug_utils.h
UMLEnum::~UMLEnum
virtual ~UMLEnum()
Definition: enum.cpp:39
UMLEnum::addEnumLiteral
UMLObject * addEnumLiteral(const QString &name, Uml::ID::Type id=Uml::ID::None, const QString &value=QString())
Definition: enum.cpp:132
idchangelog.h
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:29
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:28
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1055
umldoc.h
enum.h