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.
This commit is contained in:
parent
dd717427e1
commit
b7aa14f0e8
|
@ -17,7 +17,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -225,37 +225,58 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Applications</string>
|
<string>Applications</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="mListWidget"/>
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
</item>
|
<item>
|
||||||
<item>
|
<widget class="QListWidget" name="mListWidget"/>
|
||||||
<widget class="QPushButton" name="mButtonAdd">
|
</item>
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Add application</string>
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
</property>
|
<item>
|
||||||
</widget>
|
<widget class="QPushButton" name="mBtnAddApplication">
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>Add...</string>
|
||||||
<widget class="QPushButton" name="mButtonDelete">
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>Delete application</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</widget>
|
<widget class="QPushButton" name="mBtnEditApplication">
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>Edit...</string>
|
||||||
<widget class="QPushButton" name="mButtonModify">
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>Modify application</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</widget>
|
<widget class="QPushButton" name="mBtnRemoveApplication">
|
||||||
</item>
|
<property name="text">
|
||||||
<item>
|
<string>Remove</string>
|
||||||
<widget class="QPushButton" name="mButtonDefault">
|
</property>
|
||||||
<property name="text">
|
</widget>
|
||||||
<string>Set as default application</string>
|
</item>
|
||||||
</property>
|
<item>
|
||||||
</widget>
|
<widget class="QPushButton" name="mBtnDefaultApplication">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set as default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -329,10 +350,9 @@
|
||||||
<tabstop>mShowNoErrorsMessage</tabstop>
|
<tabstop>mShowNoErrorsMessage</tabstop>
|
||||||
<tabstop>mShowDebugWarnings</tabstop>
|
<tabstop>mShowDebugWarnings</tabstop>
|
||||||
<tabstop>mListWidget</tabstop>
|
<tabstop>mListWidget</tabstop>
|
||||||
<tabstop>mButtonAdd</tabstop>
|
<tabstop>mBtnAddApplication</tabstop>
|
||||||
<tabstop>mButtonDelete</tabstop>
|
<tabstop>mBtnEditApplication</tabstop>
|
||||||
<tabstop>mButtonModify</tabstop>
|
<tabstop>mBtnDefaultApplication</tabstop>
|
||||||
<tabstop>mButtonDefault</tabstop>
|
|
||||||
<tabstop>mSaveAllErrors</tabstop>
|
<tabstop>mSaveAllErrors</tabstop>
|
||||||
<tabstop>mSaveFullPath</tabstop>
|
<tabstop>mSaveFullPath</tabstop>
|
||||||
<tabstop>mButtons</tabstop>
|
<tabstop>mButtons</tabstop>
|
||||||
|
|
|
@ -57,16 +57,16 @@ SettingsDialog::SettingsDialog(QSettings *programSettings,
|
||||||
|
|
||||||
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok()));
|
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok()));
|
||||||
connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject()));
|
connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
connect(mUI.mButtonAdd, SIGNAL(clicked()),
|
connect(mUI.mBtnAddApplication, SIGNAL(clicked()),
|
||||||
this, SLOT(AddApplication()));
|
this, SLOT(AddApplication()));
|
||||||
connect(mUI.mButtonDelete, SIGNAL(clicked()),
|
connect(mUI.mBtnRemoveApplication, SIGNAL(clicked()),
|
||||||
this, SLOT(DeleteApplication()));
|
this, SLOT(RemoveApplication()));
|
||||||
connect(mUI.mButtonModify, SIGNAL(clicked()),
|
connect(mUI.mBtnEditApplication, SIGNAL(clicked()),
|
||||||
this, SLOT(ModifyApplication()));
|
this, SLOT(EditApplication()));
|
||||||
connect(mUI.mButtonDefault, SIGNAL(clicked()),
|
connect(mUI.mBtnDefaultApplication, SIGNAL(clicked()),
|
||||||
this, SLOT(DefaultApplication()));
|
this, SLOT(DefaultApplication()));
|
||||||
connect(mUI.mListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
|
connect(mUI.mListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
|
||||||
this, SLOT(ModifyApplication()));
|
this, SLOT(EditApplication()));
|
||||||
connect(mUI.mBtnAddIncludePath, SIGNAL(clicked()),
|
connect(mUI.mBtnAddIncludePath, SIGNAL(clicked()),
|
||||||
this, SLOT(AddIncludePath()));
|
this, SLOT(AddIncludePath()));
|
||||||
connect(mUI.mBtnRemoveIncludePath, SIGNAL(clicked()),
|
connect(mUI.mBtnRemoveIncludePath, SIGNAL(clicked()),
|
||||||
|
@ -207,7 +207,7 @@ void SettingsDialog::AddApplication()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::DeleteApplication()
|
void SettingsDialog::RemoveApplication()
|
||||||
{
|
{
|
||||||
|
|
||||||
QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems();
|
QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems();
|
||||||
|
@ -221,7 +221,7 @@ void SettingsDialog::DeleteApplication()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsDialog::ModifyApplication()
|
void SettingsDialog::EditApplication()
|
||||||
{
|
{
|
||||||
QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems();
|
QList<QListWidgetItem *> selected = mUI.mListWidget->selectedItems();
|
||||||
QListWidgetItem *item = 0;
|
QListWidgetItem *item = 0;
|
||||||
|
|
|
@ -98,13 +98,13 @@ protected slots:
|
||||||
* @brief Slot for deleting an application from the list
|
* @brief Slot for deleting an application from the list
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void DeleteApplication();
|
void RemoveApplication();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Slot for modifying an application in the list
|
* @brief Slot for modifying an application in the list
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void ModifyApplication();
|
void EditApplication();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Slot for making the selected application as the default (first)
|
* @brief Slot for making the selected application as the default (first)
|
||||||
|
|
Loading…
Reference in New Issue