Plasma-workspace

serverinfo.h
1/*
2 SPDX-FileCopyrightText: 2019 Kai Uwe Broulik <kde@privat.broulik.de>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "notificationmanager_export.h"
10
11#include <QObject>
12#include <QString>
13#include <memory>
14
15#include <qqmlregistration.h>
16
17namespace NotificationManager
18{
19/**
20 * @short Information about the notification server
21 *
22 * Provides information such as vendor, name, version of the notification server.
23 *
24 * @author Kai Uwe Broulik <kde@privat.broulik.de>
25 **/
26class NOTIFICATIONMANAGER_EXPORT ServerInfo : public QObject
27{
28 Q_OBJECT
29 QML_ELEMENT
30 QML_UNCREATABLE("Can only access ServerInfo via Server")
31
32 Q_PROPERTY(Status status READ status NOTIFY statusChanged)
33
34 Q_PROPERTY(QString vendor READ vendor NOTIFY vendorChanged)
35
36 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
37
38 Q_PROPERTY(QString version READ version NOTIFY versionChanged)
39
40 Q_PROPERTY(QString specVersion READ specVersion NOTIFY specVersionChanged)
41
42public:
43 explicit ServerInfo(QObject *parent = nullptr);
44 ~ServerInfo() override;
45
46 enum class Status {
47 Unknown = -1,
48 NotRunning,
49 Running,
50 };
51 Q_ENUM(Status)
52
53 Status status() const;
54 QString vendor() const;
55 QString name() const;
56 QString version() const;
57 QString specVersion() const;
58
59Q_SIGNALS:
60 void statusChanged(Status status);
61 void vendorChanged(const QString &vendor);
62 void nameChanged(const QString &name);
63 void versionChanged(const QString &version);
64 void specVersionChanged(const QString &specVersion);
65
66private:
67 class Private;
68 std::unique_ptr<Private> d;
69};
70
71} // namespace NotificationManager
Information about the notification server.
Definition serverinfo.h:27
Q_SCRIPTABLE CaptureState status()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 12:00:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.