Albert
Loading...
Searching...
No Matches
systemutil.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <albert/export.h>
6#include <filesystem>
7class QString;
8class QUrl;
9template <typename T> class QList;
11
12namespace albert::util
13{
14
17ALBERT_EXPORT void openUrl(const QString &url);
18
20ALBERT_EXPORT void open(const QUrl &url);
21
23ALBERT_EXPORT void open(const QString &path);
24
26ALBERT_EXPORT void open(const std::filesystem::path &path);
27
29ALBERT_EXPORT void setClipboardText(const QString &text);
30
32ALBERT_EXPORT bool havePasteSupport();
33
36ALBERT_EXPORT void setClipboardTextAndPaste(const QString &text);
37
39ALBERT_EXPORT long long runDetachedProcess(const QStringList &commandline);
40
42ALBERT_EXPORT long long runDetachedProcess(const QStringList &commandline, const QString &working_dir);
43
47ALBERT_EXPORT void tryCreateDirectory(const std::filesystem::path &path);
48
49}
Definition systemutil.h:9
Definition backgroundexecutor.h:12
bool havePasteSupport()
Returns the true if the platform supports pasting, else false.
void open(const QUrl &url)
Opens url with the default handler for the scheme.
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.
void tryCreateDirectory(const std::filesystem::path &path)
Tries to create a directory at path.
void setClipboardText(const QString &text)
Sets the system clipboard to text.
long long runDetachedProcess(const QStringList &commandline)
Run the commandline as detached process. Returns the process id.
QList< QString > QStringList
Definition systemutil.h:10