2023-02-16 13:51:55 +08:00
|
|
|
// Copyright (C) 2011 ~ 2018 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
|
2018-10-25 19:56:21 +08:00
|
|
|
|
2018-11-20 14:04:16 +08:00
|
|
|
#ifndef TRAYPLUGINITEM_H
|
|
|
|
#define TRAYPLUGINITEM_H
|
2018-10-16 14:33:06 +08:00
|
|
|
|
|
|
|
#include "pluginsitem.h"
|
|
|
|
|
2018-11-20 14:04:16 +08:00
|
|
|
class TrayPluginItem : public PluginsItem
|
2018-10-16 14:33:06 +08:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-07-11 03:18:24 +00:00
|
|
|
TrayPluginItem(PluginsItemInterface* const pluginInter, const QString &itemKey, const QJsonObject &metaData, QWidget *parent = nullptr);
|
2018-10-16 14:33:06 +08:00
|
|
|
|
2020-06-13 19:19:30 +08:00
|
|
|
inline ItemType itemType() const override {return ItemType::TrayPlugin;}
|
2018-10-16 14:33:06 +08:00
|
|
|
|
2018-11-07 16:19:57 +08:00
|
|
|
void setSuggestIconSize(QSize size);
|
2018-11-08 18:24:41 +08:00
|
|
|
void setRightSplitVisible(const bool visible);
|
2021-09-22 13:12:27 +08:00
|
|
|
int trayVisibleItemCount();
|
2018-11-07 16:19:57 +08:00
|
|
|
|
2018-10-16 14:33:06 +08:00
|
|
|
Q_SIGNALS:
|
2019-10-29 14:53:35 +08:00
|
|
|
void trayVisableCountChanged(const int &count) const;
|
2018-10-16 14:33:06 +08:00
|
|
|
|
|
|
|
private:
|
2020-06-13 19:19:30 +08:00
|
|
|
bool eventFilter(QObject *watched, QEvent *e) override;
|
2019-10-29 14:53:35 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
int m_trayVisableItemCount = 0;
|
2018-10-16 14:33:06 +08:00
|
|
|
};
|
|
|
|
|
2018-11-20 14:04:16 +08:00
|
|
|
#endif // TRAYPLUGINITEM_H
|