File indexing completed on 2024-06-23 04:26:11
0001 /* 0002 * SPDX-FileCopyrightText: 2010 Adam Celarek <kdedev at xibo dot at> 0003 * SPDX-FileCopyrightText: 2013 Dmitry Kazakov <dimula73@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef __KIS_SHADE_SELECTOR_LINE_COMBO_BOX_POPUP_H 0009 #define __KIS_SHADE_SELECTOR_LINE_COMBO_BOX_POPUP_H 0010 0011 #include <QWidget> 0012 0013 class KisShadeSelectorLineBase; 0014 class KisShadeSelectorLineEditor; 0015 class KisColorSelectorBaseProxy; 0016 0017 0018 class KisShadeSelectorLineComboBoxPopup : public QWidget { 0019 Q_OBJECT 0020 public: 0021 ~KisShadeSelectorLineComboBoxPopup() override; 0022 0023 const int spacing; 0024 0025 KisShadeSelectorLineComboBoxPopup(QWidget* parent); 0026 void setConfiguration(const QString &string); 0027 0028 private Q_SLOTS: 0029 void activateItem(QWidget *widget); 0030 0031 private: 0032 void paintEvent(QPaintEvent *) override; 0033 void mouseMoveEvent(QMouseEvent * e) override; 0034 void mousePressEvent(QMouseEvent* e) override; 0035 0036 void updateSelectedArea(const QRect &newRect); 0037 void updateHighlightedArea(const QRect &newRect); 0038 0039 private: 0040 KisShadeSelectorLineBase *m_lastHighlightedItem; 0041 KisShadeSelectorLineBase *m_lastSelectedItem; 0042 KisShadeSelectorLineEditor *m_lineEditor; 0043 0044 QRect m_highlightedArea; 0045 QRect m_selectedArea; 0046 QScopedPointer<KisColorSelectorBaseProxy> m_parentProxy; 0047 }; 0048 0049 #endif /* __KIS_SHADE_SELECTOR_LINE_COMBO_BOX_POPUP_H */