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

umbrello/umbrello

Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
UMLListViewItem Class Reference

#include <umllistviewitem.h>

Inheritance diagram for UMLListViewItem:
Inheritance graph
[legend]

Public Types

enum  ListViewType {
  lvt_View = 800, lvt_Logical_View, lvt_UseCase_View, lvt_Logical_Folder,
  lvt_UseCase_Folder, lvt_UseCase_Diagram, lvt_Collaboration_Diagram, lvt_Class_Diagram,
  lvt_State_Diagram, lvt_Activity_Diagram, lvt_Sequence_Diagram, lvt_Actor,
  lvt_UseCase, lvt_Class, lvt_Attribute, lvt_Operation,
  lvt_Template, lvt_Interface, lvt_Package, lvt_Component_Diagram,
  lvt_Component_Folder, lvt_Component_View, lvt_Component, lvt_Diagrams,
  lvt_Artifact, lvt_Deployment_Diagram, lvt_Deployment_Folder, lvt_Deployment_View,
  lvt_Node, lvt_Datatype, lvt_Datatype_Folder, lvt_Enum,
  lvt_Entity, lvt_EntityAttribute, lvt_EntityRelationship_Diagram, lvt_EntityRelationship_Folder,
  lvt_EntityRelationship_Model, lvt_Subsystem, lvt_Model, lvt_EnumLiteral,
  lvt_UniqueConstraint, lvt_PrimaryKeyConstraint, lvt_ForeignKeyConstraint, lvt_CheckConstraint,
  lvt_Category, lvt_Unknown = -1
}
 

Public Slots

void slotEditFinished (const QString &newText)
 

Public Member Functions

 UMLListViewItem (UMLListView *parent, const QString &name, ListViewType t, UMLObject *o=0)
 
 UMLListViewItem (UMLListView *parent)
 
 UMLListViewItem (UMLListViewItem *parent)
 
 UMLListViewItem (UMLListViewItem *parent, const QString &name, ListViewType t, UMLObject *o=0)
 
 UMLListViewItem (UMLListViewItem *parent, const QString &name, ListViewType t, Uml::ID::Type id)
 
 ~UMLListViewItem ()
 
void addClassifierListItem (UMLClassifierListItem *child, UMLListViewItem *childItem)
 
UMLListViewItem * childItem (int i)
 
UMLListViewItem * deepCopy (UMLListViewItem *newParent)
 
void deleteChildItem (UMLClassifierListItem *child)
 
UMLListViewItem * findChildObject (UMLClassifierListItem *cli)
 
UMLListViewItem * findItem (Uml::ID::Type id)
 
UMLListViewItem * findUMLObject (const UMLObject *o)
 
QString getSavedText () const
 
Uml::ID::Type ID () const
 
bool isOpen ()
 
bool isOwnParent (Uml::ID::Type listViewItemID)
 
bool loadFromXMI (QDomElement &qElement)
 
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
 
void setIcon (Icon_Utils::IconType iconType)
 
void setID (Uml::ID::Type id)
 
void setOpen (bool state)
 
void setText (int column, const QString &text)
 
void setText (const QString &text)
 
void setUMLObject (UMLObject *obj)
 
void setVisible (bool state)
 
QString toolTip ()
 
ListViewType type () const
 
UMLObject * umlObject () const
 
void updateFolder ()
 
void updateObject ()
 

Static Public Member Functions

static QString toString (ListViewType type)
 

Protected Types

typedef QMap
< UMLClassifierListItem
*, UMLListViewItem * > 
ChildObjectMap
 

Protected Member Functions

void cancelRenameWithMsg ()
 
void init ()
 

Protected Attributes

ChildObjectMap m_comap
 
Uml::ID::Type m_id
 
QString m_label
 
UMLObject * m_object
 
ListViewType m_type
 

Detailed Description

Items used by the class UMLListView.

This is needed as the type and object information is required to be stored.

Items used by UMLListView.

Author
Paul Hensgen phens.nosp@m.gen@.nosp@m.techi.nosp@m.e.co.nosp@m.m
See also
UMLListView Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or http://bugs.kde.org

Definition at line 38 of file umllistviewitem.h.

Member Typedef Documentation

typedef QMap<UMLClassifierListItem*, UMLListViewItem*> UMLListViewItem::ChildObjectMap
protected

Auxiliary map of child UMLLisViewItems keyed by UMLClassifierListItem.

Used by findChildObject() for efficiency instead of looping using firstChild()/nextSibling() because the latter incur enforceItemVisible() and thus expensive sorting.

Definition at line 158 of file umllistviewitem.h.

Member Enumeration Documentation

enum UMLListViewItem::ListViewType
Enumerator
lvt_View 
lvt_Logical_View 
lvt_UseCase_View 
lvt_Logical_Folder 
lvt_UseCase_Folder 
lvt_UseCase_Diagram 
lvt_Collaboration_Diagram 
lvt_Class_Diagram 
lvt_State_Diagram 
lvt_Activity_Diagram 
lvt_Sequence_Diagram 
lvt_Actor 
lvt_UseCase 
lvt_Class 
lvt_Attribute 
lvt_Operation 
lvt_Template 
lvt_Interface 
lvt_Package 
lvt_Component_Diagram 
lvt_Component_Folder 
lvt_Component_View 
lvt_Component 
lvt_Diagrams 
lvt_Artifact 
lvt_Deployment_Diagram 
lvt_Deployment_Folder 
lvt_Deployment_View 
lvt_Node 
lvt_Datatype 
lvt_Datatype_Folder 
lvt_Enum 
lvt_Entity 
lvt_EntityAttribute 
lvt_EntityRelationship_Diagram 
lvt_EntityRelationship_Folder 
lvt_EntityRelationship_Model 
lvt_Subsystem 
lvt_Model 
lvt_EnumLiteral 
lvt_UniqueConstraint 
lvt_PrimaryKeyConstraint 
lvt_ForeignKeyConstraint 
lvt_CheckConstraint 
lvt_Category 
lvt_Unknown 

Definition at line 41 of file umllistviewitem.h.

Constructor & Destructor Documentation

UMLListViewItem::UMLListViewItem ( UMLListView *  parent,
const QString &  name,
ListViewType  t,
UMLObject *  o = 0 
)

Sets up an instance.

Parameters
parentThe parent to this instance.
nameThe name of this instance.
tThe type of this instance.
oThe object it represents.

Definition at line 58 of file umllistviewitem.cpp.

UMLListViewItem::UMLListViewItem ( UMLListView *  parent)
explicit

Sets up an instance for subsequent loadFromXMI().

Parameters
parentThe parent to this instance.

Definition at line 80 of file umllistviewitem.cpp.

UMLListViewItem::UMLListViewItem ( UMLListViewItem *  parent)
explicit

Sets up an instance for subsequent loadFromXMI().

Parameters
parentThe parent to this instance.

Definition at line 94 of file umllistviewitem.cpp.

UMLListViewItem::UMLListViewItem ( UMLListViewItem *  parent,
const QString &  name,
ListViewType  t,
UMLObject *  o = 0 
)

Sets up an instance.

Parameters
parentThe parent to this instance.
nameThe name of this instance.
tThe type of this instance.
oThe object it represents.

Definition at line 108 of file umllistviewitem.cpp.

UMLListViewItem::UMLListViewItem ( UMLListViewItem *  parent,
const QString &  name,
ListViewType  t,
Uml::ID::Type  id 
)

Sets up an instance.

Parameters
parentThe parent to this instance.
nameThe name of this instance.
tThe type of this instance.
idThe id of this instance.

Definition at line 138 of file umllistviewitem.cpp.

UMLListViewItem::~UMLListViewItem ( )

Standard destructor.

Definition at line 182 of file umllistviewitem.cpp.

Member Function Documentation

void UMLListViewItem::addClassifierListItem ( UMLClassifierListItem *  child,
UMLListViewItem *  childItem 
)

Adds the child listview item representing the given UMLClassifierListItem.

Definition at line 239 of file umllistviewitem.cpp.

void UMLListViewItem::cancelRenameWithMsg ( )
protected

Auxiliary method for okRename().

Definition at line 682 of file umllistviewitem.cpp.

UMLListViewItem * UMLListViewItem::childItem ( int  i)

Definition at line 934 of file umllistviewitem.cpp.

UMLListViewItem * UMLListViewItem::deepCopy ( UMLListViewItem *  newParent)

Overrides the default sorting to sort by item type.

Sort the listview items by type and position within the corresponding list of UMLObjects. If the item does not have an UMLObject then place it last. Create a deep copy of this UMLListViewItem, but using the given parent instead of the parent of this UMLListViewItem. Return the new UMLListViewItem created.

Definition at line 790 of file umllistviewitem.cpp.

void UMLListViewItem::deleteChildItem ( UMLClassifierListItem *  child)

Deletes the child listview item representing the given UMLClassifierListItem.

Definition at line 247 of file umllistviewitem.cpp.

UMLListViewItem * UMLListViewItem::findChildObject ( UMLClassifierListItem *  cli)

Find the UMLListViewItem that represents the given UMLClassifierListItem in the children of the current UMLListViewItem.

(Only makes sense if the current UMLListViewItem represents a UMLClassifier.) Return a pointer to the item or NULL if not found.

Definition at line 831 of file umllistviewitem.cpp.

UMLListViewItem * UMLListViewItem::findItem ( Uml::ID::Type  id)

Find the UMLListViewItem of the given ID in the tree rooted at the current UMLListViewItem.

Return a pointer to the item or NULL if not found.

Parameters
idThe ID to search for.
Returns
The item with the given ID or NULL if not found.

Definition at line 848 of file umllistviewitem.cpp.

UMLListViewItem * UMLListViewItem::findUMLObject ( const UMLObject *  o)

Find the UMLListViewItem that is related to the given UMLObject in the tree rooted at the current UMLListViewItem.

Return a pointer to the item or NULL if not found.

Definition at line 812 of file umllistviewitem.cpp.

QString UMLListViewItem::getSavedText ( ) const

Returns the saved text.

Definition at line 444 of file umllistviewitem.cpp.

Uml::ID::Type UMLListViewItem::ID ( ) const

Returns the id this class represents.

Returns
The id this class represents.

Definition at line 268 of file umllistviewitem.cpp.

void UMLListViewItem::init ( )
protected

Initializes key variables of the class.

Definition at line 189 of file umllistviewitem.cpp.

bool UMLListViewItem::isOpen ( )
inline

Definition at line 141 of file umllistviewitem.h.

bool UMLListViewItem::isOwnParent ( Uml::ID::Type  listViewItemID)

Returns true if the UMLListViewItem of the given ID is a parent of this UMLListViewItem.

Definition at line 318 of file umllistviewitem.cpp.

bool UMLListViewItem::loadFromXMI ( QDomElement &  qElement)

Loads a "listitem" tag, this is only used by the clipboard currently.

Definition at line 909 of file umllistviewitem.cpp.

void UMLListViewItem::saveToXMI ( QDomDocument &  qDoc,
QDomElement &  qElement 
)

Saves the listview item to a "listitem" tag.

Definition at line 866 of file umllistviewitem.cpp.

void UMLListViewItem::setIcon ( Icon_Utils::IconType  iconType)

Set the pixmap corresponding to the given IconType.

Definition at line 452 of file umllistviewitem.cpp.

void UMLListViewItem::setID ( Uml::ID::Type  id)

Sets the id this class represents.

This only sets the ID locally, not at the UMLObject that is perhaps associated to this UMLListViewItem.

Parameters
idthe id this class represents

Definition at line 282 of file umllistviewitem.cpp.

void UMLListViewItem::setOpen ( bool  expand)

Overrides default method.

Will call default method but also makes sure correct icon is shown.

Definition at line 418 of file umllistviewitem.cpp.

void UMLListViewItem::setText ( int  column,
const QString &  text 
)

Changes the current text.

Definition at line 435 of file umllistviewitem.cpp.

void UMLListViewItem::setText ( const QString &  text)

Changes the current text of column 0.

Definition at line 427 of file umllistviewitem.cpp.

void UMLListViewItem::setUMLObject ( UMLObject *  obj)

Set the UMLObject associated with this instance.

Parameters
objThe object this class represents.

Definition at line 299 of file umllistviewitem.cpp.

void UMLListViewItem::setVisible ( bool  state)

Definition at line 258 of file umllistviewitem.cpp.

void UMLListViewItem::slotEditFinished ( const QString &  newText)
slot

This slot is called to finish item editing.

Definition at line 461 of file umllistviewitem.cpp.

QString UMLListViewItem::toolTip ( )

Returns the signature of items that are operations.

Returns
signature of an operation item, else an empty string

Definition at line 200 of file umllistviewitem.cpp.

QString UMLListViewItem::toString ( ListViewType  type)
static

Definition at line 939 of file umllistviewitem.cpp.

UMLListViewItem::ListViewType UMLListViewItem::type ( ) const

Returns the type this instance represents.

Returns
The type this instance represents.

Definition at line 231 of file umllistviewitem.cpp.

UMLObject * UMLListViewItem::umlObject ( ) const

Return the UMLObject associated with this instance.

Returns
The object this class represents.

Definition at line 309 of file umllistviewitem.cpp.

void UMLListViewItem::updateFolder ( )

Updates the icon on a folder.

Definition at line 404 of file umllistviewitem.cpp.

void UMLListViewItem::updateObject ( )

Updates the representation of the object.

Definition at line 336 of file umllistviewitem.cpp.

Member Data Documentation

ChildObjectMap UMLListViewItem::m_comap
protected

Definition at line 164 of file umllistviewitem.h.

Uml::ID::Type UMLListViewItem::m_id
protected

Definition at line 161 of file umllistviewitem.h.

QString UMLListViewItem::m_label
protected

Definition at line 163 of file umllistviewitem.h.

UMLObject* UMLListViewItem::m_object
protected

Definition at line 162 of file umllistviewitem.h.

ListViewType UMLListViewItem::m_type
protected

Definition at line 160 of file umllistviewitem.h.


The documentation for this class was generated from the following files:
  • umllistviewitem.h
  • umllistviewitem.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 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