Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
940 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2000 Matthias Elter <[email protected]>
 *  SPDX-FileCopyrightText: 2003 Patrick Julien <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef KIS_ICONWIDGET_H_
#define KIS_ICONWIDGET_H_

#include <KisPopupButton.h>
#include <kritaui_export.h>

#include <KoResource.h>

/**
 * The icon widget is used in the control box where the current color and brush
 * are shown.
 */
class KRITAUI_EXPORT KisIconWidget : public KisPopupButton
{

    Q_OBJECT

public:
    KisIconWidget(QWidget *parent = 0, const QString &name = QString());
    ~KisIconWidget() override;
    void setThumbnail(const QImage &thumbnail);
    void setResource(KoResourceSP resource);
    void setBackgroundColor(const QColor &color);
    QSize preferredIconSize() const;

protected:
    void paintEvent(QPaintEvent *) override;

private:
    struct Private;
    Private* const m_d;
};

#endif // KIS_ICONWIDGET_H_