1 /* 2 SPDX-License-Identifier: GPL-2.0-or-later 3 SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org> 4 */ 5 6 #ifndef CATEGORY_H 7 #define CATEGORY_H 8 9 #include "umlcanvasobject.h" 10 11 /** 12 * This class contains the non-graphical information required for a UML Category. 13 * This class inherits from @ref UMLCanvasObject which contains most of the 14 * information. 15 * The @ref UMLDoc class creates instances of this type. 16 * 17 * @short Information for a non-graphical UML Category. 18 * @author Sharan Rao 19 * @see UMLCanvasObject 20 * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org 21 */ 22 class UMLCategory : public UMLCanvasObject { 23 Q_OBJECT 24 public: 25 26 enum Category_Type { 27 ct_Disjoint_Specialisation, 28 ct_Overlapping_Specialisation, 29 ct_Union 30 }; 31 32 explicit UMLCategory(const QString & name = QString(), Uml::ID::Type id = Uml::ID::None); 33 ~UMLCategory(); 34 35 virtual void init(); 36 37 void copyInto(UMLObject *lhs) const; 38 39 virtual UMLObject* clone() const; 40 41 void saveToXMI1(QXmlStreamWriter& writer); 42 43 UMLCategory::Category_Type getType(); 44 45 void setType(Category_Type type); 46 47 protected: 48 49 bool load1(QDomElement & element); 50 51 private: 52 53 Category_Type m_CategoryType; 54 }; 55 56 #endif 57