File indexing completed on 2024-06-09 04:28:46

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_TOOL_LAZY_BRUSH_OPTIONS_WIDGET_H
0008 #define __KIS_TOOL_LAZY_BRUSH_OPTIONS_WIDGET_H
0009 
0010 #include <QScopedPointer>
0011 #include <QWidget>
0012 #include <QModelIndex>
0013 
0014 #include "kis_types.h"
0015 #include "KisSwatchGroup.h"
0016 
0017 class KisCanvasResourceProvider;
0018 class KoColor;
0019 
0020 
0021 /**
0022  * @brief The KisToolLazyBrushOptionsWidget class
0023  */
0024 class KisToolLazyBrushOptionsWidget : public QWidget
0025 {
0026     Q_OBJECT
0027 public:
0028     KisToolLazyBrushOptionsWidget(KisCanvasResourceProvider *provider, QWidget *parent);
0029     ~KisToolLazyBrushOptionsWidget() override;
0030 
0031 private Q_SLOTS:
0032     void entrySelected(QModelIndex index);
0033     void slotCurrentFgColorChanged(const KoColor &color);
0034     void slotCurrentNodeChanged(KisNodeSP node);
0035     void slotColorLabelsChanged();
0036 
0037     void slotMakeTransparent(bool value);
0038     void slotRemove();
0039 
0040     void slotUpdate();
0041     void slotSetAutoUpdates(bool value);
0042     void slotSetShowKeyStrokes(bool value);
0043     void slotSetShowOutput(bool value);
0044 
0045     void slotUseEdgeDetectionChanged(bool value);
0046     void slotEdgeDetectionSizeChanged(int value);
0047     void slotRadiusChanged(int value);
0048     void slotCleanUpChanged(int value);
0049     void slotLimitToDeviceChanged(bool value);
0050 
0051 
0052     void slotUpdateNodeProperties();
0053 
0054 protected:
0055     void showEvent(QShowEvent *event) override;
0056     void hideEvent(QHideEvent *event) override;
0057 
0058 private /* methods */:
0059     static bool sortSwatchInfo(const KisSwatchGroup::SwatchInfo &first, const KisSwatchGroup::SwatchInfo &second);
0060 
0061 private /* member variables */:
0062     friend struct PaletteEventFilter;
0063 
0064     struct Private;
0065     const QScopedPointer<Private> m_d;
0066 };
0067 
0068 #endif /* __KIS_TOOL_LAZY_BRUSH_OPTIONS_WIDGET_H */