summaryrefslogtreecommitdiff
path: root/src/organizercore.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-05-25 01:05:15 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-05-25 01:05:15 -0400
commitf5330efd0d2692eb14738d8ccbe4e269ce165b46 (patch)
treee9510fdf851f747386493b7d5222ece8452de630 /src/organizercore.h
parenta0500fef6c7db55c51334cc1bfc39cc9393fa16b (diff)
a copy of getBinaryExecuteInfo() and openDataFile() was in both mainwindow and modinfodialog, it's now moved to organizercore and renamed getFileExecutionContext() and executefile()
getFileExecutionContext() is also changed to return an enum instead of a 0-1-2 int
Diffstat (limited to 'src/organizercore.h')
-rw-r--r--src/organizercore.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/organizercore.h b/src/organizercore.h
index bfb72529..94cfa5ae 100644
--- a/src/organizercore.h
+++ b/src/organizercore.h
@@ -56,6 +56,13 @@ namespace MOBase {
class IPluginGame;
}
+enum class FileExecutionTypes
+{
+ executable = 1,
+ other = 2
+};
+
+
class OrganizerCore : public QObject, public MOBase::IPluginDiagnose
{
@@ -140,6 +147,12 @@ public:
void doAfterLogin(const std::function<void()> &function) { m_PostLoginTasks.append(function); }
+ static bool getFileExecutionContext(
+ QWidget* parent, const QFileInfo &targetInfo,
+ QFileInfo &binaryInfo, QString &arguments, FileExecutionTypes& type);
+
+ bool executeFile(QWidget* parent, const QFileInfo& targetInfo);
+
void spawnBinary(const QFileInfo &binary, const QString &arguments = "",
const QDir &currentDirectory = QDir(),
const QString &steamAppID = "",