QguListView Class Reference

This is the QguListView class. More...

#include <qgu_qt4.h>

Inheritance diagram for QguListView:

QcalcListView

List of all members.

Public Slots

virtual void rightButtonPressEvent (Q3ListViewItem *item, const QPoint &P, int c)
 Method that invokes the context popup menu synchronously at the specified global point.
void deleteListItems ()
void makeGroup ()
 Method that creates a new folder containing all items on localList (ie selected). Inserts folder in place of selected items or at root if nothing is selected.
void renameSelectedItem ()
 Method that renames a selected item within the current list view. Launches dialog using QguListView::reNameItem().
void copy ()
 Method that copies the WLcontext of the selected item of the current list view onto the clipboard.
void paste ()
 Method that pastes a new item into the current list view using the content of the clipboard as WLcontext.
void moveItemDown ()
 Method that moves a selected item down within the current list view. Will move in and out of folders.
void moveItemUp ()
 Method that moves a selected item up within the current list view. Moves in and out of folders.
void selectAll ()
 Method that selects all the items within the current list view and puts them on localList.
void validateWLitems ()
 Method that validates all items on this list view against the Working List
Exceptions:
None. 

void setItemChoices ()
 Method does nothing, overloaded in derived classes.
void clearMsgBar ()
 Method to empty the list view message bar.

Signals

void listModified ()
 Function signal that is emitted when the current list view has been modified.
void selectionAdded ()
 Function signal that is emitted when an item has been added to the current selection.
void raiseWindow ()
 Function signal that is emitted when a drag enters this widget. CAuses the parent window to be raised.
void viewWL_ObjRequest ()

Public Member Functions

 QguListView (QWidget *parent, const char *name=0)
 QguListView class constructor.
 ~QguListView ()
 QguListView class destructor.
void setRootLocked (bool)
 Method that sets the value of the private data member rootLock.
bool rootIsLocked ()
 Method that returns the value of the private data member rootLock.
void reLinkItem ()
 Method that relinks the selected item to a new object within the working list.
void clearSelection ()
 Method that sets all the items to be not selected. Re-implemented from Q3ListView.
QguListItemfindCommonRoot ()
 Method that returns the deepest folder that contains all the selected items (on localList).
QguListItemfindCommonFolder ()
 Method that returns the deepest folder that contains all the selected items (on localList).
bool isCommonAncestor (QguListItem *folder)
 Method that checks if folder is a common ancestor for all selected items (in localList).
void clearSelectedList ()
 Method that deselects items in this list view and triggers an update. localList is emptied.
void setSelectedList (QguListItem *item)
 Method that sets the selected list (localList) to contain item and all its descendents.
void putChildrenOnList (QguListItem *item)
 Method that adds an item and all its descendents to the selected list (localList).
void refreshSelectedList ()
 Method that refreshes the list of selected items within the current list view based on contents of localList.
bool isOnSelectedList (QguListItem *item)
 Method that checks if a given item is within the selected list of the current list view.
QguListItemfindAncestorOnList (QguListItem *item)
 Method that locates an ancestor of the specified item on the list of selected items (localList).
QguListItemfindDescendentOnList (QguListItem *item)
 Method that finds a descendent of a given item within the list of selected items (localList).
QguListItemfindDescendentOnList (QguListView *lv)
 Method that finds a descendent of any item on a list view within the list of selected items (localList).
void AddToSelectedList (QguListItem *item)
 Method that inserts a given item and its descendents in the select list (localList) of the current list view.
void RemoveFromSelectedList (QguListItem *item)
 Method that removes a given item from the list of selected items (localList) of the current list view.
QguListItemroot (QguListItem *item)
 Method that returns the root (highest level folder) of item on this list view.
QguListItemgetItemByName (QString name)
 Method that finds an item in this list view where name is its full path (e.g. WLcontext).
virtual void getAliasArrDim (QString, Dim_var &)
virtual QguAliasObjType getAliasObjectType (QString)
virtual QguAliasType getAliasObject (QString, QdObject_var)
virtual QdObject_var getAliasResultObject (QString)
virtual void viewCurrentItem ()
void QguMoveItem (QguListItem *item, QguListItem *target)
 Method that moves item to become child of target in the current list view.
virtual void insertEntries (const QString &itemContext)
virtual void insertEntries (QguListItem *dropAt, QguListItem *item)
 Method that inserts a new item at target dropAt in the current list view. Item takes WLcontext as its name.
bool reNameItem (QguListItem *item)
 Method that launches dialog to re-name item. Ensures name is unique.
QguListItemgetSafeItemAbove (QguListItem *item)
 Method that retrieves an item above atItem that is a safe target to insert an item during move.
QguListItemgetSafeItemBelow (QguListItem *item)
 Method that retrieves an item below atItem that is a safe target to insert an item during move.
void addItemsInclusive (QguListItem *newItem, QguListItem *last)
 Method that adds a set of items to the selected list (localList) within the current list view between last and newItem.
void insertListItems (QguListItem *dropAtItem)
 Method that inserts items from the dragList within the current list view at dropAt item.
bool isOnDragList (QguListItem *item)
virtual void insertDragItem (QguListItem *dropAt, QguListItem *item)
 Method that inserts an item within the current list at dropAt. Used for drag and drop.
virtual void dropEvent (QDropEvent *event)
 Event handler called when the drag is dropped on this list view. Re-implemented from QWidget. Drop uses dragList.
void emitListModified ()
void contentsMouseDoubleClickEvent (QMouseEvent *event)
 Method that processes the mouse double-click event. It has been re-implemented from Q3ListView.
void setDragList ()
 Method to copy the localList (selected items) to the dragList to use for drag and drop.
int listSize ()
 counts ALL ListTypeEntry items in list view

Public Attributes

bool bSingleSelection
int with
 Public member defining how the list view is being saved (saved with data/without data/save as).
QCursor * ShiftCursor
 Cursor used within the list view during mulitple selection.
QMenu * RButtonMenu
 Popup menu invoked by clicking the mouse right button.
vector< QguListItem * > localList
 A list of items highlighted on the current list view. A vector structure.
Dim_var selectedObjDim
 Used to identify the dimension of an array object to propagate component choice with multiple selection.
bool rootLock
 Flag to signify if the root of the list view is locked.
QPoint dragPos
bool mousePressed
bool alreadySelected
QguListItemdragItem

Protected Member Functions

virtual void contentsMousePressEvent (QMouseEvent *event)
 Method to process mouse down events. Re-implemented from Q3ListView. Handles select, multi-select and drag.
virtual void contentsMouseReleaseEvent (QMouseEvent *event)
 Method that processes the mouse up event. It has been re-implemented from Q3ListView.
virtual void contentsMouseMoveEvent (QMouseEvent *event)
 Method that processes the mouse move event. It has been re-implemented from Q3ListView.
virtual void dragMoveEvent (QDragMoveEvent *event)
 Event handler that is called when a drag is in progress. Re-implemented from QWidget.
virtual void dragEnterEvent (QDragEnterEvent *event)


Detailed Description

This is the QguListView class.

This class implements a list/tree view for QSAS. It inherits QListView which is a built-in QT3 class

Remarks:
{ This class includes Q_OBJECT which is a QT3 macro that is used in all sub-classes of QObject in order to benefit from the QT's Meta object system which are signals and slots mechanisms for inter-object communication, runtime type information and the dynamic property system }

Constructor & Destructor Documentation

QguListView::QguListView ( QWidget *  parent,
const char *  name = 0 
)

QguListView class constructor.

Parameters:
parent The parent object of the list view. It is of type QWidget
name The name of this list view being instantiated. It is a const char*
Exceptions:
none 
Returns:
none

QguListView::~QguListView (  ) 

QguListView class destructor.

Parameters:
none 
Exceptions:
none 
Returns:
none


Member Function Documentation

void QguListView::addItemsInclusive ( QguListItem newItem,
QguListItem last 
)

Method that adds a set of items to the selected list (localList) within the current list view between last and newItem.

Parameters:
newItem of type QguListItem *
last of type QguListItem *
Exceptions:
None 
Returns:
None

void QguListView::AddToSelectedList ( QguListItem item  ) 

Method that inserts a given item and its descendents in the select list (localList) of the current list view.

It protects against putting duplicates on the list in mulit-selection mode

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
None

void QguListView::clearMsgBar (  )  [slot]

Method to empty the list view message bar.

Parameters:
none 
Exceptions:
none 
Returns:
none

void QguListView::clearSelectedList (  ) 

Method that deselects items in this list view and triggers an update. localList is emptied.

Parameters:
None 
Exceptions:
none 
Returns:
None

void QguListView::clearSelection (  ) 

Method that sets all the items to be not selected. Re-implemented from Q3ListView.

Parameters:
none 
Exceptions:
none 
Returns:
none

void QguListView::contentsMouseDoubleClickEvent ( QMouseEvent *  event  ) 

Method that processes the mouse double-click event. It has been re-implemented from Q3ListView.

Parameters:
event of type QMouseEvent *
Exceptions:
None 
Returns:
None

Reimplemented in QcalcListView.

void QguListView::contentsMouseMoveEvent ( QMouseEvent *  event  )  [protected, virtual]

Method that processes the mouse move event. It has been re-implemented from Q3ListView.

Parameters:
event of type QMouseEvent *
Exceptions:
none 
Returns:
none

Reimplemented in QcalcListView.

void QguListView::contentsMousePressEvent ( QMouseEvent *  event  )  [protected, virtual]

Method to process mouse down events. Re-implemented from Q3ListView. Handles select, multi-select and drag.

Parameters:
event of type QMouseEvent *
Exceptions:
none 
Returns:
none

Reimplemented in QcalcListView.

void QguListView::contentsMouseReleaseEvent ( QMouseEvent *  event  )  [protected, virtual]

Method that processes the mouse up event. It has been re-implemented from Q3ListView.

Parameters:
event of type QMouseEvent *
Exceptions:
none 
Returns:
none

Reimplemented in QcalcListView.

void QguListView::copy (  )  [slot]

Method that copies the WLcontext of the selected item of the current list view onto the clipboard.

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListView::deleteListItems (  )  [slot]

Reimplemented in QcalcListView.

void QguListView::dragEnterEvent ( QDragEnterEvent *  event  )  [protected, virtual]

void QguListView::dragMoveEvent ( QDragMoveEvent *  event  )  [protected, virtual]

Event handler that is called when a drag is in progress. Re-implemented from QWidget.

Parameters:
event of type QDragMoveEvent *
Exceptions:
none 
Returns:
none

Reimplemented in QcalcListView.

void QguListView::dropEvent ( QDropEvent *  event  )  [virtual]

Event handler called when the drag is dropped on this list view. Re-implemented from QWidget. Drop uses dragList.

Parameters:
event of type QDropEvent *
Exceptions:
None 
Returns:
None

Reimplemented in QcalcListView.

void QguListView::emitListModified (  ) 

QguListItem * QguListView::findAncestorOnList ( QguListItem item  ) 

Method that locates an ancestor of the specified item on the list of selected items (localList).

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
Returns the ancestor if found or NULL if not found

QguListItem * QguListView::findCommonFolder (  ) 

Method that returns the deepest folder that contains all the selected items (on localList).

Differs from findCommonRoot() only in that if only one item is selected it returns the folder holding the selected item.

Parameters:
None 
Exceptions:
none 
Returns:
Returns QgListItem* or NULL if there is no common root

QguListItem * QguListView::findCommonRoot (  ) 

Method that returns the deepest folder that contains all the selected items (on localList).

Differs from findCommonFolder() only in that if only one item is selected it returns the selected item.

Parameters:
None 
Exceptions:
none 
Returns:
Returns QgListItem* or NULL if there is no common root

QguListItem * QguListView::findDescendentOnList ( QguListView lv  ) 

Method that finds a descendent of any item on a list view within the list of selected items (localList).

Parameters:
lv of QguListView * type
Exceptions:
none 
Returns:
Returns a descendent if found or NULL if not found

QguListItem * QguListView::findDescendentOnList ( QguListItem item  ) 

Method that finds a descendent of a given item within the list of selected items (localList).

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
Returns the descendent if found or NULL if not found

virtual void QguListView::getAliasArrDim ( QString  ,
Dim_var  
) [inline, virtual]

Reimplemented in QcalcListView.

virtual QguAliasType QguListView::getAliasObject ( QString  ,
QdObject_var   
) [inline, virtual]

Reimplemented in QcalcListView.

virtual QguAliasObjType QguListView::getAliasObjectType ( QString   )  [inline, virtual]

Reimplemented in QcalcListView.

virtual QdObject_var QguListView::getAliasResultObject ( QString   )  [inline, virtual]

Reimplemented in QcalcListView.

QguListItem * QguListView::getItemByName ( QString  name  ) 

Method that finds an item in this list view where name is its full path (e.g. WLcontext).

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

QguListItem * QguListView::getSafeItemAbove ( QguListItem atItem  ) 

Method that retrieves an item above atItem that is a safe target to insert an item during move.

Parameters:
atItem of type QguListItem *
Exceptions:
None 
Returns:
Returns a safe item above the specified item

QguListItem * QguListView::getSafeItemBelow ( QguListItem atItem  ) 

Method that retrieves an item below atItem that is a safe target to insert an item during move.

Parameters:
atItem of type QguListItem *
Exceptions:
None 
Returns:
Returns a safe item below the specified item

void QguListView::insertDragItem ( QguListItem dropAt,
QguListItem item 
) [virtual]

Method that inserts an item within the current list at dropAt. Used for drag and drop.

Parameters:
dropAtItem of type QguListItem *
item of type QguListItem *
Exceptions:
None 
Returns:
None

void QguListView::insertEntries ( QguListItem dropAt,
QguListItem item 
) [virtual]

Method that inserts a new item at target dropAt in the current list view. Item takes WLcontext as its name.

Parameters:
dropAt of type QguListItem*
item of type QguListItem*
Exceptions:
none 
Returns:
None

Reimplemented in QcalcListView.

virtual void QguListView::insertEntries ( const QString &  itemContext  )  [inline, virtual]

Reimplemented in QcalcListView.

void QguListView::insertListItems ( QguListItem dropAtItem  ) 

Method that inserts items from the dragList within the current list view at dropAt item.

Parameters:
dropAtItem of type QguListItem *
Exceptions:
None 
Returns:
None

bool QguListView::isCommonAncestor ( QguListItem folder  ) 

Method that checks if folder is a common ancestor for all selected items (in localList).

Parameters:
folder of type QguListItem *
Exceptions:
none 
Returns:
True if folder is an ancestor of all selected items or FALSE if any selected item is not descended from folder

bool QguListView::isOnDragList ( QguListItem item  ) 

bool QguListView::isOnSelectedList ( QguListItem item  ) 

Method that checks if a given item is within the selected list of the current list view.

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
Returns TRUE if the item belongs to the selected list of items (localList) and FALSE if it does not

void QguListView::listModified (  )  [signal]

Function signal that is emitted when the current list view has been modified.

Parameters:
None 
Exceptions:
None 
Returns:
None

int QguListView::listSize (  ) 

counts ALL ListTypeEntry items in list view

Parameters:
none 
Exceptions:
none 
Returns:
none

void QguListView::makeGroup (  )  [slot]

Method that creates a new folder containing all items on localList (ie selected). Inserts folder in place of selected items or at root if nothing is selected.

Parameters:
None 
Exceptions:
None 
Returns:
None

Reimplemented in QcalcListView.

void QguListView::moveItemDown (  )  [slot]

Method that moves a selected item down within the current list view. Will move in and out of folders.

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListView::moveItemUp (  )  [slot]

Method that moves a selected item up within the current list view. Moves in and out of folders.

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListView::paste (  )  [slot]

Method that pastes a new item into the current list view using the content of the clipboard as WLcontext.

Parameters:
None 
Exceptions:
None 
Returns:
None

Reimplemented in QcalcListView.

void QguListView::putChildrenOnList ( QguListItem item  ) 

Method that adds an item and all its descendents to the selected list (localList).

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
none

void QguListView::QguMoveItem ( QguListItem item,
QguListItem target 
)

Method that moves item to become child of target in the current list view.

Parameters:
item of type QguListItem*
target of type QguListItem*
Exceptions:
none 
Returns:
None

void QguListView::raiseWindow (  )  [signal]

Function signal that is emitted when a drag enters this widget. CAuses the parent window to be raised.

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListView::refreshSelectedList (  ) 

Method that refreshes the list of selected items within the current list view based on contents of localList.

Parameters:
None 
Exceptions:
none 
Returns:
None

void QguListView::reLinkItem (  ) 

Method that relinks the selected item to a new object within the working list.

This is used to change the data object that is being referred to. Not meaningful in the WL listview.

Parameters:
none 
Exceptions:
none 
Returns:
none

void QguListView::RemoveFromSelectedList ( QguListItem item  ) 

Method that removes a given item from the list of selected items (localList) of the current list view.

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
None

bool QguListView::reNameItem ( QguListItem item  ) 

Method that launches dialog to re-name item. Ensures name is unique.

Parameters:
item of type QguListItem *
Exceptions:
None 
Returns:
None

void QguListView::renameSelectedItem (  )  [slot]

Method that renames a selected item within the current list view. Launches dialog using QguListView::reNameItem().

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListView::rightButtonPressEvent ( Q3ListViewItem *  item,
const QPoint &  P,
int  c 
) [virtual, slot]

Method that invokes the context popup menu synchronously at the specified global point.

Parameters:
item of type QguListItem*
P of type const QPoint
c of type int
Exceptions:
None 
Returns:
None

QguListItem * QguListView::root ( QguListItem item  ) 

Method that returns the root (highest level folder) of item on this list view.

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
Returns the root of the item in the current list view

bool QguListView::rootIsLocked (  ) 

Method that returns the value of the private data member rootLock.

Parameters:
none 
Exceptions:
None 
Returns:
bool - value of the rootLock data member

void QguListView::selectAll (  )  [slot]

Method that selects all the items within the current list view and puts them on localList.

Parameters:
None 
Exceptions:
None 
Returns:
None

QguListView::selectionAdded (  )  [signal]

Function signal that is emitted when an item has been added to the current selection.

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListView::setDragList (  ) 

Method to copy the localList (selected items) to the dragList to use for drag and drop.

Parameters:
none 
Exceptions:
none 
Returns:
none

void QguListView::setItemChoices (  )  [slot]

Method does nothing, overloaded in derived classes.

Parameters:
None 
Exceptions:
None 
Returns:
None

void QguListView::setRootLocked ( bool  lock  ) 

Method that sets the value of the private data member rootLock.

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

void QguListView::setSelectedList ( QguListItem item  ) 

Method that sets the selected list (localList) to contain item and all its descendents.

Parameters:
item of type QguListItem *
Exceptions:
none 
Returns:
none

Reimplemented in QcalcListView.

void QguListView::validateWLitems (  )  [slot]

Method that validates all items on this list view against the Working List

Exceptions:
None. 

Returns:
None

Reimplemented in QcalcListView.

virtual void QguListView::viewCurrentItem (  )  [inline, virtual]

void QguListView::viewWL_ObjRequest (  )  [signal]


Member Data Documentation

A list of items highlighted on the current list view. A vector structure.

Popup menu invoked by clicking the mouse right button.

Flag to signify if the root of the list view is locked.

Used to identify the dimension of an array object to propagate component choice with multiple selection.

Cursor used within the list view during mulitple selection.

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


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