File indexing completed on 2025-03-09 04:10:27

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Eugene Ingerman
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __TOOL_REFERENCE_IMAGES_WIDGET_H
0008 #define __TOOL_REFERENCE_IMAGES_WIDGET_H
0009 
0010 #include <QScopedPointer>
0011 #include <QWidget>
0012 #include <QModelIndex>
0013 
0014 #include "kis_types.h"
0015 
0016 class KoColor;
0017 class KoSelection;
0018 class KisCanvasResourceProvider;
0019 class ToolReferenceImages;
0020 
0021 class ToolReferenceImagesWidget : public QWidget
0022 {
0023     Q_OBJECT
0024 public:
0025     ToolReferenceImagesWidget(ToolReferenceImages *tool, KisCanvasResourceProvider *provider = 0, QWidget *parent = 0);
0026     ~ToolReferenceImagesWidget() override;
0027 
0028     void selectionChanged(KoSelection *selection);
0029 
0030 
0031 private Q_SLOTS:
0032     void slotOpacitySliderChanged(qreal);
0033     void slotSaturationSliderChanged(qreal);
0034     void slotKeepAspectChanged();
0035     void slotSaveLocationChanged(int index);
0036 
0037     void slotImageValuesChanged();
0038 
0039 private:
0040     struct Private;
0041     const QScopedPointer<Private> d;
0042     void updateVisibility(bool hasSelection);
0043 };
0044 
0045 #endif