class MyListView

This class provides encoding and decoding for the uml data that will be use in a drag_n_drop operation or in a copy paste operation More...

Definition#include <./mylistview.h>
InheritsKListView (unknown) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Public Slots

Signals

Protected Types

Protected Methods

Protected Members


Detailed Description

This class provides encoding and decoding for the uml data that will be use in a drag_n_drop operation or in a copy paste operation

enum Icon_Type { it_Home = 0, it_Folder_Green, it_Folder_Green_Open, it_Folder_Grey, it_Folder_Grey_Open, it_Diagram, it_Class, it_Actor, it_UseCase, it_Public_Method, it_Private_Method, it_Protected_Method, it_Public_Attribute, it_Private_Attribute, it_Protected_Attribute }

Icon_Type

 MyListView (QWidget *parent,const char *name)

MyListView

Constructs the tree view.

Parameters:
parentThe parent to this.
nameThe internal name for this class.

 ~MyListView ()

~MyListView

Standard deconstructor.

void  setDocument (UMLDoc * d)

setDocument

Sets the document his is associated with. This is important as this is required as to setup the callbacks.

Parameters:
dThe document to associate with this class.

void  init ()

init

Carries out initalisation of attributes in class.

void  setView (UMLView * v)

setView

Set the current view to the given view.

Parameters:
vThe current view.

bool  serialize (QDataStream *s, bool archive)

serialize

Use to save or load this classes information

Parameters:
sPointer to the datastream (file) to save/load from.
archiveIf true will save the classes information, else will load the information.

Returns: Returns the status of the operation.

bool  ReadChilds ( MyListViewItem* parent, QDataStream *s)

ReadChilds

long  getClipSizeOf ()

getClipSizeOf

void  setLoading (bool _state)

setLoading

void  setWidgetDefaults ()

setWidgetDefaults

bool  GetSelectedItems (MyListViewItemList &ItemList)

GetSelectedItems

long  getClipSizeOfItemList (MyListViewItemList* Items)

getClipSizeOfItemList

Returns the amount of bytes needed to serialize Item to the clipboard

bool  clipSerializeItemList (MyListViewItemList* Items, QDataStream *s, const bool toClip)

clipSerializeItemList

Serialize Item to a QDataStream that will be put in the clipboard

MyListViewItem*  CreateItem (MyListViewItemData& Data, IDChangeLog& IDChanges, MyListViewItem* parent = 0)

CreateItem

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

QPoint  TranslatePosition (QPoint Pt)

TranslatePosition

Transalates a QPoint to the coordinates of the viewport containing the ListView

int  getSelectedCount ()

getSelectedCount

Return the amount of items selected.

QPixmap &  getPixmap ( Icon_Type type )

getPixmap

Returns the correct pixmap for the given type.

UMLDoc *  getDocument ()

getDocument

Returns the document pointer. Called by the MyListViewItem class.

void  addNewItem ( QListViewItem * parent, Uml::ListView_Type type )

addNewItem

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.

void  createUMLObject ( MyListViewItem * item, Uml::UMLObject_Type type )

createUMLObject

Creates a UMLObject out of the given list view item.

void  createChildUMLObject ( MyListViewItem * item, Uml::UMLObject_Type type )

createChildUMLObject

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

void  createDiagram ( MyListViewItem * item, Uml::Diagram_Type type )

createDiagram

Creates a diagram out of the given list view item.

QString  getUniqueDiagramName ( Uml::Diagram_Type type )

getUniqueDiagramName

Returns a unique name for a diagram.

QString  getUniqueChildUMLObjectName ( UMLConcept * parent, Uml::UMLObject_Type type )

getUniqueChildUMLObjectName

Returns a unique name for a child umlobject.

QString  getUniqueUMLObjectName ( Uml::UMLObject_Type type )

getUniqueUMLObjectName

Returns a unique name for an object.

bool  isUnique ( MyListViewItem * item, QString name )

isUnique

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

void  cancelRename ( QListViewItem * item )

cancelRename

Cancel rename event has occurred for the given item.

bool  saveToXMI ( QDomDocument & qDoc, QDomElement & qElement )

saveToXMI

bool  loadFromXMI ( QDomElement & element )

loadFromXMI

bool  loadChildrenFromXMI ( MyListViewItem * parent, QDomElement & element )

loadChildrenFromXMI

MyListViewItem * rv

rv

[protected]

MyListViewItem * ucv

ucv

[protected]

MyListViewItem * lv

lv

[protected]

ListPopupMenu * menu

menu

[protected]

QString oldText

oldText

[protected]

QString message

message

[protected]

UMLDoc * doc

doc

[protected]

bool loading

loading

[protected]

bool m_bStartedCut

m_bStartedCut

[protected]

bool m_bIgnoreCancelRename

m_bIgnoreCancelRename

[protected]

Pixmaps (struct)

Pixmaps

[protected]

void  contentsMouseReleaseEvent (QMouseEvent * me)

contentsMouseReleaseEvent

[protected]

void  contentsMousePressEvent (QMouseEvent *me)

contentsMousePressEvent

[protected]

void  contentsMouseDoubleClickEvent (QMouseEvent * me)

contentsMouseDoubleClickEvent

[protected]

void  focusOutEvent ( QFocusEvent * fe)

focusOutEvent

[protected]

bool  goodName (QListViewItem *i)

goodName

[protected]

QDragObject*  dragObject ()

dragObject

[protected]

void  startDrag ()

startDrag

[protected]

void  tidyChangeItem ()

tidyChangeItem

[protected]

bool  acceptDrag (QDropEvent* event)

acceptDrag

[protected const]

MyListViewItem *  findChildUMLObject (UMLObject *c)

findChildUMLObject

[protected]

MyListViewItem *  findUMLObject (UMLObject *p)

findUMLObject

[protected]

MyListViewItem *  findView (UMLView *v)

findView

[protected]

MyListViewItem *  findItem (int id)

findItem

[protected]

Uml::ListView_Type  convert_DT_LVT (Uml::Diagram_Type dt)

convert_DT_LVT

[protected]

Uml::ListView_Type  convert_OT_LVT (Uml::UMLObject_Type ot)

convert_OT_LVT

[protected]

void  loadPixmaps ()

loadPixmaps

[protected]

Loads the pixmaps to use in the list items.

void  slotDiagramCreated (int id)

slotDiagramCreated

[slot]

void  slotChildObjectCreated (UMLObject * o)

slotChildObjectCreated

[slot]

void  slotDiagramRenamed (int id)

slotDiagramRenamed

[slot]

void  slotObjectChanged (UMLObject * o)

slotObjectChanged

[slot]

void  slotChildObjectChanged (UMLObject * o)

slotChildObjectChanged

[slot]

void  slotObjectRemoved (UMLObject * o)

slotObjectRemoved

[slot]

void  slotDiagramRemoved (int id)

slotDiagramRemoved

[slot]

void  popupMenuSel (int sel)

popupMenuSel

[slot]

void  slotObjectCreated (UMLObject * o)

slotObjectCreated

[slot]

void  slotDropped (QDropEvent * de, QListViewItem * parent, QListViewItem * item)

slotDropped

[slot]

void  slotExpanded ( QListViewItem * item )

slotExpanded

[slot]

void  slotCollapsed ( QListViewItem * item )

slotCollapsed

[slot]

void  slotCutSuccessful ()

slotCutSuccessful

[slot]

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

void  slotItemRenamed ( QListViewItem * item , int col )

slotItemRenamed

[slot]

When a user requests a new item we wait for the signal to then verify the item. The class only connects to the rename signal while needed.

void  sigResetStatusbarProgress ()

sigResetStatusbarProgress

[signal]

Reset the status bar

void  sigSetStatusbarProgressSteps (int totalSteps)

sigSetStatusbarProgressSteps

[signal]

void  sigSetStatusbarProgress (int stepPosition)

sigSetStatusbarProgress

[signal]