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++
770 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2016 Dmitry Kazakov <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#ifndef __KIS_ROUND_HUD_BUTTON_H
#define __KIS_ROUND_HUD_BUTTON_H

#include <QScopedPointer>
#include <QAbstractButton>



class KisRoundHudButton : public QAbstractButton
{
public:
    KisRoundHudButton(QWidget *parent);
    ~KisRoundHudButton() override;

    void setOnOffIcons(const QIcon &on, const QIcon &off);

protected:
    void paintEvent(QPaintEvent *event) override;
    bool hitButton(const QPoint &pos) const override;

    void mouseMoveEvent(QMouseEvent *event) override;
    void leaveEvent(QEvent *event) override;

private:
    struct Private;
    const QScopedPointer<Private> m_d;
};

#endif /* __KIS_ROUND_HUD_BUTTON_H */