umbrello 26.03.70-1a62d36 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

umlentityattribute.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef ENTITYATTRIBUTE_H
7#define ENTITYATTRIBUTE_H
8
9#include "umlattribute.h"
10#include "basictypes.h"
11
20 class UMLEntityAttribute : public UMLAttribute
21{
22 Q_OBJECT
23 Q_ENUMS(DBIndex_Type)
24 public:
25 enum DBIndex_Type
26 {
27 None = 1100,
28 Primary,
29 Index,
30 Unique
31 };
32
33 UMLEntityAttribute(UMLObject* parent, const QString& name,
34 Uml::ID::Type id = Uml::ID::None,
35 Uml::Visibility::Enum s = Uml::Visibility::Private,
36 UMLObject *type = nullptr, const QString& iv = QString());
37 explicit UMLEntityAttribute(UMLObject* parent);
38 virtual ~UMLEntityAttribute();
39
40 bool operator==(const UMLEntityAttribute& rhs) const;
41
42 virtual void copyInto(UMLObject *lhs) const;
43
44 virtual UMLObject* clone() const;
45
46 void setAttributes(const QString& attributes);
47 QString getAttributes() const;
48
49 void setIndexType(const DBIndex_Type indexType);
50 DBIndex_Type indexType() const;
51
52 void setValues(const QString& values);
53 QString getValues() const;
54
55 void setAutoIncrement(const bool autoIncrement);
56 bool getAutoIncrement() const;
57
58 void setNull(const bool null);
59 bool getNull() const;
60
61 QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig,
62 bool withStereotype=false) const;
63
64 virtual void saveToXMI(QXmlStreamWriter& writer);
65
66 virtual bool showPropertiesDialog(QWidget *parent = nullptr);
67
68 protected:
69 void init();
70
71 bool load1(QDomElement& element);
72
73 private:
74 DBIndex_Type m_indexType;
75 QString m_values;
76 QString m_attributes;
77 bool m_autoIncrement;
78 bool m_null;
79};
80
81#endif
basictypes.h
UMLAttribute
Sets up attribute information.
Definition: umlattribute.h:23
UMLEntityAttribute
Sets up entityattribute information.
Definition: umlentityattribute.h:21
UMLEntityAttribute::~UMLEntityAttribute
virtual ~UMLEntityAttribute()
Definition: umlentityattribute.cpp:51
UMLEntityAttribute::m_attributes
QString m_attributes
Definition: umlentityattribute.h:76
UMLEntityAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=nullptr)
Definition: umlentityattribute.cpp:270
UMLEntityAttribute::load1
bool load1(QDomElement &element)
Definition: umlentityattribute.cpp:254
UMLEntityAttribute::setValues
void setValues(const QString &values)
Definition: umlentityattribute.cpp:98
UMLEntityAttribute::init
void init()
Definition: umlentityattribute.cpp:59
UMLEntityAttribute::setAutoIncrement
void setAutoIncrement(const bool autoIncrement)
Definition: umlentityattribute.cpp:116
UMLEntityAttribute::setAttributes
void setAttributes(const QString &attributes)
Definition: umlentityattribute.cpp:80
UMLEntityAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: umlentityattribute.cpp:204
UMLEntityAttribute::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: umlentityattribute.cpp:232
UMLEntityAttribute::getAutoIncrement
bool getAutoIncrement() const
Definition: umlentityattribute.cpp:107
UMLEntityAttribute::setNull
void setNull(const bool null)
Definition: umlentityattribute.cpp:152
UMLEntityAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false) const
Definition: umlentityattribute.cpp:162
UMLEntityAttribute::getValues
QString getValues() const
Definition: umlentityattribute.cpp:89
UMLEntityAttribute::m_values
QString m_values
Definition: umlentityattribute.h:75
UMLEntityAttribute::indexType
DBIndex_Type indexType() const
Definition: umlentityattribute.cpp:125
UMLEntityAttribute::m_null
bool m_null
Definition: umlentityattribute.h:78
UMLEntityAttribute::m_autoIncrement
bool m_autoIncrement
Definition: umlentityattribute.h:77
UMLEntityAttribute::m_indexType
DBIndex_Type m_indexType
Definition: umlentityattribute.h:74
UMLEntityAttribute::operator==
bool operator==(const UMLEntityAttribute &rhs) const
Definition: umlentityattribute.cpp:184
UMLEntityAttribute::DBIndex_Type
DBIndex_Type
Definition: umlentityattribute.h:26
UMLEntityAttribute::Index
@ Index
Definition: umlentityattribute.h:29
UMLEntityAttribute::None
@ None
Definition: umlentityattribute.h:27
UMLEntityAttribute::Unique
@ Unique
Definition: umlentityattribute.h:30
UMLEntityAttribute::Primary
@ Primary
Definition: umlentityattribute.h:28
UMLEntityAttribute::setIndexType
void setIndexType(const DBIndex_Type indexType)
Definition: umlentityattribute.cpp:134
UMLEntityAttribute::getAttributes
QString getAttributes() const
Definition: umlentityattribute.cpp:71
UMLEntityAttribute::clone
virtual UMLObject * clone() const
Definition: umlentityattribute.cpp:221
UMLEntityAttribute::getNull
bool getNull() const
Definition: umlentityattribute.cpp:143
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::name
QString name() const
Definition: umlobject.cpp:207
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:373
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:160
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:161
Uml::Visibility::Enum
Enum
Definition: basictypes.h:45
Uml::Visibility::Private
@ Private
Definition: basictypes.h:47
umlattribute.h