![]() |
VR-Forces 4.0.4 Class Documentation
|
class DtEchelonView: More...

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 DtEchelonHierarchy * | hierarchy () const |
| virtual void | setOptions (DtEchelonViewOptions *options) |
| virtual const DtEchelonViewOptions * | options () const |
| void | setEmbarkationHierarchy (DtEchelonHierarchy *) |
| const DtEchelonHierarchy * | embarkationHierarchy () const |
| virtual void | setSelection (const QVector< DtModelKey > &selectionList) |
| DtTMEchelonTree * | echelonTree () 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 DtEchelonView * | create (const DtEchelonHierarchy *hier, const DtEchelonViewOptions *options) |
| Returns a newly created instance of a DtEchelonView. | |
Protected Member Functions | |
| virtual DtTMEchelonTree * | createEchelonTree (QWidget *parent) |
| Creates the echelon tree widget. Called by init. | |
Protected Attributes | |
| QHash< DtModelKey, bool > | myExpansionDict |
| Dictionary keyed to ModelDataKeys which keeps whether each node is expanded or not. | |
| const DtEchelonHierarchy * | myHierarchy |
| const DtEchelonHierarchy * | myEmbarkationHierarchy |
| const DtEchelonViewOptions * | myOptions |
| bool | myAmOptionsOwner |
| True if this instance new()ed myOptions (and therefore will delete). | |
| QVBoxLayout * | myLayout |
| DtTMEchelonTree * | myEchelonTree |
| QLabel * | myDisabledReason |
Private Member Functions | |
| DtEchelonView () | |
| Default constructor not implemented. | |
| DtEchelonView (const DtEchelonView &orig) | |
| Copy constructor. | |
| DtEchelonView & | operator= (const DtEchelonView &rhs) |
| Assignment operator. | |
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.
| 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.
| 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] |
References myEchelonTree, myEmbarkationHierarchy, and DtTMEchelonTree::setEmbarkationHierarchy().
| const DtEchelonHierarchy * DtEchelonView::embarkationHierarchy | ( | ) | const [inline] |
References myEmbarkationHierarchy.
| 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 | ) | [virtual, slot] |
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 | ) | [virtual, slot] |
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 |
||
| ) | [virtual, slot] |
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 |
||
| ) | [virtual, slot] |
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 |
||
| ) | [virtual, slot] |
Expands a non-leaf node.
| virtual void DtEchelonView::collapseNode | ( | const DtModelKey & | key, |
| QVector< DtModelKey > * | remove = NULL, |
||
| QVector< DtModelKey > * | add = NULL |
||
| ) | [virtual, slot] |
Collapses a node.
| virtual void DtEchelonView::collapseParentNode | ( | const DtModelKey & | key, |
| QVector< DtModelKey > * | remove = NULL, |
||
| QVector< DtModelKey > * | add = NULL |
||
| ) | [virtual, slot] |
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 | ) | [protected, virtual] |
Creates the echelon tree widget. Called by init.
| DtEchelonView& DtEchelonView::operator= | ( | const DtEchelonView & | rhs | ) | [private] |
Assignment operator.
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] |
Referenced by embarkationHierarchy(), and setEmbarkationHierarchy().
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] |
Referenced by echelonTree(), and setEmbarkationHierarchy().
QLabel* DtEchelonView::myDisabledReason [protected] |