From 840dba26bacd044164d3236218e42f441433252c Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 7 Jun 2019 19:55:41 -0400 Subject: rework of the executables dialog to have a horizontal splitter and use a standard QDialogButtonBox --- src/editexecutablesdialog.cpp | 10 +- src/editexecutablesdialog.h | 5 +- src/editexecutablesdialog.ui | 613 +++++++++++++++++++++++------------------- 3 files changed, 347 insertions(+), 281 deletions(-) (limited to 'src') diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp index a3b2808a..559bc8f0 100644 --- a/src/editexecutablesdialog.cpp +++ b/src/editexecutablesdialog.cpp @@ -42,6 +42,9 @@ EditExecutablesDialog::EditExecutablesDialog( , m_GamePlugin(game) { ui->setupUi(this); + ui->splitter->setSizes({200, 1}); + ui->splitter->setStretchFactor(0, 0); + ui->splitter->setStretchFactor(1, 1); refreshExecutablesWidget(); @@ -367,8 +370,10 @@ void EditExecutablesDialog::on_overwriteAppIDBox_toggled(bool checked) ui->appIDOverwriteEdit->setEnabled(checked); } -void EditExecutablesDialog::on_closeButton_clicked() +void EditExecutablesDialog::on_buttonBox_clicked(QAbstractButton*) { + // there's only a close button for now, so the actual button doesn't matter + if (executableChanged()) { QMessageBox::StandardButton res = QMessageBox::question(this, tr("Save Changes?"), tr("You made changes to the current executable, do you want to save them?"), @@ -382,7 +387,8 @@ void EditExecutablesDialog::on_closeButton_clicked() refreshExecutablesWidget(); } } - this->accept(); + + accept(); } void EditExecutablesDialog::on_executablesListBox_clicked(const QModelIndex ¤t) diff --git a/src/editexecutablesdialog.h b/src/editexecutablesdialog.h index 3a856afa..07d6459c 100644 --- a/src/editexecutablesdialog.h +++ b/src/editexecutablesdialog.h @@ -22,10 +22,11 @@ along with Mod Organizer. If not, see . #include "tutorabledialog.h" #include -#include #include "executableslist.h" #include "profile.h" #include "iplugingame.h" +#include +#include namespace Ui { class EditExecutablesDialog; @@ -88,7 +89,7 @@ private slots: void on_browseDirButton_clicked(); - void on_closeButton_clicked(); + void on_buttonBox_clicked(QAbstractButton *button); void delayedRefresh(); diff --git a/src/editexecutablesdialog.ui b/src/editexecutablesdialog.ui index adda050c..1cf1116a 100644 --- a/src/editexecutablesdialog.ui +++ b/src/editexecutablesdialog.ui @@ -6,8 +6,8 @@ 0 0 - 426 - 460 + 524 + 366 @@ -21,293 +21,354 @@ - - - List of configured executables + + + + 0 + 100 + - - This is a list of your configured executables. Executables in grey are automatically recognised and can not be modified. - - - QAbstractItemView::InternalMove - - - Qt::TargetMoveAction - - - QAbstractItemView::ExtendedSelection - - - - - - - - - Title - - - - - - - Name of the executable. This is only for display purposes. - - - Name of the executable. This is only for display purposes. - - - - - - - - - - - Binary - - - - - - - Binary to run - - - Binary to run - - - - - - - Browse filesystem - - - Browse filesystem for the executable to run. - - - ... - - - - - - - - - - - Start in - - - - - - - - - - ... - - - - - - - - - - - Arguments - - - - - - - Arguments to pass to the application - - - Arguments to pass to the application - - - - - - - - - - - Allow the Steam AppID to be used for this executable to be changed. - - - Allow the Steam AppID to be used for this executable to be changed. + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Horizontal + + + false + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + List of configured executables + + + This is a list of your configured executables. Executables in grey are automatically recognised and can not be modified. + + + QAbstractItemView::InternalMove + + + Qt::TargetMoveAction + + + QAbstractItemView::ExtendedSelection + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + Title + + + + + + + Name of the executable. This is only for display purposes. + + + Name of the executable. This is only for display purposes. + + + + + + + + + + + Binary + + + + + + + Binary to run + + + Binary to run + + + + + + + Browse filesystem + + + Browse filesystem for the executable to run. + + + ... + + + + + + + + + + + Start in + + + + + + + + + + ... + + + + + + + + + + + Arguments + + + + + + + Arguments to pass to the application + + + Arguments to pass to the application + + + + + + + + + + + Allow the Steam AppID to be used for this executable to be changed. + + + Allow the Steam AppID to be used for this executable to be changed. Every game/tool distributed through Steam has a unique ID. MO needs to know this ID to start those programs directly, otherwise the program is started by steam and then MO will not work. By default, MO will use the AppID for the game. Right now the only case I know of where this needs to be overwritten is for the Skyrim Creation Kit which has its own AppID. This overwrite is already preconfigured. - - - Overwrite Steam AppID - - - - - - - false - - - Steam AppID to use for this executable that differs from the games AppID. - - - Steam AppID to use for this executable that differs from the games AppID. + + + Overwrite Steam AppID + + + + + + + false + + + Steam AppID to use for this executable that differs from the games AppID. + + + Steam AppID to use for this executable that differs from the games AppID. Every game/tool distributed through Steam has a unique ID. MO needs to know this ID to start those programs directly, otherwise the program is started by steam and then MO will not work. By default, MO will use the AppID for the game (usually 72850). Right now the only case I know of where this needs to be overwritten is for the Skyrim Creation Kit which has its own AppID (usually 202480). This overwrite is already preconfigured. - - - - - - - - - - - If this is enabled, new files are created in the specified mod instead of the "Overwrite" mod. - - - Create Files in Mod instead of Overwrite (*) - - - - - - - false - - - - - - - - - - - If this is enabled, the configured libraries will be automatically loaded when this executable is launched. - - - Force Load Libraries (*) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - false - - - Configure Libraries - - - - - - - - - Use Application's Icon for shortcuts - + + + + + + + + + + + If this is enabled, new files are created in the specified mod instead of the "Overwrite" mod. + + + Create Files in Mod instead of Overwrite (*) + + + + + + + false + + + + + + + + + + + If this is enabled, the configured libraries will be automatically loaded when this executable is launched. + + + Force Load Libraries (*) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + false + + + Configure Libraries + + + + + + + + + Use Application's Icon for shortcuts + + + + + + + (*) This setting is profile-specific + + + + + + + + + Add an executable + + + Add an executable + + + Add + + + + :/new/guiresources/resources/list-add.png:/new/guiresources/resources/list-add.png + + + + + + + Remove the selected executable + + + Remove the selected executable + + + Remove + + + + :/new/guiresources/resources/list-remove.png:/new/guiresources/resources/list-remove.png + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + - - - (*) This setting is profile-specific + + + QDialogButtonBox::Close - - - - - - Add an executable - - - Add an executable - - - Add - - - - :/new/guiresources/resources/list-add.png:/new/guiresources/resources/list-add.png - - - - - - - Remove the selected executable - - - Remove the selected executable - - - Remove - - - - :/new/guiresources/resources/list-remove.png:/new/guiresources/resources/list-remove.png - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Close - - - - - - executablesListBox titleEdit binaryEdit browseBinaryButton @@ -318,10 +379,8 @@ Right now the only case I know of where this needs to be overwritten is for the appIDOverwriteEdit newFilesModCheckBox newFilesModBox - useAppIconCheckBox addButton removeButton - closeButton -- cgit v1.3.1