umbrello: umbrello/umlmodel/instance.h Source File

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

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

- File List
- File Members

instance.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2016-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef UMLINSTANCE_H
7#define UMLINSTANCE_H
8
9#include "umlcanvasobject.h"
10#include "instanceattribute.h"
11
12class UMLClassifier;
13class UMLClassifierListItem;
14
42 class UMLInstance : public UMLCanvasObject
43{
44 Q_OBJECT
45public:
46 explicit UMLInstance(const QString& instanceName = QString(),
47 Uml::ID::Type id = Uml::ID::None,
48 UMLClassifier *classifier = nullptr);
49
50 void setClassifier(UMLClassifier *classifier);
51 void setClassifierCmd(UMLClassifier *classifier, bool emitSignal = true);
52 UMLClassifier *classifier() const;
53
54 virtual void saveToXMI(QXmlStreamWriter& writer);
55
56protected:
57 bool load1(QDomElement& element);
58 virtual bool resolveRef();
59 bool showPropertiesDialog(QWidget *parent);
60
61public slots:
62 void attributeAdded(UMLClassifierListItem*);
63 void attributeRemoved(UMLClassifierListItem*);
64};
65
66#endif // UMLINSTANCE_H
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition umlcanvasobject.h:32
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition classifierlistitem.h:25
UMLClassifier
Information for a non-graphical Concept/Class.
Definition classifier.h:35
UMLInstance
Non-graphical Information for an Instance.
Definition instance.h:43
UMLInstance::setClassifier
void setClassifier(UMLClassifier *classifier)
Definition instance.cpp:48
UMLInstance::attributeAdded
void attributeAdded(UMLClassifierListItem *)
Definition instance.cpp:179
UMLInstance::classifier
UMLClassifier * classifier() const
Definition instance.cpp:97
UMLInstance::attributeRemoved
void attributeRemoved(UMLClassifierListItem *)
Definition instance.cpp:201
UMLInstance::resolveRef
virtual bool resolveRef()
Definition instance.cpp:150
UMLInstance::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition instance.cpp:105
UMLInstance::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Definition instance.cpp:173
UMLInstance::load1
bool load1(QDomElement &element)
Definition instance.cpp:121
UMLInstance::setClassifierCmd
void setClassifierCmd(UMLClassifier *classifier, bool emitSignal=true)
Definition instance.cpp:63
instanceattribute.h
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
umlcanvasobject.h