Krita Source Code Documentation
Loading...
Searching...
No Matches
KisPopupButton.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2007 Cyrille Berger <cberger@cberger.net>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef _KIS_POPUP_BUTTON_H_
8#define _KIS_POPUP_BUTTON_H_
9
10#include <QToolButton>
11
12#include <kritawidgetutils_export.h>
13
18class KRITAWIDGETUTILS_EXPORT KisPopupButton : public QToolButton
19{
20
21 Q_OBJECT
22
23public:
24
25 KisPopupButton(QWidget* parent);
26 ~KisPopupButton() override;
27
32 void setPopupWidget(QWidget* widget);
33
38 void setPopupWidgetWidth(int w);
39
45 void adjustPosition();
46
51 void setArrowVisible(bool v);
52
53 bool isPopupWidgetVisible();
54
55public Q_SLOTS:
56
57 void showPopupWidget();
58
59 void hidePopupWidget();
60
61 void setPopupWidgetVisible(bool visible);
62
67 void setPopupWidgetDetached(bool detach);
68
69protected:
70 void paintEvent(QPaintEvent* event) override;
71
72 void paintPopupArrow();
73private:
74 struct Private;
75 Private* const m_d;
76};
77
78#endif
qreal v
Private *const m_d