MauiMan

mauimanutils.h
1#pragma once
2
3#include <QObject>
4#include "mauiman_export.h"
5
6/**
7 * @brief The MauiManUtils class
8 */
9class MAUIMAN_EXPORT MauiManUtils : public QObject
10{
11 Q_OBJECT
12 /**
13 * Whether the server application is running, listening and broadcasting events.
14 */
15 Q_PROPERTY(bool serverRunning READ serverRunning NOTIFY serverRunningChanged)
16
17public:
18 explicit MauiManUtils(QObject *parent = nullptr);
19
20 bool serverRunning() const;
21
22 /**
23 * @brief Invoke the `MauiManServer4` application to be launched.
24 */
25 static void startServer();
26
27 /**
28 * @brief Invoke the `MauiSettings` application to be launched at a given module name
29 * @param module the name of the module to be launched
30 */
31 static void invokeManager(const QString &module);
32
33 /**
34 * @brief The name of the current desktop environment. Possible values are KDE, GNOME, or CASK
35 * @return the name of the desktop environment as parsed form the env var `XDG_CURRENT_DESKTOP`
36 */
37 static QString currentDesktopSession();
38
39 /**
40 * @brief Whether the current desktop environment session is running Maui Shell
41 * @return
42 */
43 static bool isMauiSession();
44
45 /**
46 * @brief Whether the current desktop environment session is Plasma from KDE
47 * @return
48 */
49 static bool isPlasmaSession();
50
51 /**
52 * @brief Whether the current desktop environment is GNOME Shell
53 * @return
54 */
55 static bool isGnomeSession();
56
58 void serverRunningChanged(bool state);
59
60private:
61 bool m_serverRunning = false;
62};
63
The MauiManUtils class.
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:39 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.