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
55Q_SIGNALS:
57
58public Q_SLOTS:
59
60 void showPopupWidget();
61
62 void hidePopupWidget();
63
64 void setPopupWidgetVisible(bool visible);
65
70 void setPopupWidgetDetached(bool detach);
71
72protected:
73 void paintEvent(QPaintEvent* event) override;
74
75 void paintPopupArrow();
76
77private Q_SLOTS:
78 void slotMenuAboutToHide();
79
80private:
81 struct Private;
82 Private* const m_d;
83};
84
85#endif
qreal v
Private *const m_d
void sigPopupWidgetShown()