mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
perf: 格式化代码并对部分类解偶
删除AppSnapshot类中对com.deepin.dde.daemon.Dock接口的调用,并通过DBus的方式来调用相关的接口 Log: Influence: 任务栏 Task: https://pms.uniontech.com/zentao/task-view-95700.html Change-Id: Ie8e48111ee9094813b002a0809cd6ba53aae9586
This commit is contained in:
parent
8c6887108a
commit
2ee4b0c25d
@ -29,7 +29,6 @@
|
||||
#include <com_deepin_daemon_gesture.h>
|
||||
|
||||
using namespace Dock;
|
||||
using Gesture = com::deepin::daemon::Gesture;
|
||||
|
||||
class QBoxLayout;
|
||||
class QLabel;
|
||||
|
@ -55,7 +55,6 @@
|
||||
#define DRAG_STATE_PROP "DRAG_STATE"
|
||||
|
||||
using org::kde::StatusNotifierWatcher;
|
||||
using DBusDock = com::deepin::dde::daemon::Dock;
|
||||
|
||||
// let startdde know that we've already started.
|
||||
void MainWindow::RegisterDdeSession()
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
DWIDGET_USE_NAMESPACE
|
||||
|
||||
using XEventMonitor = ::com::deepin::api::XEventMonitor;
|
||||
|
||||
class MainPanelControl;
|
||||
class QTimer;
|
||||
class MenuWorker;
|
||||
|
@ -38,7 +38,7 @@ AirplaneModeApplet::AirplaneModeApplet(QWidget *parent)
|
||||
setFixedHeight(30);
|
||||
QLabel *title = new QLabel(this);
|
||||
title->setText(tr("Airplane Mode"));
|
||||
QHBoxLayout *appletlayout = new QHBoxLayout;
|
||||
QHBoxLayout *appletlayout = new QHBoxLayout(this);
|
||||
appletlayout->setMargin(0);
|
||||
appletlayout->setSpacing(0);
|
||||
appletlayout->addSpacing(0);
|
||||
|
@ -27,6 +27,9 @@
|
||||
|
||||
#define PLUGIN_STATE_KEY "enable"
|
||||
|
||||
using DBusDock = com::deepin::dde::daemon::Dock;
|
||||
using DockEntryInter = com::deepin::dde::daemon::dock::Entry;
|
||||
|
||||
using namespace Dock;
|
||||
OnboardPlugin::OnboardPlugin(QObject *parent)
|
||||
: QObject(parent)
|
||||
|
@ -31,8 +31,6 @@
|
||||
#include <com_deepin_dde_daemon_dock.h>
|
||||
#include <com_deepin_dde_daemon_dock_entry.h>
|
||||
|
||||
using DBusDock = com::deepin::dde::daemon::Dock;
|
||||
using DockEntryInter = com::deepin::dde::daemon::dock::Entry;
|
||||
namespace Dock {
|
||||
class TipsWidget;
|
||||
}
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include "powerstatuswidget.h"
|
||||
#include "powerplugin.h"
|
||||
#include "dbus/dbuspower.h"
|
||||
|
||||
#include <DGuiApplicationHelper>
|
||||
|
||||
#include <QPainter>
|
||||
|
@ -22,12 +22,12 @@
|
||||
#ifndef POWERSTATUSWIDGET_H
|
||||
#define POWERSTATUSWIDGET_H
|
||||
|
||||
#include "dbus/dbuspower.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#define POWER_KEY "power"
|
||||
|
||||
class DBusPower;
|
||||
|
||||
// from https://upower.freedesktop.org/docs/Device.html#Device:State
|
||||
enum BatteryState {
|
||||
UNKNOWN = 0, // 未知
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "dbus/dbusaccount.h"
|
||||
#include "../frame/util/utils.h"
|
||||
#include "../widgets/tipswidget.h"
|
||||
#include "./dbus/dbuspowermanager.h"
|
||||
|
||||
#include <DSysInfo>
|
||||
#include <DDBusSender>
|
||||
|
@ -24,10 +24,11 @@
|
||||
|
||||
#include "pluginsiteminterface.h"
|
||||
#include "shutdownwidget.h"
|
||||
#include "./dbus/dbuspowermanager.h"
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
class DBusPowerManager;
|
||||
|
||||
namespace Dock {
|
||||
class TipsWidget;
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class ShutdownWidget : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ShutdownWidget(QWidget *parent = 0);
|
||||
explicit ShutdownWidget(QWidget *parent = Q_NULLPTR);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user