2023-02-16 13:51:55 +08:00
|
|
|
// Copyright (C) 2019 ~ 2019 Deepin Technology Co., Ltd.
|
|
|
|
// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
|
2022-09-06 11:36:55 +08:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
2019-09-04 13:43:56 +08:00
|
|
|
|
|
|
|
#ifndef MULTITASKINGPLUGIN_H
|
|
|
|
#define MULTITASKINGPLUGIN_H
|
|
|
|
|
|
|
|
#include "pluginsiteminterface.h"
|
|
|
|
#include "multitaskingwidget.h"
|
|
|
|
|
2021-05-25 13:05:45 +08:00
|
|
|
#include <QScopedPointer>
|
2020-07-29 16:12:17 +08:00
|
|
|
|
2020-06-29 15:35:51 +08:00
|
|
|
namespace Dock {
|
|
|
|
class TipsWidget;
|
|
|
|
}
|
2019-09-04 13:43:56 +08:00
|
|
|
class MultitaskingPlugin : public QObject, PluginsItemInterface
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_INTERFACES(PluginsItemInterface)
|
|
|
|
Q_PLUGIN_METADATA(IID "com.deepin.dock.PluginsItemInterface" FILE "multitasking.json")
|
|
|
|
|
|
|
|
public:
|
2020-06-13 19:19:30 +08:00
|
|
|
explicit MultitaskingPlugin(QObject *parent = nullptr);
|
2019-09-04 13:43:56 +08:00
|
|
|
|
|
|
|
const QString pluginName() const override;
|
|
|
|
const QString pluginDisplayName() const override;
|
|
|
|
void init(PluginProxyInterface *proxyInter) override;
|
|
|
|
bool pluginIsAllowDisable() override { return true; }
|
|
|
|
QWidget *itemWidget(const QString &itemKey) override;
|
|
|
|
QWidget *itemTipsWidget(const QString &itemKey) override;
|
|
|
|
const QString itemCommand(const QString &itemKey) override;
|
|
|
|
const QString itemContextMenu(const QString &itemKey) override;
|
|
|
|
void invokedMenuItem(const QString &itemKey, const QString &menuId, const bool checked) override;
|
2020-06-13 19:19:30 +08:00
|
|
|
void refreshIcon(const QString &itemKey) override;
|
|
|
|
int itemSortKey(const QString &itemKey) override;
|
|
|
|
void setSortKey(const QString &itemKey, const int order) override;
|
2019-09-04 13:43:56 +08:00
|
|
|
PluginType type() override;
|
2022-11-28 14:37:54 +08:00
|
|
|
PluginFlags flags() const override;
|
2023-04-24 15:04:30 +08:00
|
|
|
QIcon icon(const DockPart &dockPart, DGuiApplicationHelper::ColorType themeType) override;
|
2019-09-04 13:43:56 +08:00
|
|
|
|
|
|
|
private:
|
2021-05-25 13:05:45 +08:00
|
|
|
QScopedPointer<MultitaskingWidget> m_multitaskingWidget;
|
|
|
|
QScopedPointer<Dock::TipsWidget> m_tipsLabel;
|
2019-09-04 13:43:56 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MULTITASKINGPLUGIN_H
|