umbrello: umbrello/uml1model/instance.h Source File

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

instance.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 UMLINSTANCE_H
12 #define UMLINSTANCE_H
13
14 #include "umlcanvasobject.h"
15 #include "instanceattribute.h"
16
17 class UMLClassifier;
18 class UMLClassifierListItem;
19
47 class UMLInstance : public UMLCanvasObject
48 {
49 Q_OBJECT
50 public:
51 explicit UMLInstance(const QString& instanceName = QString(),
52 Uml::ID::Type id = Uml::ID::None,
53 UMLClassifier *classifier = nullptr);
54
55 void setClassifier(UMLClassifier *classifier);
56 void setClassifierCmd(UMLClassifier *classifier, bool emitSignal = true);
57 UMLClassifier *classifier();
58
59 virtual void saveToXMI1(QXmlStreamWriter& writer);
60
61 protected:
62 bool load1(QDomElement& element);
63 virtual bool resolveRef();
64 bool showPropertiesDialog(QWidget *parent);
65
66 public slots:
67 void attributeAdded(UMLClassifierListItem*);
68 void attributeRemoved(UMLClassifierListItem*);
69 };
70
71 #endif // UMLINSTANCE_H
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:37
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLInstance
Non-graphical Information for an Instance.
Definition: instance.h:48
UMLInstance::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)
Definition: instance.cpp:107
UMLInstance::setClassifier
void setClassifier(UMLClassifier *classifier)
Definition: instance.cpp:51
UMLInstance::attributeAdded
void attributeAdded(UMLClassifierListItem *)
Definition: instance.cpp:181
UMLInstance::UMLInstance
UMLInstance(const QString &instanceName=QString(), Uml::ID::Type id=Uml::ID::None, UMLClassifier *classifier=nullptr)
Definition: instance.cpp:38
UMLInstance::attributeRemoved
void attributeRemoved(UMLClassifierListItem *)
Definition: instance.cpp:203
UMLInstance::classifier
UMLClassifier * classifier()
Definition: instance.cpp:99
UMLInstance::resolveRef
virtual bool resolveRef()
Definition: instance.cpp:152
UMLInstance::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Definition: instance.cpp:175
UMLInstance::load1
bool load1(QDomElement &element)
Definition: instance.cpp:123
UMLInstance::setClassifierCmd
void setClassifierCmd(UMLClassifier *classifier, bool emitSignal=true)
Definition: instance.cpp:65
instanceattribute.h
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:387
Uml::ID::Type
std::string Type
Definition: basictypes.h:385
umlcanvasobject.h