mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00

Modify project to pass the REUSE check Log: Modify project to pass the REUSE check Task: https://pms.uniontech.com/task-view-185215.html Change-Id: Ie954cf985f16c1a243bfc912aa7458c6e85ce9de
48 lines
998 B
C++
48 lines
998 B
C++
// SPDX-FileCopyrightText: 2011 - 2022 UnionTech Software Technology Co., Ltd.
|
|
//
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
|
#ifndef LAUNCHERITEM_H
|
|
#define LAUNCHERITEM_H
|
|
|
|
#include "dockitem.h"
|
|
|
|
namespace Dock {
|
|
class TipsWidget;
|
|
}
|
|
|
|
class QGSettings;
|
|
class LauncherItem : public DockItem
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit LauncherItem(QWidget *parent = nullptr);
|
|
|
|
inline ItemType itemType() const override {return Launcher;}
|
|
|
|
void refreshIcon() override;
|
|
|
|
protected:
|
|
void showEvent(QShowEvent* event) override;
|
|
|
|
private:
|
|
void paintEvent(QPaintEvent *e) override;
|
|
void resizeEvent(QResizeEvent *e) override;
|
|
void mousePressEvent(QMouseEvent *e) override;
|
|
void mouseReleaseEvent(QMouseEvent *e) override;
|
|
|
|
QWidget *popupTips() override;
|
|
|
|
void onGSettingsChanged(const QString& key);
|
|
|
|
bool checkGSettingsControl() const;
|
|
|
|
private:
|
|
QPixmap m_icon;
|
|
const QGSettings *m_gsettings;
|
|
QSharedPointer<TipsWidget> m_tips;
|
|
};
|
|
|
|
#endif // LAUNCHERITEM_H
|