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

Dialog window for editing settings. More...

#include <settingsdialog.h>

Collaboration diagram for Updraft::Core::SettingsDialog:

List of all members.

Public Member Functions

 SettingsDialog (QWidget *parent, SettingsManager *manager)
 Initializes the dialog, setting its parent and most importantly the SettingsManager.
 ~SettingsDialog ()
void setModel (QAbstractItemModel *model)
 Sets the data model for the dialog.
void recalculateTopViewWidth ()
 Updates the width of the top view widget so that it accomodates all the group names.
void commitEditorData ()
 Commits the data of the bottom view editors to the model.
void resetEditors ()
 Reverts data of the bottom view editors to values present in the model.

Protected Slots

void buttonBoxClicked (QAbstractButton *button)
 Handles the click events on all buttons of the dialog.
void hideCheckboxToggled ()
 Handles the toggle of the advanced setting group toggling check-box.
void restartNeeded (bool needed)
 Shows/hides the label that explains the asterisk in the setting names.

Protected Attributes

Ui::SettingsDialog * ui
 The pointer to the UI of this dialog.
SettingsDelegatesettingsDelegate
 Delegate used to create the editors for all settings.
SettingsManagersettingsManager
 The manager that was used to create this dialog.

Detailed Description

Dialog window for editing settings.

Contains two views - SettingsTopView displays setting groups and SettingsBottomView displays the individual settings for a group.


Constructor & Destructor Documentation

Updraft::Core::SettingsDialog::SettingsDialog ( QWidget *  parent,
SettingsManager manager 
)

Initializes the dialog, setting its parent and most importantly the SettingsManager.

Parameters:
parentThe QWidget parent of the dialog widget.
managerThe SettingsManager from which the dialog takes the data

Member Function Documentation

void Updraft::Core::SettingsDialog::buttonBoxClicked ( QAbstractButton *  button) [protected, slot]

Handles the click events on all buttons of the dialog.

Parameters:
buttonPointer to the button that emited the event.

Commits the data of the bottom view editors to the model.

Handles the toggle of the advanced setting group toggling check-box.

Updates the width of the top view widget so that it accomodates all the group names.

Reverts data of the bottom view editors to values present in the model.

void Updraft::Core::SettingsDialog::restartNeeded ( bool  needed) [protected, slot]

Shows/hides the label that explains the asterisk in the setting names.

void Updraft::Core::SettingsDialog::setModel ( QAbstractItemModel *  model)

Sets the data model for the dialog.

The dialog makes no assumptions about the specific class of the model, so even the standard Qt's data models can be used.

Parameters:
modelThe model to be used by this dialog

Member Data Documentation

Delegate used to create the editors for all settings.

The manager that was used to create this dialog.

Ui::SettingsDialog* Updraft::Core::SettingsDialog::ui [protected]

The pointer to the UI of this dialog.


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