umbrello  2.35.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
attribute.h
Go to the documentation of this file.
1 /*
2  SPDX-License-Identifier: GPL-2.0-or-later
3  SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4 */
5 
6 #ifndef ATTRIBUTE_H
7 #define ATTRIBUTE_H
8 
9 #include "basictypes.h"
10 #include "classifierlistitem.h"
11 #include "umlclassifierlist.h"
12 
23 {
24  Q_OBJECT
25 public:
26 
27  UMLAttribute(UMLObject *parent, const QString& name,
30  UMLObject *type = 0, const QString& iv = QString());
31  explicit UMLAttribute(UMLObject *parent);
32 
33  bool operator==(const UMLAttribute &rhs) const;
34 
35  virtual ~UMLAttribute();
36 
37  virtual void copyInto(UMLObject *lhs) const;
38 
39  void setName(const QString &name);
40 
42 
43  virtual UMLObject* clone() const;
44 
45  QString getInitialValue() const;
46  void setInitialValue(const QString &iv);
47 
49  bool withStereotype=false) const;
50 
51  QString getFullyQualifiedName(const QString& separator = QString(),
52  bool includeRoot = false) const;
53 
54  virtual void saveToXMI(QXmlStreamWriter& writer);
55 
56  virtual bool showPropertiesDialog(QWidget* parent = 0);
57 
60 
62 
63 signals:
64 
65  void attributeChanged();
66 
67 protected:
68 
69  bool load1(QDomElement & element);
70 
71  QString m_InitialValue;
73 
74 private:
75 
76  void setTemplateParams(const QString& templateParam, UMLClassifierList &templateParamList);
77 
78 };
79 
80 #endif
UMLAttribute::setVisibility
void setVisibility(Uml::Visibility::Enum s)
Definition: attribute.cpp:88
UMLAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false) const
Definition: attribute.cpp:135
Uml::ModelType::Enum
Enum
Definition: basictypes.h:27
DEBUG_REGISTER
#define DEBUG_REGISTER(src)
Definition: debug_utils.h:129
UMLAttribute::getTemplateParams
virtual UMLClassifierList getTemplateParams()
Definition: attribute.cpp:438
logDebug1
#define logDebug1(s, a)
Definition: uml.h:541
UMLDoc::datatypeFolder
UMLFolder * datatypeFolder() const
Definition: umldoc.cpp:3022
UMLAttribute::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: attribute.cpp:266
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:291
logDebug3
#define logDebug3(s, a, b, c)
Definition: uml.h:553
UMLDoc::createDatatype
UMLDatatype * createDatatype(const QString &name)
Definition: umldoc.cpp:3551
UMLObject::name
QString name() const
Definition: umlobject.cpp:207
Uml::ParameterDirection::In
@ In
Definition: basictypes.h:255
umlattributedialog.h
UMLAttribute::setParmKind
void setParmKind(Uml::ParameterDirection::Enum pk)
Definition: attribute.cpp:118
UMLAttribute::load1
bool load1(QDomElement &element)
Definition: attribute.cpp:287
Uml::ProgrammingLanguage::Java
@ Java
Definition: basictypes.h:298
operation.h
UMLClassifierListItem::getType
UMLClassifier * getType() const
Definition: classifierlistitem.cpp:98
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:100
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:373
UMLPackage::containedObjects
UMLObjectList containedObjects(bool includeInactive=false) const
Definition: package.cpp:269
Model_Utils::findUMLObject
UMLObject * findUMLObject(const UMLObjectList &inList, const QString &inName, UMLObject::ObjectType type, UMLObject *currentObj)
Definition: model_utils.cpp:185
UMLObject::ot_Attribute
@ ot_Attribute
Definition: umlobject.h:88
UMLObject::m_SecondaryId
QString m_SecondaryId
Definition: umlobject.h:317
object_factory.h
Uml::SignatureType::SigNoVis
@ SigNoVis
Definition: basictypes.h:163
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1306
UMLObject::emitModified
void emitModified()
Definition: umlobject.cpp:381
UMLObject::umlParent
UMLObject * umlParent() const
Definition: umlobject.cpp:676
UMLAttribute::~UMLAttribute
virtual ~UMLAttribute()
Definition: attribute.cpp:69
UMLObject::m_visibility
Uml::Visibility::Enum m_visibility
objects visibility
Definition: umlobject.h:309
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:651
UMLObject::save1end
void save1end(QXmlStreamWriter &writer)
Definition: umlobject.cpp:937
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:254
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:12
UMLAttribute::m_InitialValue
QString m_InitialValue
text for the attribute's initial value.
Definition: attribute.h:71
Model_Utils::getXmiId
QString getXmiId(QDomElement element)
Definition: model_utils.cpp:772
UMLAttributeDialog
Definition: umlattributedialog.h:29
UMLObject::asUMLAttribute
UMLAttribute * asUMLAttribute()
Definition: umlobject.cpp:1418
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
UMLAttribute::setName
void setName(const QString &name)
Definition: attribute.cpp:77
UMLObject
The base class for UML objects.
Definition: umlobject.h:69
UMLAttribute::m_ParmKind
Uml::ParameterDirection::Enum m_ParmKind
Definition: attribute.h:72
UMLObject::asUMLOperation
UMLOperation * asUMLOperation()
Definition: umlobject.cpp:1437
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:393
UMLObject::m_pSecondary
QPointer< UMLObject > m_pSecondary
Definition: umlobject.h:313
optionstate.h
Uml::ParameterDirection::InOut
@ InOut
Definition: basictypes.h:256
Settings::optionState
OptionState & optionState()
Definition: optionstate.cpp:357
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:308
AssociationWidget::name
QString name() const
Definition: associationwidget.cpp:880
UMLAttribute::setInitialValue
void setInitialValue(const QString &iv)
Definition: attribute.cpp:110
UMLObject::m_name
QString m_name
objects name
Definition: umlobject.h:307
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: attribute.cpp:123
classifierlistitem.h
UMLAttribute::UMLAttribute
UMLAttribute(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None, Uml::Visibility::Enum s=Uml::Visibility::Private, UMLObject *type=0, const QString &iv=QString())
Definition: attribute.cpp:36
it
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent we have made it clear that any patent must be licensed for everyone s free use or not licensed at all The precise terms and conditions for distribution and modification follow TERMS AND CONDITIONS FOR DISTRIBUTION AND MODIFICATION This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The refers to any such program or and a work based on the Program means either the Program or any derivative work under copyright a work containing the Program or a portion of it
Definition: GPL-2.0-only.txt:64
attribute.h
Uml::Visibility::toString
QString toString(Enum item, bool mnemonic)
Definition: basictypes.cpp:93
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:223
logDebug2
#define logDebug2(s, a, b)
Definition: uml.h:547
folder.h
umlclassifierlist.h
UMLAttribute::attributeChanged
void attributeChanged()
Definition: moc_attribute.cpp:129
Uml::ProgrammingLanguage::D
@ D
Definition: basictypes.h:296
UMLAttribute::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: attribute.cpp:190
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:83
basictypes.h
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1422
Uml::ParameterDirection::Out
@ Out
Definition: basictypes.h:257
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:160
Uml::ProgrammingLanguage::Cpp
@ Cpp
Definition: basictypes.h:294
c
type show c for details The hypothetical commands show w and show c should show the appropriate parts of the General Public License Of the commands you use may be called something other than show w and show c
Definition: GPL-2.0-only.txt:301
UMLAttribute::setTemplateParams
void setTemplateParams(const QString &templateParam, UMLClassifierList &templateParamList)
Definition: attribute.cpp:386
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:349
UMLAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: attribute.cpp:238
UMLDoc
Definition: umldoc.h:69
UMLAttribute
Sets up attribute information.
Definition: attribute.h:22
UMLApp::activeLanguageScopeSeparator
QString activeLanguageScopeSeparator() const
Definition: uml.cpp:2725
UMLFolder
Non-graphical management of objects and diagrams of a Folder.
Definition: folder.h:29
Uml
Definition: basictypes.cpp:22
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3652
Uml::Visibility::Enum
Enum
Definition: basictypes.h:45
UMLDoc::findUMLObject
UMLObject * findUMLObject(const QString &name, UMLObject::ObjectType type=UMLObject::ot_UMLObject, UMLObject *currentObj=0)
Definition: umldoc.cpp:1121
classifier.h
UMLOperation
Definition: operation.h:19
uml.h
Uml::SignatureType::ShowSig
@ ShowSig
Definition: basictypes.h:162
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:34
debug_utils.h
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:161
UMLAttribute::operator==
bool operator==(const UMLAttribute &rhs) const
Definition: attribute.cpp:218
umlobject.h
UMLAttribute::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: attribute.cpp:377
UMLObject::ot_Operation
@ ot_Operation
Definition: umlobject.h:89
UMLAttribute::clone
virtual UMLObject * clone() const
Definition: attribute.cpp:254
Uml::Visibility::Private
@ Private
Definition: basictypes.h:47
UMLApp::activeLanguage
Uml::ProgrammingLanguage::Enum activeLanguage() const
Definition: uml.cpp:2708
UMLObject::stereotype
QString stereotype(bool includeAdornments=false) const
Definition: umlobject.cpp:555
logWarn2
#define logWarn2(s, a, b)
Definition: uml.h:550
Uml::ProgrammingLanguage::CSharp
@ CSharp
Definition: basictypes.h:295
UMLObjectList
Definition: umlobjectlist.h:24
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:24
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1139
umldoc.h
UMLClassifierListItem::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: classifierlistitem.cpp:72
UMLObject::save1
void save1(QXmlStreamWriter &writer, const QString &type, const QString &tag=QString())
Definition: umlobject.cpp:861
logError2
#define logError2(s, a, b)
Definition: uml.h:551
UMLPackage
Non-graphical information for a Package.
Definition: package.h:27