CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkSettingsDialog Class Reference

#include <Libs/Widgets/ctkSettingsDialog.h>

Inheritance diagram for ctkSettingsDialog:
Inheritance graph
[legend]
Collaboration diagram for ctkSettingsDialog:
Collaboration graph
[legend]

Public Types

typedef QDialog Superclass
 Superclass typedef. More...
 

Public Slots

virtual void accept ()
 
void adjustTreeWidgetToContents ()
 Resize the left panel based on the panels titles. More...
 
void applySettings ()
 
virtual void reject ()
 
void reloadSettings ()
 
void resetSettings ()
 
void restoreDefaultSettings ()
 
void setCurrentPanel (const QString &label)
 
void setCurrentPanel (ctkSettingsPanel *panel)
 

Signals

void restartRequested ()
 
void settingChanged (const QString &key, const QVariant &value)
 

Public Member Functions

Q_INVOKABLE void addPanel (const QString &label, const QIcon &icon, ctkSettingsPanel *panel, ctkSettingsPanel *parentPanel=0)
 
Q_INVOKABLE void addPanel (const QString &label, ctkSettingsPanel *panel, ctkSettingsPanel *parentPanel=0)
 
Q_INVOKABLE void addPanel (ctkSettingsPanel *panel, ctkSettingsPanel *parentPanel=0)
 
 ctkSettingsDialog (QWidget *parent=0)
 Constructor. More...
 
ctkSettingsPanelcurrentPanel () const
 
bool isRestartRequired () const
 
ctkSettingsPanelpanel (const QString &panel) const
 
bool resetButton () const
 
void setResetButton (bool show)
 
void setSettings (QSettings *settings)
 
QSettings * settings () const
 
virtual ~ctkSettingsDialog ()
 Destructor. More...
 

Protected Slots

void onCurrentItemChanged (QTreeWidgetItem *currentItem, QTreeWidgetItem *previous)
 
void onDialogButtonClicked (QAbstractButton *button)
 
void onSettingChanged (const QString &key, const QVariant &newVal)
 

Protected Member Functions

virtual bool event (QEvent *)
 

Protected Attributes

QScopedPointer< ctkSettingsDialogPrivate > d_ptr
 

Properties

ctkSettingsPanelcurrentPanel
 
bool resetButton
 
bool restartRequired
 
QSettings * settings
 

Detailed Description

Definition at line 37 of file ctkSettingsDialog.h.

Member Typedef Documentation

◆ Superclass

Superclass typedef.

Definition at line 58 of file ctkSettingsDialog.h.

Constructor & Destructor Documentation

◆ ctkSettingsDialog()

ctkSettingsDialog::ctkSettingsDialog ( QWidget *  parent = 0)
explicit

Constructor.

◆ ~ctkSettingsDialog()

virtual ctkSettingsDialog::~ctkSettingsDialog ( )
virtual

Destructor.

Member Function Documentation

◆ accept

virtual void ctkSettingsDialog::accept ( )
virtualslot

◆ addPanel() [1/3]

Q_INVOKABLE void ctkSettingsDialog::addPanel ( const QString &  label,
const QIcon &  icon,
ctkSettingsPanel panel,
ctkSettingsPanel parentPanel = 0 
)

This convenience overload allows the caller to specify the panel name that will be used in the panels list, as well as an icon for the panel.

◆ addPanel() [2/3]

Q_INVOKABLE void ctkSettingsDialog::addPanel ( const QString &  label,
ctkSettingsPanel panel,
ctkSettingsPanel parentPanel = 0 
)

This convenience overload allows the caller to specify the panel name that will be used in the panels list.

◆ addPanel() [3/3]

Q_INVOKABLE void ctkSettingsDialog::addPanel ( ctkSettingsPanel panel,
ctkSettingsPanel parentPanel = 0 
)

Add settings panel to the dialog.

This adds the specified settings panel to the dialog. The panel's QWidget::windowTitle property is used as the panel name as shown in the panels list.

◆ adjustTreeWidgetToContents

void ctkSettingsDialog::adjustTreeWidgetToContents ( )
slot

Resize the left panel based on the panels titles.

◆ applySettings

void ctkSettingsDialog::applySettings ( )
slot

◆ currentPanel()

ctkSettingsPanel* ctkSettingsDialog::currentPanel ( ) const

◆ event()

virtual bool ctkSettingsDialog::event ( QEvent *  )
protectedvirtual

◆ isRestartRequired()

bool ctkSettingsDialog::isRestartRequired ( ) const

◆ onCurrentItemChanged

void ctkSettingsDialog::onCurrentItemChanged ( QTreeWidgetItem *  currentItem,
QTreeWidgetItem *  previous 
)
protectedslot

◆ onDialogButtonClicked

void ctkSettingsDialog::onDialogButtonClicked ( QAbstractButton *  button)
protectedslot

◆ onSettingChanged

void ctkSettingsDialog::onSettingChanged ( const QString &  key,
const QVariant &  newVal 
)
protectedslot

◆ panel()

ctkSettingsPanel* ctkSettingsDialog::panel ( const QString &  panel) const

◆ reject

virtual void ctkSettingsDialog::reject ( )
virtualslot

◆ reloadSettings

void ctkSettingsDialog::reloadSettings ( )
slot

Reload settings for all registered panels.

This reloads the settings for all panels, effectively throwing out any values in the UI or the panels' caches and reverting to the values in the associated QSettings. You should call this if you have made changes to the QSettings that were not made through ctkSettingsPanel.

◆ resetButton()

bool ctkSettingsDialog::resetButton ( ) const

◆ resetSettings

void ctkSettingsDialog::resetSettings ( )
slot

◆ restartRequested

void ctkSettingsDialog::restartRequested ( )
signal

Signal fired when the user accepts to restart the application because some OptionRestartRequired settings have changed.

See also
isrestartRequired

◆ restoreDefaultSettings

void ctkSettingsDialog::restoreDefaultSettings ( )
slot

◆ setCurrentPanel [1/2]

void ctkSettingsDialog::setCurrentPanel ( const QString &  label)
slot

◆ setCurrentPanel [2/2]

void ctkSettingsDialog::setCurrentPanel ( ctkSettingsPanel panel)
slot

◆ setResetButton()

void ctkSettingsDialog::setResetButton ( bool  show)

◆ setSettings()

void ctkSettingsDialog::setSettings ( QSettings *  settings)

◆ settingChanged

void ctkSettingsDialog::settingChanged ( const QString &  key,
const QVariant &  value 
)
signal

◆ settings()

QSettings* ctkSettingsDialog::settings ( ) const

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkSettingsDialogPrivate> ctkSettingsDialog::d_ptr
protected

Definition at line 138 of file ctkSettingsDialog.h.

Property Documentation

◆ currentPanel

ctkSettingsPanel* ctkSettingsDialog::currentPanel
readwrite

Definition at line 1 of file ctkSettingsDialog.h.

◆ resetButton

bool ctkSettingsDialog::resetButton
readwrite

This property controls whether the reset button is visible in the button box or not. The Cancel button is a reset button and closes the dialog at the same time.

Definition at line 1 of file ctkSettingsDialog.h.

◆ restartRequired

bool ctkSettingsDialog::restartRequired
read

Specifies if a restart required to fully apply changes.

This property is true if at least one OptionRestartRequired setting is changed. It doesn't imply that the user accepted to restart the application.

Definition at line 1 of file ctkSettingsDialog.h.

◆ settings

QSettings* ctkSettingsDialog::settings
readwrite

Definition at line 1 of file ctkSettingsDialog.h.


The documentation for this class was generated from the following file: