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{
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 */
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
bool serverRunning
Whether the server application is running, listening and broadcasting events.
static void startServer()
Invoke the MauiManServer4 application to be launched.
static bool isPlasmaSession()
Whether the current desktop environment session is Plasma from KDE.
static QString currentDesktopSession()
The name of the current desktop environment.
static bool isGnomeSession()
Whether the current desktop environment is GNOME Shell.
static void invokeManager(const QString &module)
Invoke the MauiSettings application to be launched at a given module name.
static bool isMauiSession()
Whether the current desktop environment session is running Maui Shell.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 11:57:10 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.