diff --git a/krita/plugins/paintops/curvebrush/CMakeLists.txt b/krita/plugins/paintops/curvebrush/CMakeLists.txt index 323e2eac451..07d6d0aeb44 100644 --- a/krita/plugins/paintops/curvebrush/CMakeLists.txt +++ b/krita/plugins/paintops/curvebrush/CMakeLists.txt @@ -1,26 +1,29 @@ set(kritacurvepaintop_PART_SRCS - curve_brush.cpp - curve_paintop_plugin.cpp - kis_curve_paintop.cpp - kis_curve_paintop_settings.cpp - kis_curve_paintop_settings_widget.cpp + curve_brush.cpp + curve_paintop_plugin.cpp + kis_curve_paintop.cpp + kis_curve_paintop_settings.cpp + kis_curve_line_option.cpp + kis_linewidth_option.cpp + kis_curves_opacity_option.cpp + kis_curve_paintop_settings_widget.cpp ) kde4_add_ui_files(kritacurvepaintop_PART_SRCS wdgcurveoptions.ui ) kde4_add_plugin(kritacurvepaintop ${kritacurvepaintop_PART_SRCS}) -target_link_libraries(kritacurvepaintop kritaui) +target_link_libraries(kritacurvepaintop kritalibpaintop) install(TARGETS kritacurvepaintop DESTINATION ${PLUGIN_INSTALL_DIR}) ########### install files ############### install( FILES kritacurvepaintop.desktop DESTINATION ${SERVICES_INSTALL_DIR}) install( FILES krita-curve.png DESTINATION ${DATA_INSTALL_DIR}/krita/images) install( FILES stylus.obj DESTINATION ${DATA_INSTALL_DIR}/krita/brushmodels ) install( FILES stylus.mtl DESTINATION ${DATA_INSTALL_DIR}/krita/brushmodels ) diff --git a/krita/plugins/paintops/curvebrush/curve_brush.cpp b/krita/plugins/paintops/curvebrush/curve_brush.cpp index 66d4d3e28f9..8a5074aaabd 100644 --- a/krita/plugins/paintops/curvebrush/curve_brush.cpp +++ b/krita/plugins/paintops/curvebrush/curve_brush.cpp @@ -1,193 +1,178 @@ /* * Copyright (c) 2008,2010 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "curve_brush.h" #include #include #include #include #include -const int STEPS = 200; +#include "kis_curve_line_option.h" + +const int STEPS = 200; #if defined(_WIN32) || defined(_WIN64) #define srand48 srand inline double drand48() { return double(rand()) / RAND_MAX; } #endif -CurveBrush::CurveBrush() : m_counter(1), m_increment(1) +CurveBrush::CurveBrush() : + m_painter(0), + m_branch(0) { srand48(time(0)); + m_pens.reserve(1024); } CurveBrush::~CurveBrush() { + delete m_painter; } QPointF CurveBrush::getLinearBezier(const QPointF &p1, const QPointF &p2, qreal u) { qreal rx = (1.0 - u) * p1.x() + u * p2.x(); qreal ry = (1.0 - u) * p1.y() + u * p2.y(); return QPointF(rx, ry); } QPointF CurveBrush::getQuadraticBezier(const QPointF &p0, const QPointF &p1, const QPointF &p2, qreal u) { qreal rx = pow((1.0 - u), 2) * p0.x() + 2 * u * (1.0 - u) * p1.x() + pow(u, 2) * p2.x(); qreal ry = pow((1.0 - u), 2) * p0.y() + 2 * u * (1.0 - u) * p1.y() + pow(u, 2) * p2.y(); return QPointF(rx, ry); } QPointF CurveBrush::getCubicBezier(const QPointF &p0, const QPointF &p1, const QPointF &p2, const QPointF &p3, qreal u) { qreal rx = pow((1.0 - u), 3) * p0.x() + 3.0 * u * pow((1.0 - u), 2) * p1.x() + 3.0 * pow(u, 2) * (1.0 - u) * p2.x() + pow(u, 3) * p3.x(); qreal ry = pow((1.0 - u), 3) * p0.y() + 3.0 * u * pow((1.0 - u), 2) * p1.y() + 3.0 * pow(u, 2) * (1.0 - u) * p2.y() + pow(u, 3) * p3.y(); return QPointF(rx, ry); } -void CurveBrush::paintLine(KisPaintDeviceSP dab, KisPaintDeviceSP layer, const KisPaintInformation &pi1, const KisPaintInformation &pi2) -{ - qreal x1 = pi1.pos().x(); - qreal y1 = pi1.pos().y(); - - qreal x2 = pi2.pos().x(); - qreal y2 = pi2.pos().y(); - - qreal dx = x2 - x1; - qreal dy = y2 - y1; - //qreal angle = atan2(dy, dx); - qreal distance = sqrt(dx * dx + dy * dy); - - KisRandomAccessor accessor = dab->createRandomAccessor((int) x1, (int) y1); - m_writeAccessor = &accessor; - - m_layer = layer; - m_pixelSize = dab->colorSpace()->pixelSize(); - - KoColor pcolor = m_painter->paintColor(); - // end of initialization - - qreal midPointX, midPointY; - midPointX = ((x1 + x2) / 2.0); - midPointY = ((y1 + y2) / 2.0); - - qreal midPointOffset = 0.0; - switch (m_mode) { - case 1: midPointOffset = ((drand48() * m_interval) - m_interval); - break; - case 2: midPointOffset = drand48() * m_counter; - break; - case 3: midPointOffset = m_counter; - break; - } - - if (distance > m_minimalDistance) { - if (x1 == x2) { - midPointX += midPointOffset; - } else if (y1 == y2) { - midPointY += midPointOffset; - } else if (fabs(dx) > fabs(dy)) { - // horizontal - midPointY += midPointOffset; - } else { - midPointX += midPointOffset; - } - } - - QPointF p0 = pi1.pos(); - QPointF p2 = pi2.pos(); - QPointF p1(midPointX, midPointY); - - QPointF result; - for (int i = 0 ; i <= STEPS; i++) { - result = getQuadraticBezier(p0, p1, p2, i / (qreal)STEPS); - putPixel(result,pcolor); - } - - m_counter += m_increment; - if (abs(m_counter) - 1 == m_interval) { - m_increment *= -1; - } - -} - void CurveBrush::putPixel(QPointF pos, KoColor &color) { int ipx = int (pos.x()); int ipy = int (pos.y()); qreal fx = pos.x() - ipx; qreal fy = pos.y() - ipy; qreal btl = (1 - fx) * (1 - fy); qreal btr = (fx) * (1 - fy); qreal bbl = (1 - fx) * (fy); qreal bbr = (fx) * (fy); color.setOpacity(btl); m_writeAccessor->moveTo(ipx , ipy); - if (m_layer->colorSpace()->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { + if (cs->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { memcpy(m_writeAccessor->rawData(), color.data(), m_pixelSize); } color.setOpacity(btr); m_writeAccessor->moveTo(ipx + 1, ipy); - if (m_layer->colorSpace()->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { + if (cs->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { memcpy(m_writeAccessor->rawData(), color.data(), m_pixelSize); } color.setOpacity(bbl); m_writeAccessor->moveTo(ipx, ipy + 1); - if (m_layer->colorSpace()->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { + if (cs->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { memcpy(m_writeAccessor->rawData(), color.data(), m_pixelSize); } color.setOpacity(bbr); m_writeAccessor->moveTo(ipx + 1, ipy + 1); - if (m_layer->colorSpace()->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { + if (cs->opacityU8(m_writeAccessor->rawData()) < color.opacityU8()) { memcpy(m_writeAccessor->rawData(), color.data(), m_pixelSize); } } +void CurveBrush::strokePens(QPointF pi1, QPointF pi2, KisPainter &painter) { + if (m_pens.isEmpty()) { + m_pens.append(Pen(pi1,0.0,1.0)); + } + + qreal dx = pi2.x() - pi1.x(); + qreal dy = pi2.y() - pi1.y(); + for (int i = 0; i < m_pens.length(); i++){ + Pen &pen = m_pens[i]; + + QPointF endPoint(dx, dy); + + QPainterPath path; + path.moveTo(0,0); + path.lineTo(dx, dy); + + QTransform transform; + transform.reset(); + transform.translate(pen.pos.x(), pen.pos.y()); + transform.scale(pen.scale, pen.scale); + transform.rotate(pen.rotation); + + path = transform.map(path); + //m_painter->drawPainterPath(path, QPen(Qt::white, 1.0)); + + endPoint = transform.map(endPoint); + m_painter->drawThickLine(pen.pos, endPoint, 1.0, 1.0); + pen.pos = endPoint; + } + + qreal branchThreshold = 0.5; + if ((m_branch * drand48() > branchThreshold) && (m_pens.length() < 1024)){ + int index = floor(drand48() * (m_pens.length()-1)); + + m_newPen.pos = m_pens.at(index).pos; + m_newPen.rotation = drand48() * M_PI/32;//atan(dy/dx) + (drand48() - 0.5) * M_PI/32; + m_newPen.scale = drand48() * m_pens.at(index).scale; + m_pens.append(m_newPen); + qDebug() << m_pens.length(); + m_branch = 0; + } else { + m_branch++; + } +} + diff --git a/krita/plugins/paintops/curvebrush/curve_brush.h b/krita/plugins/paintops/curvebrush/curve_brush.h index b11dbe1134b..53c63064cfa 100644 --- a/krita/plugins/paintops/curvebrush/curve_brush.h +++ b/krita/plugins/paintops/curvebrush/curve_brush.h @@ -1,76 +1,80 @@ /* - * Copyright (c) 2008,2010 Lukáš Tvrdý + * Copyright (c) 2008-2011 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _CURVE_BRUSH_H_ #define _CURVE_BRUSH_H_ #include #include #include #include #include +#include "kis_curve_paintop_settings_widget.h" +#include -class CurveBrush -{ - +class CurveProperties; +class Pen { public: - CurveBrush(); - ~CurveBrush(); + Pen():pos(QPointF(0,0)), rotation(0), scale(0) + { - void paintLine(KisPaintDeviceSP dab, KisPaintDeviceSP layer, const KisPaintInformation &pi1, const KisPaintInformation &pi2); - - void setPainter(KisPainter *painter) { - m_painter = painter; } - void setMinimalDistance(int mininmalDistance) { - m_minimalDistance = mininmalDistance; - } + Pen(QPointF ipos,qreal irotation, qreal iscale) + :pos(ipos), + rotation(irotation), + scale(iscale) + { - void setMode(int mode) { - m_mode = mode; } - void setInterval(int interval) { - m_interval = interval; - } + ~Pen() {} -private: + QPointF pos; + qreal rotation; + qreal scale; +}; +class CurveBrush +{ + +public: + CurveBrush(); + ~CurveBrush(); + +private: QPointF getCubicBezier(const QPointF &p0, const QPointF &p1, const QPointF &p2, const QPointF &p3, qreal u); QPointF getQuadraticBezier(const QPointF &p0, const QPointF &p1, const QPointF &p2, qreal u); QPointF getLinearBezier(const QPointF &p1, const QPointF &p2, qreal u); void putPixel(QPointF pos, KoColor &color); - - KisPaintDeviceSP m_layer; KisRandomAccessor * m_writeAccessor; + KoColorSpace * cs; quint32 m_pixelSize; KisPainter * m_painter; - int m_counter; - int m_increment; + QList m_pens; + int m_branch; + Pen m_newPen; - int m_interval; - int m_mode; - int m_minimalDistance; + void strokePens(QPointF pi1, QPointF pi2, KisPainter &painter); }; #endif diff --git a/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp b/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp new file mode 100644 index 00000000000..3f2d18f8d3b --- /dev/null +++ b/krita/plugins/paintops/curvebrush/kis_curve_line_option.cpp @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2011 Lukáš Tvrdý + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#include "kis_curve_line_option.h" + +#include "ui_wdgcurveoptions.h" + +class KisCurveOpOptionsWidget: public QWidget, public Ui::WdgCurveOptions +{ + +public: + KisCurveOpOptionsWidget(QWidget *parent = 0) : QWidget(parent) { + setupUi(this); + historySizeSlider->setRange(2, 300); + historySizeSlider->setValue(30); + + lineWidthSlider->setRange(1, 100); + lineWidthSlider->setValue(1); + lineWidthSlider->setSuffix("px"); + + curvesOpacitySlider->setRange(0.0, 1.0, 2); + curvesOpacitySlider->setValue(1.0); + } +}; + +KisCurveOpOption::KisCurveOpOption() + : KisPaintOpOption(i18n("Lines"), KisPaintOpOption::brushCategory(), false) +{ + m_checkable = false; + m_options = new KisCurveOpOptionsWidget(); + + connect(m_options->connectionCHBox, SIGNAL(toggled(bool)), this, SIGNAL(sigSettingChanged())); + connect(m_options->smoothingCHBox, SIGNAL(toggled(bool)), this, SIGNAL(sigSettingChanged())); + connect(m_options->historySizeSlider, SIGNAL(valueChanged(qreal)), this, SIGNAL(sigSettingChanged())); + connect(m_options->lineWidthSlider, SIGNAL(valueChanged(qreal)), this, SIGNAL(sigSettingChanged())); + connect(m_options->curvesOpacitySlider, SIGNAL(valueChanged(qreal)), this, SIGNAL(sigSettingChanged())); + + setConfigurationPage(m_options); +} + +KisCurveOpOption::~KisCurveOpOption() +{ +} + +void KisCurveOpOption::writeOptionSetting(KisPropertiesConfiguration* config) const +{ + config->setProperty(CURVE_PAINT_CONNECTION_LINE, m_options->connectionCHBox->isChecked()); + config->setProperty(CURVE_SMOOTHING, m_options->smoothingCHBox->isChecked()); + config->setProperty(CURVE_STROKE_HISTORY_SIZE, m_options->historySizeSlider->value()); + config->setProperty(CURVE_LINE_WIDTH, m_options->lineWidthSlider->value()); + config->setProperty(CURVE_CURVES_OPACITY, m_options->curvesOpacitySlider->value()); +} + +void KisCurveOpOption::readOptionSetting(const KisPropertiesConfiguration* config) +{ + m_options->connectionCHBox->setChecked(config->getBool(CURVE_PAINT_CONNECTION_LINE)); + m_options->smoothingCHBox->setChecked(config->getBool(CURVE_SMOOTHING)); + m_options->historySizeSlider->setValue(config->getInt(CURVE_STROKE_HISTORY_SIZE)); + m_options->lineWidthSlider->setValue(config->getInt(CURVE_LINE_WIDTH)); + m_options->curvesOpacitySlider->setValue(config->getDouble(CURVE_CURVES_OPACITY)); +} + + diff --git a/krita/plugins/paintops/curvebrush/kis_curve_line_option.h b/krita/plugins/paintops/curvebrush/kis_curve_line_option.h new file mode 100644 index 00000000000..67f25c0107b --- /dev/null +++ b/krita/plugins/paintops/curvebrush/kis_curve_line_option.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2011 Lukáš Tvrdý + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +#ifndef KIS_CURVE_LINE_OPTION_H +#define KIS_CURVE_LINE_OPTION_H + +#include +#include + +class KisCurveOpOptionsWidget; + +// new rewrite +const QString CURVE_LINE_WIDTH = "Curve/lineWidth"; // same as in sketch +const QString CURVE_PAINT_CONNECTION_LINE = "Curve/makeConnection"; // same as in sketch +const QString CURVE_STROKE_HISTORY_SIZE = "Curve/strokeHistorySize"; +const QString CURVE_SMOOTHING = "Curve/smoothing"; +const QString CURVE_CURVES_OPACITY = "Curve/curvesOpacity"; + +class KisCurveOpOption : public KisPaintOpOption +{ +public: + KisCurveOpOption(); + ~KisCurveOpOption(); + + void writeOptionSetting(KisPropertiesConfiguration* setting) const; + void readOptionSetting(const KisPropertiesConfiguration* setting); + +private: + KisCurveOpOptionsWidget * m_options; + +}; + +class CurveProperties{ +public: + int lineWidth; + int historySize; + qreal curvesOpacity; + bool paintConnectionLine; + bool smoothing; + + void readOptionSetting(const KisPropertiesConfiguration* settings) { + lineWidth = settings->getInt(CURVE_LINE_WIDTH); + historySize = settings->getInt(CURVE_STROKE_HISTORY_SIZE); + paintConnectionLine = settings->getBool(CURVE_PAINT_CONNECTION_LINE); + smoothing = settings->getBool(CURVE_SMOOTHING); + curvesOpacity = settings->getDouble(CURVE_CURVES_OPACITY); + } +}; + +#endif diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop.cpp b/krita/plugins/paintops/curvebrush/kis_curve_paintop.cpp index e9f514480ec..9702277c82f 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop.cpp +++ b/krita/plugins/paintops/curvebrush/kis_curve_paintop.cpp @@ -1,84 +1,128 @@ /* - * Copyright (c) 2008,2010 Lukáš Tvrdý + * Copyright (c) 2008-2011 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "kis_curve_paintop.h" -#include "kis_curve_paintop_settings.h" #include #include #include #include #include "kis_global.h" #include "kis_paint_device.h" #include "kis_painter.h" #include "kis_types.h" -#include "kis_paintop.h" - -#include "kis_curve_paintop_settings_widget.h" KisCurvePaintOp::KisCurvePaintOp(const KisCurvePaintOpSettings *settings, KisPainter * painter, KisImageWSP image) - : KisPaintOp(painter) + : KisPaintOp(painter), m_painter(0) { Q_ASSERT(settings); Q_UNUSED(image); - m_curveBrush.setPainter(painter); - m_curveBrush.setMode( settings->getInt(CURVE_MODE) ); - m_curveBrush.setMinimalDistance( settings->getInt(CURVE_MIN_DISTANCE) ); - m_curveBrush.setInterval(settings->getInt(CURVE_INTERVAL) ); + m_curveProperties.readOptionSetting(settings); + m_opacityOption.readOptionSetting(settings); + m_lineWidthOption.readOptionSetting(settings); + m_curvesOpacityOption.readOptionSetting(settings); } KisCurvePaintOp::~KisCurvePaintOp() { + delete m_painter; } qreal KisCurvePaintOp::paintAt(const KisPaintInformation& info) { Q_UNUSED(info); return 1.0; } KisDistanceInformation KisCurvePaintOp::paintLine(const KisPaintInformation& pi1, const KisPaintInformation& pi2, const KisDistanceInformation& savedDist) { Q_UNUSED(savedDist); - if (!painter()) return KisDistanceInformation(); - m_dev = painter()->device(); - if (!m_dev) return KisDistanceInformation(); + if (!painter()) { + return KisDistanceInformation(); + } if (!m_dab) { m_dab = new KisPaintDevice(painter()->device()->colorSpace()); } else { m_dab->clear(); } - //write device, read device, position - m_curveBrush.paintLine(m_dab, m_dev, pi1, pi2); + + paintLine(m_dab, pi1, pi2); QRect rc = m_dab->extent(); + quint8 origOpacity = m_opacityOption.apply(painter(), pi2); painter()->bitBlt(rc.topLeft(), m_dab, rc); - painter()->renderMirrorMask(rc,m_dab); + painter()->renderMirrorMask(rc, m_dab); + painter()->setOpacity(origOpacity); KisVector2D end = toKisVector2D(pi2.pos()); KisVector2D start = toKisVector2D(pi1.pos()); KisVector2D dragVec = end - start; + return KisDistanceInformation(0, dragVec.norm()); +} + +void KisCurvePaintOp::paintLine(KisPaintDeviceSP dab, const KisPaintInformation &pi1, const KisPaintInformation &pi2) { + if (!m_painter) { + m_painter = new KisPainter(dab); + m_painter->setPaintColor(painter()->paintColor()); + } + + int maxPoints = m_curveProperties.historySize; + m_points.append(pi2.pos()); + + while (m_points.length() > maxPoints) { + m_points.removeFirst(); + } + + qreal lineWidth = m_lineWidthOption.apply(pi2, m_curveProperties.lineWidth); + + QPen pen(QBrush(Qt::white), lineWidth); + QPainterPath path; + + if ( m_curveProperties.paintConnectionLine ) { + path.moveTo(pi1.pos()); + path.lineTo(pi2.pos()); + m_painter->drawPainterPath(path, pen); + path = QPainterPath(); + } + + if (m_points.length() >= maxPoints) { + // alpha * 0.2; + path.moveTo(m_points.first()); + + if ( m_curveProperties.smoothing ) { + path.quadTo(m_points.at(maxPoints / 2), m_points.last()); + } else { + // control point is at 1/3 of the history, 2/3 of the history and endpoint at 3/3 + int step = maxPoints / 3; + path.cubicTo(m_points.at(step), m_points.at(step+step), m_points.last()); + } + + qreal curveOpacity = m_curvesOpacityOption.apply(pi2, m_curveProperties.curvesOpacity); + m_painter->setOpacity(qRound(255.0 * curveOpacity)); + m_painter->drawPainterPath(path, pen); + m_painter->setOpacity(255); // full + } } diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop.h b/krita/plugins/paintops/curvebrush/kis_curve_paintop.h index ce994cc3a03..66c8d627440 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop.h +++ b/krita/plugins/paintops/curvebrush/kis_curve_paintop.h @@ -1,52 +1,60 @@ /* - * Copyright (c) 2008,2010 Lukáš Tvrdý + * Copyright (c) 2008-2011 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIS_CURVEPAINTOP_H_ #define KIS_CURVEPAINTOP_H_ #include #include - #include "curve_brush.h" - +#include "kis_curve_line_option.h" #include "kis_curve_paintop_settings.h" +#include +#include "kis_linewidth_option.h" +#include "kis_curves_opacity_option.h" class KisPainter; class KisCurvePaintOp : public KisPaintOp { public: KisCurvePaintOp(const KisCurvePaintOpSettings *settings, KisPainter * painter, KisImageWSP image); virtual ~KisCurvePaintOp(); - virtual bool incremental() const { - return false; - } - qreal paintAt(const KisPaintInformation& info); KisDistanceInformation paintLine(const KisPaintInformation &pi1, const KisPaintInformation &pi2, const KisDistanceInformation& savedDist); +private: + void paintLine(KisPaintDeviceSP dab, const KisPaintInformation &pi1, const KisPaintInformation &pi2); private: KisPaintDeviceSP m_dab; KisPaintDeviceSP m_dev; - CurveBrush m_curveBrush; + + CurveProperties m_curveProperties; + KisPressureOpacityOption m_opacityOption; + KisLineWidthOption m_lineWidthOption; + KisCurvesOpacityOption m_curvesOpacityOption; + + QList m_points; + KisPainter * m_painter; + }; #endif // KIS_CURVEPAINTOP_H_ diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.cpp b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.cpp index 5d92454ccda..52e27bc653b 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.cpp +++ b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.cpp @@ -1,44 +1,28 @@ /* * Copyright (c) 2008,2009 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include -#include "kis_image.h" +#include KisCurvePaintOpSettings::KisCurvePaintOpSettings() { } bool KisCurvePaintOpSettings::paintIncremental() { - return false; + return (enumPaintActionType)getInt("PaintOpAction", WASH) == BUILDUP; } - -QRectF KisCurvePaintOpSettings::paintOutlineRect(const QPointF& pos, KisImageWSP image, KisPaintOpSettings::OutlineMode _mode) const -{ - Q_UNUSED(_mode); - QRectF rect = QRectF(-5, -5, 10, 10); - return image->pixelToDocument(rect).translated(pos); -} - -void KisCurvePaintOpSettings::paintOutline(const QPointF& pos, KisImageWSP image, QPainter& painter, KisPaintOpSettings::OutlineMode _mode) const -{ - if (_mode != CursorIsOutline) return; - QRectF rect2 = paintOutlineRect(pos, image, _mode); - painter.drawLine(rect2.topLeft(), rect2.bottomRight()); - painter.drawLine(rect2.topRight(), rect2.bottomLeft()); -} - diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h index cd108c2da94..dc47de43fbc 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h +++ b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h @@ -1,42 +1,39 @@ /* * Copyright (c) 2008 Boudewijn Rempt * Copyright (c) 2008 Lukas Tvrdy * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIS_CURVE_PAINTOP_SETTINGS_H_ #define KIS_CURVE_PAINTOP_SETTINGS_H_ #include class KisCurvePaintOpSettings : public KisPaintOpSettings { public: KisCurvePaintOpSettings(); virtual ~KisCurvePaintOpSettings() {} - bool paintIncremental(); - - virtual QRectF paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const; - virtual void paintOutline(const QPointF& pos, KisImageWSP image, QPainter &painter, OutlineMode _mode) const; + virtual bool paintIncremental(); #if defined(HAVE_OPENGL) inline QString modelName() const { return "stylus"; } #endif }; #endif diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.cpp b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.cpp index b9147daa6c8..511a342062e 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.cpp +++ b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.cpp @@ -1,82 +1,54 @@ /* * Copyright (c) 2008,2010 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include +#include +#include -#include "kis_curve_paintop_settings.h" +#include "kis_curve_line_option.h" +#include +#include +#include +#include +#include +#include "kis_curves_opacity_option.h" KisCurvePaintOpSettingsWidget:: KisCurvePaintOpSettingsWidget(QWidget* parent) - : KisPaintOpSettingsWidget(parent) + : KisPaintOpOptionsWidget(parent) { - m_options = new Ui::WdgCurveOptions(); - m_options->setupUi(this); - - connect(m_options->mode1Btn,SIGNAL(toggled(bool)),this, SIGNAL(sigConfigurationUpdated())); - connect(m_options->mode2Btn,SIGNAL(toggled(bool)),this, SIGNAL(sigConfigurationUpdated())); - connect(m_options->mode3Btn,SIGNAL(toggled(bool)),this, SIGNAL(sigConfigurationUpdated())); - connect(m_options->minDistSPBox,SIGNAL(valueChanged(int)),this, SIGNAL(sigConfigurationUpdated())); - connect(m_options->pulseSPBox, SIGNAL(valueChanged(int)), this, SIGNAL(sigConfigurationUpdated())); + addPaintOpOption(new KisCurveOpOption()); + addPaintOpOption(new KisCurveOptionWidget(new KisPressureOpacityOption())); + addPaintOpOption(new KisCurveOptionWidget(new KisLineWidthOption())); + addPaintOpOption(new KisCurveOptionWidget(new KisCurvesOpacityOption())); + addPaintOpOption(new KisCompositeOpOption(true)); + addPaintOpOption(new KisPaintActionTypeOption()); } KisCurvePaintOpSettingsWidget::~ KisCurvePaintOpSettingsWidget() { - delete m_options; } -void KisCurvePaintOpSettingsWidget::setConfiguration(const KisPropertiesConfiguration * config) -{ - m_options->minDistSPBox->setValue(config->getInt(CURVE_MIN_DISTANCE)); - m_options->pulseSPBox->setValue(config->getInt(CURVE_INTERVAL)); - - switch (config->getInt(CURVE_MODE)){ - case 1: - m_options->mode1Btn->setChecked(true); break; - case 2: - m_options->mode2Btn->setChecked(true); break; - case 3: - m_options->mode3Btn->setChecked(true); break; - default: - m_options->mode1Btn->setChecked(true); break; - } -} KisPropertiesConfiguration* KisCurvePaintOpSettingsWidget::configuration() const { - KisCurvePaintOpSettings* settings = new KisCurvePaintOpSettings(); - settings->setOptionsWidget(const_cast(this)); - return settings; -} - -void KisCurvePaintOpSettingsWidget::writeConfiguration(KisPropertiesConfiguration* config) const -{ - config->setProperty("paintop", "curvebrush"); // XXX: make this a const id string - config->setProperty(CURVE_MIN_DISTANCE, m_options->minDistSPBox->value()); - config->setProperty(CURVE_INTERVAL, m_options->pulseSPBox->value()); - config->setProperty(CURVE_MODE, curveMode()); -} - -int KisCurvePaintOpSettingsWidget::curveMode() const -{ - if (m_options->mode1Btn->isChecked()) { - return 1; - } else if (m_options->mode2Btn->isChecked()) { - return 2; - } else if (m_options->mode3Btn->isChecked()) { - return 3; - } else return -1; + KisCurvePaintOpSettings* config = new KisCurvePaintOpSettings(); + config->setOptionsWidget(const_cast(this)); + config->setProperty("paintop", "chalkbrush"); // XXX: make this a const id string + writeConfiguration(config); + return config; } diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.h b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.h index b2c3b7c3982..13bb09d3966 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.h +++ b/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings_widget.h @@ -1,49 +1,42 @@ /* * Copyright (c) 2008,2010 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIS_CURVE_PAINTOP_SETTINGS_WIDGET_H_ #define KIS_CURVE_PAINTOP_SETTINGS_WIDGET_H_ -#include +#include -#include "ui_wdgcurveoptions.h" -#include "widgets/kis_popup_button.h" +class KisCurveOpOption; +class KisPropertiesConfiguration; -const QString CURVE_MIN_DISTANCE = "Curve/minimumDistance"; -const QString CURVE_MODE = "Curve/mode"; -const QString CURVE_INTERVAL = "Curve/interval"; - -class KisCurvePaintOpSettingsWidget : public KisPaintOpSettingsWidget +class KisCurvePaintOpSettingsWidget : public KisPaintOpOptionsWidget { Q_OBJECT public: KisCurvePaintOpSettingsWidget(QWidget* parent = 0); virtual ~KisCurvePaintOpSettingsWidget(); - void setConfiguration(const KisPropertiesConfiguration * config); KisPropertiesConfiguration* configuration() const; - void writeConfiguration(KisPropertiesConfiguration *config) const; - - int curveMode() const; private: - Ui::WdgCurveOptions* m_options; + KisCurveOpOption * m_options; }; + #endif diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h b/krita/plugins/paintops/curvebrush/kis_curves_opacity_option.cpp similarity index 51% copy from krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h copy to krita/plugins/paintops/curvebrush/kis_curves_opacity_option.cpp index cd108c2da94..4b6df3dd8a5 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h +++ b/krita/plugins/paintops/curvebrush/kis_curves_opacity_option.cpp @@ -1,42 +1,36 @@ /* - * Copyright (c) 2008 Boudewijn Rempt - * Copyright (c) 2008 Lukas Tvrdy + * Copyright (c) 2011 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_CURVE_PAINTOP_SETTINGS_H_ -#define KIS_CURVE_PAINTOP_SETTINGS_H_ -#include +#include "kis_curves_opacity_option.h" +#include -class KisCurvePaintOpSettings : public KisPaintOpSettings +KisCurvesOpacityOption::KisCurvesOpacityOption() + : KisCurveOption(i18n("Curves opacity"), "Curves opacity", KisPaintOpOption::brushCategory(), false) { + setMinimumLabel(i18n("0%")); + setMaximumLabel(i18n("100%")); +} -public: - KisCurvePaintOpSettings(); - virtual ~KisCurvePaintOpSettings() {} - bool paintIncremental(); - - virtual QRectF paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const; - virtual void paintOutline(const QPointF& pos, KisImageWSP image, QPainter &painter, OutlineMode _mode) const; - -#if defined(HAVE_OPENGL) - inline QString modelName() const { - return "stylus"; +double KisCurvesOpacityOption::apply(const KisPaintInformation & info, qreal opacity) const +{ + if (!isChecked()) { + return opacity; } -#endif -}; -#endif + return computeValue(info) * opacity; +} diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h b/krita/plugins/paintops/curvebrush/kis_curves_opacity_option.h similarity index 51% copy from krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h copy to krita/plugins/paintops/curvebrush/kis_curves_opacity_option.h index cd108c2da94..eada968de6b 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h +++ b/krita/plugins/paintops/curvebrush/kis_curves_opacity_option.h @@ -1,42 +1,32 @@ /* - * Copyright (c) 2008 Boudewijn Rempt - * Copyright (c) 2008 Lukas Tvrdy + * Copyright (c) 2011 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_CURVE_PAINTOP_SETTINGS_H_ -#define KIS_CURVE_PAINTOP_SETTINGS_H_ -#include +#ifndef KIS_CURVES_OPACITY_OPTION_H_ +#define KIS_CURVES_OPACITY_OPTION_H_ -class KisCurvePaintOpSettings : public KisPaintOpSettings -{ +#include "kis_curve_option.h" +#include +class KisCurvesOpacityOption : public KisCurveOption +{ public: - KisCurvePaintOpSettings(); - virtual ~KisCurvePaintOpSettings() {} - - bool paintIncremental(); - - virtual QRectF paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const; - virtual void paintOutline(const QPointF& pos, KisImageWSP image, QPainter &painter, OutlineMode _mode) const; - -#if defined(HAVE_OPENGL) - inline QString modelName() const { - return "stylus"; - } -#endif + KisCurvesOpacityOption(); + double apply(const KisPaintInformation & info, double opacity) const; }; + #endif diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h b/krita/plugins/paintops/curvebrush/kis_linewidth_option.cpp similarity index 51% copy from krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h copy to krita/plugins/paintops/curvebrush/kis_linewidth_option.cpp index cd108c2da94..e923c2c13df 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h +++ b/krita/plugins/paintops/curvebrush/kis_linewidth_option.cpp @@ -1,42 +1,36 @@ /* - * Copyright (c) 2008 Boudewijn Rempt - * Copyright (c) 2008 Lukas Tvrdy + * Copyright (c) 2011 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_CURVE_PAINTOP_SETTINGS_H_ -#define KIS_CURVE_PAINTOP_SETTINGS_H_ -#include +#include "kis_linewidth_option.h" +#include -class KisCurvePaintOpSettings : public KisPaintOpSettings +KisLineWidthOption::KisLineWidthOption() + : KisCurveOption(i18n("Line width"), "Line width", KisPaintOpOption::brushCategory(), false) { + setMinimumLabel(i18n("0%")); + setMaximumLabel(i18n("100%")); +} -public: - KisCurvePaintOpSettings(); - virtual ~KisCurvePaintOpSettings() {} - bool paintIncremental(); - - virtual QRectF paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const; - virtual void paintOutline(const QPointF& pos, KisImageWSP image, QPainter &painter, OutlineMode _mode) const; - -#if defined(HAVE_OPENGL) - inline QString modelName() const { - return "stylus"; +double KisLineWidthOption::apply(const KisPaintInformation & info, double lineWidth) const +{ + if (!isChecked()) { + return lineWidth; } -#endif -}; -#endif + return computeValue(info) * lineWidth; +} diff --git a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h b/krita/plugins/paintops/curvebrush/kis_linewidth_option.h similarity index 51% copy from krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h copy to krita/plugins/paintops/curvebrush/kis_linewidth_option.h index cd108c2da94..c9663a2c48b 100644 --- a/krita/plugins/paintops/curvebrush/kis_curve_paintop_settings.h +++ b/krita/plugins/paintops/curvebrush/kis_linewidth_option.h @@ -1,42 +1,32 @@ /* - * Copyright (c) 2008 Boudewijn Rempt - * Copyright (c) 2008 Lukas Tvrdy + * Copyright (c) 2011 Lukáš Tvrdý * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_CURVE_PAINTOP_SETTINGS_H_ -#define KIS_CURVE_PAINTOP_SETTINGS_H_ -#include +#ifndef KIS_LINEWIDTH_OPTION_H_ +#define KIS_LINEWIDTHOPTION_H_ -class KisCurvePaintOpSettings : public KisPaintOpSettings -{ +#include "kis_curve_option.h" +#include +class KisLineWidthOption : public KisCurveOption +{ public: - KisCurvePaintOpSettings(); - virtual ~KisCurvePaintOpSettings() {} - - bool paintIncremental(); - - virtual QRectF paintOutlineRect(const QPointF& pos, KisImageWSP image, OutlineMode _mode) const; - virtual void paintOutline(const QPointF& pos, KisImageWSP image, QPainter &painter, OutlineMode _mode) const; - -#if defined(HAVE_OPENGL) - inline QString modelName() const { - return "stylus"; - } -#endif + KisLineWidthOption(); + double apply(const KisPaintInformation & info, double lineWidth) const; }; + #endif diff --git a/krita/plugins/paintops/curvebrush/wdgcurveoptions.ui b/krita/plugins/paintops/curvebrush/wdgcurveoptions.ui index 0174515d4c7..fc9eafd5702 100644 --- a/krita/plugins/paintops/curvebrush/wdgcurveoptions.ui +++ b/krita/plugins/paintops/curvebrush/wdgcurveoptions.ui @@ -1,161 +1,114 @@ WdgCurveOptions 0 0 - 278 - 201 + 367 + 343 0 0 0 0 - - - - Mode 2 - - + + + + + + Line width + + + + + + + - - - - Mode 1 - - - true - - - - - - - Mode 3 - - - - - - - Qt::Vertical - - - - 20 - 40 - - - + + + + + + History size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - - - Pulse interval: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + + + + Curves opacity + + + + + + + - - - - - 75 - true - - - - Curve Mode - - - - - - - - 50 - false - - - - Minimal distance: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - 30 - - - 0 - - - 99 - - - true - - + + + + + + Paint connection line + + + + + + + Smoothing + + + + - - - - 10 - - - 0 - - - 4096 - - - true - - - - - + + Qt::Vertical - - QSizePolicy::Fixed - 20 - 10 + 259 - KIntNumInput + KisDoubleSliderSpinBox QWidget -
knuminput.h
+
kis_slider_spin_box.h
+ 1