From df84e30a6fd6fb8500a8b7c689a67e3794c8f1c4 Mon Sep 17 00:00:00 2001 From: tsic404 Date: Tue, 26 Mar 2024 17:51:08 +0800 Subject: [PATCH] chore: bump version 0.0.6 bump version 0.0.6 log: as title --- debian/changelog | 9 + debian/control | 16 +- .../dock/tray/libdbusmenu-qt/CMakeLists.txt | 2 +- .../org_deepin_dde_airplanemode1.cpp | 131 ------- .../org_deepin_dde_airplanemode1.h | 140 ------- .../org_deepin_dde_inputdevice1_keyboard.cpp | 277 -------------- .../org_deepin_dde_inputdevice1_keyboard.h | 221 ----------- .../org_deepin_dde_systempower1.cpp | 348 ------------------ .../org_deepin_dde_systempower1.h | 198 ---------- 9 files changed, 23 insertions(+), 1319 deletions(-) delete mode 100644 panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.cpp delete mode 100644 panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.h delete mode 100644 panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.cpp delete mode 100644 panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.h delete mode 100644 panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.cpp delete mode 100644 panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.h diff --git a/debian/changelog b/debian/changelog index 89225bfc3..3e6715f33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +dde-shell (0.0.6) unstable; urgency=medium + + * new dock ui + * dock x11 preview + * dock tmp tray + * add clipboard/workspace/search applet for dock + + -- tsic404 Tue, 26 Mar 2024 17:46:41 +0800 + dde-shell (0.0.5) unstable; urgency=medium * feat: add application preview in dock diff --git a/debian/control b/debian/control index 4f2068041..15d79122c 100644 --- a/debian/control +++ b/debian/control @@ -28,10 +28,20 @@ Build-Depends: libqt6svg6, qml6-module-qtquick-layouts, qml6-module-qtquick-window, qml6-module-qt-labs-platform, - libdtk6declarative, qml6-module-qtquick-controls2-styles-chameleon, - qtbase5-dev, qtbase5-private-dev, qtwayland5-dev-tools, qtwayland5-private-dev, qt6-declarative-private-dev, libdtkgui-dev, libdtkwidget-dev, + libdtk6declarative, qml6-module-qtquick-controls2-styles-chameleon, qt6-declarative-private-dev, libyaml-cpp-dev, - qt6-l10n-tools + qtbase5-dev, qtbase5-private-dev, qtwayland5-dev-tools, qtwayland5-private-dev, libdtkgui-dev, libdtkwidget-dev, libdtkcore5-bin, + qt6-l10n-tools, qt6-svg-dev, libdwayland-dev, + libxcb-composite0-dev, + libxcb-damage0-dev, + libxcb-ewmh-dev, + libxcb-icccm4-dev, + libxcb-image0-dev, + libxcursor-dev, + libxdamage-dev, + libxres-dev, + libxtst-dev, + libgsettings-qt-dev, Standards-Version: 3.9.8 Homepage: http://www.deepin.org diff --git a/panels/dock/tray/libdbusmenu-qt/CMakeLists.txt b/panels/dock/tray/libdbusmenu-qt/CMakeLists.txt index df67b0f7e..43a1ea803 100644 --- a/panels/dock/tray/libdbusmenu-qt/CMakeLists.txt +++ b/panels/dock/tray/libdbusmenu-qt/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") set(CMAKE_CXX_STANDARD 17) # Build options -option(WITH_DOC "Build documentation (requires Doxygen)" ON) +option(WITH_DOC "Build documentation (requires Doxygen)" OFF) # Versions ## Package version diff --git a/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.cpp b/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.cpp deleted file mode 100644 index af4b38375..000000000 --- a/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -c org_deepin_dde_AirplaneMode1 -p /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1 /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/airplane-mode/dbusinterface/xml/org.deepin.dde.AirplaneMode1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __org_deepin_dde_AirplaneMode1 - */ - -class __org_deepin_dde_AirplaneMode1Private -{ -public: - __org_deepin_dde_AirplaneMode1Private() = default; - - // begin member variables - bool BluetoothEnabled; - bool Enabled; - bool WifiEnabled; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__org_deepin_dde_AirplaneMode1::__org_deepin_dde_AirplaneMode1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __org_deepin_dde_AirplaneMode1Private) -{ - connect(this, &__org_deepin_dde_AirplaneMode1::propertyChanged, this, &__org_deepin_dde_AirplaneMode1::onPropertyChanged); - -} - -__org_deepin_dde_AirplaneMode1::~__org_deepin_dde_AirplaneMode1() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __org_deepin_dde_AirplaneMode1::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("BluetoothEnabled")) - { - const bool &BluetoothEnabled = qvariant_cast(value); - if (d_ptr->BluetoothEnabled != BluetoothEnabled) - { - d_ptr->BluetoothEnabled = BluetoothEnabled; - Q_EMIT BluetoothEnabledChanged(d_ptr->BluetoothEnabled); - } - return; - } - - if (propName == QStringLiteral("Enabled")) - { - const bool &Enabled = qvariant_cast(value); - if (d_ptr->Enabled != Enabled) - { - d_ptr->Enabled = Enabled; - Q_EMIT EnabledChanged(d_ptr->Enabled); - } - return; - } - - if (propName == QStringLiteral("WifiEnabled")) - { - const bool &WifiEnabled = qvariant_cast(value); - if (d_ptr->WifiEnabled != WifiEnabled) - { - d_ptr->WifiEnabled = WifiEnabled; - Q_EMIT WifiEnabledChanged(d_ptr->WifiEnabled); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -bool __org_deepin_dde_AirplaneMode1::bluetoothEnabled() -{ - return qvariant_cast(internalPropGet("BluetoothEnabled", &d_ptr->BluetoothEnabled)); -} - -bool __org_deepin_dde_AirplaneMode1::enabled() -{ - return qvariant_cast(internalPropGet("Enabled", &d_ptr->Enabled)); -} - -bool __org_deepin_dde_AirplaneMode1::wifiEnabled() -{ - return qvariant_cast(internalPropGet("WifiEnabled", &d_ptr->WifiEnabled)); -} - -void __org_deepin_dde_AirplaneMode1::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__org_deepin_dde_AirplaneMode1::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __org_deepin_dde_AirplaneMode1::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.h b/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.h deleted file mode 100644 index bc15dec9f..000000000 --- a/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -c org_deepin_dde_AirplaneMode1 -p /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/airplane-mode/dbusinterface/generation_dbus_interface/org_deepin_dde_airplanemode1 /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/airplane-mode/dbusinterface/xml/org.deepin.dde.AirplaneMode1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef ORG_DEEPIN_DDE_AIRPLANEMODE1_H -#define ORG_DEEPIN_DDE_AIRPLANEMODE1_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.AirplaneMode1 - */ -class __org_deepin_dde_AirplaneMode1Private; -class __org_deepin_dde_AirplaneMode1 : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.AirplaneMode1"; } - -public: - explicit __org_deepin_dde_AirplaneMode1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__org_deepin_dde_AirplaneMode1(); - - Q_PROPERTY(bool BluetoothEnabled READ bluetoothEnabled NOTIFY BluetoothEnabledChanged) - bool bluetoothEnabled(); - - Q_PROPERTY(bool Enabled READ enabled NOTIFY EnabledChanged) - bool enabled(); - - Q_PROPERTY(bool WifiEnabled READ wifiEnabled NOTIFY WifiEnabledChanged) - bool wifiEnabled(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> DumpState() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("DumpState"), argumentList); - } - - inline void DumpStateQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("DumpState"), argumentList); - } - - - inline QDBusPendingReply<> Enable(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - return asyncCallWithArgumentList(QStringLiteral("Enable"), argumentList); - } - - inline void EnableQueued(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - - CallQueued(QStringLiteral("Enable"), argumentList); - } - - - inline QDBusPendingReply<> EnableBluetooth(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - return asyncCallWithArgumentList(QStringLiteral("EnableBluetooth"), argumentList); - } - - inline void EnableBluetoothQueued(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - - CallQueued(QStringLiteral("EnableBluetooth"), argumentList); - } - - - inline QDBusPendingReply<> EnableWifi(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - return asyncCallWithArgumentList(QStringLiteral("EnableWifi"), argumentList); - } - - inline void EnableWifiQueued(bool enabled) - { - QList argumentList; - argumentList << QVariant::fromValue(enabled); - - CallQueued(QStringLiteral("EnableWifi"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - // begin property changed signals - void BluetoothEnabledChanged(bool value) const; - void EnabledChanged(bool value) const; - void WifiEnabledChanged(bool value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __org_deepin_dde_AirplaneMode1Private *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__org_deepin_dde_AirplaneMode1 AirplaneMode1; - } - } -} -#endif diff --git a/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.cpp b/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.cpp deleted file mode 100644 index ca3bf1a64..000000000 --- a/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -c org_deepin_dde_InputDevice1_Keyboard -p /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/keyboard-layout/dbusinterface/xml/org.deepin.dde.InputDevice1.Keyboard.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __org_deepin_dde_InputDevice1_Keyboard - */ - -class __org_deepin_dde_InputDevice1_KeyboardPrivate -{ -public: - __org_deepin_dde_InputDevice1_KeyboardPrivate() = default; - - // begin member variables - bool CapslockToggle; - QString CurrentLayout; - int CursorBlink; - int LayoutScope; - uint RepeatDelay; - bool RepeatEnabled; - uint RepeatInterval; - QStringList UserLayoutList; - QStringList UserOptionList; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__org_deepin_dde_InputDevice1_Keyboard::__org_deepin_dde_InputDevice1_Keyboard(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __org_deepin_dde_InputDevice1_KeyboardPrivate) -{ - connect(this, &__org_deepin_dde_InputDevice1_Keyboard::propertyChanged, this, &__org_deepin_dde_InputDevice1_Keyboard::onPropertyChanged); - - if (QMetaType::type("KeyboardLayoutList") == QMetaType::UnknownType) - registerKeyboardLayoutListMetaType(); -} - -__org_deepin_dde_InputDevice1_Keyboard::~__org_deepin_dde_InputDevice1_Keyboard() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __org_deepin_dde_InputDevice1_Keyboard::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("CapslockToggle")) - { - const bool &CapslockToggle = qvariant_cast(value); - if (d_ptr->CapslockToggle != CapslockToggle) - { - d_ptr->CapslockToggle = CapslockToggle; - Q_EMIT CapslockToggleChanged(d_ptr->CapslockToggle); - } - return; - } - - if (propName == QStringLiteral("CurrentLayout")) - { - const QString &CurrentLayout = qvariant_cast(value); - if (d_ptr->CurrentLayout != CurrentLayout) - { - d_ptr->CurrentLayout = CurrentLayout; - Q_EMIT CurrentLayoutChanged(d_ptr->CurrentLayout); - } - return; - } - - if (propName == QStringLiteral("CursorBlink")) - { - const int &CursorBlink = qvariant_cast(value); - if (d_ptr->CursorBlink != CursorBlink) - { - d_ptr->CursorBlink = CursorBlink; - Q_EMIT CursorBlinkChanged(d_ptr->CursorBlink); - } - return; - } - - if (propName == QStringLiteral("LayoutScope")) - { - const int &LayoutScope = qvariant_cast(value); - if (d_ptr->LayoutScope != LayoutScope) - { - d_ptr->LayoutScope = LayoutScope; - Q_EMIT LayoutScopeChanged(d_ptr->LayoutScope); - } - return; - } - - if (propName == QStringLiteral("RepeatDelay")) - { - const uint &RepeatDelay = qvariant_cast(value); - if (d_ptr->RepeatDelay != RepeatDelay) - { - d_ptr->RepeatDelay = RepeatDelay; - Q_EMIT RepeatDelayChanged(d_ptr->RepeatDelay); - } - return; - } - - if (propName == QStringLiteral("RepeatEnabled")) - { - const bool &RepeatEnabled = qvariant_cast(value); - if (d_ptr->RepeatEnabled != RepeatEnabled) - { - d_ptr->RepeatEnabled = RepeatEnabled; - Q_EMIT RepeatEnabledChanged(d_ptr->RepeatEnabled); - } - return; - } - - if (propName == QStringLiteral("RepeatInterval")) - { - const uint &RepeatInterval = qvariant_cast(value); - if (d_ptr->RepeatInterval != RepeatInterval) - { - d_ptr->RepeatInterval = RepeatInterval; - Q_EMIT RepeatIntervalChanged(d_ptr->RepeatInterval); - } - return; - } - - if (propName == QStringLiteral("UserLayoutList")) - { - const QStringList &UserLayoutList = qvariant_cast(value); - if (d_ptr->UserLayoutList != UserLayoutList) - { - d_ptr->UserLayoutList = UserLayoutList; - Q_EMIT UserLayoutListChanged(d_ptr->UserLayoutList); - } - return; - } - - if (propName == QStringLiteral("UserOptionList")) - { - const QStringList &UserOptionList = qvariant_cast(value); - if (d_ptr->UserOptionList != UserOptionList) - { - d_ptr->UserOptionList = UserOptionList; - Q_EMIT UserOptionListChanged(d_ptr->UserOptionList); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -bool __org_deepin_dde_InputDevice1_Keyboard::capslockToggle() -{ - return qvariant_cast(internalPropGet("CapslockToggle", &d_ptr->CapslockToggle)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::setCapslockToggle(bool value) -{ - - internalPropSet("CapslockToggle", QVariant::fromValue(value), &d_ptr->CapslockToggle); -} - -QString __org_deepin_dde_InputDevice1_Keyboard::currentLayout() -{ - return qvariant_cast(internalPropGet("CurrentLayout", &d_ptr->CurrentLayout)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::setCurrentLayout(const QString &value) -{ - - internalPropSet("CurrentLayout", QVariant::fromValue(value), &d_ptr->CurrentLayout); -} - -int __org_deepin_dde_InputDevice1_Keyboard::cursorBlink() -{ - return qvariant_cast(internalPropGet("CursorBlink", &d_ptr->CursorBlink)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::setCursorBlink(int value) -{ - - internalPropSet("CursorBlink", QVariant::fromValue(value), &d_ptr->CursorBlink); -} - -int __org_deepin_dde_InputDevice1_Keyboard::layoutScope() -{ - return qvariant_cast(internalPropGet("LayoutScope", &d_ptr->LayoutScope)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::setLayoutScope(int value) -{ - - internalPropSet("LayoutScope", QVariant::fromValue(value), &d_ptr->LayoutScope); -} - -uint __org_deepin_dde_InputDevice1_Keyboard::repeatDelay() -{ - return qvariant_cast(internalPropGet("RepeatDelay", &d_ptr->RepeatDelay)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::setRepeatDelay(uint value) -{ - - internalPropSet("RepeatDelay", QVariant::fromValue(value), &d_ptr->RepeatDelay); -} - -bool __org_deepin_dde_InputDevice1_Keyboard::repeatEnabled() -{ - return qvariant_cast(internalPropGet("RepeatEnabled", &d_ptr->RepeatEnabled)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::setRepeatEnabled(bool value) -{ - - internalPropSet("RepeatEnabled", QVariant::fromValue(value), &d_ptr->RepeatEnabled); -} - -uint __org_deepin_dde_InputDevice1_Keyboard::repeatInterval() -{ - return qvariant_cast(internalPropGet("RepeatInterval", &d_ptr->RepeatInterval)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::setRepeatInterval(uint value) -{ - - internalPropSet("RepeatInterval", QVariant::fromValue(value), &d_ptr->RepeatInterval); -} - -QStringList __org_deepin_dde_InputDevice1_Keyboard::userLayoutList() -{ - return qvariant_cast(internalPropGet("UserLayoutList", &d_ptr->UserLayoutList)); -} - -QStringList __org_deepin_dde_InputDevice1_Keyboard::userOptionList() -{ - return qvariant_cast(internalPropGet("UserOptionList", &d_ptr->UserOptionList)); -} - -void __org_deepin_dde_InputDevice1_Keyboard::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__org_deepin_dde_InputDevice1_Keyboard::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __org_deepin_dde_InputDevice1_Keyboard::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.h b/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.h deleted file mode 100644 index 62d25d332..000000000 --- a/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -c org_deepin_dde_InputDevice1_Keyboard -p /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/keyboard-layout/dbusinterface/generation_dbus_interface/org_deepin_dde_inputdevice1_keyboard /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/keyboard-layout/dbusinterface/xml/org.deepin.dde.InputDevice1.Keyboard.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef ORG_DEEPIN_DDE_INPUTDEVICE1_KEYBOARD_H -#define ORG_DEEPIN_DDE_INPUTDEVICE1_KEYBOARD_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "types/keyboardlayoutlist.h" - -/* - * Proxy class for interface org.deepin.dde.InputDevice1.Keyboard - */ -class __org_deepin_dde_InputDevice1_KeyboardPrivate; -class __org_deepin_dde_InputDevice1_Keyboard : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.InputDevice1.Keyboard"; } - -public: - explicit __org_deepin_dde_InputDevice1_Keyboard(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__org_deepin_dde_InputDevice1_Keyboard(); - - Q_PROPERTY(bool CapslockToggle READ capslockToggle WRITE setCapslockToggle NOTIFY CapslockToggleChanged) - bool capslockToggle(); - void setCapslockToggle(bool value); - - Q_PROPERTY(QString CurrentLayout READ currentLayout WRITE setCurrentLayout NOTIFY CurrentLayoutChanged) - QString currentLayout(); - void setCurrentLayout(const QString &value); - - Q_PROPERTY(int CursorBlink READ cursorBlink WRITE setCursorBlink NOTIFY CursorBlinkChanged) - int cursorBlink(); - void setCursorBlink(int value); - - Q_PROPERTY(int LayoutScope READ layoutScope WRITE setLayoutScope NOTIFY LayoutScopeChanged) - int layoutScope(); - void setLayoutScope(int value); - - Q_PROPERTY(uint RepeatDelay READ repeatDelay WRITE setRepeatDelay NOTIFY RepeatDelayChanged) - uint repeatDelay(); - void setRepeatDelay(uint value); - - Q_PROPERTY(bool RepeatEnabled READ repeatEnabled WRITE setRepeatEnabled NOTIFY RepeatEnabledChanged) - bool repeatEnabled(); - void setRepeatEnabled(bool value); - - Q_PROPERTY(uint RepeatInterval READ repeatInterval WRITE setRepeatInterval NOTIFY RepeatIntervalChanged) - uint repeatInterval(); - void setRepeatInterval(uint value); - - Q_PROPERTY(QStringList UserLayoutList READ userLayoutList NOTIFY UserLayoutListChanged) - QStringList userLayoutList(); - - Q_PROPERTY(QStringList UserOptionList READ userOptionList NOTIFY UserOptionListChanged) - QStringList userOptionList(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> AddLayoutOption(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("AddLayoutOption"), argumentList); - } - - inline void AddLayoutOptionQueued(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("AddLayoutOption"), argumentList); - } - - - inline QDBusPendingReply<> AddUserLayout(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("AddUserLayout"), argumentList); - } - - inline void AddUserLayoutQueued(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("AddUserLayout"), argumentList); - } - - - inline QDBusPendingReply<> ClearLayoutOption() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("ClearLayoutOption"), argumentList); - } - - inline void ClearLayoutOptionQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("ClearLayoutOption"), argumentList); - } - - - inline QDBusPendingReply<> DeleteLayoutOption(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("DeleteLayoutOption"), argumentList); - } - - inline void DeleteLayoutOptionQueued(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("DeleteLayoutOption"), argumentList); - } - - - inline QDBusPendingReply<> DeleteUserLayout(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("DeleteUserLayout"), argumentList); - } - - inline void DeleteUserLayoutQueued(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - - CallQueued(QStringLiteral("DeleteUserLayout"), argumentList); - } - - - inline QDBusPendingReply GetLayoutDesc(const QString &in0) - { - QList argumentList; - argumentList << QVariant::fromValue(in0); - return asyncCallWithArgumentList(QStringLiteral("GetLayoutDesc"), argumentList); - } - - - - inline QDBusPendingReply LayoutList() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("LayoutList"), argumentList); - } - - - - inline QDBusPendingReply<> Reset() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Reset"), argumentList); - } - - inline void ResetQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Reset"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - // begin property changed signals - void CapslockToggleChanged(bool value) const; - void CurrentLayoutChanged(const QString & value) const; - void CursorBlinkChanged(int value) const; - void LayoutScopeChanged(int value) const; - void RepeatDelayChanged(uint value) const; - void RepeatEnabledChanged(bool value) const; - void RepeatIntervalChanged(uint value) const; - void UserLayoutListChanged(const QStringList & value) const; - void UserOptionListChanged(const QStringList & value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __org_deepin_dde_InputDevice1_KeyboardPrivate *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - namespace inputdevice1 { - typedef ::__org_deepin_dde_InputDevice1_Keyboard Keyboard; - } - } - } -} -#endif diff --git a/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.cpp b/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.cpp deleted file mode 100644 index 08ed430b0..000000000 --- a/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.cpp +++ /dev/null @@ -1,348 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -c org_deepin_dde_SystemPower1 -p /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1 /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/power/dbusinterface/xml/org.deepin.dde.SystemPower1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "/home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.h" - -DCORE_USE_NAMESPACE -/* - * Implementation of interface class __org_deepin_dde_SystemPower1 - */ - -class __org_deepin_dde_SystemPower1Private -{ -public: - __org_deepin_dde_SystemPower1Private() = default; - - // begin member variables - double BatteryPercentage; - uint BatteryStatus; - qulonglong BatteryTimeToEmpty; - qulonglong BatteryTimeToFull; - bool HasBattery; - bool HasLidSwitch; - bool IsHighPerformanceSupported; - QString Mode; - bool OnBattery; - bool PowerSavingModeAuto; - bool PowerSavingModeAutoWhenBatteryLow; - uint PowerSavingModeBrightnessDropPercent; - bool PowerSavingModeEnabled; - bool PowerSystemAutoToSleepWhenFree; - -public: - QMap m_processingCalls; - QMap> m_waittingCalls; -}; - -__org_deepin_dde_SystemPower1::__org_deepin_dde_SystemPower1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : DDBusExtendedAbstractInterface(service, path, staticInterfaceName(), connection, parent) - , d_ptr(new __org_deepin_dde_SystemPower1Private) -{ - connect(this, &__org_deepin_dde_SystemPower1::propertyChanged, this, &__org_deepin_dde_SystemPower1::onPropertyChanged); - -} - -__org_deepin_dde_SystemPower1::~__org_deepin_dde_SystemPower1() -{ - qDeleteAll(d_ptr->m_processingCalls.values()); - delete d_ptr; -} - -void __org_deepin_dde_SystemPower1::onPropertyChanged(const QString &propName, const QVariant &value) -{ - if (propName == QStringLiteral("BatteryPercentage")) - { - const double &BatteryPercentage = qvariant_cast(value); - if (d_ptr->BatteryPercentage != BatteryPercentage) - { - d_ptr->BatteryPercentage = BatteryPercentage; - Q_EMIT BatteryPercentageChanged(d_ptr->BatteryPercentage); - } - return; - } - - if (propName == QStringLiteral("BatteryStatus")) - { - const uint &BatteryStatus = qvariant_cast(value); - if (d_ptr->BatteryStatus != BatteryStatus) - { - d_ptr->BatteryStatus = BatteryStatus; - Q_EMIT BatteryStatusChanged(d_ptr->BatteryStatus); - } - return; - } - - if (propName == QStringLiteral("BatteryTimeToEmpty")) - { - const qulonglong &BatteryTimeToEmpty = qvariant_cast(value); - if (d_ptr->BatteryTimeToEmpty != BatteryTimeToEmpty) - { - d_ptr->BatteryTimeToEmpty = BatteryTimeToEmpty; - Q_EMIT BatteryTimeToEmptyChanged(d_ptr->BatteryTimeToEmpty); - } - return; - } - - if (propName == QStringLiteral("BatteryTimeToFull")) - { - const qulonglong &BatteryTimeToFull = qvariant_cast(value); - if (d_ptr->BatteryTimeToFull != BatteryTimeToFull) - { - d_ptr->BatteryTimeToFull = BatteryTimeToFull; - Q_EMIT BatteryTimeToFullChanged(d_ptr->BatteryTimeToFull); - } - return; - } - - if (propName == QStringLiteral("HasBattery")) - { - const bool &HasBattery = qvariant_cast(value); - if (d_ptr->HasBattery != HasBattery) - { - d_ptr->HasBattery = HasBattery; - Q_EMIT HasBatteryChanged(d_ptr->HasBattery); - } - return; - } - - if (propName == QStringLiteral("HasLidSwitch")) - { - const bool &HasLidSwitch = qvariant_cast(value); - if (d_ptr->HasLidSwitch != HasLidSwitch) - { - d_ptr->HasLidSwitch = HasLidSwitch; - Q_EMIT HasLidSwitchChanged(d_ptr->HasLidSwitch); - } - return; - } - - if (propName == QStringLiteral("IsHighPerformanceSupported")) - { - const bool &IsHighPerformanceSupported = qvariant_cast(value); - if (d_ptr->IsHighPerformanceSupported != IsHighPerformanceSupported) - { - d_ptr->IsHighPerformanceSupported = IsHighPerformanceSupported; - Q_EMIT IsHighPerformanceSupportedChanged(d_ptr->IsHighPerformanceSupported); - } - return; - } - - if (propName == QStringLiteral("Mode")) - { - const QString &Mode = qvariant_cast(value); - if (d_ptr->Mode != Mode) - { - d_ptr->Mode = Mode; - Q_EMIT ModeChanged(d_ptr->Mode); - } - return; - } - - if (propName == QStringLiteral("OnBattery")) - { - const bool &OnBattery = qvariant_cast(value); - if (d_ptr->OnBattery != OnBattery) - { - d_ptr->OnBattery = OnBattery; - Q_EMIT OnBatteryChanged(d_ptr->OnBattery); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeAuto")) - { - const bool &PowerSavingModeAuto = qvariant_cast(value); - if (d_ptr->PowerSavingModeAuto != PowerSavingModeAuto) - { - d_ptr->PowerSavingModeAuto = PowerSavingModeAuto; - Q_EMIT PowerSavingModeAutoChanged(d_ptr->PowerSavingModeAuto); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeAutoWhenBatteryLow")) - { - const bool &PowerSavingModeAutoWhenBatteryLow = qvariant_cast(value); - if (d_ptr->PowerSavingModeAutoWhenBatteryLow != PowerSavingModeAutoWhenBatteryLow) - { - d_ptr->PowerSavingModeAutoWhenBatteryLow = PowerSavingModeAutoWhenBatteryLow; - Q_EMIT PowerSavingModeAutoWhenBatteryLowChanged(d_ptr->PowerSavingModeAutoWhenBatteryLow); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeBrightnessDropPercent")) - { - const uint &PowerSavingModeBrightnessDropPercent = qvariant_cast(value); - if (d_ptr->PowerSavingModeBrightnessDropPercent != PowerSavingModeBrightnessDropPercent) - { - d_ptr->PowerSavingModeBrightnessDropPercent = PowerSavingModeBrightnessDropPercent; - Q_EMIT PowerSavingModeBrightnessDropPercentChanged(d_ptr->PowerSavingModeBrightnessDropPercent); - } - return; - } - - if (propName == QStringLiteral("PowerSavingModeEnabled")) - { - const bool &PowerSavingModeEnabled = qvariant_cast(value); - if (d_ptr->PowerSavingModeEnabled != PowerSavingModeEnabled) - { - d_ptr->PowerSavingModeEnabled = PowerSavingModeEnabled; - Q_EMIT PowerSavingModeEnabledChanged(d_ptr->PowerSavingModeEnabled); - } - return; - } - - if (propName == QStringLiteral("PowerSystemAutoToSleepWhenFree")) - { - const bool &PowerSystemAutoToSleepWhenFree = qvariant_cast(value); - if (d_ptr->PowerSystemAutoToSleepWhenFree != PowerSystemAutoToSleepWhenFree) - { - d_ptr->PowerSystemAutoToSleepWhenFree = PowerSystemAutoToSleepWhenFree; - Q_EMIT PowerSystemAutoToSleepWhenFreeChanged(d_ptr->PowerSystemAutoToSleepWhenFree); - } - return; - } - - qWarning() << "property not handle: " << propName; - return; -} - -double __org_deepin_dde_SystemPower1::batteryPercentage() -{ - return qvariant_cast(internalPropGet("BatteryPercentage", &d_ptr->BatteryPercentage)); -} - -uint __org_deepin_dde_SystemPower1::batteryStatus() -{ - return qvariant_cast(internalPropGet("BatteryStatus", &d_ptr->BatteryStatus)); -} - -qulonglong __org_deepin_dde_SystemPower1::batteryTimeToEmpty() -{ - return qvariant_cast(internalPropGet("BatteryTimeToEmpty", &d_ptr->BatteryTimeToEmpty)); -} - -qulonglong __org_deepin_dde_SystemPower1::batteryTimeToFull() -{ - return qvariant_cast(internalPropGet("BatteryTimeToFull", &d_ptr->BatteryTimeToFull)); -} - -bool __org_deepin_dde_SystemPower1::hasBattery() -{ - return qvariant_cast(internalPropGet("HasBattery", &d_ptr->HasBattery)); -} - -bool __org_deepin_dde_SystemPower1::hasLidSwitch() -{ - return qvariant_cast(internalPropGet("HasLidSwitch", &d_ptr->HasLidSwitch)); -} - -bool __org_deepin_dde_SystemPower1::isHighPerformanceSupported() -{ - return qvariant_cast(internalPropGet("IsHighPerformanceSupported", &d_ptr->IsHighPerformanceSupported)); -} - -QString __org_deepin_dde_SystemPower1::mode() -{ - return qvariant_cast(internalPropGet("Mode", &d_ptr->Mode)); -} - -bool __org_deepin_dde_SystemPower1::onBattery() -{ - return qvariant_cast(internalPropGet("OnBattery", &d_ptr->OnBattery)); -} - -bool __org_deepin_dde_SystemPower1::powerSavingModeAuto() -{ - return qvariant_cast(internalPropGet("PowerSavingModeAuto", &d_ptr->PowerSavingModeAuto)); -} - -void __org_deepin_dde_SystemPower1::setPowerSavingModeAuto(bool value) -{ - - internalPropSet("PowerSavingModeAuto", QVariant::fromValue(value), &d_ptr->PowerSavingModeAuto); -} - -bool __org_deepin_dde_SystemPower1::powerSavingModeAutoWhenBatteryLow() -{ - return qvariant_cast(internalPropGet("PowerSavingModeAutoWhenBatteryLow", &d_ptr->PowerSavingModeAutoWhenBatteryLow)); -} - -void __org_deepin_dde_SystemPower1::setPowerSavingModeAutoWhenBatteryLow(bool value) -{ - - internalPropSet("PowerSavingModeAutoWhenBatteryLow", QVariant::fromValue(value), &d_ptr->PowerSavingModeAutoWhenBatteryLow); -} - -uint __org_deepin_dde_SystemPower1::powerSavingModeBrightnessDropPercent() -{ - return qvariant_cast(internalPropGet("PowerSavingModeBrightnessDropPercent", &d_ptr->PowerSavingModeBrightnessDropPercent)); -} - -void __org_deepin_dde_SystemPower1::setPowerSavingModeBrightnessDropPercent(uint value) -{ - - internalPropSet("PowerSavingModeBrightnessDropPercent", QVariant::fromValue(value), &d_ptr->PowerSavingModeBrightnessDropPercent); -} - -bool __org_deepin_dde_SystemPower1::powerSavingModeEnabled() -{ - return qvariant_cast(internalPropGet("PowerSavingModeEnabled", &d_ptr->PowerSavingModeEnabled)); -} - -void __org_deepin_dde_SystemPower1::setPowerSavingModeEnabled(bool value) -{ - - internalPropSet("PowerSavingModeEnabled", QVariant::fromValue(value), &d_ptr->PowerSavingModeEnabled); -} - -bool __org_deepin_dde_SystemPower1::powerSystemAutoToSleepWhenFree() -{ - return qvariant_cast(internalPropGet("PowerSystemAutoToSleepWhenFree", &d_ptr->PowerSystemAutoToSleepWhenFree)); -} - -void __org_deepin_dde_SystemPower1::setPowerSystemAutoToSleepWhenFree(bool value) -{ - - internalPropSet("PowerSystemAutoToSleepWhenFree", QVariant::fromValue(value), &d_ptr->PowerSystemAutoToSleepWhenFree); -} - -void __org_deepin_dde_SystemPower1::CallQueued(const QString &callName, const QList &args) -{ - if (d_ptr->m_waittingCalls.contains(callName)) - { - d_ptr->m_waittingCalls[callName] = args; - return; - } - if (d_ptr->m_processingCalls.contains(callName)) - { - d_ptr->m_waittingCalls.insert(callName, args); - } else { - QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(asyncCallWithArgumentList(callName, args)); - connect(watcher, &QDBusPendingCallWatcher::finished, this, &__org_deepin_dde_SystemPower1::onPendingCallFinished); - d_ptr->m_processingCalls.insert(callName, watcher); - } -} - -void __org_deepin_dde_SystemPower1::onPendingCallFinished(QDBusPendingCallWatcher *w) -{ - w->deleteLater(); - const auto callName = d_ptr->m_processingCalls.key(w); - Q_ASSERT(!callName.isEmpty()); - if (callName.isEmpty()) - return; - d_ptr->m_processingCalls.remove(callName); - if (!d_ptr->m_waittingCalls.contains(callName)) - return; - const auto args = d_ptr->m_waittingCalls.take(callName); - CallQueued(callName, args); -} diff --git a/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.h b/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.h deleted file mode 100644 index 3fec6181a..000000000 --- a/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1.h +++ /dev/null @@ -1,198 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp-fix version 0.8 - * Command line was: qdbusxml2cpp-fix -c org_deepin_dde_SystemPower1 -p /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/power/dbusinterface/generation_dbus_interface/org_deepin_dde_systempower1 /home/uos/private/github_projects/dde-shell/panels/dock/tray/plugins/power/dbusinterface/xml/org.deepin.dde.SystemPower1.xml - * - * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef ORG_DEEPIN_DDE_SYSTEMPOWER1_H -#define ORG_DEEPIN_DDE_SYSTEMPOWER1_H - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -/* - * Proxy class for interface org.deepin.dde.Power1 - */ -class __org_deepin_dde_SystemPower1Private; -class __org_deepin_dde_SystemPower1 : public DTK_CORE_NAMESPACE::DDBusExtendedAbstractInterface -{ - Q_OBJECT - -public: - static inline const char *staticInterfaceName() - { return "org.deepin.dde.Power1"; } - -public: - explicit __org_deepin_dde_SystemPower1(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0); - - ~__org_deepin_dde_SystemPower1(); - - Q_PROPERTY(double BatteryPercentage READ batteryPercentage NOTIFY BatteryPercentageChanged) - double batteryPercentage(); - - Q_PROPERTY(uint BatteryStatus READ batteryStatus NOTIFY BatteryStatusChanged) - uint batteryStatus(); - - Q_PROPERTY(qulonglong BatteryTimeToEmpty READ batteryTimeToEmpty NOTIFY BatteryTimeToEmptyChanged) - qulonglong batteryTimeToEmpty(); - - Q_PROPERTY(qulonglong BatteryTimeToFull READ batteryTimeToFull NOTIFY BatteryTimeToFullChanged) - qulonglong batteryTimeToFull(); - - Q_PROPERTY(bool HasBattery READ hasBattery NOTIFY HasBatteryChanged) - bool hasBattery(); - - Q_PROPERTY(bool HasLidSwitch READ hasLidSwitch NOTIFY HasLidSwitchChanged) - bool hasLidSwitch(); - - Q_PROPERTY(bool IsHighPerformanceSupported READ isHighPerformanceSupported NOTIFY IsHighPerformanceSupportedChanged) - bool isHighPerformanceSupported(); - - Q_PROPERTY(QString Mode READ mode NOTIFY ModeChanged) - QString mode(); - - Q_PROPERTY(bool OnBattery READ onBattery NOTIFY OnBatteryChanged) - bool onBattery(); - - Q_PROPERTY(bool PowerSavingModeAuto READ powerSavingModeAuto WRITE setPowerSavingModeAuto NOTIFY PowerSavingModeAutoChanged) - bool powerSavingModeAuto(); - void setPowerSavingModeAuto(bool value); - - Q_PROPERTY(bool PowerSavingModeAutoWhenBatteryLow READ powerSavingModeAutoWhenBatteryLow WRITE setPowerSavingModeAutoWhenBatteryLow NOTIFY PowerSavingModeAutoWhenBatteryLowChanged) - bool powerSavingModeAutoWhenBatteryLow(); - void setPowerSavingModeAutoWhenBatteryLow(bool value); - - Q_PROPERTY(uint PowerSavingModeBrightnessDropPercent READ powerSavingModeBrightnessDropPercent WRITE setPowerSavingModeBrightnessDropPercent NOTIFY PowerSavingModeBrightnessDropPercentChanged) - uint powerSavingModeBrightnessDropPercent(); - void setPowerSavingModeBrightnessDropPercent(uint value); - - Q_PROPERTY(bool PowerSavingModeEnabled READ powerSavingModeEnabled WRITE setPowerSavingModeEnabled NOTIFY PowerSavingModeEnabledChanged) - bool powerSavingModeEnabled(); - void setPowerSavingModeEnabled(bool value); - - Q_PROPERTY(bool PowerSystemAutoToSleepWhenFree READ powerSystemAutoToSleepWhenFree WRITE setPowerSystemAutoToSleepWhenFree NOTIFY PowerSystemAutoToSleepWhenFreeChanged) - bool powerSystemAutoToSleepWhenFree(); - void setPowerSystemAutoToSleepWhenFree(bool value); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply > GetBatteries() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetBatteries"), argumentList); - } - - - - inline QDBusPendingReply<> Refresh() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("Refresh"), argumentList); - } - - inline void RefreshQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("Refresh"), argumentList); - } - - - inline QDBusPendingReply<> RefreshBatteries() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RefreshBatteries"), argumentList); - } - - inline void RefreshBatteriesQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RefreshBatteries"), argumentList); - } - - - inline QDBusPendingReply<> RefreshMains() - { - QList argumentList; - return asyncCallWithArgumentList(QStringLiteral("RefreshMains"), argumentList); - } - - inline void RefreshMainsQueued() - { - QList argumentList; - - CallQueued(QStringLiteral("RefreshMains"), argumentList); - } - - - inline QDBusPendingReply<> SetMode(const QString &mode) - { - QList argumentList; - argumentList << QVariant::fromValue(mode); - return asyncCallWithArgumentList(QStringLiteral("SetMode"), argumentList); - } - - inline void SetModeQueued(const QString &mode) - { - QList argumentList; - argumentList << QVariant::fromValue(mode); - - CallQueued(QStringLiteral("SetMode"), argumentList); - } - - - -Q_SIGNALS: // SIGNALS - void BatteryAdded(const QDBusObjectPath &objpath); - void BatteryDisplayUpdate(qlonglong timestamp); - void BatteryRemoved(const QDBusObjectPath &objpath); - void LidClosed(); - void LidOpened(); - // begin property changed signals - void BatteryPercentageChanged(double value) const; - void BatteryStatusChanged(uint value) const; - void BatteryTimeToEmptyChanged(qulonglong value) const; - void BatteryTimeToFullChanged(qulonglong value) const; - void HasBatteryChanged(bool value) const; - void HasLidSwitchChanged(bool value) const; - void IsHighPerformanceSupportedChanged(bool value) const; - void ModeChanged(const QString & value) const; - void OnBatteryChanged(bool value) const; - void PowerSavingModeAutoChanged(bool value) const; - void PowerSavingModeAutoWhenBatteryLowChanged(bool value) const; - void PowerSavingModeBrightnessDropPercentChanged(uint value) const; - void PowerSavingModeEnabledChanged(bool value) const; - void PowerSystemAutoToSleepWhenFreeChanged(bool value) const; - -public Q_SLOTS: - void CallQueued(const QString &callName, const QList &args); - -private Q_SLOTS: - void onPendingCallFinished(QDBusPendingCallWatcher *w); - void onPropertyChanged(const QString &propName, const QVariant &value); - -private: - __org_deepin_dde_SystemPower1Private *d_ptr; -}; - -namespace org { - namespace deepin { - namespace dde { - typedef ::__org_deepin_dde_SystemPower1 Power1; - } - } -} -#endif