![]() |
Stellarium
0.17.0
|
TuiNode objects are linked together in a network of nodes to form the structure of a menu which may be navigated using the cursor keys. More...
#include <TuiNode.hpp>
Public Member Functions | |
| TuiNode (const QString &text, TuiNode *parent=Q_NULLPTR, TuiNode *prev=Q_NULLPTR) | |
| Create a TuiNode. More... | |
| virtual TuiNodeResponse | handleKey (int key) |
| virtual TuiNodeResponse | navigation (int key) |
| virtual QString | getDisplayText () const |
| virtual TuiNode * | getParentNode () const |
| virtual void | setParentNode (TuiNode *n) |
| virtual TuiNode * | getChildNode () const |
| virtual void | setChildNode (TuiNode *n) |
| This also takes ownership of the child through OObject->setParent. | |
| virtual TuiNode * | getPrevNode () const |
| virtual void | setPrevNode (TuiNode *n) |
| virtual TuiNode * | getNextNode () const |
| virtual void | setNextNode (TuiNode *n) |
| virtual void | loopToTheLast () |
| Set prevNode to the last of the chain of nextNode-s. More... | |
| int | getNodeNumber () const |
| QList< int > | getAncestorsNumbers () const |
Protected Member Functions | |
| void | updateNodeNumber () |
| Updates nodeNumber, ancestorNumbers and prefixText. | |
Protected Attributes | |
| TuiNode * | parentNode |
| TuiNode * | childNode |
| TuiNode * | prevNode |
| TuiNode * | nextNode |
| QString | prefixText |
| Text of the prefix containing the hierarchical node number. | |
| QString | displayText |
| int | nodeNumber |
| Number of the node in the current menu. More... | |
| QList< int > | ancestorsNumbers |
| Contains the numbers of the parent nodes in the hierarchy. More... | |
Each node has a single line of text which will be displayed when a node is active. Depending on the sub-class for a particular node, it may be used to edit data of one sort of another.
| text | the text to display for this node |
| parent | the node for the parent menu item |
| prev | the previous node in the current menu (typically shares the same parent) |
|
virtual |
Call for the first node of a menu after all others have been added.
|
protected |
The last element is the number of the node in the current menu.
|
protected |
Automatically set to 1 if there is no prevNode.
1.8.11