umbrello: umbrello/uml1model/entityattribute.h Source File

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

entityattribute.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) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef ENTITYATTRIBUTE_H
12 #define ENTITYATTRIBUTE_H
13
14 #include "attribute.h"
15 #include "basictypes.h"
16
25 class UMLEntityAttribute : public UMLAttribute
26 {
27 Q_OBJECT
28 Q_ENUMS(DBIndex_Type)
29 public:
30 enum DBIndex_Type
31 {
32 None = 1100,
33 Primary,
34 Index,
35 Unique
36 };
37
38 UMLEntityAttribute(UMLObject* parent, const QString& name,
39 Uml::ID::Type id = Uml::ID::None,
40 Uml::Visibility::Enum s = Uml::Visibility::Private,
41 UMLObject *type = 0, const QString& iv = QString());
42 explicit UMLEntityAttribute(UMLObject* parent);
43 virtual ~UMLEntityAttribute();
44
45 bool operator==(const UMLEntityAttribute& rhs) const;
46
47 virtual void copyInto(UMLObject *lhs) const;
48
49 virtual UMLObject* clone() const;
50
51 void setAttributes(const QString& attributes);
52 QString getAttributes() const;
53
54 void setIndexType(const DBIndex_Type indexType);
55 DBIndex_Type indexType() const;
56
57 void setValues(const QString& values);
58 QString getValues() const;
59
60 void setAutoIncrement(const bool autoIncrement);
61 bool getAutoIncrement() const;
62
63 void setNull(const bool null);
64 bool getNull() const;
65
66 QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false);
67
68 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
69
70 virtual bool showPropertiesDialog(QWidget* parent = 0);
71
72 protected:
73 void init();
74
75 bool load1(QDomElement& element);
76
77 private:
78 DBIndex_Type m_indexType;
79 QString m_values;
80 QString m_attributes;
81 bool m_autoIncrement;
82 bool m_null;
83 };
84
85 #endif
attribute.h
basictypes.h
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLEntityAttribute
Sets up entityattribute information.
Definition: entityattribute.h:26
UMLEntityAttribute::~UMLEntityAttribute
virtual ~UMLEntityAttribute()
Definition: entityattribute.cpp:55
UMLEntityAttribute::m_attributes
QString m_attributes
Definition: entityattribute.h:80
UMLEntityAttribute::load1
bool load1(QDomElement &element)
Definition: entityattribute.cpp:257
UMLEntityAttribute::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: entityattribute.cpp:236
UMLEntityAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: entityattribute.cpp:273
UMLEntityAttribute::setValues
void setValues(const QString &values)
Definition: entityattribute.cpp:102
UMLEntityAttribute::init
void init()
Definition: entityattribute.cpp:63
UMLEntityAttribute::setAutoIncrement
void setAutoIncrement(const bool autoIncrement)
Definition: entityattribute.cpp:120
UMLEntityAttribute::setAttributes
void setAttributes(const QString &attributes)
Definition: entityattribute.cpp:84
UMLEntityAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: entityattribute.cpp:208
UMLEntityAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: entityattribute.cpp:166
UMLEntityAttribute::getAutoIncrement
bool getAutoIncrement() const
Definition: entityattribute.cpp:111
UMLEntityAttribute::setNull
void setNull(const bool null)
Definition: entityattribute.cpp:156
UMLEntityAttribute::getValues
QString getValues() const
Definition: entityattribute.cpp:93
UMLEntityAttribute::m_values
QString m_values
Definition: entityattribute.h:79
UMLEntityAttribute::indexType
DBIndex_Type indexType() const
Definition: entityattribute.cpp:129
UMLEntityAttribute::m_null
bool m_null
Definition: entityattribute.h:82
UMLEntityAttribute::m_autoIncrement
bool m_autoIncrement
Definition: entityattribute.h:81
UMLEntityAttribute::m_indexType
DBIndex_Type m_indexType
Definition: entityattribute.h:78
UMLEntityAttribute::operator==
bool operator==(const UMLEntityAttribute &rhs) const
Definition: entityattribute.cpp:188
UMLEntityAttribute::DBIndex_Type
DBIndex_Type
Definition: entityattribute.h:31
UMLEntityAttribute::Index
@ Index
Definition: entityattribute.h:34
UMLEntityAttribute::None
@ None
Definition: entityattribute.h:32
UMLEntityAttribute::Unique
@ Unique
Definition: entityattribute.h:35
UMLEntityAttribute::Primary
@ Primary
Definition: entityattribute.h:33
UMLEntityAttribute::setIndexType
void setIndexType(const DBIndex_Type indexType)
Definition: entityattribute.cpp:138
UMLEntityAttribute::getAttributes
QString getAttributes() const
Definition: entityattribute.cpp:75
UMLEntityAttribute::clone
virtual UMLObject * clone() const
Definition: entityattribute.cpp:225
UMLEntityAttribute::UMLEntityAttribute
UMLEntityAttribute(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None, Uml::Visibility::Enum s=Uml::Visibility::Private, UMLObject *type=0, const QString &iv=QString())
Definition: entityattribute.cpp:34
UMLEntityAttribute::getNull
bool getNull() const
Definition: entityattribute.cpp:147
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:162
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:163
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61