Updraft
1.0
Open source glider flight visualisation tool.
|
A single setting. More...
#include <settingsmodel.h>
Public Member Functions | |
SettingsItem (QDomNode node, SettingsModel *model) | |
Creates the settings item to contain the given QDomNode, belonging to the given SettingsModel. | |
~SettingsItem () | |
void | prependChild (SettingsItem *item) |
Adds a child SettingsItem before all children in this SettingsItem. | |
void | appendChild (SettingsItem *item) |
Adds a child SettingsItem after all children in this SettingsItem. | |
void | insertChild (SettingsItem *item, int index) |
Adds a child SettingsItem into the given position in the children list of this item. | |
SettingsItem * | getChild (int index) |
Gets the child SettingsItem at the given index. | |
int | childIndex (SettingsItem *item) |
Returns the index of a child SettingsItem in this SettingsItem. | |
SettingsItem * | getParent () |
QDomNode | getNode () |
int | rowCount () |
SettingsModel * | getModel () |
void | setIcon (QIcon i) |
Sets the icon for this settings item. | |
QIcon | getIcon () |
Private Attributes | |
QDomNode | domNode |
The QDomNode pointing to the data of this setting. | |
QVector< SettingsItem * > | children |
Children of this SettingsItem SettingsModel hierarchy. | |
SettingsItem * | parent |
Parent of this SettingsItem in the SettingsModel hierarchy. | |
SettingsModel * | myModel |
The SettingsModel where the data for this item is stored. | |
QIcon | icon |
Icon used by this item. |
A single setting.
It contains a QDomNode that points to the item in the QDomDocument hierarchy that contains the setting's data.
Updraft::Core::SettingsItem::SettingsItem | ( | QDomNode | node, |
SettingsModel * | model | ||
) |
Creates the settings item to contain the given QDomNode, belonging to the given SettingsModel.
node | The QDomNode that this SettingsItem should contain. |
model | The data model to which this setting belongs. |
void Updraft::Core::SettingsItem::appendChild | ( | SettingsItem * | item | ) |
Adds a child SettingsItem after all children in this SettingsItem.
item | The item to append as a child of this item. |
int Updraft::Core::SettingsItem::childIndex | ( | SettingsItem * | item | ) |
Returns the index of a child SettingsItem in this SettingsItem.
item | The child whose index is to be retrieved. |
SettingsItem * Updraft::Core::SettingsItem::getChild | ( | int | index | ) |
Gets the child SettingsItem at the given index.
QIcon Updraft::Core::SettingsItem::getIcon | ( | ) | [inline] |
SettingsModel* Updraft::Core::SettingsItem::getModel | ( | ) | [inline] |
QDomNode Updraft::Core::SettingsItem::getNode | ( | ) | [inline] |
SettingsItem* Updraft::Core::SettingsItem::getParent | ( | ) | [inline] |
void Updraft::Core::SettingsItem::insertChild | ( | SettingsItem * | item, |
int | index | ||
) |
Adds a child SettingsItem into the given position in the children list of this item.
item | The item to insert as a child of this item. |
index | The index at which the item should be inserted. |
void Updraft::Core::SettingsItem::prependChild | ( | SettingsItem * | item | ) |
Adds a child SettingsItem before all children in this SettingsItem.
item | The item to prepend as a child of this item. |
void Updraft::Core::SettingsItem::setIcon | ( | QIcon | i | ) | [inline] |
Sets the icon for this settings item.
Used for setting group icons.
i | The new icon for the item. |
QVector<SettingsItem*> Updraft::Core::SettingsItem::children [private] |
Children of this SettingsItem SettingsModel hierarchy.
QDomNode Updraft::Core::SettingsItem::domNode [private] |
The QDomNode pointing to the data of this setting.
QIcon Updraft::Core::SettingsItem::icon [private] |
Icon used by this item.
The SettingsModel where the data for this item is stored.
SettingsItem* Updraft::Core::SettingsItem::parent [private] |
Parent of this SettingsItem in the SettingsModel hierarchy.