• 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
entityattribute.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) 2002-2013 *
8  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9  ***************************************************************************/
10 
11 #ifndef ENTITYATTRIBUTE_H
12 #define ENTITYATTRIBUTE_H
13 
14 #include "attribute.h"
15 #include "basictypes.h"
16 
25 class UMLEntityAttribute : public UMLAttribute
26 {
27  Q_OBJECT
28  Q_ENUMS(DBIndex_Type)
29 public:
30  enum DBIndex_Type
31  {
32  None = 1100,
33  Primary,
34  Index,
35  Unique
36  };
37 
38  UMLEntityAttribute(UMLObject* parent, const QString& name,
39  Uml::ID::Type id = Uml::ID::None,
40  Uml::Visibility::Enum s = Uml::Visibility::Private,
41  UMLObject *type = 0, const QString& iv = QString());
42  explicit UMLEntityAttribute(UMLObject* parent);
43  virtual ~UMLEntityAttribute();
44 
45  bool operator==(const UMLEntityAttribute& rhs) const;
46 
47  virtual void copyInto(UMLObject *lhs) const;
48 
49  virtual UMLObject* clone() const;
50 
51  void setAttributes(const QString& attributes);
52  QString getAttributes() const;
53 
54  void setIndexType(const DBIndex_Type indexType);
55  DBIndex_Type indexType() const;
56 
57  void setValues(const QString& values);
58  QString getValues() const;
59 
60  void setAutoIncrement(const bool autoIncrement);
61  bool getAutoIncrement() const;
62 
63  void setNull(const bool null);
64  bool getNull() const;
65 
66  QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig);
67 
68  virtual void saveToXMI(QDomDocument& qDoc, QDomElement& qElement);
69 
70  bool showPropertiesDialog(QWidget* parent);
71 
72 protected:
73  void init();
74 
75  bool load(QDomElement& element);
76 
77 private:
78  DBIndex_Type m_indexType;
79  QString m_values;
80  QString m_attributes;
81  bool m_autoIncrement;
82  bool m_null;
83 };
84 
85 #endif
UMLEntityAttribute::Index
Definition: entityattribute.h:34
UMLEntityAttribute::setNull
void setNull(const bool null)
Sets the initial value of the UMLEntityAttribute's allow null value.
Definition: entityattribute.cpp:159
UMLEntityAttribute::saveToXMI
virtual void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the XMI element.
Definition: entityattribute.cpp:238
UMLEntityAttribute::getAttributes
QString getAttributes() const
Returns the value of the UMLEntityAttribute's attributes property.
Definition: entityattribute.cpp:78
UMLEntityAttribute::setValues
void setValues(const QString &values)
Sets the UMLEntityAttribute's length/values property.
Definition: entityattribute.cpp:105
UMLEntityAttribute::None
Definition: entityattribute.h:32
Uml::Visibility::Enum
Enum
Definition: basictypes.h:56
UMLEntityAttribute::indexType
DBIndex_Type indexType() const
Returns the UMLEntityAttribute's index type property.
Definition: entityattribute.cpp:132
UMLEntityAttribute::operator==
bool operator==(const UMLEntityAttribute &rhs) const
Overloaded '==' operator.
Definition: entityattribute.cpp:190
UMLEntityAttribute::~UMLEntityAttribute
virtual ~UMLEntityAttribute()
Destructor.
Definition: entityattribute.cpp:58
QWidget
UMLEntityAttribute::getValues
QString getValues() const
Returns the UMLEntityAttribute's length/values property.
Definition: entityattribute.cpp:96
UMLAttribute
This class is used to set up information for an attribute.
Definition: attribute.h:27
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:134
Uml::Visibility::Private
Definition: basictypes.h:58
UMLObject
This class is the non-graphical version of UMLWidget.
Definition: umlobject.h:41
UMLEntityAttribute::load
bool load(QDomElement &element)
Loads the XMI element.
Definition: entityattribute.cpp:259
UMLEntityAttribute::Primary
Definition: entityattribute.h:33
UMLEntityAttribute::copyInto
virtual void copyInto(UMLObject *lhs) const
Copy the internal presentation of this object into the UMLEntityAttribute object. ...
Definition: entityattribute.cpp:210
attribute.h
UMLEntityAttribute::Unique
Definition: entityattribute.h:35
UMLEntityAttribute::setAutoIncrement
void setAutoIncrement(const bool autoIncrement)
Sets the UMLEntityAttribute's auto_increment boolean.
Definition: entityattribute.cpp:123
UMLEntityAttribute::init
void init()
Initialize members of this class.
Definition: entityattribute.cpp:66
Uml::ID::Type
std::string Type
Definition: basictypes.h:317
UMLEntityAttribute::getNull
bool getNull() const
Returns the UMLEntityAttribute's allow null value.
Definition: entityattribute.cpp:150
UMLEntityAttribute::setIndexType
void setIndexType(const DBIndex_Type indexType)
Sets the initial value of the UMLEntityAttribute's index type property.
Definition: entityattribute.cpp:141
UMLEntityAttribute
This class is used to set up information for an entityattribute.
Definition: entityattribute.h:25
UMLEntityAttribute::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Display the properties configuration dialog for the entityattribute.
Definition: entityattribute.cpp:275
UMLEntityAttribute::setAttributes
void setAttributes(const QString &attributes)
Sets the UMLEntityAttribute's attributes property.
Definition: entityattribute.cpp:87
UMLEntityAttribute::clone
virtual UMLObject * clone() const
Make a clone of the UMLEntityAttribute.
Definition: entityattribute.cpp:227
Uml::SignatureType::NoSig
Definition: basictypes.h:135
UMLEntityAttribute::UMLEntityAttribute
UMLEntityAttribute(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())
Sets up an entityattribute.
Definition: entityattribute.cpp:34
UMLEntityAttribute::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig)
Returns a string representation of the UMLEntityAttribute.
Definition: entityattribute.cpp:169
UMLObject::name
QString name() const
Returns a copy of m_name.
Definition: umlobject.cpp:185
UMLEntityAttribute::getAutoIncrement
bool getAutoIncrement() const
Returns the UMLEntityAttribute's auto_increment boolean.
Definition: entityattribute.cpp:114
basictypes.h
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:319
UMLEntityAttribute::DBIndex_Type
DBIndex_Type
Definition: entityattribute.h:30
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