summaryrefslogtreecommitdiff
path: root/src/executableslist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/executableslist.h')
-rw-r--r--src/executableslist.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/executableslist.h b/src/executableslist.h
index 207190c4..888dbfe1 100644
--- a/src/executableslist.h
+++ b/src/executableslist.h
@@ -95,6 +95,14 @@ public:
Executable &find(const QString &tilte);
/**
+ * @brief find an executable by a fileinfo structure
+ * @param info the info object to search for
+ * @return the executable
+ * @exception runtime_error will throw an exception if the name is not correct
+ */
+ Executable &findByBinary(const QFileInfo &info);
+
+ /**
* @brief determine if an executable exists
* @param title the title of the executable to look up
* @return true if the executable exists, false otherwise
@@ -116,8 +124,16 @@ public:
* @param closeMO if true, MO will be closed when the binary is started
**/
void addExecutable(const QString &title, const QString &executableName, const QString &arguments,
- const QString &workingDirectory, MOBase::ExecutableInfo::CloseMOStyle closeMO,
- const QString &steamAppID, bool custom, bool toolbar);
+ const QString &workingDirectory, MOBase::ExecutableInfo::CloseMOStyle closeMO, const QString &steamAppID,
+ bool custom, bool toolbar, int pos = -1);
+
+ /**
+ * @brief change position of an executable which is expected to exist
+ * @param title title of the executable
+ * @param toolbar enable/disable placement on the toolbar
+ * @param pos new position for the executable
+ */
+ void position(const QString &title, bool toolbar, int pos);
/**
* @brief remove the executable with the specified file name. This needs to be an absolute file path
@@ -145,7 +161,7 @@ public:
private:
- Executable *findExe(const QString &title);
+ std::vector<Executable>::iterator findExe(const QString &title);
void addExecutableInternal(const QString &title, const QString &executableName, const QString &arguments,
const QString &workingDirectory, MOBase::ExecutableInfo::CloseMOStyle closeMO,