QguListItem Class Reference

This is the QguListItem class. More...

#include <qgu_qt4.h>

Inheritance diagram for QguListItem:

QcalcListVirtualItem

List of all members.

Public Member Functions

 QguListItem (QguListView *parent=0, QString txt=0, QguListType type=ListTypeEntry, QguListItem *after=0)
 Constructor of the QguListItem class.
 QguListItem (QguListItem *parent=0, QString txt=0, QguListType type=ListTypeEntry, QguListItem *after=0)
void setLocked (bool)
 Method that sets the lock private flag for the current list item.
bool isLocked ()
 Method that returns the value of the lock private flag for the current list item.
bool nameAlreadyUsed (QString name)
 Method that checks if the provided name has been already used within the list view starting at the current list item.
QguListType getEntryType ()
 Method that returns the entry type of the current item.
QString nameContext ()
 Method that returns the full name and path in the list view hierarchy.
QString text (int)
 Method returnes text for an item that never contains "/" which can cause confusion with folders.
void setText (int, QString)
 Method sets correct context for an item replacing dummy "}" with "/".
void removeIfEmpty ()
 Method that removes a folder from the current list view if it is empty.
QString getWLcontext ()
 Method that returns the working list context for the current item (name and path of actual data object on WL).
bool nameUsed (QString &name)
 Method thats checks if the provided name is included within this folder. Alays false if this is an entry.
void set_Selected (bool choice)
 Method that sets the current item to selected/unselected depending upon the value of the choice parameter.
void setChildrenSelected (bool choice)
 Method that recursively sets an item and any children selected according to arguent 'choice'. For visual feedback only.
QguListItemsafeParent ()
 Method that returns the parent of this, or the first root level folder if there is no QguListItem parent.
QguListItemfindName (QString name)
 Method to look up 'name' within the folder containing this item (which MUST be the first item in the folder).
bool isDescendent (QguListItem *item)
 Method that checks if the child argument is descendent of this, or is this item itself.
void refreshWLcontext ()
 Internal method, use QwlListView::refreshWLcontext() which calls QguListItem::refreshWLcontext safely.
QdObject_var QguGetObject ()
 Method that returns the QdObject_var pointer associated with this item.
virtual bool validateLink (bool valid)
 Method that checks that the WL context of an item still refers to a valid item on the working list.
bool validateWLitems (bool valid)
 recursive to test if this and its siblings and all their children still refer to valid data objects on the WL
void setColour (bool valid, bool thisValid)
 Method that sets the colour of the current item depending upon its validity.
QguListItemQguGetNext ()
 Method that returns the next item on the list view starting at this item. first call should be for first item on list.

Public Attributes

QguListType entryType
 Enumeration that defines the type of this item.
QString WLcontext
 The full name and path on the list view of this item.
int with
 Public member defining how the list item is being saved (saved with/without data/without data/save as).
bool isVector
Dim_var virtualArrDim

Private Attributes

bool Lock

Friends

Vostreamoperator<< (Vostream &, QguListItem &)
Vistreamoperator>> (Vistream &, QguListItem &)


Detailed Description

This is the QguListItem class.

This class specialises the QListViewItem class which implements a list view item.

A list view item is a multi-column object capable of displaying itself in a QListView.

It inherits QListViewItem which is a built-in QT3 class


Constructor & Destructor Documentation

QguListItem::QguListItem ( QguListView parent = 0,
QString  txt = 0,
QguListType  type = ListTypeEntry,
QguListItem after = 0 
)

Constructor of the QguListItem class.

Parameters:
parent of type QguListView *
txt of type QString
type of type QguListType
after of type QguListItem *
Exceptions:
None 
Returns:
None

QguListItem::QguListItem ( QguListItem parent = 0,
QString  txt = 0,
QguListType  type = ListTypeEntry,
QguListItem after = 0 
)


Member Function Documentation

QguListItem * QguListItem::findName ( QString  name  ) 

Method to look up 'name' within the folder containing this item (which MUST be the first item in the folder).

Parameters:
name of type QString
Exceptions:
None 
Returns:
Returns the item if found or NULL if not found.

QguListType QguListItem::getEntryType (  ) 

Method that returns the entry type of the current item.

Parameters:
None 
Exceptions:
None 
Returns:
Returns the type of the current list item as defined within QguListType enumeration.

QString QguListItem::getWLcontext (  ) 

Method that returns the working list context for the current item (name and path of actual data object on WL).

Parameters:
None 
Exceptions:
None 
Returns:
Returns the working list context for the current item, or empty string if not available.

bool QguListItem::isDescendent ( QguListItem child  ) 

Method that checks if the child argument is descendent of this, or is this item itself.

Parameters:
child of type QguListItem *
Exceptions:
None 
Returns:
Returns true if child is descendent of this, or is this.

bool QguListItem::isLocked (  ) 

Method that returns the value of the lock private flag for the current list item.

Parameters:
None 
Exceptions:
None 
Returns:
The value of the flag Lock

bool QguListItem::nameAlreadyUsed ( QString  name  ) 

Method that checks if the provided name has been already used within the list view starting at the current list item.

Parameters:
name of QString type
Exceptions:
None 
Returns:
Returns TRUE if the provided name has been already used

QString QguListItem::nameContext (  ) 

Method that returns the full name and path in the list view hierarchy.

Parameters:
None 
Exceptions:
None 
Returns:
Returns the name context of the current list item

bool QguListItem::nameUsed ( QString &  name  ) 

Method thats checks if the provided name is included within this folder. Alays false if this is an entry.

Parameters:
name of QString & type
Exceptions:
None 
Returns:
Returns TRUE if the provided name has been used

QguListItem * QguListItem::QguGetNext (  ) 

Method that returns the next item on the list view starting at this item. first call should be for first item on list.

Parameters:
None 
Exceptions:
None 
Returns:
Returns the next item or NULL when no more items on list

QdObject_var QguListItem::QguGetObject (  ) 

Method that returns the QdObject_var pointer associated with this item.

Parameters:
None 
Exceptions:
None 
Returns:
Returns the QdObject_var pointer. If object not found then obj.is_nil()

void QguListItem::refreshWLcontext (  ) 

Internal method, use QwlListView::refreshWLcontext() which calls QguListItem::refreshWLcontext safely.

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListItem::removeIfEmpty (  ) 

Method that removes a folder from the current list view if it is empty.

Parameters:
None 
Exceptions:
None 
Returns:
None

QguListItem * QguListItem::safeParent (  ) 

Method that returns the parent of this, or the first root level folder if there is no QguListItem parent.

Parameters:
None 
Exceptions:
None 
Returns:
Returns the parent of this, or the first root level folder if this has no parent

void QguListItem::set_Selected ( bool  choice  ) 

Method that sets the current item to selected/unselected depending upon the value of the choice parameter.

Parameters:
choice of type bool*
Exceptions:
None 
Returns:
None

void QguListItem::setChildrenSelected ( bool  choice  ) 

Method that recursively sets an item and any children selected according to arguent 'choice'. For visual feedback only.

Parameters:
choice of type bool
Exceptions:
None 
Returns:
None

void QguListItem::setColour ( bool  valid,
bool  thisValid 
)

Method that sets the colour of the current item depending upon its validity.

Parameters:
valid of bool type
thisValid of bool type
Exceptions:
None 
Returns:
None

void QguListItem::setLocked ( bool  lock  ) 

Method that sets the lock private flag for the current list item.

Parameters:
lock of bool type
Exceptions:
None 
Returns:
None

void QguListItem::setText ( int  txtCol,
QString  txt 
)

Method sets correct context for an item replacing dummy "}" with "/".

Parameters:
txtCol of type int, column for text in listview
txt of type QString
Exceptions:
None 
Returns:
None

QString QguListItem::text ( int  txtCol  ) 

Method returnes text for an item that never contains "/" which can cause confusion with folders.

Parameters:
None 
Exceptions:
None 
Returns:
Returns the sanitised text.

bool QguListItem::validateLink ( bool  valid  )  [virtual]

Method that checks that the WL context of an item still refers to a valid item on the working list.

Parameters:
valid of bool type
Exceptions:
None 
Returns:
Returns TRUE if this link is valid.

Reimplemented in QcalcListVirtualItem.

bool QguListItem::validateWLitems ( bool  valid  ) 

recursive to test if this and its siblings and all their children still refer to valid data objects on the WL

Parameters:
valid of bool type
Exceptions:
None 
Returns:
Returns TRUE if the item is valid


Friends And Related Function Documentation

Vostream& operator<< ( Vostream v_os,
QguListItem item 
) [friend]

Vistream& operator>> ( Vistream v_is,
QguListItem item 
) [friend]


Member Data Documentation

Enumeration that defines the type of this item.

bool QguListItem::Lock [private]

Public member defining how the list item is being saved (saved with/without data/without data/save as).

The full name and path on the list view of this item.


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

Generated on Fri Jan 8 12:51:29 2010 for QSAS by  doxygen 1.5.7