Krita Source Code Documentation
Loading...
Searching...
No Matches
WGSelectorPopup.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Mathias Wein <lynx.mw+kde@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6#ifndef WGSELECTORPOPUP_H
7#define WGSELECTORPOPUP_H
8
9#include <QWidget>
10#include <QTimer>
11
13class WGShadeSelector;
15
16class WGSelectorPopup : public QWidget
17{
18 Q_OBJECT
19public:
20 explicit WGSelectorPopup(QWidget *parent = nullptr);
24public Q_SLOTS:
25 void slotShowPopup();
26protected:
27 void paintEvent(QPaintEvent *event) override;
28
29#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
30 void enterEvent(QEvent *event) override;
31#else
32 void enterEvent(QEnterEvent *event) override;
33#endif
34 void leaveEvent(QEvent *event) override;
35 void keyPressEvent(QKeyEvent *event) override;
36 void hideEvent(QHideEvent *event) override;
37
38Q_SIGNALS:
40private Q_SLOTS:
41 void slotInteraction(bool active);
42private:
43 void replaceCentranWidget(QWidget *widget);
44
45 int m_margin {10};
46 bool m_isInteracting {false};
48 QTimer *m_hideTimer;
49};
50
51#endif // WGSELECTORPOPUP_H
The KisVisualColorSelector class.
void replaceCentranWidget(QWidget *widget)
void sigPopupClosed(WGSelectorPopup *popup)
void enterEvent(QEnterEvent *event) override
WGSelectorPopup(QWidget *parent=nullptr)
void keyPressEvent(QKeyEvent *event) override
void hideEvent(QHideEvent *event) override
void paintEvent(QPaintEvent *event) override
void slotInteraction(bool active)
void setSelectorWidget(KisVisualColorSelector *selector)
void leaveEvent(QEvent *event) override
WGSelectorWidgetBase * selectorWidget() const
WGSelectorWidgetBase * m_selectorWidget