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
UMLEntityAttribute::None
@ None
Definition: entityattribute.h:32
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLEntityAttribute::Primary
@ Primary
Definition: entityattribute.h:33
UMLEntityAttribute::setNull
void setNull(const bool null)
Definition: entityattribute.cpp:156
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
UMLAttribute::load1
bool load1(QDomElement &element)
Definition: attribute.cpp:281
UMLEntityAttribute::m_autoIncrement
bool m_autoIncrement
Definition: entityattribute.h:81
UMLEntityAttribute::setAttributes
void setAttributes(const QString &attributes)
Definition: entityattribute.cpp:84
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:112
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
UMLObject::m_SecondaryId
QString m_SecondaryId
Definition: umlobject.h:286
object_factory.h
Uml::SignatureType::SigNoVis
@ SigNoVis
Definition: basictypes.h:165
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
UMLEntityAttribute::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: entityattribute.cpp:236
umlentityattributedialog.h
UMLObject::umlParent
UMLObject * umlParent() const
Definition: umlobject.cpp:671
UMLObject::m_visibility
Uml::Visibility::Enum m_visibility
objects visibility
Definition: umlobject.h:277
UMLAttribute::m_InitialValue
QString m_InitialValue
text for the attribute's initial value.
Definition: attribute.h:75
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
UMLEntityAttribute::m_values
QString m_values
Definition: entityattribute.h:79
UMLEntityAttributeDialog
Definition: umlentityattributedialog.h:32
UMLEntityAttribute::getAttributes
QString getAttributes() const
Definition: entityattribute.cpp:75
UMLEntityAttribute::~UMLEntityAttribute
virtual ~UMLEntityAttribute()
Definition: entityattribute.cpp:55
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLEntityAttribute::operator==
bool operator==(const UMLEntityAttribute &rhs) const
Definition: entityattribute.cpp:188
UMLAttribute::m_ParmKind
Uml::ParameterDirection::Enum m_ParmKind
Definition: attribute.h:76
UMLObject::asUMLEntityAttribute
UMLEntityAttribute * asUMLEntityAttribute()
Definition: umlobject.cpp:1314
UMLEntityAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: entityattribute.cpp:208
UMLObject::m_pSecondary
QPointer< UMLObject > m_pSecondary
Definition: umlobject.h:282
UMLEntityAttribute::DBIndex_Type
DBIndex_Type
Definition: entityattribute.h:31
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
UMLEntityAttribute::getValues
QString getValues() const
Definition: entityattribute.cpp:93
UMLEntityAttribute::getNull
bool getNull() const
Definition: entityattribute.cpp:147
entityattribute.h
UMLEntityAttribute::init
void init()
Definition: entityattribute.cpp:63
attribute.h
Uml::Visibility::toString
QString toString(Enum item, bool mnemonic)
Definition: basictypes.cpp:107
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:845
UMLEntityAttribute::getAutoIncrement
bool getAutoIncrement() const
Definition: entityattribute.cpp:111
UMLEntityAttribute::m_attributes
QString m_attributes
Definition: entityattribute.h:80
UMLObject::ot_EntityAttribute
@ ot_EntityAttribute
Definition: umlobject.h:102
basictypes.h
UMLEntityAttribute::setValues
void setValues(const QString &values)
Definition: entityattribute.cpp:102
uDebug
#define uDebug()
Definition: debug_utils.h:122
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:162
UMLEntityAttribute::setAutoIncrement
void setAutoIncrement(const bool autoIncrement)
Definition: entityattribute.cpp:120
UMLEntityAttribute::m_indexType
DBIndex_Type m_indexType
Definition: entityattribute.h:78
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLEntityAttribute::setIndexType
void setIndexType(const DBIndex_Type indexType)
Definition: entityattribute.cpp:138
UMLEntityAttribute::Index
@ Index
Definition: entityattribute.h:34
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
uml.h
Uml::SignatureType::ShowSig
@ ShowSig
Definition: basictypes.h:164
debug_utils.h
UMLEntityAttribute::m_null
bool m_null
Definition: entityattribute.h:82
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:163
UMLEntityAttribute::Unique
@ Unique
Definition: entityattribute.h:35
UMLEntityAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: entityattribute.cpp:166
UMLEntityAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: entityattribute.cpp:273
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61
UMLEntityAttribute
Sets up entityattribute information.
Definition: entityattribute.h:26
UMLEntityAttribute::load1
bool load1(QDomElement &element)
Definition: entityattribute.cpp:257
umldoc.h
UMLClassifierListItem::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: classifierlistitem.cpp:75
UMLEntityAttribute::clone
virtual UMLObject * clone() const
Definition: entityattribute.cpp:225
UMLEntityAttribute::indexType
DBIndex_Type indexType() const
Definition: entityattribute.cpp:129