• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

umbrello/umbrello

  • sources
  • kde-4.12
  • kdesdk
  • umbrello
  • umbrello
enum.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) 2003-2013 *
8  * Umbrello UML Modeller Authors <[email protected]> *
9  ***************************************************************************/
10 
11 #ifndef ENUM_H
12 #define ENUM_H
13 
14 #include "classifier.h"
15 
16 class UMLEnumLiteral;
17 
28 class UMLEnum : public UMLClassifier
29 {
30  Q_OBJECT
31 public:
32  explicit UMLEnum(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None);
33 
34  virtual ~UMLEnum();
35 
36  bool operator==(const UMLEnum& rhs) const;
37 
38  virtual void copyInto(UMLObject *lhs) const;
39 
40  virtual UMLObject* clone() const;
41 
42  UMLObject* createEnumLiteral(const QString& name = QString());
43 
44  UMLObject* addEnumLiteral(const QString &name, Uml::ID::Type id = Uml::ID::None);
45 
46  bool addEnumLiteral(UMLEnumLiteral* literal, IDChangeLog* Log = 0);
47  bool addEnumLiteral(UMLEnumLiteral* literal, int position);
48 
49  int removeEnumLiteral(UMLEnumLiteral* literal);
50 
51  int enumLiterals();
52 
53  void signalEnumLiteralRemoved(UMLClassifierListItem *elit);
54 
55  virtual void saveToXMI(QDomDocument & qDoc, QDomElement & qElement);
56 
57  virtual UMLClassifierListItem* makeChildObject(const QString& xmiTag);
58 
59 signals:
60  void enumLiteralAdded(UMLClassifierListItem*);
61  void enumLiteralRemoved(UMLClassifierListItem*);
62 
63 protected:
64  bool load(QDomElement & element);
65 
66 private:
67  void init();
68 
69 };
70 
71 #endif // ENUM_H
72 
UMLEnum::addEnumLiteral
UMLObject * addEnumLiteral(const QString &name, Uml::ID::Type id=Uml::ID::None)
Adds an enumliteral to the enum.
Definition: enum.cpp:132
UMLEnum::copyInto
virtual void copyInto(UMLObject *lhs) const
Copy the internal presentation of this object into the new object.
Definition: enum.cpp:56
UMLClassifier
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
UMLClassifierListItem
Classifiers (classes, interfaces) have lists of operations, attributes, templates and others...
Definition: classifierlistitem.h:29
UMLEnum::removeEnumLiteral
int removeEnumLiteral(UMLEnumLiteral *literal)
Removes an enumliteral from the class.
Definition: enum.cpp:204
IDChangeLog
This class contains all the ID translations done for each UMLObject pasted.
Definition: idchangelog.h:26
UMLEnum::~UMLEnum
virtual ~UMLEnum()
Standard destructor.
Definition: enum.cpp:39
UMLEnum::operator==
bool operator==(const UMLEnum &rhs) const
Overloaded '==' operator.
Definition: enum.cpp:47
classifier.h
UMLObject
This class is the non-graphical version of UMLWidget.
Definition: umlobject.h:41
UMLEnum::signalEnumLiteralRemoved
void signalEnumLiteralRemoved(UMLClassifierListItem *elit)
Emit the enumLiteralRemoved signal.
Definition: enum.cpp:231
UMLEnum::enumLiteralRemoved
void enumLiteralRemoved(UMLClassifierListItem *)
UMLEnum::makeChildObject
virtual UMLClassifierListItem * makeChildObject(const QString &xmiTag)
Create a new ClassifierListObject (enumLiteral) according to the given XMI tag.
Definition: enum.cpp:288
UMLEnumLiteral
This class is used to set up information for an enum literal.
Definition: enumliteral.h:25
UMLEnum::enumLiteralAdded
void enumLiteralAdded(UMLClassifierListItem *)
Uml::ID::Type
std::string Type
Definition: basictypes.h:317
UMLEnum
This class contains the non-graphical information required for a UML Enum.
Definition: enum.h:28
UMLEnum::enumLiterals
int enumLiterals()
Returns the number of enumliterals for the class.
Definition: enum.cpp:223
UMLEnum::clone
virtual UMLObject * clone() const
Make a clone of this object.
Definition: enum.cpp:64
UMLObject::name
QString name() const
Returns a copy of m_name.
Definition: umlobject.cpp:185
UMLEnum::UMLEnum
UMLEnum(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Sets up an enum.
Definition: enum.cpp:31
UMLEnum::createEnumLiteral
UMLObject * createEnumLiteral(const QString &name=QString())
Creates a literal for the enum.
Definition: enum.cpp:85
UMLEnum::load
bool load(QDomElement &element)
Loads the element including its enumliterals.
Definition: enum.cpp:253
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:319
UMLEnum::saveToXMI
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the element including its enumliterals.
Definition: enum.cpp:239
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal