mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00

修改文档的最新接口的说明以及示例代码 Log: Influence: 无 Task: https://pms.uniontech.com/task-view-221667.html Change-Id: Ief0a7122727bfa3171a0b60ff86dc027013d9b4a
48 lines
1.4 KiB
C++
48 lines
1.4 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;
|
|
PluginMode status() const override;
|
|
QString description() const override;
|
|
|
|
QIcon icon(const DockPart &dockPart, int themeType) override;
|
|
PluginFlags flags() const override;
|
|
|
|
private:
|
|
InformationWidget *m_pluginWidget;
|
|
QLabel *m_tipsWidget;
|
|
QLabel *m_appletWidget;
|
|
};
|
|
|
|
#endif // HOMEMONITORPLUGIN_H
|