umbrello 2.32.3 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-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLINSTANCE_H
12 #define UMLINSTANCE_H
13
14 #include "classifier.h"
15
26 class UMLInstance : public UMLClassifier
27 {
28 public:
29 explicit UMLInstance(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None);
30
31 void setClassifierName(const QString &name);
32 QString classifierName();
33
34 void setClassifier(UMLClassifier *classifier);
35 void setClassifierCmd(UMLClassifier *classifier);
36 UMLClassifier *classifier();
37
38 virtual UMLAttribute* createAttribute(const QString &name = QString(),
39 UMLObject *type = 0, Uml::Visibility::Enum vis = Uml::Visibility::Private,
40 const QString &init = QString());
41
42 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
43
44
45 protected:
46 bool load1(QDomElement& element);
47 virtual bool resolveRef();
48 bool showPropertiesDialog(QWidget *parent);
49
50 QPointer<UMLClassifier> m_classifier;
51 };
52
53 #endif // UMLINSTANCE_H
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1309
instance.h
UMLInstance::setClassifierCmd
void setClassifierCmd(UMLClassifier *classifier)
Definition: instance.cpp:88
instanceattribute.h
UMLInstance
Non-graphical Information for an Instance.
Definition: instance.h:27
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLInstance::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: instance.cpp:147
UMLCanvasObject::uniqChildName
virtual QString uniqChildName(const UMLObject::ObjectType type, const QString &prefix=QString())
Definition: umlcanvasobject.cpp:180
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
Object_Factory::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &n, UMLPackage *parentPkg, bool solicitNewName)
Definition: object_factory.cpp:203
UMLInstance::classifierName
QString classifierName()
Definition: instance.cpp:65
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
UniqueID::init
void init()
Definition: uniqueid.cpp:37
UMLObject::m_SecondaryId
QString m_SecondaryId
Definition: umlobject.h:286
object_factory.h
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
UMLObject::emitModified
void emitModified()
Definition: umlobject.cpp:385
cmds.h
UMLInstanceAttributeDialog
Definition: umlinstanceattributedialog.h:23
UMLClassifier::resolveRef
virtual bool resolveRef()
Definition: classifier.cpp:691
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
ClassPropertiesDialog
Definition: classpropertiesdialog.h:35
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::ot_InstanceAttribute
@ ot_InstanceAttribute
Definition: umlobject.h:110
UMLInstance::setClassifierName
void setClassifierName(const QString &name)
Definition: instance.cpp:50
UMLObject::m_pSecondary
QPointer< UMLObject > m_pSecondary
Definition: umlobject.h:282
UMLDoc::signalUMLObjectCreated
void signalUMLObjectCreated(UMLObject *o)
Definition: umldoc.cpp:1985
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
Uml::CmdRenameUMLInstanceType
Definition: cmdrenameumlinstancetype.h:25
uniqueid.h
UMLObject::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: umlobject.cpp:834
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:845
i18n
#define i18n
Definition: main.cpp:39
UMLInstance::classifier
UMLClassifier * classifier()
Definition: instance.cpp:97
UMLObject::ot_Instance
@ ot_Instance
Definition: umlobject.h:90
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
UMLDoc
Definition: umldoc.h:75
UMLInstance::m_classifier
QPointer< UMLClassifier > m_classifier
Definition: instance.h:50
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:80
UMLInstance::UMLInstance
UMLInstance(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: instance.cpp:34
UMLCanvasObject::findChildObject
virtual UMLObject * findChildObject(const QString &n, UMLObject::ObjectType t=UMLObject::ot_UMLObject)
Definition: umlcanvasobject.cpp:238
UniqueID::gen
Uml::ID::Type gen()
Definition: uniqueid.cpp:26
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3582
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
UMLInstance::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Definition: instance.cpp:211
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:27
UMLInstance::setClassifier
void setClassifier(UMLClassifier *classifier)
Definition: instance.cpp:74
classifier.h
UMLObject::loadFromXMI1
virtual bool loadFromXMI1(QDomElement &element)
Definition: umlobject.cpp:955
UMLInstance::load1
bool load1(QDomElement &element)
Definition: instance.cpp:163
uml.h
UMLInstanceAttribute
Sets up instanceattribute information.
Definition: instanceattribute.h:26
MultiPageDialogBase::exec
int exec()
Definition: multipagedialogbase.cpp:223
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
classpropertiesdialog.h
UMLObject::init
void init()
Definition: umlobject.cpp:126
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61
UMLInstance::resolveRef
virtual bool resolveRef()
Definition: instance.cpp:192
umlinstanceattributedialog.h
UMLInstance::createAttribute
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Definition: instance.cpp:102
UMLApp::executeCommand
void executeCommand(QUndoCommand *cmd)
Definition: uml.cpp:3438
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
UMLClassifier::addAttribute
UMLAttribute * addAttribute(const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: classifier.cpp:810