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

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

- File List
- File Members

umlinstance.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 "umlinstanceattribute.h"
11
12 class UMLClassifier;
13 class UMLClassifierListItem;
14
42 class UMLInstance : public UMLCanvasObject
43{
44 Q_OBJECT
45 public:
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
56 protected:
57 bool load1(QDomElement& element);
58 virtual bool resolveRef();
59 bool showPropertiesDialog(QWidget *parent);
60
61 public Q_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
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: umlclassifier.h:35
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: umlclassifierlistitem.h:25
UMLInstance
Non-graphical Information for an Instance.
Definition: umlinstance.h:43
UMLInstance::setClassifier
void setClassifier(UMLClassifier *classifier)
Definition: umlinstance.cpp:47
UMLInstance::attributeAdded
void attributeAdded(UMLClassifierListItem *)
Definition: umlinstance.cpp:178
UMLInstance::classifier
UMLClassifier * classifier() const
Definition: umlinstance.cpp:96
UMLInstance::attributeRemoved
void attributeRemoved(UMLClassifierListItem *)
Definition: umlinstance.cpp:200
UMLInstance::resolveRef
virtual bool resolveRef()
Definition: umlinstance.cpp:149
UMLInstance::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: umlinstance.cpp:104
UMLInstance::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Definition: umlinstance.cpp:172
UMLInstance::load1
bool load1(QDomElement &element)
Definition: umlinstance.cpp:120
UMLInstance::setClassifierCmd
void setClassifierCmd(UMLClassifier *classifier, bool emitSignal=true)
Definition: umlinstance.cpp:62
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
umlinstanceattribute.h