1 #ifndef QSETTINGSDIALOGWIDGET_H 2 #define QSETTINGSDIALOGWIDGET_H 4 #include "qsettingsdialog_global.h" 5 #include "qsettingswidget.h" 19 virtual QString buttonText()
const = 0;
21 virtual QIcon buttonIcon()
const;
23 virtual void showDialog() = 0;
30 static void wrapInDialog(
QDialog *dialog,
QWidget *element,
bool fixedSize =
false);
37 template<
typename TSettingsW
idget>
45 widget(new TSettingsWidget(this))
47 if(this->widget->inherits(
"QDialog"))
48 this->dialog = (
QDialog*)this->widget;
50 this->dialog =
new QDialog(
this);
51 wrapInDialog(this->dialog, this->widget);
57 return this->widget->hasValueChanged();
60 this->widget->resetValueChanged();
63 this->widget->setValue(value);
66 return this->widget->getValue();
69 this->widget->resetValue();
72 return this->widget->searchExpression(regex);
77 return this->widget->windowTitle();
80 return this->widget->windowIcon();
88 TSettingsWidget *widget;
91 #endif // QSETTINGSDIALOGWIDGET_H