UMLListViewItem Class Reference
Items used by the class UMLListView. Items used by UMLListView. More...
#include <umllistviewitem.h>
Public Member Functions | |
| UMLListViewItem (UMLListView *parent, const QString &name, Uml::ListView_Type t, UMLObject *o=0) | |
| Sets up an instance. | |
| UMLListViewItem (UMLListView *parent) | |
| Sets up an instance for subsequent loadFromXMI(). | |
| UMLListViewItem (UMLListViewItem *parent) | |
| Sets up an instance for subsequent loadFromXMI(). | |
| UMLListViewItem (UMLListViewItem *parent, const QString &name, Uml::ListView_Type t, UMLObject *o=0) | |
| Sets up an instance. | |
| UMLListViewItem (UMLListViewItem *parent, const QString &name, Uml::ListView_Type t, Uml::IDType id) | |
| Sets up an instance. | |
| ~UMLListViewItem () | |
| Standard deconstructor. | |
| Uml::ListView_Type | getType () const |
| Returns the type this instance represents. | |
| void | setID (Uml::IDType id) |
| Sets the id this class represents. | |
| Uml::IDType | getID () const |
| Returns the id this class represents. | |
| void | setUMLObject (UMLObject *obj) |
| Set the UMLObject associated with this instance. | |
| UMLObject * | getUMLObject () |
| Return the UMLObject associated with this instance. | |
| bool | isOwnParent (Uml::IDType listViewItemID) |
| Returns true if the UMLListViewItem of the given ID is a parent of this UMLListViewItem. | |
| void | updateObject () |
| Updates the representation of the object. | |
| void | updateFolder () |
| Updates the icon on a folder. | |
| void | setOpen (bool open) |
| Overrides default method. | |
| void | setText (const QString &text) |
| Changes the current text and updates the tooltip. | |
| QString | getText () const |
| Returns the current text. | |
| void | setCreating (bool creating) |
| Sets if the item is in the middle of being created. | |
| void | setIcon (Uml::Icon_Type iconType) |
| Set the pixmap corresponding to the given Icon_Type. | |
| void | cancelRename (int col) |
| Overrides default method to make public. | |
| void | addClassifierListItem (UMLClassifierListItem *child, UMLListViewItem *childItem) |
| Adds the child listview item representing the given UMLClassifierListItem. | |
| void | deleteChildItem (UMLClassifierListItem *child) |
| Deletes the child listview item representing the given UMLClassifierListItem. | |
| virtual int | compare (QListViewItem *other, int col, bool ascending) const |
| Overrides the default sorting to sort by item type. | |
| int | childCount () const |
| Returns the number of children of the UMLListViewItem containing this object. | |
| UMLListViewItem * | deepCopy (UMLListViewItem *newParent) |
| Create a deep copy of this UMLListViewItem, but using the given parent instead of the parent of this UMLListViewItem. | |
| UMLListViewItem * | findUMLObject (const UMLObject *o) |
| Find the UMLListViewItem that is related to the given UMLObject in the tree rooted at the current UMLListViewItem. | |
| UMLListViewItem * | findChildObject (UMLClassifierListItem *cli) |
| Find the UMLListViewItem that represents the given UMLClassifierListItem in the children of the current UMLListViewItem. | |
| UMLListViewItem * | findItem (Uml::IDType id) |
| Find the UMLListViewItem of the given ID in the tree rooted at the current UMLListViewItem. | |
| void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
| saves the listview item to a <listitem> tag | |
| bool | loadFromXMI (QDomElement &qElement) |
| Loads a <listitem> tag, this is only used by the clipboard currently. | |
Protected Types | |
| typedef QMap< UMLClassifierListItem *, UMLListViewItem * > | ChildObjectMap |
| Auxiliary map of child UMLLisViewItems keyed by UMLClassifierListItem. | |
Protected Member Functions | |
| void | init (UMLListView *parent=0) |
| Initializes key variables of the class. | |
| void | okRename (int col) |
| This function is called if the user presses Enter during in-place renaming of the item in column col, reimplemented from QlistViewItem. | |
| void | cancelRenameWithMsg () |
| Auxiliary method for okRename(). | |
Protected Attributes | |
| bool | m_bCreating |
| Flag used to set the state of creating. | |
| Uml::ListView_Type | m_Type |
| Uml::IDType | m_nId |
| int | m_nChildren |
| UMLObject * | m_pObject |
| QString | m_Label |
| ChildObjectMap | m_comap |
Static Protected Attributes | |
| static UMLListView * | s_pListView = 0 |
| This list view all the instance of this class are displayed on. | |
Detailed Description
Items used by the class UMLListView. Items used by UMLListView.This is needed as the type and object information is required to be stored.
- Author:
- Paul Hensgen <phensgen@techie.com>
- See also:
- UMLListView Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Definition at line 36 of file umllistviewitem.h.
Member Typedef Documentation
|
|
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 275 of file umllistviewitem.h. |
Constructor & Destructor Documentation
|
||||||||||||||||||||
|
Sets up an instance.
Definition at line 42 of file umllistviewitem.cpp. References UMLObject::getID(), init(), setIcon(), and setText(). Referenced by deepCopy(). |
|
|
Sets up an instance for subsequent loadFromXMI().
Definition at line 55 of file umllistviewitem.cpp. References init(). |
|
|
Sets up an instance for subsequent loadFromXMI().
Definition at line 62 of file umllistviewitem.cpp. References init(). |
|
||||||||||||||||||||
|
Sets up an instance.
Definition at line 67 of file umllistviewitem.cpp. References UMLObject::getID(), init(), setText(), updateFolder(), and updateObject(). |
|
||||||||||||||||||||
|
Sets up an instance.
Definition at line 86 of file umllistviewitem.cpp. References init(), setIcon(), setText(), and updateFolder(). |
|
|
Standard deconstructor.
Definition at line 128 of file umllistviewitem.cpp. |
Member Function Documentation
|
|
Returns the type this instance represents.
Definition at line 143 of file umllistviewitem.cpp. Referenced by UMLListView::addAtContainer(), compare(), UMLListView::createItem(), UMLListView::createUMLObject(), deepCopy(), UMLListView::determineParentItem(), UMLListView::findFolderForDiagram(), UMLListView::findUMLObjectInFolder(), UMLListView::findView(), UMLView::isSavedInSeparateFile(), UMLListView::isUnique(), UMLDoc::isUnique(), UMLObject::loadFromXMI(), UMLListView::slotCollapsed(), UMLListView::slotExpanded(), and UMLListView::slotObjectCreated(). |
|
|
Sets the id this class represents. This only sets the ID locally, not at the UMLObject that is perhaps associated to this UMLListViewItem.
Definition at line 168 of file umllistviewitem.cpp. References UMLObject::getID(). |
|
|
Returns the id this class represents.
Definition at line 162 of file umllistviewitem.cpp. References UMLObject::getID(). Referenced by UMLListView::createDiagramItem(), findItem(), UMLListView::findView(), okRename(), UMLListView::popupMenuSel(), and saveToXMI(). |
|
|
Set the UMLObject associated with this instance.
Definition at line 115 of file umllistviewitem.h. Referenced by UMLDoc::closeDocument(), UMLListView::createChildUMLObject(), and UMLListView::moveObject(). |
|
|
Return the UMLObject associated with this instance.
Definition at line 124 of file umllistviewitem.h. Referenced by UMLListView::addAtContainer(), compare(), UMLListView::createChildUMLObject(), UMLListView::createDiagram(), UMLListView::createUMLObject(), UMLDrag::decodeClip2(), deepCopy(), UMLListView::deleteItem(), UMLListView::findUMLObjectInFolder(), UMLView::isSavedInSeparateFile(), UMLListView::isUnique(), UMLDoc::isUnique(), UMLObject::loadFromXMI(), UMLListView::moveObject(), and UMLListView::popupMenuSel(). |
|
|
Returns true if the UMLListViewItem of the given ID is a parent of this UMLListViewItem.
Definition at line 178 of file umllistviewitem.cpp. References UMLListView::findItem(), and s_pListView. |
|
|
Updates the representation of the object.
Definition at line 192 of file umllistviewitem.cpp. References Model_Utils::convert_LVT_IT(), UMLObject::getBaseType(), UMLObject::getName(), UMLObject::getStereotype(), UMLObject::getVisibility(), setIcon(), setText(), and UMLClassifierListItem::toString(). Referenced by loadFromXMI(), UMLListView::slotObjectChanged(), and UMLListViewItem(). |
|
|
Updates the icon on a folder.
Definition at line 251 of file umllistviewitem.cpp. References Model_Utils::convert_LVT_IT(), and setIcon(). Referenced by setOpen(), UMLListView::slotCollapsed(), UMLListView::slotExpanded(), and UMLListViewItem(). |
|
|
Overrides default method. Will call default method but also makes sure correct icon is shown. Definition at line 260 of file umllistviewitem.cpp. References updateFolder(). Referenced by UMLListView::addNewItem(), UMLListView::collapseAll(), UMLListView::expandAll(), UMLListView::init(), loadFromXMI(), and UMLListView::slotObjectCreated(). |
|
|
Changes the current text and updates the tooltip.
Definition at line 265 of file umllistviewitem.cpp. Referenced by UMLListView::childObjectAdded(), UMLListView::createChildUMLObject(), loadFromXMI(), UMLView::loadUISDiagram(), okRename(), UMLListView::popupMenuSel(), UMLListView::slotDiagramRenamed(), UMLListViewItem(), and updateObject(). |
|
|
Returns the current text.
Definition at line 270 of file umllistviewitem.cpp. Referenced by UMLListView::addAtContainer(), compare(), deepCopy(), UMLListView::popupMenuSel(), and UMLListView::slotDropped(). |
|
|
Sets if the item is in the middle of being created.
Definition at line 163 of file umllistviewitem.h. References m_bCreating. Referenced by UMLListView::addNewItem(). |
|
|
Set the pixmap corresponding to the given Icon_Type.
Definition at line 274 of file umllistviewitem.cpp. References UMLListView::getPixmap(), and s_pListView. Referenced by UMLListView::addNewItem(), UMLListView::changeIconOf(), UMLListView::slotObjectCreated(), UMLListViewItem(), updateFolder(), and updateObject(). |
|
|
Overrides default method to make public.
Definition at line 482 of file umllistviewitem.cpp. References UMLListView::cancelRename(), m_bCreating, and s_pListView. Referenced by UMLListView::popupMenuSel(). |
|
||||||||||||
|
Adds the child listview item representing the given UMLClassifierListItem.
Definition at line 147 of file umllistviewitem.cpp. Referenced by UMLListView::createChildUMLObject(), and UMLListView::moveObject(). |
|
|
Deletes the child listview item representing the given UMLClassifierListItem.
Definition at line 151 of file umllistviewitem.cpp. References findChildObject(). Referenced by UMLListView::childObjectRemoved(). |
|
||||||||||||||||
|
Overrides the default sorting to sort by item type.
Definition at line 491 of file umllistviewitem.cpp. References UMLObject::getBaseType(), UMLClassifier::getFilteredList(), getText(), getType(), getUMLObject(), and Model_Utils::typeIsClassifierList(). |
|
|
Returns the number of children of the UMLListViewItem containing this object.
Definition at line 196 of file umllistviewitem.h. |
|
|
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 578 of file umllistviewitem.cpp. References getText(), getType(), getUMLObject(), and UMLListViewItem(). Referenced by UMLListView::moveObject(). |
|
|
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 595 of file umllistviewitem.cpp. Referenced by UMLListView::findUMLObject(). |
|
|
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 608 of file umllistviewitem.cpp. Referenced by UMLListView::childObjectAdded(), and deleteChildItem(). |
|
|
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.
Definition at line 616 of file umllistviewitem.cpp. References getID(). Referenced by UMLListView::findItem(). |
|
||||||||||||
|
saves the listview item to a <listitem> tag
Definition at line 629 of file umllistviewitem.cpp. References UMLObject::getBaseType(), UMLListView::getDocument(), UMLFolder::getFolderFile(), UMLObject::getID(), getID(), and s_pListView. Referenced by UMLDrag::setUMLDataClip2(), and UMLDrag::setUMLDataClip3(). |
|
|
Loads a <listitem> tag, this is only used by the clipboard currently.
Definition at line 672 of file umllistviewitem.cpp. References UMLDoc::findObjectById(), UMLListView::getDocument(), s_pListView, setOpen(), setText(), and updateObject(). Referenced by UMLDrag::decodeClip2(), and UMLDrag::decodeClip3(). |
|
|
Initializes key variables of the class.
Definition at line 130 of file umllistviewitem.cpp. References m_bCreating, and s_pListView. Referenced by UMLListViewItem(). |
|
|
|
Auxiliary method for okRename().
Definition at line 475 of file umllistviewitem.cpp. Referenced by okRename(). |
Member Data Documentation
|
|
This list view all the instance of this class are displayed on.
Definition at line 40 of file umllistviewitem.cpp. Referenced by cancelRename(), init(), isOwnParent(), loadFromXMI(), okRename(), saveToXMI(), and setIcon(). |
|
|
Flag used to set the state of creating.
Definition at line 267 of file umllistviewitem.h. Referenced by cancelRename(), init(), okRename(), and setCreating(). |
The documentation for this class was generated from the following files:
