umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
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

Items used by UMLListView. More...

#include <umllistviewitem.h>

Inheritance diagram for UMLListViewItem:
Collaboration diagram for UMLListViewItem:

Public Types

enum  ListViewType {
  lvt_Min = 799 , 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_Port , lvt_Properties ,
  lvt_Properties_AutoLayout , lvt_Properties_Class , lvt_Properties_CodeGeneration , lvt_Properties_CodeImport ,
  lvt_Properties_CodeViewer , lvt_Properties_Font , lvt_Properties_General , lvt_Properties_UserInterface ,
  lvt_Association , lvt_Object_Diagram , lvt_Instance , lvt_InstanceAttribute ,
  lvt_Max , 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 ()
 
ListViewType type () const
 
void setID (Uml::ID::Type id)
 
Uml::ID::Type ID () const
 
void setUMLObject (UMLObject *obj)
 
UMLObjectumlObject () const
 
bool isOwnParent (Uml::ID::Type listViewItemID)
 
void updateObject ()
 
void updateFolder ()
 
void setText (int column, const QString &text)
 
void setText (const QString &text)
 
QString getSavedText () const
 
void setVisible (bool state)
 
QString toolTip () const
 
void setIcon (Icon_Utils::IconType iconType)
 
void addChildItem (UMLObject *child, UMLListViewItem *childItem)
 
void deleteChildItem (UMLObject *child)
 
UMLListViewItemdeepCopy (UMLListViewItem *newParent)
 
UMLListViewItemfindUMLObject (const UMLObject *o)
 
UMLListViewItemfindChildObject (UMLObject *child)
 
UMLListViewItemfindItem (Uml::ID::Type id)
 
UMLListViewItemchildItem (int i)
 
void saveToXMI (QXmlStreamWriter &writer)
 
bool loadFromXMI (QDomElement &qElement)
 
bool isOpen () const
 
void setOpen (bool state)
 

Static Public Member Functions

static QString toString (ListViewType type)
 

Protected Types

typedef QMap< UMLObject *, UMLListViewItem * > ChildObjectMap
 

Protected Member Functions

void init ()
 
void cancelRenameWithMsg ()
 

Protected Attributes

ListViewType m_type
 
Uml::ID::Type m_id
 
QPointer< UMLObjectm_object
 
QString m_label
 
ChildObjectMap m_comap
 

Detailed Description

Items used by UMLListView.

Items used by the class UMLListView. This is needed as the type and object information is required to be stored.

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 https://bugs.kde.org

Member Typedef Documentation

◆ ChildObjectMap

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

Member Enumeration Documentation

◆ ListViewType

Enumerator
lvt_Min 
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_Port 
lvt_Properties 
lvt_Properties_AutoLayout 
lvt_Properties_Class 
lvt_Properties_CodeGeneration 
lvt_Properties_CodeImport 
lvt_Properties_CodeViewer 
lvt_Properties_Font 
lvt_Properties_General 
lvt_Properties_UserInterface 
lvt_Association 
lvt_Object_Diagram 
lvt_Instance 
lvt_InstanceAttribute 
lvt_Max 
lvt_Unknown 

Constructor & Destructor Documentation

◆ UMLListViewItem() [1/5]

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.
Here is the call graph for this function:

◆ UMLListViewItem() [2/5]

UMLListViewItem::UMLListViewItem ( UMLListView parent)
explicit

Sets up an instance for subsequent loadFromXMI().

Parameters
parentThe parent to this instance.
Here is the call graph for this function:

◆ UMLListViewItem() [3/5]

UMLListViewItem::UMLListViewItem ( UMLListViewItem parent)
explicit

Sets up an instance for subsequent loadFromXMI().

Parameters
parentThe parent to this instance.
Here is the call graph for this function:

◆ UMLListViewItem() [4/5]

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.
Here is the call graph for this function:

◆ UMLListViewItem() [5/5]

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.
Here is the call graph for this function:

◆ ~UMLListViewItem()

UMLListViewItem::~UMLListViewItem ( )

Standard destructor.

Member Function Documentation

◆ addChildItem()

void UMLListViewItem::addChildItem ( UMLObject child,
UMLListViewItem childItem 
)

Adds the child listview item representing the given UMLObject.

Here is the call graph for this function:

◆ cancelRenameWithMsg()

void UMLListViewItem::cancelRenameWithMsg ( )
protected

Auxiliary method for okRename().

Here is the call graph for this function:

◆ childItem()

UMLListViewItem * UMLListViewItem::childItem ( int  i)

◆ deepCopy()

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 a 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.

Here is the call graph for this function:

◆ deleteChildItem()

void UMLListViewItem::deleteChildItem ( UMLObject child)

Deletes the child listview item representing the given UMLObject.

Here is the call graph for this function:

◆ findChildObject()

UMLListViewItem * UMLListViewItem::findChildObject ( UMLObject child)

Find the UMLListViewItem that represents the given UMLObject in the children of the current UMLListViewItem. Return a pointer to the item or NULL if not found.

◆ findItem()

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.
Here is the call graph for this function:

◆ findUMLObject()

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.

Here is the call graph for this function:

◆ getSavedText()

QString UMLListViewItem::getSavedText ( ) const

Returns the saved text.

◆ ID()

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

Returns the id this class represents.

Returns
The id this class represents.

◆ init()

void UMLListViewItem::init ( )
protected

Initializes key variables of the class.

◆ isOpen()

bool UMLListViewItem::isOpen ( ) const
inline

◆ isOwnParent()

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

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

Here is the call graph for this function:

◆ loadFromXMI()

bool UMLListViewItem::loadFromXMI ( QDomElement &  qElement)

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

Here is the call graph for this function:

◆ saveToXMI()

void UMLListViewItem::saveToXMI ( QXmlStreamWriter &  writer)

Saves the listview item to a "listitem" tag.

Here is the call graph for this function:

◆ setIcon()

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

Set the pixmap corresponding to the given IconType.

Here is the call graph for this function:

◆ setID()

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
Here is the call graph for this function:

◆ setOpen()

void UMLListViewItem::setOpen ( bool  expand)

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

Here is the call graph for this function:

◆ setText() [1/2]

void UMLListViewItem::setText ( const QString &  newText)

Changes the current text of column 0.

Here is the call graph for this function:

◆ setText() [2/2]

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

Changes the current text.

Here is the call graph for this function:

◆ setUMLObject()

void UMLListViewItem::setUMLObject ( UMLObject obj)

Set the UMLObject associated with this instance.

Parameters
objThe object this class represents.

◆ setVisible()

void UMLListViewItem::setVisible ( bool  state)

◆ slotEditFinished

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

This slot is called to finish item editing

Here is the call graph for this function:

◆ toolTip()

QString UMLListViewItem::toolTip ( ) const

Returns the signature of items that are operations.

Returns
signature of an operation item, else an empty string
Here is the call graph for this function:

◆ toString()

QString UMLListViewItem::toString ( ListViewType  type)
static
Here is the call graph for this function:

◆ type()

UMLListViewItem::ListViewType UMLListViewItem::type ( ) const

Returns the type this instance represents.

Returns
The type this instance represents.

◆ umlObject()

UMLObject * UMLListViewItem::umlObject ( ) const

Return the UMLObject associated with this instance.

Returns
The object this class represents.

◆ updateFolder()

void UMLListViewItem::updateFolder ( )

Updates the icon on a folder.

Here is the call graph for this function:

◆ updateObject()

void UMLListViewItem::updateObject ( )

Updates the representation of the object.

Here is the call graph for this function:

Member Data Documentation

◆ m_comap

ChildObjectMap UMLListViewItem::m_comap
protected

◆ m_id

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

◆ m_label

QString UMLListViewItem::m_label
protected

◆ m_object

QPointer<UMLObject> UMLListViewItem::m_object
protected

◆ m_type

ListViewType UMLListViewItem::m_type
protected

The documentation for this class was generated from the following files: