1#ifndef DESKTOP_UTILS_DESKTOPSERVICES_H
2#define DESKTOP_UTILS_DESKTOPSERVICES_H
12QT_FORWARD_DECLARE_CLASS(QObject)
13QT_FORWARD_DECLARE_CLASS(QString)
21 std::function<
void(
bool)> &&darkModeChangedCallback, QObject *context =
nullptr,
bool invokeImmediately =
true);
#define QT_UTILITIES_EXPORT
Marks the symbol to be exported by the qtutilities library.
QT_UTILITIES_EXPORT QMetaObject::Connection onDarkModeChanged(std::function< void(bool)> &&darkModeChangedCallback, QObject *context=nullptr, bool invokeImmediately=true)
Invokes the specified callback when the color scheme changed.
QT_UTILITIES_EXPORT std::optional< bool > isDarkModeEnabled()
Returns whether dark mode is enabled.
QT_UTILITIES_EXPORT bool isPaletteDark(const QPalette &palette=QPalette())
Returns whether palette is dark.
QT_UTILITIES_EXPORT bool openLocalFileOrDir(const QString &path)
Shows the specified file or directory using the default file browser.