2017-09-18 14:33:44 +08:00
|
|
|
/*
|
2018-02-07 11:52:47 +08:00
|
|
|
* Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
|
2017-09-18 14:33:44 +08:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2016-06-16 16:56:21 +08:00
|
|
|
#ifndef DOCKPLUGINSCONTROLLER_H
|
|
|
|
#define DOCKPLUGINSCONTROLLER_H
|
|
|
|
|
2016-06-23 16:43:22 +08:00
|
|
|
#include "item/pluginsitem.h"
|
2016-06-24 11:32:25 +08:00
|
|
|
#include "pluginproxyinterface.h"
|
2019-01-10 12:39:34 +08:00
|
|
|
#include "util/abstractpluginscontroller.h"
|
2016-06-23 16:43:22 +08:00
|
|
|
|
2019-01-07 13:49:40 +08:00
|
|
|
#include <com_deepin_dde_daemon_dock.h>
|
|
|
|
|
2016-06-16 16:56:21 +08:00
|
|
|
#include <QPluginLoader>
|
|
|
|
#include <QList>
|
2016-06-28 10:06:04 +08:00
|
|
|
#include <QMap>
|
2018-10-24 18:09:44 +08:00
|
|
|
#include <QDBusConnectionInterface>
|
2016-06-16 16:56:21 +08:00
|
|
|
|
|
|
|
class PluginsItemInterface;
|
2019-01-10 12:39:34 +08:00
|
|
|
class DockPluginsController : public AbstractPluginsController
|
2016-06-16 16:56:21 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2017-10-23 10:06:36 +08:00
|
|
|
friend class DockItemController;
|
|
|
|
|
2016-06-16 16:56:21 +08:00
|
|
|
public:
|
2019-01-07 16:42:48 +08:00
|
|
|
explicit DockPluginsController(QObject *parent = 0);
|
2016-06-16 16:56:21 +08:00
|
|
|
|
2016-06-27 14:33:21 +08:00
|
|
|
// implements PluginProxyInterface
|
2018-12-05 14:45:44 +08:00
|
|
|
void itemAdded(PluginsItemInterface * const itemInter, const QString &itemKey) Q_DECL_OVERRIDE;
|
|
|
|
void itemUpdate(PluginsItemInterface * const itemInter, const QString &itemKey) Q_DECL_OVERRIDE;
|
|
|
|
void itemRemoved(PluginsItemInterface * const itemInter, const QString &itemKey) Q_DECL_OVERRIDE;
|
2018-12-03 18:16:39 +08:00
|
|
|
void requestWindowAutoHide(PluginsItemInterface * const itemInter, const QString &itemKey, const bool autoHide) Q_DECL_OVERRIDE;
|
2018-12-04 09:50:56 +08:00
|
|
|
void requestRefreshWindowVisible(PluginsItemInterface * const itemInter, const QString &itemKey) Q_DECL_OVERRIDE;
|
2018-12-17 14:38:09 +08:00
|
|
|
void requestSetAppletVisible(PluginsItemInterface * const itemInter, const QString &itemKey, const bool visible) Q_DECL_OVERRIDE;
|
2019-01-10 12:39:34 +08:00
|
|
|
|
|
|
|
void startLoader();
|
2016-06-27 14:33:21 +08:00
|
|
|
|
2016-06-16 16:56:21 +08:00
|
|
|
signals:
|
2016-06-28 17:48:02 +08:00
|
|
|
void pluginItemInserted(PluginsItem *pluginItem) const;
|
|
|
|
void pluginItemRemoved(PluginsItem *pluginItem) const;
|
2017-02-09 09:27:03 +08:00
|
|
|
void pluginItemUpdated(PluginsItem *pluginItem) const;
|
2018-11-20 14:04:16 +08:00
|
|
|
void fashionTraySizeChanged(const QSize &traySize) const;
|
2016-06-16 16:56:21 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DOCKPLUGINSCONTROLLER_H
|