Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdbusmenuconnection_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QDBUSMENUCONNECTION_H
5#define QDBUSMENUCONNECTION_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/QString>
19#include <QtDBus/QDBusConnection>
20#include <QtDBus/QDBusVariant>
21
22#include <QtGui/qtgui-config.h>
23#include <QtCore/private/qglobal_p.h>
25
27
29#ifndef QT_NO_SYSTEMTRAYICON
30class QDBusTrayIcon;
31#endif // QT_NO_SYSTEMTRAYICON
32
34{
36
37public:
38 QDBusMenuConnection(QObject *parent = nullptr, const QString &serviceName = QString());
40 QDBusConnection connection() const { return m_connection; }
41 QDBusServiceWatcher *dbusWatcher() const { return m_dbusWatcher; }
42 bool isWatcherRegistered() const { return m_watcherRegistered; }
43#ifndef QT_NO_SYSTEMTRAYICON
49#endif // QT_NO_SYSTEMTRAYICON
50
52#ifndef QT_NO_SYSTEMTRAYICON
54#endif // QT_NO_SYSTEMTRAYICON
55
56private Q_SLOTS:
57 void dbusError(const QDBusError &error);
58
59private:
60 QString m_serviceName;
61 QDBusConnection m_connection;
62 QDBusServiceWatcher *m_dbusWatcher;
63 bool m_watcherRegistered;
64};
65
67
68#endif // QDBUSMENUCONNECTION_H
\inmodule QtDBus
\inmodule QtDBus
Definition qdbuserror.h:21
QDBusMenuConnection(QObject *parent=nullptr, const QString &serviceName=QString())
bool registerTrayIconMenu(QDBusTrayIcon *item)
bool registerTrayIcon(QDBusTrayIcon *item)
QDBusServiceWatcher * dbusWatcher() const
void unregisterTrayIconMenu(QDBusTrayIcon *item)
void unregisterTrayIcon(QDBusTrayIcon *item)
bool registerTrayIconWithWatcher(QDBusTrayIcon *item)
QDBusConnection connection() const
The QDBusServiceWatcher class allows the user to watch for a bus service change.
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
#define Q_OBJECT
#define Q_SLOTS
#define Q_MOC_INCLUDE(...)
#define Q_SIGNALS
QGraphicsItem * item