Updraft  1.0
Open source glider flight visualisation tool.
Updraft::Core::SettingsDelegate Class Reference

This class allows us to override the default editors for setting items. More...

#include <settingsdelegate.h>

List of all members.

Public Member Functions

 SettingsDelegate (QObject *parent=0)
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 Created an editor for the setting at the given model index.
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 Trensfers the data from the item editor to the data model.
void setEditorData (QWidget *editor, const QModelIndex &index) const
 Transfers the data from the model to the editor.

Detailed Description

This class allows us to override the default editors for setting items.


Constructor & Destructor Documentation

Updraft::Core::SettingsDelegate::SettingsDelegate ( QObject *  parent = 0) [explicit]

Member Function Documentation

QWidget * Updraft::Core::SettingsDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Created an editor for the setting at the given model index.

Parameters:
parentThe parent that should be set in the editor.
optionStyle option for the item at the given index.
indexThe model index of the setting for which the editor should be created.
void Updraft::Core::SettingsDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const

Transfers the data from the model to the editor.

Parameters:
editorThe editor for this item that was previously created with the createEditor() method.
indexThe model index of the settings item whose data should be transfered.
void Updraft::Core::SettingsDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

Trensfers the data from the item editor to the data model.

Parameters:
editorPointer to the editor widget for this setting's item.
modelPointer to the model containing the setting.
indexIndex at which the setting resides in the model.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines