diff --git a/plugins/dockers/CMakeLists.txt b/plugins/dockers/CMakeLists.txt index 6dd261fcca..9429916ba7 100644 --- a/plugins/dockers/CMakeLists.txt +++ b/plugins/dockers/CMakeLists.txt @@ -1,32 +1,31 @@ add_subdirectory(defaultdockers) add_subdirectory(smallcolorselector) add_subdirectory(specificcolorselector) add_subdirectory(digitalmixer) add_subdirectory(advancedcolorselector) add_subdirectory(presetdocker) add_subdirectory(historydocker) add_subdirectory(channeldocker) add_subdirectory(artisticcolorselector) add_subdirectory(tasksetdocker) add_subdirectory(compositiondocker) add_subdirectory(patterndocker) add_subdirectory(griddocker) add_subdirectory(arrangedocker) if(HAVE_OCIO) add_subdirectory(lut) endif() add_subdirectory(overview) add_subdirectory(palettedocker) -add_subdirectory(colorslider) add_subdirectory(animation) add_subdirectory(presethistory) add_subdirectory(svgcollectiondocker) add_subdirectory(histogram) if(NOT APPLE AND HAVE_QT_QUICK) add_subdirectory(touchdocker) option(ENABLE_CPU_THROTTLE "Build the CPU Throttle Docker" OFF) if (ENABLE_CPU_THROTTLE) add_subdirectory(throttle) endif() endif() diff --git a/plugins/dockers/colorslider/CMakeLists.txt b/plugins/dockers/colorslider/CMakeLists.txt deleted file mode 100644 index 1e5cdf1c02..0000000000 --- a/plugins/dockers/colorslider/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -set(kritacolorslider_SOURCES - kis_color_slider.cpp - kis_color_slider_dock.cpp - kis_color_slider_widget.cpp - kis_color_slider_input.cpp - kis_color_slider_input.cpp - kis_hsv_slider.cpp - -) - -add_library(kritacolorslider MODULE ${kritacolorslider_SOURCES}) -target_link_libraries(kritacolorslider kritaui ${OPENEXR_LIBRARIES}) -install(TARGETS kritacolorslider DESTINATION ${KRITA_PLUGIN_INSTALL_DIR}) diff --git a/plugins/dockers/colorslider/kis_color_slider.cpp b/plugins/dockers/colorslider/kis_color_slider.cpp deleted file mode 100644 index 5af64ce658..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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_color_slider.h" -#include - -#include - - -#include -#include -#include - -#include -#include - -#include "kis_config.h" -#include "kis_cursor.h" -#include "kis_global.h" -#include "kis_types.h" -#include "KisViewManager.h" - -#include "kis_color_slider_dock.h" - -K_PLUGIN_FACTORY_WITH_JSON(ColorSliderPluginFactory, "krita_colorslider.json", registerPlugin();) - -class ColorSliderDockFactory : public KoDockFactoryBase -{ -public: - ColorSliderDockFactory() { - } - - QString id() const override { - return QString("ColorSlider"); - } - - virtual Qt::DockWidgetArea defaultDockWidgetArea() const { - return Qt::RightDockWidgetArea; - } - - QDockWidget* createDockWidget() override { - ColorSliderDock * dockWidget = new ColorSliderDock(); - - dockWidget->setObjectName(id()); - - return dockWidget; - } - - KoDockFactoryBase::DockPosition defaultDockPosition() const override { - return DockMinimized; - } -}; - - -ColorSliderPlugin::ColorSliderPlugin(QObject *parent, const QVariantList &) - : QObject(parent) -{ - dbgPlugins << "ColorSliderPlugin"; - - KoDockRegistry::instance()->add(new ColorSliderDockFactory()); -} - -ColorSliderPlugin::~ColorSliderPlugin() -{ -} - -#include "kis_color_slider.moc" diff --git a/plugins/dockers/colorslider/kis_color_slider.h b/plugins/dockers/colorslider/kis_color_slider.h deleted file mode 100644 index ff2ecfe3bf..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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 _COLORSLIDER_H_ -#define _COLORSLIDER_H_ - -#include -#include - -class KisViewManager; - -/** - * Template of view plugin - */ -class ColorSliderPlugin : public QObject -{ - Q_OBJECT -public: - ColorSliderPlugin(QObject *parent, const QVariantList &); - ~ColorSliderPlugin() override; -private: - KisViewManager* m_view; -}; - -#endif diff --git a/plugins/dockers/colorslider/kis_color_slider_dock.cpp b/plugins/dockers/colorslider/kis_color_slider_dock.cpp deleted file mode 100644 index d1e939009d..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider_dock.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - * Copyright (c) 2015 Moritz Molch - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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_color_slider_dock.h" - -//#include -#include -#include - -#include -#include -#include -#include "kis_config_notifier.h" -#include - -#include -#include -#include -#include -#include -#include - -#include "kis_color_slider_widget.h" - -ColorSliderDock::ColorSliderDock() - : QDockWidget(i18n("Color Sliders")) - , m_canvas(0) - , m_view(0) - , m_colorSliders(0) -{ -} - -void ColorSliderDock::setCanvas(KoCanvasBase *canvas) -{ - setEnabled(canvas != 0); - - if (m_canvas) { - m_canvas->disconnectCanvasObserver(this); - } - if (m_view) { - m_canvasConnections.clear(); - } - - KisCanvas2* kisCanvas = dynamic_cast(canvas); - if (kisCanvas) { - KisViewManager* view = kisCanvas->viewManager(); - - if (m_colorSliders) { - m_colorSliders->disconnect(); // explicit disconnect in case Qt gets confused. - delete m_colorSliders; - } - QWidget *m_sliderdockerwidget = new QWidget; - QVBoxLayout *m_layout = new QVBoxLayout(m_sliderdockerwidget); - m_layout->setContentsMargins(4,4,4,0); - m_layout->setSpacing(1); - setWidget(m_sliderdockerwidget); - //m_updateAllowed = true; - - //settings// - QBitArray m_SlidersConfigArray(12); - - KConfigGroup cfg = KSharedConfig::openConfig()->group("hsxColorSlider"); - - m_SlidersConfigArray[0] =cfg.readEntry("hsvH", false); - m_SlidersConfigArray[1] =cfg.readEntry("hsvS", false); - m_SlidersConfigArray[2] =cfg.readEntry("hsvV", false); - - m_SlidersConfigArray[3] =cfg.readEntry("hslH", true); - m_SlidersConfigArray[4] =cfg.readEntry("hslS", true); - m_SlidersConfigArray[5] =cfg.readEntry("hslL", true); - - m_SlidersConfigArray[6] =cfg.readEntry("hsiH", false); - m_SlidersConfigArray[7] =cfg.readEntry("hsiS", false); - m_SlidersConfigArray[8] =cfg.readEntry("hsiI", false); - - m_SlidersConfigArray[9] =cfg.readEntry("hsyH", false); - m_SlidersConfigArray[10]=cfg.readEntry("hsyS", false); - m_SlidersConfigArray[11]=cfg.readEntry("hsyY", false); - - - m_colorSliders = new KisColorSliderWidget(kisCanvas->displayColorConverter()->displayRendererInterface(), this, kisCanvas, m_SlidersConfigArray); - m_layout->addWidget(m_colorSliders); - - m_canvasConnections.addConnection(m_colorSliders, SIGNAL(colorChanged(const KoColor&)), view->resourceProvider(), SLOT(slotSetFGColor(const KoColor&))); - m_canvasConnections.addConnection(view->resourceProvider(), SIGNAL(sigFGColorChanged(const KoColor&)), m_colorSliders, SLOT(setColor(const KoColor&))); - m_canvasConnections.addConnection(kisCanvas->displayColorConverter(), SIGNAL(displayConfigurationChanged()), this, SLOT(udpateSliders())); - m_canvasConnections.addConnection(KisConfigNotifier::instance(), SIGNAL(configChanged()), m_colorSliders, SLOT(slotConfigChanged())); - - m_canvas = kisCanvas; - m_view = view; - } -} - - -void ColorSliderDock::unsetCanvas() -{ - setEnabled(false); - m_canvas = 0; - m_view = 0; - - delete m_colorSliders; - m_colorSliders = 0; -} - -void ColorSliderDock::udpateSliders() -{ - if (!m_colorSliders) return; - m_colorSliders->setColor(m_view->resourceProvider()->fgColor()); -} - - -#include "moc_kis_color_slider_dock.cpp" - - - diff --git a/plugins/dockers/colorslider/kis_color_slider_dock.h b/plugins/dockers/colorslider/kis_color_slider_dock.h deleted file mode 100644 index 4bc1f3fbe0..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider_dock.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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 _COLORSLIDER_DOCK_H_ -#define _COLORSLIDER_DOCK_H_ - -#include -#include -#include -#include "kis_signal_auto_connection.h" - -#include -#include - -class KisViewManager; -class KisColorSliderWidget; - -class ColorSliderDock : public QDockWidget, public KoCanvasObserverBase -{ - Q_OBJECT -public: - ColorSliderDock(); - QString observerName() override { return "ColorSliderDock"; } - /// reimplemented from KoCanvasObserverBase - void setCanvas(KoCanvasBase *canvas) override; - void unsetCanvas() override; -public Q_SLOTS: - void udpateSliders(); - -private: - QPointer m_canvas; - KisViewManager *m_view; - KisColorSliderWidget* m_colorSliders; - KisSignalAutoConnectionsStore m_canvasConnections; -}; - - -#endif diff --git a/plugins/dockers/colorslider/kis_color_slider_input.cpp b/plugins/dockers/colorslider/kis_color_slider_input.cpp deleted file mode 100644 index 1054cc0beb..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider_input.cpp +++ /dev/null @@ -1,709 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - * Copyright (c) 2015 Moritz Molch - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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_color_slider_input.h" - -#include -#ifdef HAVE_OPENEXR -#include -#endif - -#include - -#include - -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include - -#include "kis_hsv_slider.h" -#include "kis_display_color_converter.h" - -#include "kis_double_parse_spin_box.h" - -KisColorSliderInput::KisColorSliderInput(QWidget* parent, KoColor* color, const int type, KoColorDisplayRendererInterface *displayRenderer, KisCanvas2* canvas) - : QWidget(parent), - m_type(type), - m_color(color), - m_displayRenderer(displayRenderer), - m_canvas(canvas) -{ - //init -} - -void KisColorSliderInput::init() -{ - QHBoxLayout* m_layout = new QHBoxLayout(this); - m_layout->setContentsMargins(0, 0, 0, 0); - m_layout->setSpacing(1); - - QString m_name; - switch (m_type){ - case 0: m_name=i18n("Hue"); break; - case 1: m_name=i18n("Saturation"); break; - case 2: m_name=i18nc("HSV Value","Value"); break; - case 3: m_name=i18n("Hue"); break; - case 4: m_name=i18n("Saturation"); break; - case 5: m_name=i18n("Lightness"); break; - case 6: m_name=i18n("Hue"); break; - case 7: m_name=i18n("Saturation"); break; - case 8: m_name=i18n("Intensity"); break; - case 9: m_name=i18n("Hue"); break; - case 10: m_name=i18n("Saturation"); break; - case 11: m_name=i18n("Luma"); break; - } - - QLabel* m_label = new QLabel(i18n("%1:", m_name), this); - m_layout->addWidget(m_label); - - m_hsvSlider = new KisHSVSlider(Qt::Horizontal, this, m_displayRenderer, m_canvas); - m_hsvSlider->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - m_layout->addWidget(m_hsvSlider); - connect (m_hsvSlider, SIGNAL(sliderPressed()), SLOT(sliderIn())); - connect (m_hsvSlider, SIGNAL(sliderReleased()), SLOT(sliderOut())); - - QWidget* m_input = createInput(); - m_hsvSlider->setFixedHeight(m_input->sizeHint().height()); - m_layout->addWidget(m_input); -} - -KisHSXColorSliderInput::KisHSXColorSliderInput(QWidget* parent, const int type, KoColor* color, KoColorDisplayRendererInterface *displayRenderer, KisCanvas2* canvas) : KisColorSliderInput(parent, color, type, displayRenderer, canvas), - m_canvas(canvas), - m_hue(0), - m_sat(0), - m_val(0), - R(0), - G(0), - B(0), - Gamma(0) -{ - m_hueupdating = false; - m_satupdating = false; - m_toneupdating = false; - m_sliderisupdating = false; - init(); -} - -void KisHSXColorSliderInput::setValue(double v) -{ - - //This function returns the colour based on the type of the slider as well as the value// - - qreal h=0.0; - qreal s=0.0; - qreal l=0.0; - KConfigGroup cfg = KSharedConfig::openConfig()->group("advancedColorSelector"); - R = cfg.readEntry("lumaR", 0.2126); - G = cfg.readEntry("lumaG", 0.7152); - B = cfg.readEntry("lumaB", 0.0722); - Gamma = cfg.readEntry("gamma", 2.2); - - switch (m_type) { - case 0: - m_hue = v; - h=m_hue/360.0; - s=m_sat/100.0; - l=m_val/100.0; - *m_color = this->converter()->fromHsvF(h, s, l); - if (m_hueupdating==false) { - emit(hueUpdated(static_cast(m_hue))); - } - else { - m_hueupdating=false; - } - break; - case 3: - m_hue = v; - h=m_hue/360.0; - s=m_sat/100.0; - l=m_val/100.0; - *m_color = this->converter()->fromHslF(h, s, l); - if (m_hueupdating==false) { - emit(hueUpdated(static_cast(m_hue))); - } - else { - m_hueupdating=false; - } - break; - case 6: - m_hue = v; - h=m_hue/360.0; - s=m_sat/100.0; - l=m_val/100.0; - *m_color = this->converter()->fromHsiF(h, s, l); - if (m_hueupdating==false) { - emit(hueUpdated(static_cast(m_hue))); - } - else { - m_hueupdating=false; - } - break; - case 9: - m_hue = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHsyF(h, s, l, R, G, B, Gamma); - if (m_hueupdating==false) { - emit(hueUpdated(static_cast(m_hue))); - } - else { - m_hueupdating=false; - } - break; - case 1: - m_sat = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHsvF(h, s, l); - if (m_satupdating==false) { - emit(satUpdated(static_cast(m_sat), m_type)); - } - else { - m_satupdating=false; - } - break; - case 2: - m_val = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHsvF(h, s, l); - if (m_toneupdating==false) { - emit(toneUpdated(static_cast(m_val), m_type)); - } - else { - m_toneupdating=false; - } - break; - case 4: - m_sat = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHslF(h, s, l); - if (m_satupdating==false) { - emit(satUpdated(static_cast(m_sat), m_type)); - } - else { - m_satupdating=false; - } - break; - case 5: - m_val = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHslF(h, s, l); - if (m_toneupdating==false) { - emit(toneUpdated(static_cast(m_val), m_type)); - } - else { - m_toneupdating=false; - } - break; - case 7: - m_sat = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHsiF(h, s, l); - if (m_satupdating==false) { - emit(satUpdated(static_cast(m_sat), m_type)); - } - else { - m_satupdating=false; - } - break; - case 8: - m_val = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHsiF(h, s, l); - if (m_toneupdating==false) { - emit(toneUpdated(static_cast(m_val), m_type)); - } - else { - m_toneupdating=false; - } - break; - case 10: - m_sat = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHsyF(h, s, l, R, G, B, Gamma); - if (m_satupdating==false) { - emit(satUpdated(static_cast(m_sat), m_type)); - } - else { - m_satupdating=false; - } - break; - case 11: - m_val = v; - h=m_hue/360.0f; - s=m_sat/100.0f; - l=m_val/100.0f; - *m_color = this->converter()->fromHsyF(h, s, l, R, G, B, Gamma); - if (m_toneupdating==false) { - emit(toneUpdated(static_cast(m_val), m_type)); - } - else { - m_toneupdating=false; - } - break; - default: - Q_ASSERT(false); - } - emit(updated()); -} -//update -void KisHSXColorSliderInput::update() -{ - -// KoColor min = *m_color; -// KoColor max = *m_color; - - qreal hue = 0.0; - qreal sat = 0.0; - qreal val = 0.0; - qreal hue_backup, sat_backup, val_backup; - //gets the hsv for the appropriate type// - hue_backup = m_hue; - sat_backup = m_sat; - val_backup = m_val; - - switch (m_type) { - case 0: - this->converter()->getHsvF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating) { - if ((sat * 100.0) < m_sat + 2 && (sat * 100.0) > m_sat - 2) { - sat = (sat_backup * 0.01); - } - if ((val * 100.0) < m_val + 2 && (val * 100.0) > m_val - 2) { - val = (val_backup*0.01); - } - - } - else { - if((hue * 360.0) < m_hue + 2 && (hue * 360.0) > m_hue - 2) { - hue = (hue_backup/360.0); - } - } - break; - case 1: - this->converter()->getHsvF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating) { - if ((hue * 360.0) < m_hue + 2 && (hue * 360.0) > m_hue - 2 ) { - hue = (hue_backup/360.0); - } - if ((val * 100.0) < m_val + 2 && (val * 100.0) > m_val - 2) { - val = (val_backup*0.01); - } - } - else { - if ((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - } - break; - case 2: - this->converter()->getHsvF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating==true) - { - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - } - else{ - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - } - break; - case 3: - this->converter()->getHslF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating==true) - { - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - - - } - else{ - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - } - break; - case 4: - this->converter()->getHslF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating==true) - { - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - - - } - else{ - - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - } - break; - case 5: - this->converter()->getHslF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating==true) - { - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - } - else{ - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - } - break; - case 6: - this->converter()->getHsiF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating==true) - { - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - - - } - else{ - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - } - break; - case 7: - this->converter()->getHsiF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating==true) - { - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - - - } - else{ - - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - } - break; - case 8: - this->converter()->getHsiF(*m_color, &hue, &sat, &val); - if (m_sliderisupdating==true) - { - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - } - else{ - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - } - break; - case 9: - this->converter()->getHsyF(*m_color, &hue, &sat, &val, R, G, B, Gamma); - if (m_sliderisupdating==true) - { - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - - - } - else{ - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - } - break; - case 10: - this->converter()->getHsyF(*m_color, &hue, &sat, &val, R, G, B, Gamma); - if (m_sliderisupdating==true) - { - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - - - } - else{ - - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - } - break; - case 11: - this->converter()->getHsyF(*m_color, &hue, &sat, &val, R, G, B, Gamma); - if (m_sliderisupdating == true) - { - if((sat*100.0)m_sat-2) { - sat = (sat_backup*0.01); - } - if((hue*360.0)m_hue-2) { - hue = (hue_backup/360.0); - } - } - else{ - if((val*100.0)m_val-2) { - val = (val_backup*0.01); - } - } - break; - } - //this prevents the hue going to 0 when used with grey// - - if (sat<=0.0) { - m_hue = hue_backup; - } - else{ - m_hue=(hue*360.0); - } - - if (val == 0) { - m_sat = sat_backup; - } - else{ - m_sat=(sat*100.0); - } - - m_val=(val*100.0); - - if (m_hueupdating==true){m_val=val_backup; m_sat = sat_backup; m_hueupdating=false;} - else if (m_satupdating==true){m_val=val_backup; m_hue = hue_backup; m_satupdating=false;} - else if (m_toneupdating==true){m_sat=sat_backup; m_hue = hue_backup;m_toneupdating=false;} - - //sets slider and num-input according to type// - switch (m_type) { - case 0: - case 3: - case 6: - case 9: - m_NumInput->setValue(m_hue); - m_hsvSlider->setValue(static_cast(m_hue)); - break; - case 1: - m_NumInput->setValue(m_sat); - m_hsvSlider->setValue(static_cast(m_sat)); - break; - case 2: - m_NumInput->setValue(m_val); - m_hsvSlider->setValue(static_cast(m_val)); - break; - case 4: - m_NumInput->setValue(m_sat); - m_hsvSlider->setValue(static_cast(m_sat)); - break; - case 5: - m_NumInput->setValue(m_val); - m_hsvSlider->setValue(static_cast(m_val)); - break; - case 7: - m_NumInput->setValue(m_sat); - m_hsvSlider->setValue(static_cast(m_sat)); - break; - case 8: - m_NumInput->setValue(m_val); - m_hsvSlider->setValue(static_cast(m_val)); - break; - case 10: - m_NumInput->setValue(m_sat); - m_hsvSlider->setValue(static_cast(m_sat)); - break; - case 11: - m_NumInput->setValue(m_val); - m_hsvSlider->setValue(static_cast(m_val)); - break; - default: - Q_ASSERT(false); - } - m_hsvSlider->setColors(*m_color,m_type, m_hue, R, G, B, Gamma); -} - -QWidget* KisHSXColorSliderInput::createInput() -{ - m_NumInput = new KisDoubleParseSpinBox(this); - m_NumInput->setMinimum(0); - m_NumInput->setMaximum(100.0); - m_NumInput->setKeyboardTracking(false);//this makes sure that only full values are sent after loss of focus. Much more user friendly// - m_hsvSlider->setMaximum(100); - switch (m_type) { - case 0: - case 3: - case 6: - case 9: - m_NumInput->setMaximum(360.0); - m_NumInput->setWrapping(true); - m_hsvSlider->setMaximum(360); - m_NumInput->setSingleStep (5.0); - break; - case 1: - case 2: - case 4: - case 5: - case 7: - case 8: - case 10: - case 11: - m_NumInput->setMaximum(100.0); - m_hsvSlider->setMaximum(100); - m_NumInput->setSingleStep (10.0); - break; - default: - Q_ASSERT(false); - } - connect(m_hsvSlider, SIGNAL(valueChanged(int)), this, SLOT(sliderChanged(int))); - connect(m_NumInput, SIGNAL(valueChanged(double)), this, SLOT(numInputChanged(double))); - return m_NumInput; -} - -void KisHSXColorSliderInput::sliderChanged(int i) -{ - m_NumInput->setValue(i*1.0); - setValue(i*1.0); -} - -void KisHSXColorSliderInput::sliderIn(){ - m_sliderisupdating=true; -} - -void KisHSXColorSliderInput::sliderOut(){ - m_sliderisupdating=false; -} -//attempt at getting rid of dancing sliders... #2859 -//The nminput should not be changing the sliders if the sliders are the one changing the input. -//As numinpit rounds off at 2 decimals(and there's no point at letting it continue the signal circle). -void KisHSXColorSliderInput::numInputChanged(double v) -{ - if (m_sliderisupdating==true){ - return; - } - else { - setValue(v); - } -} - -//this connects to the display converter. Important for OCIO, breaks on missing of m_canvas somehow. -KisDisplayColorConverter* KisHSXColorSliderInput::converter() const -{ - return m_canvas ? - m_canvas->displayColorConverter() : - KisDisplayColorConverter::dumbConverterInstance(); -} - -void KisHSXColorSliderInput::hueUpdate(int h) -{ - if (h<=m_hue-2 || h>=m_hue+2) { - m_hue=h; - m_hueupdating=true; - update(); - } -} - -void KisHSXColorSliderInput::satUpdate(int s, int type) -{ - if (m_type==type+1 || m_type==type-1) - { - if (s<=m_sat-3 || s>=m_sat+3) { - m_sat=s; - m_satupdating=true; - update(); - } - } -} - -void KisHSXColorSliderInput::toneUpdate(int l, int type) -{ - if (m_type==type-1 || m_type==type-2) - { - if (l<25 || l>75){ - - if (l<=m_val-10 || l>=m_val+10) { - m_val=l; - m_toneupdating=true; - update(); - } - } - else { - if (l<=m_val-3 || l>=m_val+3) { - m_val=l; - m_toneupdating=true; - update(); - } - } - - - } -} - -#include "moc_kis_color_slider_input.cpp" diff --git a/plugins/dockers/colorslider/kis_color_slider_input.h b/plugins/dockers/colorslider/kis_color_slider_input.h deleted file mode 100644 index dfd8f26e7d..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider_input.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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_COLOR_SLIDER_INPUT_H_ -#define _KIS_COLOR_SLIDER_INPUT_H_ - -#include -#include - -#include "KoColorDisplayRendererInterface.h" - -#include "kis_canvas2.h" - -class KoColor; -class QWidget; -class QDoubleSpinBox; -class KisDoubleParseSpinBox; -class KisHSVSlider; -class KisDisplayColorConverter; - - -class KisColorSliderInput : public QWidget -{ - Q_OBJECT -public: - KisColorSliderInput(QWidget* parent, KoColor* color, const int type, KoColorDisplayRendererInterface *displayRenderer, KisCanvas2* canvas); -protected: - void init(); - virtual QWidget* createInput() = 0; -Q_SIGNALS: - void updated(); - -protected: - const int m_type; - KoColor* m_color; - KoColorDisplayRendererInterface *m_displayRenderer; - QPointer m_canvas; - KisHSVSlider* m_hsvSlider; -}; - -class KisHSXColorSliderInput : public KisColorSliderInput -{ - Q_OBJECT -public: - KisHSXColorSliderInput(QWidget* parent, const int type, KoColor* color, KoColorDisplayRendererInterface *displayRenderer, KisCanvas2* canvas); - - KisDisplayColorConverter* converter() const; -protected: - QWidget* createInput() override; - QPointer m_canvas; -public Q_SLOTS: - void setValue(double); - void update(); - void hueUpdate(int h); - void satUpdate(int s, int type); - void toneUpdate(int l, int type); - void sliderChanged(int i); - void sliderIn(); - void sliderOut(); - void numInputChanged(double v); -Q_SIGNALS: - void hueUpdated(int); - void satUpdated(int, int); - void toneUpdated(int, int); -private: - KisDoubleParseSpinBox* m_NumInput; - qreal m_hue; - qreal m_sat; - qreal m_val; - qreal R, G, B, Gamma; - bool m_hueupdating; - bool m_satupdating; - bool m_toneupdating; - bool m_sliderisupdating; -}; - -#endif diff --git a/plugins/dockers/colorslider/kis_color_slider_widget.cpp b/plugins/dockers/colorslider/kis_color_slider_widget.cpp deleted file mode 100644 index ba4c48524a..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider_widget.cpp +++ /dev/null @@ -1,483 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - * Copyright (c) 2015 Moritz Molch - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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_color_slider_widget.h" -#include -#include -#include -#include - - -#include -#include -#include -#include - -#include -#include -#include - -#include "kis_color_slider_input.h" -#include -#include "kis_debug.h" -#include "kis_signal_compressor.h" -//#include "kis_color_space_selector.h" - - - -KisColorSliderWidget::KisColorSliderWidget(KoColorDisplayRendererInterface *displayRenderer, QWidget* parent, KisCanvas2* canvas, QBitArray SlidersConfigArray) - : QWidget(parent) - //, m_colorSpace(0) - //, m_customColorSpaceSelected(false) - , m_updateCompressor(new KisSignalCompressor(10, KisSignalCompressor::POSTPONE, this)) - , m_displayRenderer(displayRenderer) - , m_canvas(canvas) -{ - m_layout = new QVBoxLayout(this); - m_layout->setContentsMargins(0,0,0,0); - m_layout->setSpacing(1); - m_updateAllowed = true; - - connect(m_updateCompressor, SIGNAL(timeout()), SLOT(updateTimeout())); - m_configCompressor = new KisSignalCompressor(10, KisSignalCompressor::POSTPONE, this); - connect(m_configCompressor, SIGNAL(timeout()), SLOT(setConfig())); - //dbgKrita<<"m_canvas:"<addWidget(hsvH); - hsvH->setVisible(false); - - hsvS = new KisHSXColorSliderInput(this, 1, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsvS); - m_layout->addWidget(hsvS); - hsvS->setVisible(false); - - hsvV = new KisHSXColorSliderInput(this, 2, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsvV); - m_layout->addWidget(hsvV); - hsvV->setVisible(false); - - //hsl sliders// - - hslH = new KisHSXColorSliderInput(this, 3, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hslH); - m_layout->addWidget(hslH); - hslH->setVisible(false); - - hslS = new KisHSXColorSliderInput(this, 4, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hslS); - m_layout->addWidget(hslS); - hslS->setVisible(false); - - hslL = new KisHSXColorSliderInput(this, 5, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hslL); - m_layout->addWidget(hslL); - hslL->setVisible(false); - - - //hsi sliders// - - hsiH = new KisHSXColorSliderInput(this, 6, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsiH); - m_layout->addWidget(hsiH); - hsiH->setVisible(false); - - hsiS = new KisHSXColorSliderInput(this, 7, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsiS); - m_layout->addWidget(hsiS); - hsiS->setVisible(false); - - hsiI = new KisHSXColorSliderInput(this, 8, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsiI); - m_layout->addWidget(hsiI); - hsiI->setVisible(false); - - //hsy'sliders// - - hsyH = new KisHSXColorSliderInput(this, 9, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsyH); - m_layout->addWidget(hsyH); - hsyH->setVisible(false); - - hsyS = new KisHSXColorSliderInput(this, 10, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsyS); - m_layout->addWidget(hsyS); - hsyS->setVisible(false); - - hsyY = new KisHSXColorSliderInput(this, 11, &m_color, m_displayRenderer, m_canvas); - m_inputs.append(hsyY); - m_layout->addWidget(hsyY); - hsyY->setVisible(false); - - m_layout->addStretch(1); - - setSlidersVisible(SlidersConfigArray); - - -} - -KisColorSliderWidget::~KisColorSliderWidget() -{ - //KConfigGroup cfg = KSharedConfig::openConfig()->group(QString()); - //cfg.writeEntry("SpecificColorSelector/ShowColorSpaceSelector", m_chkShowColorSpaceSelector->isChecked()); - -} - -void KisColorSliderWidget::update() -{ - if (m_updateAllowed) { - m_updateCompressor->start(); - } -} - -void KisColorSliderWidget::setColor(const KoColor& c) -{ - m_updateAllowed = false; - m_color.fromKoColor(c); - emit(updated()); - m_updateAllowed = true; -} - -void KisColorSliderWidget::updateTimeout() -{ - emit(colorChanged(m_color)); - -} - -void KisColorSliderWidget::setSlidersVisible(QBitArray SlidersConfigArray) -{ - //dbgKrita<<"check2"; - QList visibleInputs; - - if (SlidersConfigArray[0]==true) { - visibleInputs.append(hsvH); - hsvH->setVisible(true); - connect(hsvH, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsvH, SLOT(update())); - connect(hsvH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - connect(this, SIGNAL(hueUpdated(int)), hsvH, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hsvH, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsvH, SLOT(toneUpdate(int, int))); - } - else { - hsvH->setVisible(false); - disconnect(hsvH, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsvH, SLOT(update())); - disconnect(hsvH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(hueUpdated(int)), hsvH, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsvH, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsvH, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[1]==true) { - visibleInputs.append(hsvS); - hsvS->setVisible(true); - connect(hsvS, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsvS, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hsvS, SLOT(hueUpdate(int))); - connect(hsvS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(satUpdated(int, int)), hsvS, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsvS, SLOT(toneUpdate(int, int))); - } - else { - hsvS->setVisible(false); - disconnect(hsvS, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsvS, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hsvS, SLOT(hueUpdate(int))); - disconnect(hsvS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsvS, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsvS, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[2]==true) { - visibleInputs.append(hsvV); - hsvV->setVisible(true); - connect(hsvV, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsvV, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hsvV, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hsvV, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsvV, SLOT(toneUpdate(int, int))); - connect(hsvV, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - else { - hsvV->setVisible(false); - disconnect(hsvV, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsvV, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hsvV, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsvV, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsvV, SLOT(toneUpdate(int, int))); - disconnect(hsvV, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[3]==true) { - visibleInputs.append(hslH); - hslH->setVisible(true); - connect(hslH, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hslH, SLOT(update())); - connect(hslH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - connect(this, SIGNAL(hueUpdated(int)), hslH, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hslH, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hslH, SLOT(toneUpdate(int, int))); - } - else { - hslH->setVisible(false); - disconnect(hslH, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hslH, SLOT(update())); - disconnect(hslH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(hueUpdated(int)), hslH, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hslH, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hslH, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[4]==true) { - visibleInputs.append(hslS); - hslS->setVisible(true); - connect(hslS, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hslS, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hslS, SLOT(hueUpdate(int))); - connect(hslS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(satUpdated(int, int)), hslS, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hslS, SLOT(toneUpdate(int, int))); - } - else { - hslS->setVisible(false); - disconnect(hslS, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hslS, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hslS, SLOT(hueUpdate(int))); - disconnect(hslS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hslS, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hslS, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[5]==true) { - visibleInputs.append(hslL); - hslL->setVisible(true); - connect(hslL, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hslL, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hslL, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hslL, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hslL, SLOT(toneUpdate(int, int))); - connect(hslL, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - else { - hslL->setVisible(false); - disconnect(hslL, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hslL, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hslL, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hslL, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hslL, SLOT(toneUpdate(int, int))); - disconnect(hslL, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[6]==true) { - visibleInputs.append(hsiH); - hsiH->setVisible(true); - connect(hsiH, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsiH, SLOT(update())); - connect(hsiH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - connect(this, SIGNAL(hueUpdated(int)), hsiH, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hsiH, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsiH, SLOT(toneUpdate(int, int))); - } - else { - hsiH->setVisible(false); - disconnect(hsiH, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsiH, SLOT(update())); - disconnect(hsiH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(hueUpdated(int)), hsiH, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsiH, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsiH, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[7]==true) { - visibleInputs.append(hsiS); - hsiS->setVisible(true); - connect(hsiS, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsiS, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hsiS, SLOT(hueUpdate(int))); - connect(hsiS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(satUpdated(int, int)), hsiS, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsiS, SLOT(toneUpdate(int, int))); - } - else { - hsiS->setVisible(false); - disconnect(hsiS, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsiS, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hsiS, SLOT(hueUpdate(int))); - disconnect(hsiS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsiS, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsiS, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[8]==true) { - visibleInputs.append(hsiI); - hsiI->setVisible(true); - connect(hsiI, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsiI, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hsiI, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hsiI, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsiI, SLOT(toneUpdate(int, int))); - connect(hsiI, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - else { - hsiI->setVisible(false); - disconnect(hsiI, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsiI, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hsiI, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsiI, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsiI, SLOT(toneUpdate(int, int))); - disconnect(hsiI, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[9]==true) { - visibleInputs.append(hsyH); - hsyH->setVisible(true); - connect(hsyH, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsyH, SLOT(update())); - connect(hsyH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - connect(this, SIGNAL(hueUpdated(int)), hsyH, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hsyH, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsyH, SLOT(toneUpdate(int, int))); - } - else { - hsyH->setVisible(false); - disconnect(hsyH, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsyH, SLOT(update())); - disconnect(hsyH, SIGNAL(hueUpdated(int)), this, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(hueUpdated(int)), hsyH, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsyH, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsyH, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[10]==true) { - visibleInputs.append(hsyS); - hsyS->setVisible(true); - connect(hsyS, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsyS, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hsyS, SLOT(hueUpdate(int))); - connect(hsyS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(satUpdated(int, int)), hsyS, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsyS, SLOT(toneUpdate(int, int))); - } - else { - hsyS->setVisible(false); - disconnect(hsyS, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsyS, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hsyS, SLOT(hueUpdate(int))); - disconnect(hsyS, SIGNAL(satUpdated(int, int)), this, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsyS, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsyS, SLOT(toneUpdate(int, int))); - } - - if (SlidersConfigArray[11]==true) { - visibleInputs.append(hsyY); - hsyY->setVisible(true); - connect(hsyY, SIGNAL(updated()), this, SLOT(update())); - connect(this, SIGNAL(updated()), hsyY, SLOT(update())); - connect(this, SIGNAL(hueUpdated(int)), hsyY, SLOT(hueUpdate(int))); - connect(this, SIGNAL(satUpdated(int, int)), hsyY, SLOT(satUpdate(int, int))); - connect(this, SIGNAL(toneUpdated(int, int)), hsyY, SLOT(toneUpdate(int, int))); - connect(hsyY, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - else { - hsyY->setVisible(false); - disconnect(hsyY, SIGNAL(updated()), this, SLOT(update())); - disconnect(this, SIGNAL(updated()), hsyY, SLOT(update())); - disconnect(this, SIGNAL(hueUpdated(int)), hsyY, SLOT(hueUpdate(int))); - disconnect(this, SIGNAL(satUpdated(int, int)), hsyY, SLOT(satUpdate(int, int))); - disconnect(this, SIGNAL(toneUpdated(int, int)), hsyY, SLOT(toneUpdate(int, int))); - disconnect(hsyY, SIGNAL(toneUpdated(int, int)), this, SLOT(toneUpdate(int, int))); - } - - QList labels; - int labelWidth = 0; - - Q_FOREACH (KisColorSliderInput* input, visibleInputs) { - Q_FOREACH (QLabel* label, input->findChildren()) { - labels.append(label); - labelWidth = qMax(labelWidth, label->sizeHint().width()); - } - } - - Q_FOREACH (QLabel *label, labels) { - label->setMinimumWidth(labelWidth); - } - - - updateTimeout(); -} -void KisColorSliderWidget::slotConfigChanged() -{ - if (m_updateAllowed) { - m_configCompressor->start(); - } -} - -void KisColorSliderWidget::setConfig() -{ - //QTimer::singleShot(1, this, SLOT(update()));//need to wait a bit before accessing the config. - - QBitArray m_SlidersConfigArray(12); - //dbgKrita<<"check"; - KConfigGroup cfg = KSharedConfig::openConfig()->group("hsxColorSlider"); - - m_SlidersConfigArray[0] =cfg.readEntry("hsvH", false); - m_SlidersConfigArray[1] =cfg.readEntry("hsvS", false); - m_SlidersConfigArray[2] =cfg.readEntry("hsvV", false); - - m_SlidersConfigArray[3] =cfg.readEntry("hslH", true); - m_SlidersConfigArray[4] =cfg.readEntry("hslS", true); - m_SlidersConfigArray[5] =cfg.readEntry("hslL", true); - - m_SlidersConfigArray[6] =cfg.readEntry("hsiH", false); - m_SlidersConfigArray[7] =cfg.readEntry("hsiS", false); - m_SlidersConfigArray[8] =cfg.readEntry("hsiI", false); - - m_SlidersConfigArray[9] =cfg.readEntry("hsyH", false); - m_SlidersConfigArray[10]=cfg.readEntry("hsyS", false); - m_SlidersConfigArray[11]=cfg.readEntry("hsyY", false); - - setSlidersVisible(m_SlidersConfigArray); - -} - -void KisColorSliderWidget::hueUpdate(int h) -{ - emit(hueUpdated(h)); -} - -void KisColorSliderWidget::satUpdate(int s, int type) -{ - emit(satUpdated(s, type)); -} -void KisColorSliderWidget::toneUpdate(int l, int type) -{ - emit(toneUpdated(l, type)); -} - -#include "moc_kis_color_slider_widget.cpp" diff --git a/plugins/dockers/colorslider/kis_color_slider_widget.h b/plugins/dockers/colorslider/kis_color_slider_widget.h deleted file mode 100644 index 89fa226a93..0000000000 --- a/plugins/dockers/colorslider/kis_color_slider_widget.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2008 Cyrille Berger - * Copyright (c) 2014 Wolthera van Hövell - - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; version 2.1 of the License. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser 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_COLOR_SLIDER_WIDGET_H_ -#define _KIS_COLOR_SLIDER_WIDGET_H_ - -#include -#include - -#include - -#include "kis_canvas2.h" - -class KoColorSpace; -class KoColorDisplayRendererInterface; -class QVBoxLayout; -class KisColorSliderInput; -class KisSignalCompressor; -class QBitArray; - -class KisColorSliderWidget : public QWidget -{ - Q_OBJECT -public: - KisColorSliderWidget(KoColorDisplayRendererInterface *displayRenderer, QWidget* parent, KisCanvas2* canvas, QBitArray SlidersConfigArray); - ~KisColorSliderWidget() override; - - //bool customColorSpaceUsed(); -public Q_SLOTS: - //void setColorSpace(const KoColorSpace*); - void setColor(const KoColor&); - void slotConfigChanged(); -private Q_SLOTS: - void update(); - void updateTimeout(); - void hueUpdate(int h); - void satUpdate(int s, int type); - void toneUpdate(int l, int type); - void setSlidersVisible(QBitArray SlidersConfigArray); - void setConfig(); - //void setCustomColorSpace(const KoColorSpace *); -Q_SIGNALS: - void colorChanged(const KoColor&); - void updated(); - void hueUpdated(int); - void satUpdated(int, int); - void toneUpdated(int, int); -private: - QList m_inputs; -// const KoColorSpace* m_colorSpace; - QVBoxLayout *m_layout; - KoColor m_color; - bool m_updateAllowed; - KisSignalCompressor *m_updateCompressor; - KisSignalCompressor *m_configCompressor; - KoColorDisplayRendererInterface *m_displayRenderer; - QPointer m_canvas; - KisColorSliderInput* hsvH; - KisColorSliderInput* hsvS; - KisColorSliderInput* hsvV; - KisColorSliderInput* hslH; - KisColorSliderInput* hslS; - KisColorSliderInput* hslL; - KisColorSliderInput* hsiH; - KisColorSliderInput* hsiS; - KisColorSliderInput* hsiI; - KisColorSliderInput* hsyH; - KisColorSliderInput* hsyS; - KisColorSliderInput* hsyY; -}; -#endif diff --git a/plugins/dockers/colorslider/kis_hsv_slider.cpp b/plugins/dockers/colorslider/kis_hsv_slider.cpp deleted file mode 100644 index 354eb3eb93..0000000000 --- a/plugins/dockers/colorslider/kis_hsv_slider.cpp +++ /dev/null @@ -1,268 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2006 Sven Langkamp - Copyright (c) 2009 Cyrille Berger - Copyright (c) 2014 Wolthera van Hövell - Copyright (c) 2015 Moritz Molch - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. -*/ -#include "kis_hsv_slider.h" -#include "KoColorSpace.h" - -#include -#include -#include -#include -#include - -#include "kis_display_color_converter.h" - -#define ARROWSIZE 8 - -struct KisHSVSlider::Private -{ - Private() : upToDate(false), displayRenderer(0) {} - KoColor currentColorF; - int HSVtype; - KoColor minColor; - qreal hue_b; - QPixmap pixmap; - bool upToDate; - KoColorDisplayRendererInterface *displayRenderer; -}; - -KisHSVSlider::KisHSVSlider(QWidget* parent, KoColorDisplayRendererInterface *displayRenderer) - : KSelector(parent), d(new Private), - R(0), - G(0), - B(0), - Gamma(0) -{ - setMaximum(255); - d->displayRenderer = displayRenderer; - connect(d->displayRenderer, SIGNAL(displayConfigurationChanged()), SLOT(update())); -} - -KisHSVSlider::KisHSVSlider(Qt::Orientation o, QWidget *parent, KoColorDisplayRendererInterface *displayRenderer, KisCanvas2* canvas) - : KSelector(o, parent), d(new Private), m_canvas(canvas) -{ - setMaximum(255); - d->displayRenderer = displayRenderer; - connect(d->displayRenderer, SIGNAL(displayConfigurationChanged()), SLOT(update())); -} - -KisHSVSlider::~KisHSVSlider() -{ - delete d; -} - - -void KisHSVSlider::setColors(const KoColor& currentc, const int type, qreal hue_backup, qreal l_R, qreal l_G, qreal l_B, qreal gamma) -{ - d->currentColorF = currentc; -// KoColor c = currentc; - d->HSVtype = type; - d->hue_b = hue_backup/360.0f; - R=l_R; - G=l_G; - B=l_B; - Gamma=gamma; - - d->upToDate = false; - - QTimer::singleShot(1, this, SLOT(update())); -} - -void KisHSVSlider::drawContents( QPainter *painter ) -{ - QPixmap checker(8, 8); - QPainter p(&checker); - p.fillRect(0, 0, 4, 4, Qt::lightGray); - p.fillRect(4, 0, 4, 4, Qt::darkGray); - p.fillRect(0, 4, 4, 4, Qt::darkGray); - p.fillRect(4, 4, 4, 4, Qt::lightGray); - p.end(); - QRect contentsRect_(contentsRect()); - painter->fillRect(contentsRect_, QBrush(checker)); - - if( !d->upToDate || d->pixmap.isNull() || d->pixmap.width() != contentsRect_.width() - || d->pixmap.height() != contentsRect_.height() ) - { - KoColor c = d->currentColorF; // smart way to fetch colorspace - QColor color; - int type = d->HSVtype; - - QImage image(contentsRect_.width(), contentsRect_.height(), QImage::Format_ARGB32 ); - - if( orientation() == Qt::Horizontal ) { - for (int x = 0; x < contentsRect_.width(); x++) { - - qreal t = static_cast(x) / (contentsRect_.width() - 1); - t = 1.0-t; - - //function find current color from hsv thingymabobs. - c = HSXcolor(type, t); - - color = d->displayRenderer->toQColor(c); - - for (int y = 0; y < contentsRect_.height(); y++) - image.setPixel(x, y, color.rgba()); - } - } - else { - for (int y = 0; y < contentsRect_.height(); y++) { - - qreal t = static_cast(y) / (contentsRect_.height() - 1); - - c = HSXcolor(type, t); - - color = d->displayRenderer->toQColor(c); - - for (int x = 0; x < contentsRect_.width(); x++) - image.setPixel(x, y, color.rgba()); - } - } - d->pixmap = QPixmap::fromImage(image); - d->upToDate = true; - } - painter->drawPixmap( contentsRect_, d->pixmap, QRect( 0, 0, d->pixmap.width(), d->pixmap.height()) ); -} - -KoColor KisHSVSlider::currentColor() const -{ - KoColor c(d->minColor.colorSpace()); - int type = d->HSVtype; - qreal t = (value() - minimum()) / qreal(maximum() - minimum()) * 255; - c = HSXcolor(type, t); - return c; -} - -KoColor KisHSVSlider::HSXcolor(int type, qreal t) const -{ - KoColor coordinate_color(d->currentColorF.colorSpace()); - KoColor c = d->currentColorF; - qreal hue, sat, val; - qreal hue_backup = d->hue_b; - - switch(type){ - case 0: - this->converter()->getHsvF(c, &hue, &sat, &val); - coordinate_color = this->converter()->fromHsvF( (1.0 - t) , sat, val); - break;//hsv hue - case 1: - this->converter()->getHsvF(c, &hue, &sat, &val); - if (sat<=0.0 && t<1.0) { - hue=hue_backup; - } - coordinate_color = this->converter()->fromHsvF( hue, (1.0 - t), val); - break;//hsv sat - case 2: - this->converter()->getHsvF(c, &hue, &sat, &val); - coordinate_color = this->converter()->fromHsvF( hue, sat, (1.0 - t)); - break;//hsv value - case 3: - this->converter()->getHslF(c, &hue, &sat, &val); - coordinate_color = this->converter()->fromHslF( (1.0 - t) , sat, val); - break;//hsl hue - case 4: - this->converter()->getHslF(c, &hue, &sat, &val); - if (sat<=0.0 && t<1.0) { - hue=hue_backup; - } - coordinate_color = this->converter()->fromHslF( hue, (1.0 - t), val); - break;//hsl sat - case 5: - this->converter()->getHslF(c, &hue, &sat, &val); - coordinate_color = this->converter()->fromHslF( hue, sat, (1.0 - t)); - break;//hsl value - case 6: - this->converter()->getHsiF(c, &hue, &sat, &val); - coordinate_color = this->converter()->fromHsiF( (1.0 - t) , sat, val); - break;//hsi hue - case 7: - this->converter()->getHsiF(c, &hue, &sat, &val); - if (sat<=0.0 && t<1.0) { - hue=hue_backup; - } - coordinate_color = this->converter()->fromHsiF( hue, (1.0 - t), val); - break;//hsi sat - case 8: - this->converter()->getHsiF(c, &hue, &sat, &val); - coordinate_color = this->converter()->fromHsiF( hue, sat, (1.0 - t)); - break;//hsi value - case 9: - this->converter()->getHsyF(c, &hue, &sat, &val, R, G, B, Gamma); - coordinate_color = this->converter()->fromHsyF( (1.0 - t) , sat, val, R, G, B, Gamma); - break;//hsy hue - case 10: - this->converter()->getHsyF(c, &hue, &sat, &val, R, G, B, Gamma); - if (sat==0 && (1.0-t)>0) { - hue=hue_backup; - } - coordinate_color = this->converter()->fromHsyF( hue, (1.0 - t), val, R, G, B, Gamma); - break;//hsy sat - case 11: - this->converter()->getHsyF(c, &hue, &sat, &val, R, G, B, Gamma); - coordinate_color = this->converter()->fromHsyF( hue, sat, (1.0 - t), R, G, B, Gamma); - break;//hsy value - } - return coordinate_color; -} - -KisDisplayColorConverter* KisHSVSlider::converter() const -{ - return m_canvas ? - m_canvas->displayColorConverter() : - KisDisplayColorConverter::dumbConverterInstance(); -} - -void KisHSVSlider::drawArrow(QPainter *painter, const QPoint &pos) -{ - painter->setPen(palette().text().color()); - painter->setBrush(palette().text()); - - QStyleOption o; - o.initFrom(this); - o.state &= ~QStyle::State_MouseOver; - - if ( orientation() == Qt::Vertical ) { - o.rect = QRect( pos.x(), pos.y() - ARROWSIZE / 2, - ARROWSIZE, ARROWSIZE ); - } else { - o.rect = QRect( pos.x() - ARROWSIZE / 2, pos.y(), - ARROWSIZE, ARROWSIZE ); - } - - QStyle::PrimitiveElement arrowPE; - switch (arrowDirection()) { - case Qt::UpArrow: - arrowPE = QStyle::PE_IndicatorArrowUp; - break; - case Qt::DownArrow: - arrowPE = QStyle::PE_IndicatorArrowDown; - break; - case Qt::RightArrow: - arrowPE = QStyle::PE_IndicatorArrowRight; - break; - case Qt::LeftArrow: - default: - arrowPE = QStyle::PE_IndicatorArrowLeft; - break; - } - - style()->drawPrimitive(arrowPE, &o, painter, this); - -} diff --git a/plugins/dockers/colorslider/kis_hsv_slider.h b/plugins/dockers/colorslider/kis_hsv_slider.h deleted file mode 100644 index e447c52271..0000000000 --- a/plugins/dockers/colorslider/kis_hsv_slider.h +++ /dev/null @@ -1,62 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2006 Sven Langkamp - Copyright (C) 2014 Wolthera van Hövell - Copyright (c) 2015 Moritz Molch - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. -*/ - -#ifndef KIS_HSVSLIDER_H -#define KIS_HSVSLIDER_H - -#include - -#include -#include "KoColorDisplayRendererInterface.h" -#include "kis_canvas2.h" - - -class KoColor; -class KisDisplayColorConverter; - -class KisHSVSlider : public KSelector -{ - Q_OBJECT -public: - explicit KisHSVSlider(QWidget *parent = 0, KoColorDisplayRendererInterface *displayRenderer = KoDumbColorDisplayRenderer::instance()); - explicit KisHSVSlider(Qt::Orientation orientation, QWidget *parent = 0, KoColorDisplayRendererInterface *displayRenderer = KoDumbColorDisplayRenderer::instance(), KisCanvas2* canvas = 0); - ~KisHSVSlider() override; - -public: - void setColors( const KoColor& currentcolor, const int type, qreal hue_backup, qreal l_R=0.2126, qreal l_G=0.7152, qreal l_B=0.0722, qreal gamma=2.2); - /** - * Return the current color - */ - KoColor currentColor() const; - KoColor HSXcolor(int type, qreal t) const; - KisDisplayColorConverter* converter() const; -protected: - void drawContents( QPainter* ) override; - void drawArrow(QPainter *painter, const QPoint &pos) override; - struct Private; - Private* const d; -private: - qreal R, G, B, Gamma; - KoColorDisplayRendererInterface *m_displayRenderer; - QPointer m_canvas; -}; - -#endif diff --git a/plugins/dockers/colorslider/krita_colorslider.json b/plugins/dockers/colorslider/krita_colorslider.json deleted file mode 100644 index d8d9f7a7a5..0000000000 --- a/plugins/dockers/colorslider/krita_colorslider.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Id": "ColorSlider", - "Type": "Service", - "X-KDE-Library": "kritacolorslider", - "X-KDE-ServiceTypes": [ - "Krita/Dock" - ], - "X-Krita-Version": "28" -}