Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_iconwidget.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2000 Matthias Elter <elter@kde.org>
3 * SPDX-FileCopyrightText: 2003 Patrick Julien <freak@codepimps.org>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef KIS_ICONWIDGET_H_
9#define KIS_ICONWIDGET_H_
10
11#include <KisPopupButton.h>
12#include <kritaui_export.h>
13
14#include <KoResource.h>
15
20class KRITAUI_EXPORT KisIconWidget : public KisPopupButton
21{
22
23 Q_OBJECT
24
25public:
26 KisIconWidget(QWidget *parent = 0, const QString &name = QString());
27 ~KisIconWidget() override;
28 void setThumbnail(const QImage &thumbnail);
29 void setResource(KoResourceSP resource);
30 void setBackgroundColor(const QColor &color);
31 QSize preferredIconSize() const;
32
33protected:
34 void paintEvent(QPaintEvent *) override;
35
36private:
37 struct Private;
38 Private* const m_d;
39};
40
41#endif // KIS_ICONWIDGET_H_
42
Private *const m_d
void paintEvent(QPaintEvent *event) override