diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-17 13:09:55 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-17 13:09:55 +0000 |
| commit | fcc385fc5c74fb0af9483fefa5be64b95d299189 (patch) | |
| tree | c11c51550f2c613c5cdf68e060029716f7b253e7 /src/plugins/General/notifier | |
| parent | fbf6df0e267774e4cfa32678176869095fa28986 (diff) | |
| download | qmmp-fcc385fc5c74fb0af9483fefa5be64b95d299189.tar.gz qmmp-fcc385fc5c74fb0af9483fefa5be64b95d299189.tar.bz2 qmmp-fcc385fc5c74fb0af9483fefa5be64b95d299189.zip | |
using standard dialog buttons
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@690 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/notifier')
| -rw-r--r-- | src/plugins/General/notifier/settingsdialog.cpp | 5 | ||||
| -rw-r--r-- | src/plugins/General/notifier/settingsdialog.h | 4 | ||||
| -rw-r--r-- | src/plugins/General/notifier/settingsdialog.ui | 96 |
3 files changed, 47 insertions, 58 deletions
diff --git a/src/plugins/General/notifier/settingsdialog.cpp b/src/plugins/General/notifier/settingsdialog.cpp index 3899216ec..297fae316 100644 --- a/src/plugins/General/notifier/settingsdialog.cpp +++ b/src/plugins/General/notifier/settingsdialog.cpp @@ -47,14 +47,13 @@ SettingsDialog::SettingsDialog(QWidget *parent) ui.psiCheckBox->setChecked(settings.value("psi_notification", FALSE).toBool()); ui.desktopCheckBox->setChecked(settings.value("desktop_notification", TRUE).toBool()); settings.endGroup(); - connect(ui.okButton, SIGNAL(clicked()), SLOT(writeSettings())); } SettingsDialog::~SettingsDialog() {} -void SettingsDialog::writeSettings() +void SettingsDialog::accept() { QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); settings.beginGroup("Notifier"); @@ -69,5 +68,5 @@ void SettingsDialog::writeSettings() settings.setValue("psi_notification", ui.psiCheckBox->isChecked()); settings.setValue("desktop_notification", ui.desktopCheckBox->isChecked()); settings.endGroup(); - accept(); + QDialog::accept(); } diff --git a/src/plugins/General/notifier/settingsdialog.h b/src/plugins/General/notifier/settingsdialog.h index 6d5f39a15..04cbc0516 100644 --- a/src/plugins/General/notifier/settingsdialog.h +++ b/src/plugins/General/notifier/settingsdialog.h @@ -37,8 +37,8 @@ public: ~SettingsDialog(); -private slots: - void writeSettings(); +public slots: + virtual void accept(); private: Ui::SettingsDialog ui; diff --git a/src/plugins/General/notifier/settingsdialog.ui b/src/plugins/General/notifier/settingsdialog.ui index d77592dff..8b2df2d37 100644 --- a/src/plugins/General/notifier/settingsdialog.ui +++ b/src/plugins/General/notifier/settingsdialog.ui @@ -6,14 +6,14 @@ <x>0</x> <y>0</y> <width>278</width> - <height>355</height> + <height>330</height> </rect> </property> <property name="windowTitle" > <string>Notifier Plugin Settings</string> </property> - <layout class="QVBoxLayout" > - <item> + <layout class="QGridLayout" name="gridLayout" > + <item row="0" column="0" colspan="2" > <widget class="QGroupBox" name="groupBox_2" > <property name="title" > <string>Psi Notification</string> @@ -29,7 +29,7 @@ </layout> </widget> </item> - <item> + <item row="1" column="0" colspan="2" > <widget class="QGroupBox" name="groupBox" > <property name="title" > <string>Desktop Notification</string> @@ -201,7 +201,7 @@ <property name="orientation" > <enum>Qt::Horizontal</enum> </property> - <property name="sizeHint" > + <property name="sizeHint" stdset="0" > <size> <width>40</width> <height>20</height> @@ -212,69 +212,59 @@ </layout> </widget> </item> - <item> - <layout class="QHBoxLayout" > - <property name="spacing" > - <number>6</number> + <item row="2" column="0" > + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> </property> - <property name="leftMargin" > - <number>0</number> + <property name="sizeHint" stdset="0" > + <size> + <width>131</width> + <height>31</height> + </size> </property> - <property name="topMargin" > - <number>0</number> - </property> - <property name="rightMargin" > - <number>0</number> - </property> - <property name="bottomMargin" > - <number>0</number> + </spacer> + </item> + <item row="2" column="1" > + <widget class="QDialogButtonBox" name="buttonBox" > + <property name="standardButtons" > + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> </property> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" > - <size> - <width>131</width> - <height>31</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="okButton" > - <property name="text" > - <string>OK</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="cancelButton" > - <property name="text" > - <string>Cancel</string> - </property> - </widget> - </item> - </layout> + </widget> </item> </layout> </widget> <resources/> <connections> <connection> - <sender>cancelButton</sender> - <signal>clicked()</signal> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>SettingsDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel" > + <x>183</x> + <y>303</y> + </hint> + <hint type="destinationlabel" > + <x>62</x> + <y>314</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> <receiver>SettingsDialog</receiver> <slot>reject()</slot> <hints> <hint type="sourcelabel" > - <x>336</x> - <y>210</y> + <x>249</x> + <y>298</y> </hint> <hint type="destinationlabel" > - <x>179</x> - <y>224</y> + <x>95</x> + <y>299</y> </hint> </hints> </connection> |
