-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
Add DBus adaptor class for org.deepin.dde.ControlCenter1 interface Log: add ControlCenter DBus adaptor
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#include "ControlCenterAdaptor.h" | ||
#include <QtCore/QMetaObject> | ||
Check warning on line 6 in calendar-client/config/dbus/ControlCenterAdaptor.cpp GitHub Actions / cppcheck
|
||
#include <QtCore/QByteArray> | ||
Check warning on line 7 in calendar-client/config/dbus/ControlCenterAdaptor.cpp GitHub Actions / cppcheck
|
||
#include <QtCore/QList> | ||
Check warning on line 8 in calendar-client/config/dbus/ControlCenterAdaptor.cpp GitHub Actions / cppcheck
|
||
#include <QtCore/QMap> | ||
Check warning on line 9 in calendar-client/config/dbus/ControlCenterAdaptor.cpp GitHub Actions / cppcheck
|
||
#include <QtCore/QString> | ||
Check warning on line 10 in calendar-client/config/dbus/ControlCenterAdaptor.cpp GitHub Actions / cppcheck
|
||
#include <QtCore/QStringList> | ||
Check warning on line 11 in calendar-client/config/dbus/ControlCenterAdaptor.cpp GitHub Actions / cppcheck
|
||
#include <QtCore/QVariant> | ||
Check warning on line 12 in calendar-client/config/dbus/ControlCenterAdaptor.cpp GitHub Actions / cppcheck
|
||
|
||
/* | ||
* Implementation of adaptor class ControlCenterAdaptor | ||
*/ | ||
|
||
ControlCenterAdaptor::ControlCenterAdaptor(QObject *parent) | ||
: QDBusAbstractAdaptor(parent) | ||
{ | ||
// constructor | ||
setAutoRelaySignals(true); | ||
} | ||
|
||
ControlCenterAdaptor::~ControlCenterAdaptor() | ||
{ | ||
// destructor | ||
} | ||
|
||
void ControlCenterAdaptor::ShowPage(const QString &url) | ||
{ | ||
// handle method call org.deepin.dde.ControlCenter1.ShowPage | ||
QMetaObject::invokeMethod(parent(), "ShowPage", Q_ARG(QString, url)); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-FileCopyrightText: 2024 - 2025 UnionTech Software Technology Co., Ltd. | ||
// | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
#ifndef CONTROLCENTERADAPTOR_H | ||
#define CONTROLCENTERADAPTOR_H | ||
|
||
#include <QtCore/QObject> | ||
Check warning on line 8 in calendar-client/config/dbus/ControlCenterAdaptor.h GitHub Actions / cppcheck
|
||
#include <QtDBus/QtDBus> | ||
Check warning on line 9 in calendar-client/config/dbus/ControlCenterAdaptor.h GitHub Actions / cppcheck
|
||
QT_BEGIN_NAMESPACE | ||
class QByteArray; | ||
template<class T> class QList; | ||
template<class Key, class Value> class QMap; | ||
class QString; | ||
class QStringList; | ||
class QVariant; | ||
QT_END_NAMESPACE | ||
|
||
/* | ||
* Adaptor class for interface org.deepin.dde.ControlCenter1 | ||
*/ | ||
class ControlCenterAdaptor: public QDBusAbstractAdaptor | ||
{ | ||
Q_OBJECT | ||
Q_CLASSINFO("D-Bus Interface", "org.deepin.dde.ControlCenter1") | ||
Q_CLASSINFO("D-Bus Introspection", "" | ||
" <interface name=\"org.deepin.dde.ControlCenter1\">\n" | ||
" <method name=\"ShowPage\">\n" | ||
" <arg direction=\"in\" type=\"s\" name=\"url\"/>\n" | ||
" </method>\n" | ||
" </interface>\n" | ||
"") | ||
public: | ||
ControlCenterAdaptor(QObject *parent); | ||
virtual ~ControlCenterAdaptor(); | ||
|
||
public: // PROPERTIES | ||
public Q_SLOTS: // METHODS | ||
Check warning on line 38 in calendar-client/config/dbus/ControlCenterAdaptor.h GitHub Actions / cppcheck
|
||
void ShowPage(const QString &url); | ||
Q_SIGNALS: // SIGNALS | ||
}; | ||
|
||
#endif |