mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00

去掉插件的指针接口,同时插件根据任务栏图标类别返回不同类型的图标,修改所有已实现的插件接口 Log: Influence: 任务栏-查看快捷设置图标、快捷区域可点击的图标、系统电源图标是否显示正常 Task: https://pms.uniontech.com/task-view-110309.html Change-Id: I9ffc42189471bb6183f264b366434d9be77275a4
46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
#ifndef HOMEMONITORPLUGIN_H
|
|
#define HOMEMONITORPLUGIN_H
|
|
|
|
#include "informationwidget.h"
|
|
|
|
#include <QObject>
|
|
|
|
#include <dde-dock/pluginsiteminterface.h>
|
|
|
|
class HomeMonitorPlugin : public QObject, PluginsItemInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(PluginsItemInterface)
|
|
Q_PLUGIN_METADATA(IID "com.deepin.dock.PluginsItemInterface" FILE "home_monitor.json")
|
|
|
|
public:
|
|
explicit HomeMonitorPlugin(QObject *parent = nullptr);
|
|
|
|
const QString pluginDisplayName() const override;
|
|
const QString pluginName() const override;
|
|
void init(PluginProxyInterface *proxyInter) override;
|
|
|
|
QWidget *itemWidget(const QString &itemKey) override;
|
|
QWidget *itemTipsWidget(const QString &itemKey) override;
|
|
QWidget *itemPopupApplet(const QString &itemKey) override;
|
|
|
|
bool pluginIsAllowDisable() override;
|
|
bool pluginIsDisable() override;
|
|
void pluginStateSwitched() override;
|
|
|
|
const QString itemContextMenu(const QString &itemKey) override;
|
|
void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) override;
|
|
|
|
QIcon icon(const DockPart &) override;
|
|
PluginStatus status() const override;
|
|
bool isPrimary() const override;
|
|
QString description() const override;
|
|
|
|
private:
|
|
InformationWidget *m_pluginWidget;
|
|
QLabel *m_tipsWidget;
|
|
QLabel *m_appletWidget;
|
|
};
|
|
|
|
#endif // HOMEMONITORPLUGIN_H
|