From b7aa14f0e8bea1ba4e44a1bed7a3410ad8d2a246 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Fri, 25 Feb 2011 09:43:07 +0200 Subject: [PATCH] GUI: Improve edit application setttings dialog. Make the editor application settings dialog to look similar than include paths dialog. Move buttons right to the list, not below. And remove unnecessary "application" word from button texts. Rename Modify-button to Edit-button since we are not modifying the application but editing its info. Similarly rename Delete- button to Remove-button since we are not deleting the application but removing from the list. --- gui/settings.ui | 90 ++++++++++++++++++++++++++---------------- gui/settingsdialog.cpp | 18 ++++----- gui/settingsdialog.h | 4 +- 3 files changed, 66 insertions(+), 46 deletions(-) diff --git a/gui/settings.ui b/gui/settings.ui index 78c6f405f..f4366013f 100644 --- a/gui/settings.ui +++ b/gui/settings.ui @@ -17,7 +17,7 @@ - 1 + 2 @@ -225,37 +225,58 @@ Applications - + - - - - - - Add application - - - - - - - Delete application - - - - - - - Modify application - - - - - - - Set as default application - - + + + + + + + + + + Add... + + + + + + + Edit... + + + + + + + Remove + + + + + + + Set as default + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + @@ -329,10 +350,9 @@ mShowNoErrorsMessage mShowDebugWarnings mListWidget - mButtonAdd - mButtonDelete - mButtonModify - mButtonDefault + mBtnAddApplication + mBtnEditApplication + mBtnDefaultApplication mSaveAllErrors mSaveFullPath mButtons diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index 8425c8002..513c8ad5c 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -57,16 +57,16 @@ SettingsDialog::SettingsDialog(QSettings *programSettings, connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok())); connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject())); - connect(mUI.mButtonAdd, SIGNAL(clicked()), + connect(mUI.mBtnAddApplication, SIGNAL(clicked()), this, SLOT(AddApplication())); - connect(mUI.mButtonDelete, SIGNAL(clicked()), - this, SLOT(DeleteApplication())); - connect(mUI.mButtonModify, SIGNAL(clicked()), - this, SLOT(ModifyApplication())); - connect(mUI.mButtonDefault, SIGNAL(clicked()), + connect(mUI.mBtnRemoveApplication, SIGNAL(clicked()), + this, SLOT(RemoveApplication())); + connect(mUI.mBtnEditApplication, SIGNAL(clicked()), + this, SLOT(EditApplication())); + connect(mUI.mBtnDefaultApplication, SIGNAL(clicked()), this, SLOT(DefaultApplication())); connect(mUI.mListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), - this, SLOT(ModifyApplication())); + this, SLOT(EditApplication())); connect(mUI.mBtnAddIncludePath, SIGNAL(clicked()), this, SLOT(AddIncludePath())); connect(mUI.mBtnRemoveIncludePath, SIGNAL(clicked()), @@ -207,7 +207,7 @@ void SettingsDialog::AddApplication() } } -void SettingsDialog::DeleteApplication() +void SettingsDialog::RemoveApplication() { QList selected = mUI.mListWidget->selectedItems(); @@ -221,7 +221,7 @@ void SettingsDialog::DeleteApplication() } } -void SettingsDialog::ModifyApplication() +void SettingsDialog::EditApplication() { QList selected = mUI.mListWidget->selectedItems(); QListWidgetItem *item = 0; diff --git a/gui/settingsdialog.h b/gui/settingsdialog.h index 743595fd1..22d3c3253 100644 --- a/gui/settingsdialog.h +++ b/gui/settingsdialog.h @@ -98,13 +98,13 @@ protected slots: * @brief Slot for deleting an application from the list * */ - void DeleteApplication(); + void RemoveApplication(); /** * @brief Slot for modifying an application in the list * */ - void ModifyApplication(); + void EditApplication(); /** * @brief Slot for making the selected application as the default (first)