verticalLayout->addWidget(searchInBookmarksCheckBox);
+ connect(historySizeSpinBox, SIGNAL(editingFinished()), this,
+ SLOT(changed()));
+ connect(searchResultSizeSpinBox, SIGNAL(editingFinished()), this,
+ SLOT(changed()));
+ connect(searchInDictionariesCheckBox, SIGNAL(toggled(bool)), this,
+ SLOT(changed()));
+ connect(searchInBookmarksCheckBox, SIGNAL(toggled(bool)), this,
+ SLOT(changed()));
+
+
settings = 0;
#ifndef Q_WS_MAEMO_5
#ifndef Q_WS_MAEMO_5
_save = false;
#endif
+ _changed = false;
settings = guiInterface->settings();
historySizeSpinBox->setValue(
#ifndef Q_WS_MAEMO_5
if(settings && _save) {
#else
- if(settings &&
+ if(settings && _changed &&
QMessageBox::question(this, "Save", "Do you want to save changes?",
QMessageBox::Save, QMessageBox::Cancel) == QMessageBox::Save) {
}
+void SettingsWidget::changed() {
+ _changed = true;
+}
+
#ifndef Q_WS_MAEMO_5
void SettingsWidget::save() {
_save = true;
*/
explicit SettingsWidget(GUIInterface *parent = 0);
+
protected:
void showEvent(QShowEvent *);
void hideEvent(QHideEvent *);
GUIInterface* guiInterface;
Settings* settings;
+ bool _changed;
#ifndef Q_WS_MAEMO_5
QPushButton* closeButton;
QHBoxLayout* footerLayout;
bool _save;
- public Q_SLOTS:
+ private Q_SLOTS:
void save();
#endif
+private Q_SLOTS:
+ void changed();
+
};
#endif // SETTINGSWIDGET_H