 |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Go to the documentation of this file.
21 #ifndef __ctkSettingsDialog_h
22 #define __ctkSettingsDialog_h
28 #include "ctkWidgetsExport.h"
30 class QAbstractButton;
32 class QTreeWidgetItem;
33 class ctkSettingsDialogPrivate;
43 Q_PROPERTY(
bool resetButton READ resetButton WRITE setResetButton);
45 Q_PROPERTY(QSettings* settings READ settings WRITE setSettings);
47 Q_PROPERTY(
ctkSettingsPanel* currentPanel READ currentPanel WRITE setCurrentPanel);
54 Q_PROPERTY(
bool restartRequired READ isRestartRequired);
90 Q_INVOKABLE
void addPanel(
const QString& label,
const QIcon& icon,
138 QScopedPointer<ctkSettingsDialogPrivate>
d_ptr;
void settingChanged(const QString &key, const QVariant &value)
Q_INVOKABLE void addPanel(const QString &label, ctkSettingsPanel *panel, ctkSettingsPanel *parentPanel=0)
void adjustTreeWidgetToContents()
Resize the left panel based on the panels titles.
ctkSettingsPanel * currentPanel() const
void setCurrentPanel(const QString &label)
void setSettings(QSettings *settings)
void onSettingChanged(const QString &key, const QVariant &newVal)
void onCurrentItemChanged(QTreeWidgetItem *currentItem, QTreeWidgetItem *previous)
virtual bool event(QEvent *)
ctkSettingsDialog(QWidget *parent=0)
Constructor.
void setResetButton(bool show)
bool isRestartRequired() const
ctkSettingsPanel * panel(const QString &panel) const
void onDialogButtonClicked(QAbstractButton *button)
Q_INVOKABLE void addPanel(ctkSettingsPanel *panel, ctkSettingsPanel *parentPanel=0)
QSettings * settings() const
void restoreDefaultSettings()
Q_INVOKABLE void addPanel(const QString &label, const QIcon &icon, ctkSettingsPanel *panel, ctkSettingsPanel *parentPanel=0)
QDialog Superclass
Superclass typedef.
void setCurrentPanel(ctkSettingsPanel *panel)
virtual ~ctkSettingsDialog()
Destructor.
QScopedPointer< ctkSettingsDialogPrivate > d_ptr