diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-06-07 19:26:54 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-06-15 14:40:39 -0400 |
| commit | fafdb146004401355db5245cc1f7c241c00cf991 (patch) | |
| tree | f4cf3fd832369e705d57da7158ff67c215ee3081 /src/executableslist.h | |
| parent | 65ad374d9769524a62ac423b7d73661e42163265 (diff) | |
fixed EditExecutablesDialog being opened without a parent
removed Executable's constructor with values, replaced with default ctor + setters, all these strings were much too error-prone
added Executable ctor overload to convert from ExecutableInfo
plugin executables now override most of the custom changes
renamed browseButton to browseBinaryButton to avoid confusion with the other browseDirButton
fixed both browse dialogs not handling cancel
EditExecutablesDialog's list used to change the text color for custom executables, replaced with italics
Diffstat (limited to 'src/executableslist.h')
| -rw-r--r-- | src/executableslist.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/executableslist.h b/src/executableslist.h index e35cb550..54a105d0 100644 --- a/src/executableslist.h +++ b/src/executableslist.h @@ -27,7 +27,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QFileInfo>
#include <QMetaType>
-namespace MOBase { class IPluginGame; }
+namespace MOBase { class IPluginGame; class ExecutableInfo; }
/*!
* @brief Information about an executable
@@ -44,9 +44,12 @@ public: Q_DECLARE_FLAGS(Flags, Flag);
- Executable(
- QString title, QFileInfo binaryInfo, QString arguments,
- QString steamAppID, QString workingDirectory, Flags flags);
+ Executable() = default;
+
+ /**
+ * @brief Executable from plugin
+ */
+ Executable(const MOBase::ExecutableInfo& info, Flags flags);
const QString& title() const;
const QFileInfo& binaryInfo() const;
@@ -55,6 +58,13 @@ public: const QString& workingDirectory() const;
Flags flags() const;
+ Executable& title(const QString& s);
+ Executable& binaryInfo(const QFileInfo& fi);
+ Executable& arguments(const QString& s);
+ Executable& steamAppID(const QString& s);
+ Executable& workingDirectory(const QString& s);
+ Executable& flags(Flags f);
+
bool isCustom() const;
bool isShownOnToolbar() const;
void setShownOnToolbar(bool state);
|
