umbrello API Documentation

UMLListView Class Reference

This is one of the main classes used in this program. Displays the list view for the program. More...

#include <umllistview.h>

List of all members.

Public Slots

void slotDiagramCreated (Uml::IDType id)
 Creates a new item to represent a new diagram.
void slotDiagramRenamed (Uml::IDType id)
 renames a diagram in the list view
void slotObjectCreated (UMLObject *object)
 Creates a new list view item and connects the appropriate signals/slots.
void connectNewObjectsSlots (UMLObject *object)
 connect some signals into slots in the list view for newly created UMLObjects
void childObjectAdded (UMLClassifierListItem *obj)
 Adds a new operation, attribute or template item to a classifier.
void slotObjectRemoved (UMLObject *object)
 disconnects signals and removes the list view item
void childObjectRemoved (UMLClassifierListItem *obj)
 deletes the list view item
void slotObjectChanged ()
 calls updateObject() on the item representing the sending object no parameters, uses sender() to work out which object called the slot
void slotDiagramRemoved (Uml::IDType id)
 removes the item representing a diagram
void popupMenuSel (int sel)
 Called when a right mouse button menu has an item selected.
void slotDropped (QDropEvent *de, QListViewItem *parent, QListViewItem *item)
 Something has been dragged and dropped onto the list view.
void slotExpanded (QListViewItem *item)
 calls updateFolder() on the item to update the icon to open
void slotCollapsed (QListViewItem *item)
 calls updateFolder() on the item to update the icon to closed
void expandAll (QListViewItem *item)
 Open all items in the list view.
void collapseAll (QListViewItem *item)
 Close all items in the list view.
void slotCutSuccessful ()
 Connects to the signal that UMLApp emits when a cut operation is successful.

Public Member Functions

 UMLListView (QWidget *parent, const char *name)
 Constructs the tree view.
 ~UMLListView ()
 Standard deconstructor.
void setDocument (UMLDoc *d)
 Sets the document his is associated with.
void init ()
 Carries out initalisation of attributes in class.
void setView (UMLView *v)
 Set the current view to the given view.
int getSelectedItems (UMLListViewItemList &ItemList)
 Get selected items.
int getSelectedItemsRoot (UMLListViewItemList &ItemList)
 Get selected items, but only root elements selected (without children).
UMLListViewItemcreateDiagramItem (UMLView *v)
 Create a listview item for an existing diagram.
UMLListViewItemcreateItem (UMLListViewItem &Data, IDChangeLog &IDChanges, UMLListViewItem *parent=0)
 CHECK - This is perhaps redundant since the UMLListViewItemData => UMLListViewItem merge.
UMLListViewItemfindFolderForDiagram (Uml::Diagram_Type dt)
 Find the parent folder for a diagram.
UMLListViewItemdetermineParentItem (UMLObject *object) const
 Determine the parent ListViewItem given an UMLObject.
UMLListViewItemdetermineParentItem (Uml::ListView_Type lvt) const
 Determine the parent ListViewItem given a ListView_Type.
int getSelectedCount ()
 Return the amount of items selected.
QPixmap & getPixmap (Uml::Icon_Type type)
 Returns the correct pixmap for the given type.
UMLDocgetDocument ()
 Returns the document pointer.
void addNewItem (UMLListViewItem *parent, Uml::ListView_Type type)
 Adds a new item to the tree of the given type under the given parent.
UMLListViewItemfindUMLObject (const UMLObject *p) const
 Find an UMLObject in the listview.
UMLListViewItemfindView (UMLView *v)
 Searches through the tree for the item which represents the diagram given.
UMLListViewItemfindItem (Uml::IDType id)
 Searches through the tree for the item with the given ID.
UMLListViewItemrootView (Uml::ListView_Type type)
 Returns the corresponding view if the listview type is one of the root views, Root/Logical/UseCase/Component/Deployment/EntityRelation View.
void changeIconOf (UMLObject *o, Uml::Icon_Type to)
 Changes the icon for the given UMLObject to the given icon.
UMLObjectcreateUMLObject (UMLListViewItem *item, Uml::Object_Type type)
 Creates a UMLObject out of the given list view item.
bool createChildUMLObject (UMLListViewItem *item, Uml::Object_Type type)
 Creates a child UMLObject out of the given list view item.
void createDiagram (UMLListViewItem *item, Uml::Diagram_Type type)
 Creates a diagram out of the given list view item.
QString getUniqueDiagramName (Uml::Diagram_Type type)
 Returns a unique name for a diagram.
bool isUnique (UMLListViewItem *item, const QString &name)
 Returns if the given name is unique for the given items type.
void cancelRename (QListViewItem *item)
 Cancel rename event has occurred for the given item.
void setStartedCut (bool startedCut)
 Set the variable m_bStartedCut to indicate that selection should be deleted in slotCutSuccessful().
void setStartedCopy (bool startedCopy)
 Set the variable m_bStartedCopy.
bool startedCopy () const
 Return the variable m_bStartedCopy.
UMLListViewItemmoveObject (Uml::IDType srcId, Uml::ListView_Type srcType, UMLListViewItem *newParent)
 Moves an object given is unique ID and listview type to an other listview parent item.
bool itemRenamed (QListViewItem *item, int col)
 Called for informing the list view that an item was renamed.
void closeDatatypesFolder ()
UMLListViewItemtheRootView ()
UMLListViewItemtheLogicalView ()
UMLListViewItemtheUseCaseView ()
UMLListViewItemtheComponentView ()
UMLListViewItemtheDeploymentView ()
UMLListViewItemtheDatatypeFolder ()
Uml::ListView_Type rootViewType (UMLListViewItem *item)
 Determines the root listview type of the given UMLListViewItem.
void saveToXMI (QDomDocument &qDoc, QDomElement &qElement)
bool loadFromXMI (QDomElement &element)
bool loadChildrenFromXMI (UMLListViewItem *parent, QDomElement &element)

Static Public Member Functions

static bool mayHaveChildItems (Uml::Object_Type type)
 Return true if the given Object_Type permits child items.

Protected Member Functions

bool eventFilter (QObject *o, QEvent *e)
void contentsMouseReleaseEvent (QMouseEvent *me)
void contentsMousePressEvent (QMouseEvent *me)
void contentsMouseDoubleClickEvent (QMouseEvent *me)
void focusOutEvent (QFocusEvent *fe)
QDragObject * dragObject ()
void startDrag ()
bool acceptDrag (QDropEvent *event) const
void keyPressEvent (QKeyEvent *)
UMLListViewItemfindUMLObjectInFolder (UMLListViewItem *item, UMLObject *o)
 This methods looks for a object in a folder an its subfolders recursive.
void loadPixmaps ()
 Loads the pixmaps to use in the list items.
void deleteChildrenOf (QListViewItem *parent)
 Deletes all child-items of parent.
bool deleteItem (UMLListViewItem *temp)
 Delete a listview item.
void childObjectAdded (UMLClassifierListItem *child, UMLClassifier *parent)
 Adds a new operation, attribute or template item to a classifier, identical to childObjectAdded(obj) but with an explicit parent.
void addAtContainer (UMLListViewItem *item, UMLListViewItem *parent)
 Auxiliary method for moveObject(): Adds the model object at the proper new container (package if nested, UMLDoc if at global level), and updates the containment relationships in the model.

Static Protected Member Functions

static bool isExpandable (Uml::ListView_Type lvt)
 Return true if the given list view type can be expanded/collapsed.

Protected Attributes

UMLListViewItemm_rv
UMLListViewItemm_lv [Uml::N_MODELTYPES]
UMLListViewItemm_datatypeFolder
ListPopupMenum_pMenu
QString oldText
QString message
UMLDocm_doc
bool m_bStartedCut
bool m_bStartedCopy
bool m_bIgnoreCancelRename
bool m_bCreatingChildObject
 Used when creating an attribute or an operation to stop it adding a second listViewItem.
QPixmap m_Pixmaps [Uml::N_ICONTYPES]


Detailed Description

This is one of the main classes used in this program. Displays the list view for the program.

Information is displayed here in a tree view. No objects are created here. A call to UMLDoc make any additions/deletion or updates to objects. This class will then wait for a signal before updating the tree view.

Author:
Paul Hensgen <phensgen@techie.com> Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 44 of file umllistview.h.


Constructor & Destructor Documentation

UMLListView::UMLListView QWidget *  parent,
const char *  name
 

Constructs the tree view.

Parameters:
parent The parent to this.
name The internal name for this class.

Definition at line 95 of file umllistview.cpp.

UMLListView::~UMLListView  ) 
 

Standard deconstructor.

Definition at line 141 of file umllistview.cpp.


Member Function Documentation

void UMLListView::setDocument UMLDoc d  ) 
 

Sets the document his is associated with.

This is important as this is required as to setup the callbacks.

Parameters:
d The document to associate with this class.

Definition at line 817 of file umllistview.cpp.

References slotDiagramCreated(), slotDiagramRemoved(), slotDiagramRenamed(), slotObjectCreated(), and slotObjectRemoved().

Referenced by UMLApp::initView().

void UMLListView::init  ) 
 

Carries out initalisation of attributes in class.

Definition at line 1000 of file umllistview.cpp.

References Model_Utils::convert_MT_LVT(), deleteChildrenOf(), UMLDoc::getDatatypeFolder(), UMLFolder::getLocalName(), UMLDoc::getRootFolder(), m_bCreatingChildObject, and UMLListViewItem::setOpen().

Referenced by UMLDoc::closeDocument(), and UMLApp::initView().

void UMLListView::setView UMLView v  ) 
 

Set the current view to the given view.

Parameters:
v The current view.

Definition at line 1029 of file umllistview.cpp.

References findView().

int UMLListView::getSelectedItems UMLListViewItemList &  ItemList  ) 
 

Get selected items.

Parameters:
ItemList List of UMLListViewItems returned.
Returns:
The number of selected items.

Definition at line 1520 of file umllistview.cpp.

Referenced by UMLClipboard::copy().

int UMLListView::getSelectedItemsRoot UMLListViewItemList &  ItemList  ) 
 

Get selected items, but only root elements selected (without children).

Parameters:
ItemList List of UMLListViewItems returned.
Returns:
The number of selected items.

Definition at line 1535 of file umllistview.cpp.

UMLListViewItem * UMLListView::createDiagramItem UMLView v  ) 
 

Create a listview item for an existing diagram.

Parameters:
v The existing diagram.

Definition at line 1556 of file umllistview.cpp.

References Model_Utils::convert_DT_LVT(), determineParentItem(), findUMLObject(), UMLListViewItem::getID(), and UMLObject::getName().

Referenced by UMLFolder::activateViews().

UMLListViewItem * UMLListView::createItem UMLListViewItem Data,
IDChangeLog IDChanges,
UMLListViewItem parent = 0
 

CHECK - This is perhaps redundant since the UMLListViewItemData => UMLListViewItem merge.

Creates a new UMLListViewItem from a UMLListViewItem, if parent is null the ListView Decides who is going to be the parent

Definition at line 1581 of file umllistview.cpp.

References Model_Utils::convert_DT_LVT(), determineParentItem(), UMLClassifier::findChildObjectById(), UMLDoc::findObjectById(), UMLDoc::findView(), UMLView::getName(), UMLView::getType(), and UMLListViewItem::getType().

UMLListViewItem * UMLListView::findFolderForDiagram Uml::Diagram_Type  dt  ) 
 

Find the parent folder for a diagram.

If the currently selected item in the list view is a folder then that folder is returned as the parent.

Parameters:
dt The Diagram_Type of the diagram. The type will only be used if there is no currently selected item, or if the current item is not a folder. In that case the root folder which is suitable for the Diagram_Type is returned.
Returns:
Pointer to the parent UMLListViewItem for the diagram.

Definition at line 531 of file umllistview.cpp.

References UMLListViewItem::getType(), and Model_Utils::typeIsRootView().

Referenced by UMLDrag::decodeClip2(), and slotDiagramCreated().

UMLListViewItem * UMLListView::determineParentItem UMLObject object  )  const
 

Determine the parent ListViewItem given an UMLObject.

Parameters:
object Pointer to the UMLObject for which to look up the parent.
Returns:
Pointer to the parent UMLListViewItem chosen. Returns NULL on error (no parent could be determined.)

Definition at line 570 of file umllistview.cpp.

References findUMLObject(), UMLObject::getName(), UMLListViewItem::getType(), and Model_Utils::guessContainer().

Referenced by createDiagramItem(), createItem(), and slotObjectCreated().

UMLListViewItem * UMLListView::determineParentItem Uml::ListView_Type  lvt  )  const
 

Determine the parent ListViewItem given a ListView_Type.

This parent is used for creating new UMLListViewItems.

Parameters:
lvt The ListView_Type for which to lookup the parent.
Returns:
Pointer to the parent UMLListViewItem chosen.

Definition at line 1666 of file umllistview.cpp.

bool UMLListView::mayHaveChildItems Uml::Object_Type  type  )  [static]
 

Return true if the given Object_Type permits child items.

A "child item" is anything that qualifies as a UMLClassifierListItem, e.g. operations and attributes of classifiers.

Definition at line 620 of file umllistview.cpp.

Referenced by slotObjectCreated().

int UMLListView::getSelectedCount  ) 
 

Return the amount of items selected.

Definition at line 1699 of file umllistview.cpp.

QPixmap & UMLListView::getPixmap Uml::Icon_Type  type  ) 
 

Returns the correct pixmap for the given type.

Definition at line 1742 of file umllistview.cpp.

Referenced by UMLListViewItem::setIcon().

UMLDoc* UMLListView::getDocument  )  [inline]
 

Returns the document pointer.

Called by the UMLListViewItem class.

Definition at line 166 of file umllistview.h.

Referenced by UMLListViewItem::loadFromXMI(), UMLListViewItem::okRename(), and UMLListViewItem::saveToXMI().

void UMLListView::addNewItem UMLListViewItem parent,
Uml::ListView_Type  type
 

Adds a new item to the tree of the given type under the given parent.

Method will take care of signalling anyone needed on creation of new item. e.g. UMLDoc if an UMLObject is created.

Definition at line 1841 of file umllistview.cpp.

References Model_Utils::convert_LVT_DT(), Model_Utils::convert_LVT_IT(), Model_Utils::convert_LVT_OT(), getUniqueDiagramName(), UMLListViewItem::setCreating(), UMLListViewItem::setIcon(), UMLListViewItem::setOpen(), UMLCanvasObject::uniqChildName(), and Model_Utils::uniqObjectName().

Referenced by popupMenuSel().

UMLListViewItem * UMLListView::findUMLObject const UMLObject p  )  const
 

Find an UMLObject in the listview.

Parameters:
p Pointer to the object to find in the list view.
Returns:
Pointer to the UMLObject found or NULL if not found.

Definition at line 915 of file umllistview.cpp.

References UMLListViewItem::findUMLObject().

Referenced by changeIconOf(), childObjectAdded(), childObjectRemoved(), UMLClipboard::copy(), createDiagramItem(), Import_Utils::createUMLObject(), determineParentItem(), slotObjectChanged(), and slotObjectCreated().

UMLListViewItem * UMLListView::findView UMLView v  ) 
 

Searches through the tree for the item which represents the diagram given.

Parameters:
v the diagram to search for
Returns:
the item which represents the diagram

Definition at line 933 of file umllistview.cpp.

References Model_Utils::convert_DT_LVT(), UMLListViewItem::getID(), and UMLListViewItem::getType().

Referenced by createDiagram(), isUnique(), UMLApp::setCurrentView(), setView(), slotDiagramCreated(), and slotDiagramRenamed().

UMLListViewItem * UMLListView::findItem Uml::IDType  id  ) 
 

Searches through the tree for the item with the given ID.

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

Definition at line 983 of file umllistview.cpp.

References UMLListViewItem::findItem().

Referenced by UMLFolder::activateViews(), UMLListViewItem::isOwnParent(), UMLView::isSavedInSeparateFile(), moveObject(), slotDiagramRemoved(), and slotObjectRemoved().

UMLListViewItem * UMLListView::rootView Uml::ListView_Type  type  ) 
 

Returns the corresponding view if the listview type is one of the root views, Root/Logical/UseCase/Component/Deployment/EntityRelation View.

Definition at line 2595 of file umllistview.cpp.

void UMLListView::changeIconOf UMLObject o,
Uml::Icon_Type  to
 

Changes the icon for the given UMLObject to the given icon.

Definition at line 926 of file umllistview.cpp.

References findUMLObject(), and UMLListViewItem::setIcon().

Referenced by UMLClassifier::setBaseType().

UMLObject * UMLListView::createUMLObject UMLListViewItem item,
Uml::Object_Type  type
 

Creates a UMLObject out of the given list view item.

Definition at line 2005 of file umllistview.cpp.

References UMLPackage::addObject(), connectNewObjectsSlots(), UMLObject::getName(), UMLListViewItem::getType(), UMLListViewItem::getUMLObject(), UMLClassifier::setBaseType(), and UMLObject::setUMLPackage().

Referenced by itemRenamed().

bool UMLListView::createChildUMLObject UMLListViewItem item,
Uml::Object_Type  type
 

Creates a child UMLObject out of the given list view item.

Definition at line 2087 of file umllistview.cpp.

References UMLListViewItem::addClassifierListItem(), connectNewObjectsSlots(), UMLClassifier::createAttribute(), UMLClassifier::createOperation(), UMLClassifier::createTemplate(), UMLListViewItem::getUMLObject(), UMLDoc::loading(), Model_Utils::OpDescriptor::m_args, m_bCreatingChildObject, Model_Utils::NameAndType::m_direction, Model_Utils::NameAndType::m_initialValue, Model_Utils::OpDescriptor::m_name, Model_Utils::NameAndType::m_name, Model_Utils::OpDescriptor::m_pReturnType, Model_Utils::NameAndType::m_type, Model_Utils::parseAttribute(), Model_Utils::parseOperation(), Model_Utils::parseTemplate(), Model_Utils::psText(), UMLDoc::setModified(), UMLAttribute::setParmKind(), UMLListViewItem::setText(), UMLOperation::setType(), UMLClassifierListItem::setType(), UMLListViewItem::setUMLObject(), UMLOperation::toString(), UMLAttribute::toString(), and UMLTemplate::toString().

Referenced by itemRenamed().

void UMLListView::createDiagram UMLListViewItem item,
Uml::Diagram_Type  type
 

Creates a diagram out of the given list view item.

Definition at line 2182 of file umllistview.cpp.

References UMLView::activate(), findView(), UMLListViewItem::getUMLObject(), UMLView::setID(), UMLView::setName(), and UMLView::setType().

Referenced by itemRenamed().

QString UMLListView::getUniqueDiagramName Uml::Diagram_Type  type  ) 
 

Returns a unique name for a diagram.

Definition at line 2209 of file umllistview.cpp.

References UMLDoc::uniqViewName().

Referenced by addNewItem().

bool UMLListView::isUnique UMLListViewItem item,
const QString &  name
 

Returns if the given name is unique for the given items type.

Definition at line 2213 of file umllistview.cpp.

References UMLCanvasObject::findChildObject(), UMLPackage::findObject(), UMLDoc::findUMLObject(), UMLDoc::findView(), findView(), UMLListViewItem::getType(), and UMLListViewItem::getUMLObject().

Referenced by itemRenamed().

void UMLListView::cancelRename QListViewItem *  item  ) 
 

Cancel rename event has occurred for the given item.

Definition at line 2304 of file umllistview.cpp.

Referenced by UMLListViewItem::cancelRename(), and popupMenuSel().

void UMLListView::setStartedCut bool  startedCut  ) 
 

Set the variable m_bStartedCut to indicate that selection should be deleted in slotCutSuccessful().

Definition at line 2583 of file umllistview.cpp.

void UMLListView::setStartedCopy bool  startedCopy  ) 
 

Set the variable m_bStartedCopy.

NB: While m_bStartedCut is reset as soon as the Cut operation is done, the variable m_bStartedCopy is reset much later - upon pasting.

Definition at line 2587 of file umllistview.cpp.

bool UMLListView::startedCopy  )  const
 

Return the variable m_bStartedCopy.

Definition at line 2591 of file umllistview.cpp.

Referenced by UMLDrag::decodeClip1().

UMLListViewItem * UMLListView::moveObject Uml::IDType  srcId,
Uml::ListView_Type  srcType,
UMLListViewItem newParent
 

Moves an object given is unique ID and listview type to an other listview parent item.

Also takes care of the corresponding move in the model.

Definition at line 1245 of file umllistview.cpp.

References addAtContainer(), UMLListViewItem::addClassifierListItem(), UMLPackage::addObject(), UMLOperation::addParm(), connectNewObjectsSlots(), UMLClassifier::createAttribute(), UMLClassifier::createOperation(), UMLListViewItem::deepCopy(), findItem(), UMLDoc::findObjectById(), UMLApp::getCurrentView(), UMLApp::getDocWindow(), UMLAttribute::getInitialValue(), UMLObject::getName(), UMLAttribute::getParmKind(), UMLOperation::getParmList(), UMLClassifierListItem::getType(), UMLListViewItem::getUMLObject(), UMLObject::getUMLPackage(), UMLObject::getVisibility(), UMLDoc::loading(), m_bCreatingChildObject, UMLPackage::removeObject(), UMLAttribute::setParmKind(), UMLOperation::setType(), UMLListViewItem::setUMLObject(), UMLObject::setUMLPackage(), UMLObject::setVisibility(), DocWindow::showDocumentation(), UMLClassifier::takeItem(), and UMLView::updateContainment().

Referenced by UMLView::removeAssocInViewAndDoc(), and slotDropped().

bool UMLListView::itemRenamed QListViewItem *  item,
int  col
 

Called for informing the list view that an item was renamed.

Definition at line 1885 of file umllistview.cpp.

References Model_Utils::convert_LVT_OT(), createChildUMLObject(), createDiagram(), createUMLObject(), isUnique(), and UMLObject::setStereotype().

Referenced by UMLListViewItem::okRename().

Uml::ListView_Type UMLListView::rootViewType UMLListViewItem item  ) 
 

Determines the root listview type of the given UMLListViewItem.

Starts at the given item, compares it against each of the predefined root views (Root, Logical, UseCase, Component, Deployment, EntityRelationship.) Returns the ListView_Type of the matching root view; if no match then continues the search using the item's parent, then grandparent, and so forth. Returns Uml::lvt_Unknown if no match at all is found.

Definition at line 1723 of file umllistview.cpp.

UMLListViewItem * UMLListView::findUMLObjectInFolder UMLListViewItem item,
UMLObject o
[protected]
 

This methods looks for a object in a folder an its subfolders recursive.

Parameters:
item The folder entry of the list view.
o The object to be found in the folder.
Returns:
The object if found else a NULL pointer.

Definition at line 875 of file umllistview.cpp.

References UMLListViewItem::getType(), and UMLListViewItem::getUMLObject().

bool UMLListView::isExpandable Uml::ListView_Type  lvt  )  [static, protected]
 

Return true if the given list view type can be expanded/collapsed.

Definition at line 1806 of file umllistview.cpp.

Referenced by slotCollapsed(), and slotExpanded().

void UMLListView::loadPixmaps  )  [protected]
 

Loads the pixmaps to use in the list items.

Definition at line 1751 of file umllistview.cpp.

void UMLListView::deleteChildrenOf QListViewItem *  parent  )  [protected]
 

Deletes all child-items of parent.

Definition at line 2625 of file umllistview.cpp.

Referenced by init().

bool UMLListView::deleteItem UMLListViewItem temp  )  [protected]
 

Delete a listview item.

Parameters:
temp a non-null UMLListViewItem, for example: (UMLListViewItem*)currentItem()
Returns:
true if correctly deleted

Definition at line 2641 of file umllistview.cpp.

References UMLPackage::containedObjects(), UMLListViewItem::getUMLObject(), UMLCanvasObject::removeAllChildObjects(), UMLDoc::removeDiagram(), and UMLDoc::removeUMLObject().

Referenced by popupMenuSel().

void UMLListView::childObjectAdded UMLClassifierListItem child,
UMLClassifier parent
[protected]
 

Adds a new operation, attribute or template item to a classifier, identical to childObjectAdded(obj) but with an explicit parent.

Parameters:
child the child object
parent the parent object

Definition at line 766 of file umllistview.cpp.

References connectNewObjectsSlots(), Model_Utils::convert_OT_LVT(), UMLListViewItem::findChildObject(), findUMLObject(), UMLDoc::loading(), m_bCreatingChildObject, and UMLListViewItem::setText().

Referenced by childObjectAdded(), connectNewObjectsSlots(), and slotObjectCreated().

void UMLListView::addAtContainer UMLListViewItem item,
UMLListViewItem parent
[protected]
 

Auxiliary method for moveObject(): Adds the model object at the proper new container (package if nested, UMLDoc if at global level), and updates the containment relationships in the model.

Definition at line 1220 of file umllistview.cpp.

References UMLPackage::addObject(), UMLApp::getCurrentView(), UMLListViewItem::getText(), UMLListViewItem::getType(), UMLListViewItem::getUMLObject(), UMLObject::setUMLPackage(), and UMLView::updateContainment().

Referenced by moveObject().

void UMLListView::slotDiagramCreated Uml::IDType  id  )  [slot]
 

Creates a new item to represent a new diagram.

Parameters:
id the id of the new diagram

Definition at line 557 of file umllistview.cpp.

References Model_Utils::convert_DT_LVT(), findFolderForDiagram(), findView(), UMLView::getName(), UMLView::getType(), and UMLDoc::loading().

Referenced by setDocument().

void UMLListView::slotDiagramRenamed Uml::IDType  id  )  [slot]
 

renames a diagram in the list view

Parameters:
id the id of the renamed diagram

Definition at line 806 of file umllistview.cpp.

References findView(), UMLDoc::findView(), UMLView::getName(), and UMLListViewItem::setText().

Referenced by setDocument().

void UMLListView::slotObjectCreated UMLObject object  )  [slot]
 

Creates a new list view item and connects the appropriate signals/slots.

Parameters:
object the newly created object

Definition at line 635 of file umllistview.cpp.

References childObjectAdded(), connectNewObjectsSlots(), Model_Utils::convert_LVT_IT(), Model_Utils::convert_OT_LVT(), determineParentItem(), findUMLObject(), UMLApp::getDocWindow(), UMLClassifier::getFilteredList(), UMLFolder::getFolderFile(), UMLListViewItem::getType(), UMLDoc::loading(), m_bCreatingChildObject, mayHaveChildItems(), UMLListViewItem::setIcon(), UMLListViewItem::setOpen(), and DocWindow::showDocumentation().

Referenced by setDocument().

void UMLListView::connectNewObjectsSlots UMLObject object  )  [slot]
 

connect some signals into slots in the list view for newly created UMLObjects

Definition at line 682 of file umllistview.cpp.

References childObjectAdded(), childObjectRemoved(), and slotObjectChanged().

Referenced by childObjectAdded(), createChildUMLObject(), createUMLObject(), moveObject(), and slotObjectCreated().

void UMLListView::childObjectAdded UMLClassifierListItem obj  )  [slot]
 

Adds a new operation, attribute or template item to a classifier.

Parameters:
obj the child object

Definition at line 761 of file umllistview.cpp.

References childObjectAdded().

void UMLListView::slotObjectRemoved UMLObject object  )  [slot]
 

disconnects signals and removes the list view item

Parameters:
object the object about to be removed

Definition at line 831 of file umllistview.cpp.

References findItem(), UMLApp::getDocWindow(), UMLDoc::loading(), slotObjectChanged(), and DocWindow::updateDocumentation().

Referenced by setDocument().

void UMLListView::childObjectRemoved UMLClassifierListItem obj  )  [slot]
 

deletes the list view item

Parameters:
obj the object to remove

Definition at line 795 of file umllistview.cpp.

References UMLListViewItem::deleteChildItem(), and findUMLObject().

Referenced by connectNewObjectsSlots().

void UMLListView::slotObjectChanged  )  [slot]
 

calls updateObject() on the item representing the sending object no parameters, uses sender() to work out which object called the slot

Definition at line 750 of file umllistview.cpp.

References findUMLObject(), UMLDoc::loading(), and UMLListViewItem::updateObject().

Referenced by connectNewObjectsSlots(), and slotObjectRemoved().

void UMLListView::slotDiagramRemoved Uml::IDType  id  )  [slot]
 

removes the item representing a diagram

Parameters:
id the id of the diagram

Definition at line 841 of file umllistview.cpp.

References findItem(), UMLApp::getDocWindow(), and DocWindow::updateDocumentation().

Referenced by setDocument().

void UMLListView::popupMenuSel int  sel  )  [slot]
 

Called when a right mouse button menu has an item selected.

Definition at line 239 of file umllistview.cpp.

References addNewItem(), cancelRename(), UMLListViewItem::cancelRename(), collapseAll(), ListPopupMenu::convert_MT_DT(), UMLDoc::createDiagram(), deleteItem(), expandAll(), UMLViewImageExporter::exportView(), UMLDoc::findView(), UMLObject::getBaseType(), UMLApp::getDocWindow(), UMLListViewItem::getID(), UMLView::getImageExporter(), UMLDoc::getName(), UMLListViewItem::getText(), UMLListViewItem::getUMLObject(), UMLFolder::setFolderFile(), UMLDoc::setName(), UMLListViewItem::setText(), DocWindow::showDocumentation(), UMLView::showPropDialog(), UMLObject::showProperties(), UMLApp::slotImportClasses(), Model_Utils::typeIsDiagram(), DocWindow::updateDocumentation(), and UMLDoc::URL().

Referenced by slotCutSuccessful().

void UMLListView::slotDropped QDropEvent *  de,
QListViewItem *  parent,
QListViewItem *  item
[slot]
 

Something has been dragged and dropped onto the list view.

Definition at line 1500 of file umllistview.cpp.

References UMLListViewItem::getText(), and moveObject().

void UMLListView::slotExpanded QListViewItem *  item  )  [slot]
 

calls updateFolder() on the item to update the icon to open

Definition at line 1821 of file umllistview.cpp.

References UMLListViewItem::getType(), isExpandable(), and UMLListViewItem::updateFolder().

void UMLListView::slotCollapsed QListViewItem *  item  )  [slot]
 

calls updateFolder() on the item to update the icon to closed

Definition at line 1827 of file umllistview.cpp.

References UMLListViewItem::getType(), isExpandable(), and UMLListViewItem::updateFolder().

void UMLListView::expandAll QListViewItem *  item  )  [slot]
 

Open all items in the list view.

Definition at line 2570 of file umllistview.cpp.

References UMLListViewItem::setOpen().

Referenced by popupMenuSel().

void UMLListView::collapseAll QListViewItem *  item  )  [slot]
 

Close all items in the list view.

Definition at line 2577 of file umllistview.cpp.

References UMLListViewItem::setOpen().

Referenced by popupMenuSel().

void UMLListView::slotCutSuccessful  )  [slot]
 

Connects to the signal that UMLApp emits when a cut operation is successful.

Definition at line 1833 of file umllistview.cpp.

References popupMenuSel().


Member Data Documentation

bool UMLListView::m_bCreatingChildObject [protected]
 

Used when creating an attribute or an operation to stop it adding a second listViewItem.

Definition at line 311 of file umllistview.h.

Referenced by childObjectAdded(), createChildUMLObject(), init(), moveObject(), and slotObjectCreated().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:07 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003