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
widgets/kis_double_widget.cc
widgets/kis_filter_selector_widget.cc
widgets/kis_gradient_chooser.cc
widgets/kis_gradient_slider_widget.cc
widgets/kis_gradient_slider.cpp
widgets/kis_iconwidget.cc
widgets/kis_mask_widgets.cpp
widgets/kis_meta_data_merge_strategy_chooser_widget.cc
......
......@@ -367,7 +367,7 @@
<customwidget>
<class>KisGradientSliderWidget</class>
<extends></extends>
<header>widgets/kis_gradient_slider_widget.h</header>
<header>KisGradientSliderWidget.h</header>
</customwidget>
</customwidgets>
<resources/>
......
......@@ -28,12 +28,13 @@
#include "kis_debug.h"
#include "widgets/kis_gradient_slider_widget.h"
#include "KisGradientSliderWidget.h"
/****************************** KisAutogradient ******************************/
KisAutogradient::KisAutogradient(KoSegmentGradient* gradient, QWidget *parent, const char* name, const QString& caption)
: QWidget(parent), m_autogradientResource(gradient)
: QWidget(parent)
, m_autogradientResource(gradient)
{
setObjectName(name);
setupUi(this);
......
......@@ -382,7 +382,7 @@
<customwidget>
<class>KisGradientSlider</class>
<extends>QWidget</extends>
<header>kis_gradient_slider.h</header>
<header>KisGradientSlider.h</header>
<container>1</container>
</customwidget>
</customwidgets>
......
......@@ -83,6 +83,9 @@ set(kritawidgets_LIB_SRCS
KoAnchorSelectionWidget.cpp
squeezedcombobox.cpp
KisGradientSlider.cpp
KisGradientSliderWidget.cpp
)
ki18n_wrap_ui( kritawidgets_LIB_SRCS
......
......@@ -19,7 +19,7 @@
*/
// Local includes.
#include "kis_gradient_slider.h"
#include "KisGradientSlider.h"
// C++ includes.
......
......@@ -28,13 +28,13 @@
#include <QList>
#include <QPair>
#include <kritaui_export.h>
#include "kritawidgets_export.h"
/**
* @brief The KisGradientSlider class is a numerical slider that paints a light-dark
* gradient for use in filters and histograms.
*/
class KRITAUI_EXPORT KisGradientSlider : public QWidget
class KRITAWIDGETS_EXPORT KisGradientSlider : public QWidget
{
Q_OBJECT
......
......@@ -17,7 +17,7 @@
* 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 <QContextMenuEvent>
#include <QPixmap>
......
......@@ -29,10 +29,12 @@ class QMenu;
class KoGradientSegment;
class KoSegmentGradient;
#include "kritawidgets_export.h"
/**
* @brief The KisGradientSliderWidget class makes it possible to edit gradients.
*/
class KisGradientSliderWidget : public QWidget
class KRITAWIDGETS_EXPORT KisGradientSliderWidget : public QWidget
{
Q_OBJECT
......
......@@ -37,7 +37,7 @@
#include "kis_paint_device.h"
#include "kis_histogram.h"
#include "kis_painter.h"
#include "kis_gradient_slider.h"
#include "KisGradientSlider.h"
#include "kis_processing_information.h"
#include "kis_selection.h"
#include "kis_types.h"
......
......@@ -334,7 +334,7 @@
<customwidget>
<class>KisGradientSlider</class>
<extends>QWidget</extends>
<header>kis_gradient_slider.h</header>
<header>KisGradientSlider.h</header>
</customwidget>
<customwidget>
<class>KisDoubleParseSpinBox</class>
......@@ -343,8 +343,8 @@
</customwidget>
</customwidgets>
<includes>
<include location="local">kis_gradient_slider.h</include>
<include location="local">kis_gradient_slider.h</include>
<include location="local">KisGradientSlider.h</include>
<include location="local">KisGradientSlider.h</include>
</includes>
<resources/>
<connections/>
......
......@@ -32,7 +32,7 @@
#include <filter/kis_filter_registry.h>
#include <kis_global.h>
#include "kis_gradient_slider.h"
#include "KisGradientSlider.h"
#include "kis_histogram.h"
#include <kis_layer.h>
#include "kis_paint_device.h"
......
......@@ -174,12 +174,12 @@
<customwidget>
<class>KisGradientSlider</class>
<extends>QWidget</extends>
<header>kis_gradient_slider.h</header>
<header>KisGradientSlider.h</header>
</customwidget>
</customwidgets>
<includes>
<include location="local">kis_gradient_slider.h</include>
<include location="local">kis_gradient_slider.h</include>
<include location="local">KisGradientSlider.h</include>
<include location="local">KisGradientSlider.h</include>
</includes>
<resources/>
<connections/>
......
......@@ -326,7 +326,7 @@
<customwidget>
<class>KisGradientSlider</class>
<extends>QWidget</extends>
<header>kis_gradient_slider.h</header>
<header>KisGradientSlider.h</header>
<container>1</container>
</customwidget>
<customwidget>
......
......@@ -42,7 +42,7 @@
#include <kis_painter.h>
#include <kis_iterator_ng.h>
#include <kis_fixed_paint_device.h>
#include <kis_gradient_slider.h>
#include <KisGradientSlider.h>
#include "kis_embedded_pattern_manager.h"
#include <brushengine/kis_paintop_lod_limitations.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