![]() |
Stellarium
24.4
|
Allows navigation but also selection from a list of string values. More...
#include <TuiNodeEnum.hpp>
Signals | |
void | setValue (const QString &s) |
Public Member Functions | |
TuiNodeEnum (const QString &text, QObject *receiver, const char *method, const QStringList &items, const QString &defValue, TuiNode *parent=Q_NULLPTR, TuiNode *prev=Q_NULLPTR) | |
Create a TuiNodeEnum node. More... | |
TuiNodeResponse | handleEditingKey (int key) override |
QString | getDisplayText () const override |
![]() | |
TuiNodeEditable (const QString &text, TuiNode *parent=Q_NULLPTR, TuiNode *prev=Q_NULLPTR) | |
TuiNodeResponse | handleKey (int key) override |
![]() | |
TuiNode (const QString &text, TuiNode *parent=Q_NULLPTR, TuiNode *prev=Q_NULLPTR) | |
Create a TuiNode. More... | |
virtual TuiNodeResponse | navigation (int key) |
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 |
Additional Inherited Members | |
![]() | |
void | updateNodeNumber () |
Updates nodeNumber, ancestorNumbers and prefixText. | |
![]() | |
bool | editing |
![]() | |
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... | |
Allows navigation but also selection from a list of string values.
TuiNodeEnum::TuiNodeEnum | ( | const QString & | text, |
QObject * | receiver, | ||
const char * | method, | ||
const QStringList & | items, | ||
const QString & | defValue, | ||
TuiNode * | parent = Q_NULLPTR , |
||
TuiNode * | prev = Q_NULLPTR |
||
) |
Create a TuiNodeEnum node.
text | the text to be displayed for this node |
receiver | a QObject which will receive a signal when the value is changed |
method | the method in the receiver which will be called when the value is changed. Note that this should be passed using the SLOT() macro. |
items | a list of string values which the item may take. |
defValue | the string value which is used as the initially selected value. Note if this is not in the items list, the first item in the items list will be used instead. |
parent | the node for the parent menu item |
prev | the previous node in the current menu (typically shares the same parent) |