Albert
Loading...
Searching...
No Matches
systemutil.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <QtGlobal>
6#include <albert/export.h>
7#include <filesystem>
8class QString;
9class QUrl;
10template <typename T> class QList;
12
13namespace albert
14{
15
19
25ALBERT_EXPORT void openUrl(const QString &url);
26
28ALBERT_EXPORT void open(const QUrl &url);
29
31ALBERT_EXPORT void open(const QString &path);
32
34ALBERT_EXPORT void open(const std::filesystem::path &path);
35
37ALBERT_EXPORT void setClipboardText(const QString &text);
38
40ALBERT_EXPORT bool havePasteSupport();
41
47ALBERT_EXPORT void setClipboardTextAndPaste(const QString &text);
48
55ALBERT_EXPORT long long runDetachedProcess(const QStringList &commandline);
56
64ALBERT_EXPORT long long runDetachedProcess(const QStringList &commandline, const QString &working_dir);
65
67ALBERT_EXPORT QString toQString(const std::filesystem::path &path);
68
69#ifdef Q_OS_MAC
76ALBERT_EXPORT QString runAppleScript(const QString &script);
77#endif
78
80
81}
Definition systemutil.h:10
bool havePasteSupport()
Returns the true if the platform supports pasting, else false.
void setClipboardText(const QString &text)
Sets the system clipboard to text.
void open(const QUrl &url)
Opens url with the default handler for the scheme.
QString toQString(const std::filesystem::path &path)
Returns a QString representation of path.
long long runDetachedProcess(const QStringList &commandline)
Starts the commandline in a new process, and detaches from it.
void setClipboardTextAndPaste(const QString &text)
Sets the system clipboard to text and pastes text to the front-most window.
void openUrl(const QString &url)
Opens url with the default handler for the scheme.
Definition app.h:56