umbrello: umbrello/uml1model/category.h Source File

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

category.h
Go to the documentation of this file.
1 /***************************************************************************
2 * *
3 * This program is free software; you can redistribute it and/or modify *
4 * it under the terms of the GNU General Public License as published by *
5 * the Free Software Foundation; either version 2 of the License, or *
6 * (at your option) any later version. *
7 * *
8 * copyright (C) 2002-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef CATEGORY_H
13 #define CATEGORY_H
14
15 #include "umlcanvasobject.h"
16
28 class UMLCategory : public UMLCanvasObject {
29 Q_OBJECT
30 public:
31
32 enum Category_Type {
33 ct_Disjoint_Specialisation,
34 ct_Overlapping_Specialisation,
35 ct_Union
36 };
37
38 explicit UMLCategory(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None);
39 ~UMLCategory();
40
41 virtual void init();
42
43 void copyInto(UMLObject *lhs) const;
44
45 virtual UMLObject* clone() const;
46
47 void saveToXMI1(QXmlStreamWriter& writer);
48
49 UMLCategory::Category_Type getType();
50
51 void setType(Category_Type type);
52
53 protected:
54
55 bool load1(QDomElement & element);
56
57 private:
58
59 Category_Type m_CategoryType;
60 };
61
62 #endif
UMLCanvasObject
Non-graphical information for a UMLCanvasObject.
Definition: umlcanvasobject.h:37
UMLCategory
Information for a non-graphical UML Category.
Definition: category.h:28
UMLCategory::UMLCategory
UMLCategory(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: category.cpp:19
UMLCategory::copyInto
void copyInto(UMLObject *lhs) const
Definition: category.cpp:45
UMLCategory::m_CategoryType
Category_Type m_CategoryType
Definition: category.h:59
UMLCategory::getType
UMLCategory::Category_Type getType()
Definition: category.cpp:88
UMLCategory::init
virtual void init()
Definition: category.cpp:35
UMLCategory::Category_Type
Category_Type
Definition: category.h:32
UMLCategory::ct_Overlapping_Specialisation
@ ct_Overlapping_Specialisation
Definition: category.h:34
UMLCategory::ct_Union
@ ct_Union
Definition: category.h:35
UMLCategory::ct_Disjoint_Specialisation
@ ct_Disjoint_Specialisation
Definition: category.h:33
UMLCategory::setType
void setType(Category_Type type)
Definition: category.cpp:96
UMLCategory::~UMLCategory
~UMLCategory()
Definition: category.cpp:28
UMLCategory::clone
virtual UMLObject * clone() const
Definition: category.cpp:58
UMLCategory::load1
bool load1(QDomElement &element)
Definition: category.cpp:78
UMLCategory::saveToXMI1
void saveToXMI1(QXmlStreamWriter &writer)
Definition: category.cpp:68
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
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