summaryrefslogtreecommitdiff
path: root/src/organizercore.h
diff options
context:
space:
mode:
authorAl <gabriel.cortesi@outlook.com>2019-05-26 12:24:02 +0200
committerGitHub <noreply@github.com>2019-05-26 12:24:02 +0200
commit2caa688e5581849441b1c96e4a2d357e9241f74a (patch)
treec99b83f84f4be692663be4256e9ec955f4258e7e /src/organizercore.h
parent2d58ad346c9e8840d3864080d62999e686962a76 (diff)
parent21185182c6551d053cccdcf087e0c219a3785cf8 (diff)
Merge pull request #731 from isanae/filetree-dds-preview-630
Add preview to filetree, some refactoring
Diffstat (limited to 'src/organizercore.h')
-rw-r--r--src/organizercore.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/organizercore.h b/src/organizercore.h
index bfb72529..9c4e3ae2 100644
--- a/src/organizercore.h
+++ b/src/organizercore.h
@@ -56,6 +56,20 @@ namespace MOBase {
class IPluginGame;
}
+
+namespace shell
+{
+ bool ExploreFile(const QFileInfo& info);
+ bool ExploreFile(const QString& path);
+ bool ExploreFile(const QDir& dir);
+
+ bool OpenFile(const QString& path);
+ bool OpenLink(const QUrl& url);
+
+ bool Execute(const QString& program, const QString& params);
+}
+
+
class OrganizerCore : public QObject, public MOBase::IPluginDiagnose
{
@@ -87,6 +101,12 @@ private:
typedef boost::signals2::signal<void (const QString&)> SignalModInstalled;
public:
+ enum class FileExecutionTypes
+ {
+ Executable = 1,
+ Other = 2
+ };
+
static bool isNxmLink(const QString &link) { return link.startsWith("nxm://", Qt::CaseInsensitive); }
OrganizerCore(const QSettings &initSettings);
@@ -140,6 +160,14 @@ 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 executeFileVirtualized(QWidget* parent, const QFileInfo& targetInfo);
+ bool previewFileWithAlternatives(QWidget* parent, QString filename);
+ bool previewFile(QWidget* parent, const QString& originName, const QString& path);
+
void spawnBinary(const QFileInfo &binary, const QString &arguments = "",
const QDir &currentDirectory = QDir(),
const QString &steamAppID = "",