#include <qgu_qt4.h>
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. | |
QguListItem * | safeParent () |
Method that returns the parent of this, or the first root level folder if there is no QguListItem parent. | |
QguListItem * | findName (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. | |
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. | |
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 | |
Vostream & | operator<< (Vostream &, QguListItem &) |
Vistream & | operator>> (Vistream &, QguListItem &) |
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
QguListItem::QguListItem | ( | QguListView * | parent = 0 , |
|
QString | txt = 0 , |
|||
QguListType | type = ListTypeEntry , |
|||
QguListItem * | after = 0 | |||
) |
Constructor of the QguListItem class.
parent | of type QguListView * | |
txt | of type QString | |
type | of type QguListType | |
after | of type QguListItem * |
None |
QguListItem::QguListItem | ( | QguListItem * | parent = 0 , |
|
QString | txt = 0 , |
|||
QguListType | type = ListTypeEntry , |
|||
QguListItem * | after = 0 | |||
) |
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).
name | of type QString |
None |
QguListType QguListItem::getEntryType | ( | ) |
Method that returns the entry type of the current item.
None |
None |
QString QguListItem::getWLcontext | ( | ) |
Method that returns the working list context for the current item (name and path of actual data object on WL).
None |
None |
bool QguListItem::isDescendent | ( | QguListItem * | child | ) |
Method that checks if the child argument is descendent of this, or is this item itself.
child | of type QguListItem * |
None |
bool QguListItem::isLocked | ( | ) |
Method that returns the value of the lock private flag for the current list item.
None |
None |
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.
name | of QString type |
None |
QString QguListItem::nameContext | ( | ) |
Method that returns the full name and path in the list view hierarchy.
None |
None |
bool QguListItem::nameUsed | ( | QString & | name | ) |
Method thats checks if the provided name is included within this folder. Alays false if this is an entry.
name | of QString & type |
None |
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.
None |
None |
QdObject_var QguListItem::QguGetObject | ( | ) |
Method that returns the QdObject_var pointer associated with this item.
None |
None |
void QguListItem::refreshWLcontext | ( | ) |
Internal method, use QwlListView::refreshWLcontext() which calls QguListItem::refreshWLcontext safely.
None |
None |
void QguListItem::removeIfEmpty | ( | ) |
Method that removes a folder from the current list view if it is empty.
None |
None |
QguListItem * QguListItem::safeParent | ( | ) |
Method that returns the parent of this, or the first root level folder if there is no QguListItem parent.
None |
None |
void QguListItem::set_Selected | ( | bool | choice | ) |
Method that sets the current item to selected/unselected depending upon the value of the choice parameter.
choice | of type bool* |
None |
void QguListItem::setChildrenSelected | ( | bool | choice | ) |
Method that recursively sets an item and any children selected according to arguent 'choice'. For visual feedback only.
choice | of type bool |
None |
void QguListItem::setColour | ( | bool | valid, | |
bool | thisValid | |||
) |
Method that sets the colour of the current item depending upon its validity.
valid | of bool type | |
thisValid | of bool type |
None |
void QguListItem::setLocked | ( | bool | lock | ) |
Method that sets the lock private flag for the current list item.
lock | of bool type |
None |
void QguListItem::setText | ( | int | txtCol, | |
QString | txt | |||
) |
Method sets correct context for an item replacing dummy "}" with "/".
txtCol | of type int, column for text in listview | |
txt | of type QString |
None |
QString QguListItem::text | ( | int | txtCol | ) |
Method returnes text for an item that never contains "/" which can cause confusion with folders.
None |
None |
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.
valid | of bool type |
None |
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
valid | of bool type |
None |
Vostream& operator<< | ( | Vostream & | v_os, | |
QguListItem & | item | |||
) | [friend] |
Vistream& operator>> | ( | Vistream & | v_is, | |
QguListItem & | item | |||
) | [friend] |
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).
QString QguListItem::WLcontext |
The full name and path on the list view of this item.