mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-12 17:17:50 +03:00
35 lines
715 B
C++
35 lines
715 B
C++
/*
|
|
SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com>
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef LAYOUTMENUITEMWIDGET_H
|
|
#define LAYOUTMENUITEMWIDGET_H
|
|
|
|
// Qt
|
|
#include <QAction>
|
|
#include <QWidget>
|
|
#include <QWidgetAction>
|
|
#include <QPaintEvent>
|
|
#include <QStyleOptionMenuItem>
|
|
|
|
|
|
class LayoutMenuItemWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
LayoutMenuItemWidget(QAction* action, QWidget *parent);
|
|
|
|
QSize minimumSizeHint() const override;
|
|
void paintEvent(QPaintEvent* e) override;
|
|
|
|
void setIcon(const bool &isBackgroundFile, const QString &iconName);
|
|
|
|
private:
|
|
QAction *m_action{nullptr};
|
|
bool m_isBackgroundFile;
|
|
QString m_iconName;
|
|
};
|
|
|
|
#endif
|