dde-dock/frame/dbus/dbusdockadaptors.cpp
Zhang Qipeng 625f6ba2b9 feat: 任务栏安全模式通知
当任务栏9分钟内累计崩溃3次进入安全模式后,发出通知,用户点击通知中的退出安全模式,任务栏重新加载插件。

Log: 新增任务栏安全模式通知。
Task: https://pms.uniontech.com/zentao/task-view-58411.html
Change-Id: I06b65ce4fdea29b635ff2af2dda0d0199035f4e8
2021-01-27 13:48:51 +08:00

57 lines
1.4 KiB
C++

/*
* Copyright (C) 2016 ~ 2018 Deepin Technology Co., Ltd.
*
* Author: sbw <sbw@sbw.so>
*
* Maintainer: sbw <sbw@sbw.so>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dbusdockadaptors.h"
#include <QScreen>
#include <QDebug>
DBusDockAdaptors::DBusDockAdaptors(MainWindow* parent): QDBusAbstractAdaptor(parent)
{
connect(parent, &MainWindow::panelGeometryChanged, this, [=] {
emit DBusDockAdaptors::geometryChanged(geometry());
});
}
DBusDockAdaptors::~DBusDockAdaptors()
{
}
MainWindow *DBusDockAdaptors::parent() const
{
return static_cast<MainWindow *>(QObject::parent());
}
void DBusDockAdaptors::callShow()
{
return parent()->callShow();
}
void DBusDockAdaptors::ReloadPlugins()
{
return parent()->relaodPlugins();
}
QRect DBusDockAdaptors::geometry() const
{
return parent()->geometry();
}