2018-10-25 19:56:21 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
|
|
|
|
*
|
|
|
|
* Author: listenerri <listenerri@gmail.com>
|
|
|
|
*
|
|
|
|
* Maintainer: listenerri <listenerri@gmail.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/>.
|
|
|
|
*/
|
|
|
|
|
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:
|
2020-11-06 17:52:08 +08:00
|
|
|
TrayPluginItem(PluginsItemInterface* const pluginInter, const QString &itemKey, const QString &pluginApi, 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);
|
2019-10-29 14:53:35 +08:00
|
|
|
int trayVisableItemCount();
|
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
|