Commit 2d068df9 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Move two widgets to libs/widgets

The confusingly named KisGradientSlider KisGradientSliderWidget
don't depend on anything Krita-specific, so they can be part of
the generic widgets library. Also export KisGradientSliderWidget
so it can be used anywhere.
parent a9110c72
...@@ -222,8 +222,6 @@ set(kritaui_LIB_SRCS ...@@ -222,8 +222,6 @@ set(kritaui_LIB_SRCS
widgets/kis_double_widget.cc widgets/kis_double_widget.cc
widgets/kis_filter_selector_widget.cc widgets/kis_filter_selector_widget.cc
widgets/kis_gradient_chooser.cc widgets/kis_gradient_chooser.cc
widgets/kis_gradient_slider_widget.cc
widgets/kis_gradient_slider.cpp
widgets/kis_iconwidget.cc widgets/kis_iconwidget.cc
widgets/kis_mask_widgets.cpp widgets/kis_mask_widgets.cpp
widgets/kis_meta_data_merge_strategy_chooser_widget.cc widgets/kis_meta_data_merge_strategy_chooser_widget.cc
......
...@@ -367,7 +367,7 @@ ...@@ -367,7 +367,7 @@
<customwidget> <customwidget>
<class>KisGradientSliderWidget</class> <class>KisGradientSliderWidget</class>
<extends></extends> <extends></extends>
<header>widgets/kis_gradient_slider_widget.h</header> <header>KisGradientSliderWidget.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
......
...@@ -28,12 +28,13 @@ ...@@ -28,12 +28,13 @@
#include "kis_debug.h" #include "kis_debug.h"
#include "widgets/kis_gradient_slider_widget.h" #include "KisGradientSliderWidget.h"
/****************************** KisAutogradient ******************************/ /****************************** KisAutogradient ******************************/
KisAutogradient::KisAutogradient(KoSegmentGradient* gradient, QWidget *parent, const char* name, const QString& caption) KisAutogradient::KisAutogradient(KoSegmentGradient* gradient, QWidget *parent, const char* name, const QString& caption)
: QWidget(parent), m_autogradientResource(gradient) : QWidget(parent)
, m_autogradientResource(gradient)
{ {
setObjectName(name); setObjectName(name);
setupUi(this); setupUi(this);
......
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
<customwidget> <customwidget>
<class>KisGradientSlider</class> <class>KisGradientSlider</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>kis_gradient_slider.h</header> <header>KisGradientSlider.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
......
...@@ -83,6 +83,9 @@ set(kritawidgets_LIB_SRCS ...@@ -83,6 +83,9 @@ set(kritawidgets_LIB_SRCS
KoAnchorSelectionWidget.cpp KoAnchorSelectionWidget.cpp
squeezedcombobox.cpp squeezedcombobox.cpp
KisGradientSlider.cpp
KisGradientSliderWidget.cpp
) )
ki18n_wrap_ui( kritawidgets_LIB_SRCS ki18n_wrap_ui( kritawidgets_LIB_SRCS
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
*/ */
// Local includes. // Local includes.
#include "kis_gradient_slider.h" #include "KisGradientSlider.h"
// C++ includes. // C++ includes.
......
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
#include <QList> #include <QList>
#include <QPair> #include <QPair>
#include <kritaui_export.h> #include "kritawidgets_export.h"
/** /**
* @brief The KisGradientSlider class is a numerical slider that paints a light-dark * @brief The KisGradientSlider class is a numerical slider that paints a light-dark
* gradient for use in filters and histograms. * gradient for use in filters and histograms.
*/ */
class KRITAUI_EXPORT KisGradientSlider : public QWidget class KRITAWIDGETS_EXPORT KisGradientSlider : public QWidget
{ {
Q_OBJECT Q_OBJECT
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#include "widgets/kis_gradient_slider_widget.h" #include "KisGradientSliderWidget.h"
#include <QPainter> #include <QPainter>
#include <QContextMenuEvent> #include <QContextMenuEvent>
#include <QPixmap> #include <QPixmap>
......
...@@ -29,10 +29,12 @@ class QMenu; ...@@ -29,10 +29,12 @@ class QMenu;
class KoGradientSegment; class KoGradientSegment;
class KoSegmentGradient; class KoSegmentGradient;
#include "kritawidgets_export.h"
/** /**
* @brief The KisGradientSliderWidget class makes it possible to edit gradients. * @brief The KisGradientSliderWidget class makes it possible to edit gradients.
*/ */
class KisGradientSliderWidget : public QWidget class KRITAWIDGETS_EXPORT KisGradientSliderWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "kis_paint_device.h" #include "kis_paint_device.h"
#include "kis_histogram.h" #include "kis_histogram.h"
#include "kis_painter.h" #include "kis_painter.h"
#include "kis_gradient_slider.h" #include "KisGradientSlider.h"
#include "kis_processing_information.h" #include "kis_processing_information.h"
#include "kis_selection.h" #include "kis_selection.h"
#include "kis_types.h" #include "kis_types.h"
......
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
<customwidget> <customwidget>
<class>KisGradientSlider</class> <class>KisGradientSlider</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>kis_gradient_slider.h</header> <header>KisGradientSlider.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>KisDoubleParseSpinBox</class> <class>KisDoubleParseSpinBox</class>
...@@ -343,8 +343,8 @@ ...@@ -343,8 +343,8 @@
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<includes> <includes>
<include location="local">kis_gradient_slider.h</include> <include location="local">KisGradientSlider.h</include>
<include location="local">kis_gradient_slider.h</include> <include location="local">KisGradientSlider.h</include>
</includes> </includes>
<resources/> <resources/>
<connections/> <connections/>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <filter/kis_filter_registry.h> #include <filter/kis_filter_registry.h>
#include <kis_global.h> #include <kis_global.h>
#include "kis_gradient_slider.h" #include "KisGradientSlider.h"
#include "kis_histogram.h" #include "kis_histogram.h"
#include <kis_layer.h> #include <kis_layer.h>
#include "kis_paint_device.h" #include "kis_paint_device.h"
......
...@@ -174,12 +174,12 @@ ...@@ -174,12 +174,12 @@
<customwidget> <customwidget>
<class>KisGradientSlider</class> <class>KisGradientSlider</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>kis_gradient_slider.h</header> <header>KisGradientSlider.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<includes> <includes>
<include location="local">kis_gradient_slider.h</include> <include location="local">KisGradientSlider.h</include>
<include location="local">kis_gradient_slider.h</include> <include location="local">KisGradientSlider.h</include>
</includes> </includes>
<resources/> <resources/>
<connections/> <connections/>
......
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
<customwidget> <customwidget>
<class>KisGradientSlider</class> <class>KisGradientSlider</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>kis_gradient_slider.h</header> <header>KisGradientSlider.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <kis_painter.h> #include <kis_painter.h>
#include <kis_iterator_ng.h> #include <kis_iterator_ng.h>
#include <kis_fixed_paint_device.h> #include <kis_fixed_paint_device.h>
#include <kis_gradient_slider.h> #include <KisGradientSlider.h>
#include "kis_embedded_pattern_manager.h" #include "kis_embedded_pattern_manager.h"
#include <brushengine/kis_paintop_lod_limitations.h> #include <brushengine/kis_paintop_lod_limitations.h>
#include "kis_texture_chooser.h" #include "kis_texture_chooser.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment