VR-Forces 4.1 Class Documentation
List of all members | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DtEchelonView Class Reference

class DtEchelonView: More...

Inheritance diagram for DtEchelonView:
Inheritance graph
[legend]

Public Slots

virtual void addNode (const DtModelKey &key)
 Adds a new node to the expand/collapse list.
virtual void removeNode (const DtModelKey &key)
 Removes a node from the expand/collapse list.
virtual void setExpanded (const DtModelKey &key, bool expand, QVector< DtModelKey > *remove=NULL, QVector< DtModelKey > *add=NULL)
 Expands or collapsed an item.
virtual void expandAllToLevel (int level, QVector< DtModelKey > *remove=NULL, QVector< DtModelKey > *add=NULL)
 Expands all items above the specified level and collapses all items at or below that level.
virtual void expandNode (const DtModelKey &key, QVector< DtModelKey > *remove=NULL, QVector< DtModelKey > *add=NULL)
 Expands a non-leaf node.
virtual void collapseNode (const DtModelKey &key, QVector< DtModelKey > *remove=NULL, QVector< DtModelKey > *add=NULL)
 Collapses a node.
virtual void collapseParentNode (const DtModelKey &key, QVector< DtModelKey > *remove=NULL, QVector< DtModelKey > *add=NULL)
 Collapses the parent node of a node.

Signals

void nodeExpanded (const DtModelKey &, QVector< DtModelKey > *remove, QVector< DtModelKey > *add)
 Emitted when an node is expanded.
void nodeCollapsed (const DtModelKey &, QVector< DtModelKey > *remove, QVector< DtModelKey > *add)
 Emitted when an node is collapsed.
void selectionChanged (const QVector< DtModelKey > &)
void selectionAdded (const QVector< DtModelKey > &)
void clearSelection (bool)
void showInformationClicked (const DtModelData &)
void deleteRequested ()

Public Member Functions

 DtEchelonView (const DtEchelonHierarchy *hier, const DtEchelonViewOptions *opt=NULL)
 Default constructor.
virtual ~DtEchelonView ()
 Destructor.
virtual bool init ()
 Must be called after construction.
virtual void syncWithHierarchy ()
 Removes all nodes, then add all nodes currently in the hierarchy.
virtual bool expanded (const DtModelKey &key) const
 Get whether or not this item is currently expanded.
virtual bool parentsExpanded (const DtModelKey &key) const
 Returns true if every node, starting with this node's parent, up to the root node are all expanded.
virtual void setHierarchy (const DtEchelonHierarchy *hier)
 Provided for completeness. Not for casual use.
virtual const DtEchelonHierarchyhierarchy () const
virtual void setOptions (DtEchelonViewOptions *options)
virtual const
DtEchelonViewOptions
options () const
void setEmbarkationHierarchy (DtEchelonHierarchy *)
const DtEchelonHierarchyembarkationHierarchy () const
virtual void setSelection (const QVector< DtModelKey > &selectionList)
DtTMEchelonTreeechelonTree () const
virtual void tick ()
 Ticks the echelon tree.
virtual void selectionModeChanged (DtBaseWindow *w)
virtual void disableView (const QString &)
 Call to "disable" the view by replacing the tree view with a label with the specified string.
virtual void enableView ()
virtual void initConnections ()

Static Public Member Functions

static DtEchelonViewcreate (const DtEchelonHierarchy *hier, const DtEchelonViewOptions *options)
 Returns a newly created instance of a DtEchelonView.

Protected Member Functions

virtual DtTMEchelonTreecreateEchelonTree (QWidget *parent)
 Creates the echelon tree widget. Called by init.

Protected Attributes

QHash< DtModelKey, boolmyExpansionDict
 Dictionary keyed to ModelDataKeys which keeps whether each node is expanded or not.
const DtEchelonHierarchymyHierarchy
const DtEchelonHierarchymyEmbarkationHierarchy
const DtEchelonViewOptionsmyOptions
bool myAmOptionsOwner
 True if this instance new()ed myOptions (and therefore will delete).
QVBoxLayout * myLayout
DtTMEchelonTreemyEchelonTree
QLabelmyDisabledReason

Private Member Functions

 DtEchelonView ()
 Default constructor not implemented.
 DtEchelonView (const DtEchelonView &orig)
 Copy constructor.
DtEchelonViewoperator= (const DtEchelonView &rhs)
 Assignment operator.

Detailed Description

class DtEchelonView:

An instance of DtEchelonView maintains the current expdand/collapse view of an echelon hierarchy. It connects to a DtEchelonHierarchy to maintain sycronization. Multiple ExpandViews may be connected to the same hierarchy and maintain seperate views. It derives from QObject in order to use the Qt signal/slot callback system.

Constructor & Destructor Documentation

DtEchelonView::DtEchelonView ( const DtEchelonHierarchy hier,
const DtEchelonViewOptions opt = NULL 
)

Default constructor.

virtual DtEchelonView::~DtEchelonView ( )
virtual

Destructor.

DtEchelonView::DtEchelonView ( )
private

Default constructor not implemented.

DtEchelonView::DtEchelonView ( const DtEchelonView orig)
private

Copy constructor.

Member Function Documentation

virtual bool DtEchelonView::init ( )
virtual

Must be called after construction.

virtual void DtEchelonView::syncWithHierarchy ( )
virtual

Removes all nodes, then add all nodes currently in the hierarchy.

No expanded/collapsed signals are sent with this operation.

virtual bool DtEchelonView::expanded ( const DtModelKey key) const
virtual

Get whether or not this item is currently expanded.

virtual bool DtEchelonView::parentsExpanded ( const DtModelKey key) const
virtual

Returns true if every node, starting with this node's parent, up to the root node are all expanded.

virtual void DtEchelonView::setHierarchy ( const DtEchelonHierarchy hier)
virtual

Provided for completeness. Not for casual use.

virtual const DtEchelonHierarchy* DtEchelonView::hierarchy ( ) const
virtual
virtual void DtEchelonView::setOptions ( DtEchelonViewOptions options)
virtual
virtual const DtEchelonViewOptions* DtEchelonView::options ( ) const
virtual
void DtEchelonView::setEmbarkationHierarchy ( DtEchelonHierarchy h)
inline
const DtEchelonHierarchy * DtEchelonView::embarkationHierarchy ( ) const
inline
virtual void DtEchelonView::setSelection ( const QVector< DtModelKey > &  selectionList)
virtual
DtTMEchelonTree * DtEchelonView::echelonTree ( ) const
inline

References myEchelonTree.

virtual void DtEchelonView::tick ( )
virtual

Ticks the echelon tree.

virtual void DtEchelonView::selectionModeChanged ( DtBaseWindow w)
virtual
virtual void DtEchelonView::disableView ( const QString &  )
virtual

Call to "disable" the view by replacing the tree view with a label with the specified string.

Call enableView to reenable

virtual void DtEchelonView::enableView ( )
virtual
virtual void DtEchelonView::initConnections ( )
virtual
static DtEchelonView* DtEchelonView::create ( const DtEchelonHierarchy hier,
const DtEchelonViewOptions options 
)
static

Returns a newly created instance of a DtEchelonView.

virtual void DtEchelonView::addNode ( const DtModelKey key)
virtualslot

Adds a new node to the expand/collapse list.

If the node is higher than the current view level (in myOptions) in will be expanded initially. Otherwise, it will be collapsed initailly.

virtual void DtEchelonView::removeNode ( const DtModelKey key)
virtualslot

Removes a node from the expand/collapse list.

virtual void DtEchelonView::setExpanded ( const DtModelKey key,
bool  expand,
QVector< DtModelKey > *  remove = NULL,
QVector< DtModelKey > *  add = NULL 
)
virtualslot

Expands or collapsed an item.

If remove or add is NULL, the map is not effected and it assumed the method caller will effect the map selection with the keys found in remove and/or add

virtual void DtEchelonView::expandAllToLevel ( int  level,
QVector< DtModelKey > *  remove = NULL,
QVector< DtModelKey > *  add = NULL 
)
virtualslot

Expands all items above the specified level and collapses all items at or below that level.

virtual void DtEchelonView::expandNode ( const DtModelKey key,
QVector< DtModelKey > *  remove = NULL,
QVector< DtModelKey > *  add = NULL 
)
virtualslot

Expands a non-leaf node.

virtual void DtEchelonView::collapseNode ( const DtModelKey key,
QVector< DtModelKey > *  remove = NULL,
QVector< DtModelKey > *  add = NULL 
)
virtualslot

Collapses a node.

virtual void DtEchelonView::collapseParentNode ( const DtModelKey key,
QVector< DtModelKey > *  remove = NULL,
QVector< DtModelKey > *  add = NULL 
)
virtualslot

Collapses the parent node of a node.

void DtEchelonView::nodeExpanded ( const DtModelKey ,
QVector< DtModelKey > *  remove,
QVector< DtModelKey > *  add 
)
signal

Emitted when an node is expanded.

void DtEchelonView::nodeCollapsed ( const DtModelKey ,
QVector< DtModelKey > *  remove,
QVector< DtModelKey > *  add 
)
signal

Emitted when an node is collapsed.

void DtEchelonView::selectionChanged ( const QVector< DtModelKey > &  )
signal
void DtEchelonView::selectionAdded ( const QVector< DtModelKey > &  )
signal
void DtEchelonView::clearSelection ( bool  )
signal
void DtEchelonView::showInformationClicked ( const DtModelData )
signal
void DtEchelonView::deleteRequested ( )
signal
virtual DtTMEchelonTree* DtEchelonView::createEchelonTree ( QWidget parent)
protectedvirtual

Creates the echelon tree widget. Called by init.

DtEchelonView& DtEchelonView::operator= ( const DtEchelonView rhs)
private

Assignment operator.

Member Data Documentation

QHash<DtModelKey, bool> DtEchelonView::myExpansionDict
protected

Dictionary keyed to ModelDataKeys which keeps whether each node is expanded or not.

const DtEchelonHierarchy* DtEchelonView::myHierarchy
protected
const DtEchelonHierarchy* DtEchelonView::myEmbarkationHierarchy
protected
const DtEchelonViewOptions* DtEchelonView::myOptions
protected
bool DtEchelonView::myAmOptionsOwner
protected

True if this instance new()ed myOptions (and therefore will delete).

QVBoxLayout* DtEchelonView::myLayout
protected
DtTMEchelonTree* DtEchelonView::myEchelonTree
protected
QLabel* DtEchelonView::myDisabledReason
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)