umbrello: umbrello/uml1model/instanceattribute.h Source File

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

instanceattribute.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) 2016-2021 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLINSTANCEATTRIBUTE_H
12 #define UMLINSTANCEATTRIBUTE_H
13
14 #include "umlobject.h"
15
16 class UMLInstance;
17 class UMLAttribute;
18
38 class UMLInstanceAttribute : public UMLObject
39 {
40 Q_OBJECT
41 public:
42 UMLInstanceAttribute(UMLInstance *parent,
43 UMLAttribute *umlAttr, const QString& value = QString());
44
45 void setAttribute(UMLAttribute *umlAttr);
46 UMLAttribute *getAttribute() const;
47
48 void setValue(const QString& value);
49 QString getValue() const;
50
51 QString toString();
52
53 virtual void saveToXMI1(QXmlStreamWriter& writer);
54
55 virtual bool showPropertiesDialog(QWidget* parent = 0);
56
57 protected:
58 virtual bool load1(QDomElement &element);
59
60 private:
61 void init();
62 QString m_value;
63 };
64
65 #endif // UMLINSTANCEATTRIBUTE_H
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLInstanceAttribute
Sets up instanceattribute information.
Definition: instanceattribute.h:39
UMLInstanceAttribute::setAttribute
void setAttribute(UMLAttribute *umlAttr)
Definition: instanceattribute.cpp:62
UMLInstanceAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: instanceattribute.cpp:148
UMLInstanceAttribute::setValue
void setValue(const QString &value)
Definition: instanceattribute.cpp:83
UMLInstanceAttribute::init
void init()
UMLInstanceAttribute::init Initialize members of this class.
Definition: instanceattribute.cpp:53
UMLInstanceAttribute::getValue
QString getValue() const
Definition: instanceattribute.cpp:92
UMLInstanceAttribute::getAttribute
UMLAttribute * getAttribute() const
Definition: instanceattribute.cpp:72
UMLInstanceAttribute::m_value
QString m_value
Definition: instanceattribute.h:62
UMLInstanceAttribute::UMLInstanceAttribute
UMLInstanceAttribute(UMLInstance *parent, UMLAttribute *umlAttr, const QString &value=QString())
Definition: instanceattribute.cpp:39
UMLInstanceAttribute::load1
virtual bool load1(QDomElement &element)
Definition: instanceattribute.cpp:123
UMLInstanceAttribute::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: instanceattribute.cpp:110
UMLInstanceAttribute::toString
QString toString()
Definition: instanceattribute.cpp:101
UMLInstance
Non-graphical Information for an Instance.
Definition: instance.h:48
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
umlobject.h