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++
991 B
Raw Blame
/*
 *  SPDX-FileCopyrightText: 2026 Luna Lovecraft <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-3.0-or-later
 */

#ifndef _KIS_SELECTION_ACTIONS_PANEL_BUTTON
#define _KIS_SELECTION_ACTIONS_PANEL_BUTTON

#include <qabstractbutton.h>

class KoColorDisplayRendererInterface;

///Custom widget for selection actions panel buttons, to prevent them being drawn over the pop-up palette
class KisSelectionActionsPanelButton : public QAbstractButton {
  public:
    KisSelectionActionsPanelButton(const QString& iconName, const QString &tooltip, int size, QWidget *parent);
    ~KisSelectionActionsPanelButton();
    void draw(QPainter &painter, const KoColorDisplayRendererInterface *displayRendererInterface);
protected:
    void paintEvent(QPaintEvent *e) override;
    void tabletEvent(QTabletEvent* e) override;
    bool event(QEvent* event) override;
    void contextMenuEvent(QContextMenuEvent *event) override;
    void mousePressEvent(QMouseEvent* event) override;
};


#endif