dde-dock/frame/item/quicksettingitem.h
donghualin f14c19ba9e fix: 修复从控制中心第一次连接需要密码的网络没有弹出网络面板的问题
在任务栏插件区域接收到显示面板的请求的时候,先显示快捷面板,然后在快捷面板中显示请求的窗体

Log:
Influence: 从控制中心第一次连接需要密码的网络,观察任务栏是否显示网络列表
Bug: https://pms.uniontech.com/bug-view-150395.html
Change-Id: Idec2390a55a6236d336c52bf73a10448bc84615f
2022-11-23 12:36:28 +00:00

70 lines
2.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Copyright (C) 2022 ~ 2022 Deepin Technology Co., Ltd.
*
* Author: donghualin <donghualin@uniontech.com>
*
* Maintainer: donghualin <donghualin@uniontech.com>
*
* 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/>.
*/
#ifndef QUICKSETTINGITEM_H
#define QUICKSETTINGITEM_H
#include "dockitem.h"
class PluginsItemInterface;
class QuickIconWidget;
class QuickSettingItem : public DockItem
{
Q_OBJECT
public:
enum class QuickSettingType {
Single = 1, // 插件的UI显示单列
Multi = 2, // 插件的UI显示双列例如网络和蓝牙等
Full = 4 // 插件的UI整行显示例如声音亮度、音乐播放等
};
public:
QuickSettingItem(PluginsItemInterface *const pluginInter, QWidget *parent = nullptr);
~QuickSettingItem() override;
PluginsItemInterface *pluginItem() const;
ItemType itemType() const override;
virtual const QPixmap dragPixmap();
const QString itemKey() const;
virtual QuickSettingType type() const = 0;
Q_SIGNALS:
void requestShowChildWidget(QWidget *);
protected:
void paintEvent(QPaintEvent *e) override;
QColor foregroundColor() const;
private:
PluginsItemInterface *m_pluginInter;
QString m_itemKey;
QJsonObject m_metaData;
};
class QuickSettingFactory
{
public:
static QuickSettingItem *createQuickWidget(PluginsItemInterface *const pluginInter);
};
#endif // QUICKSETTINGITEM_H