Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSegmentGradientEditor.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2004 Cyrille Berger <cberger@cberger.net>
3 * SPDX-FileCopyrightText: 2004 Sven Langkamp <sven.langkamp@gmail.com>
4 * SPDX-FileCopyrightText: 2021 Deif Lou <ginoba@gmail.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef _KIS_SEGMENT_GRADIENT_EDITOR_H_
10#define _KIS_SEGMENT_GRADIENT_EDITOR_H_
11
12#include <kritaui_export.h>
13#include <KoSegmentGradient.h>
14
15#include "ui_wdgsegmentgradienteditor.h"
16
18
19class KRITAUI_EXPORT KisSegmentGradientEditor : public QWidget, public Ui::KisWdgSegmentGradientEditor
20{
21 Q_OBJECT
22
23public:
24 KisSegmentGradientEditor(QWidget *parent);
25 KisSegmentGradientEditor(KoSegmentGradientSP gradient, QWidget *parent, const char* name, const QString& caption, KoCanvasResourcesInterfaceSP canvasResourcesInterface);
26
27 void setGradient(KoSegmentGradientSP gradient);
28 void gradient() const;
29
30 void setCanvasResourcesInterface(KoCanvasResourcesInterfaceSP canvasResourcesInterface);
31 KoCanvasResourcesInterfaceSP canvasResourcesInterface() const;
32
33 void setCompactMode(bool value);
34
35Q_SIGNALS:
37
38private:
49
50private Q_SLOTS:
51 void on_nameedit_editingFinished();
52 void on_gradientSlider_selectedHandleChanged();
53
54 void on_segmentLeftEditor_positionChanged(double position);
55 void on_segmentLeftEditor_colorTypeChanged(KisGradientWidgetsUtils::ColorType type);
56 void on_segmentLeftEditor_transparentToggled(bool checked);
57 void on_segmentLeftEditor_colorChanged(KoColor color);
58 void on_segmentLeftEditor_opacityChanged(double opacity);
59 void on_segmentRightEditor_positionChanged(double position);
60 void on_segmentRightEditor_colorTypeChanged(KisGradientWidgetsUtils::ColorType type);
61 void on_segmentRightEditor_transparentToggled(bool checked);
62 void on_segmentRightEditor_colorChanged(KoColor color);
63 void on_segmentRightEditor_opacityChanged(double opacity);
64 void on_segmentInterpolationTypeComboBox_activated(int value);
65 void on_segmentColorInterpolationTypeComboBox_activated(int value);
66
67 void on_stopPositionSlider_valueChanged(double position);
68 void on_stopLeftEditor_colorTypeChanged(KisGradientWidgetsUtils::ColorType type);
69 void on_stopLeftEditor_transparentToggled(bool checked);
70 void on_stopLeftEditor_colorChanged(KoColor color);
71 void on_stopLeftEditor_opacityChanged(double opacity);
72 void on_stopRightEditor_colorTypeChanged(KisGradientWidgetsUtils::ColorType type);
73 void on_stopRightEditor_transparentToggled(bool checked);
74 void on_stopRightEditor_colorChanged(KoColor color);
75 void on_stopRightEditor_opacityChanged(double opacity);
76 void on_constrainStopButton_keepAspectRatioChanged(bool keep);
77
78 void on_midPointPositionSlider_valueChanged(double opacity);
79
80 void editSelectedHandle();
81};
82
83#endif
float value(const T *src, size_t ch)
KoCanvasResourcesInterfaceSP m_canvasResourcesInterface
Write API docs here.