mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
/*
|
|
* 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/>.
|
|
*/
|
|
|
|
#ifndef SHOWDESKTOPITEM_H
|
|
#define SHOWDESKTOPITEM_H
|
|
|
|
#include "dockitem.h"
|
|
|
|
class ShowDesktopItem : public DockItem
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ShowDesktopItem(QWidget *parent = nullptr);
|
|
virtual ~ShowDesktopItem() override;
|
|
inline ItemType itemType() const override
|
|
{
|
|
return Launcher;
|
|
}
|
|
|
|
protected:
|
|
void enterEvent(QEvent *event) Q_DECL_OVERRIDE;
|
|
void leaveEvent(QEvent *event) Q_DECL_OVERRIDE;
|
|
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
|
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
|
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
|
|
|
|
private:
|
|
bool m_isHovered;
|
|
bool m_isPressed;
|
|
};
|
|
|
|
#endif // SHOWDESKTOPITEM_H
|