| 1 |
#ifndef DESKTOP_UTILS_DESKTOPSERVICES_H |
| 2 |
#define DESKTOP_UTILS_DESKTOPSERVICES_H |
| 3 |
|
| 4 |
#include "../global.h" |
| 5 |
|
| 6 |
#include <QMetaObject> |
| 7 |
#include <QPalette> |
| 8 |
|
| 9 |
#include <functional> |
| 10 |
#include <optional> |
| 11 |
|
| 12 |
QT_FORWARD_DECLARE_CLASS(QObject) |
| 13 |
QT_FORWARD_DECLARE_CLASS(QString) |
| 14 |
|
| 15 |
namespace QtUtilities { |
| 16 |
|
| 17 |
QT_UTILITIES_EXPORT bool openLocalFileOrDir(const QString &path); |
| 18 |
QT_UTILITIES_EXPORT bool isPaletteDark(const QPalette &palette = QPalette()); |
| 19 |
QT_UTILITIES_EXPORT std::optional<bool> isDarkModeEnabled(); |
| 20 |
QT_UTILITIES_EXPORT QMetaObject::Connection onDarkModeChanged( |
| 21 |
std::function<void(bool)> &&darkModeChangedCallback, QObject *context = nullptr, bool invokeImmediately = true); |
| 22 |
|
| 23 |
} |
| 24 |
|
| 25 |
#endif |