Commit 71ca5b28 authored by Sven Langkamp's avatar Sven Langkamp

split paintop popup into seperate popups for settings and preset, experimental

svn path=/trunk/koffice/; revision=1127876
parent d7372f40
......@@ -138,6 +138,7 @@ set(kritaui_LIB_SRCS
widgets/kis_multi_double_filter_widget.cc
widgets/kis_multi_integer_filter_widget.cc
widgets/kis_paintop_presets_popup.cpp
widgets/kis_paintop_presets_chooser_popup.cpp
widgets/kis_pattern_chooser.cc
widgets/kis_popup_button.cc
widgets/kis_preset_chooser.cpp
......@@ -197,6 +198,7 @@ kde4_add_ui_files(kritaui_LIB_SRCS
forms/wdgfilterdialog.ui
forms/wdgmetadatamergestrategychooser.ui
forms/wdgpaintoppresets.ui
forms/wdgpaintopsettings.ui
forms/wdgdlggeneratorlayer.ui
forms/wdgfilterselector.ui
forms/wdgfilternodecreation.ui
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>706</width>
<height>324</height>
<width>510</width>
<height>439</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -16,171 +16,39 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout_4" rowstretch="1,0">
<item row="0" column="0" rowspan="2">
<widget class="QTabWidget" name="tabPresets">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabCustom">
<attribute name="title">
<string>Active Settings</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="0" colspan="2">
<widget class="QFrame" name="frmOptionWidgetContainer">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="txtPreset">
<property name="toolTip">
<string>Current brush definition</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bnSave">
<property name="toolTip">
<string>save the current brush definition under this name</string>
</property>
<property name="text">
<string>&amp;Save to Presets</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="5" column="0">
<widget class="QPushButton" name="bnDefaultPreset">
<property name="text">
<string>Default preset</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabChooser">
<attribute name="title">
<string>Preset Collection</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1" columnminimumwidth="0,0">
<item row="0" column="0">
<widget class="KLineEdit" name="searchBar">
<property name="clickMessage">
<string>Search Preset</string>
</property>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="showAllCheckBox">
<property name="text">
<string>Show all</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="KisPresetChooser" name="wdgPresetChooser" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>4</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item row="0" column="1">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="KisScratchPad" name="scratchPad" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="fillLayer">
<property name="text">
<string/>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1" columnminimumwidth="0,0">
<item row="0" column="0">
<widget class="KLineEdit" name="searchBar">
<property name="clickMessage">
<string>Search Preset</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fillGradient">
<property name="text">
<string/>
<property name="showClearButton" stdset="0">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fillSolid">
<item row="0" column="1">
<widget class="QCheckBox" name="showAllCheckBox">
<property name="text">
<string/>
<string>Show all</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="eraseScratchPad">
<property name="text">
<string/>
<item row="1" column="0" colspan="2">
<widget class="KisPresetChooser" name="wdgPresetChooser" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>4</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>400</height>
</size>
</property>
</widget>
</item>
......@@ -200,12 +68,6 @@
<header>widgets/kis_preset_chooser.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KisScratchPad</class>
<extends>QWidget</extends>
<header>kis_scratch_pad.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>WdgPaintOpSettings</class>
<widget class="QWidget" name="WdgPaintOpSettings">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>673</width>
<height>335</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Name:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="txtPreset">
<property name="toolTip">
<string>Current brush definition</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bnSave">
<property name="toolTip">
<string>save the current brush definition under this name</string>
</property>
<property name="text">
<string>&amp;Save to Presets</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="2" rowspan="2">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="KisScratchPad" name="scratchPad" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QFrame" name="frmOptionWidgetContainer">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="bnDefaultPreset">
<property name="text">
<string>Default preset</string>
</property>
</widget>
</item>
<item row="2" column="1">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>267</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="fillLayer">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fillGradient">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fillSolid">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="eraseScratchPad">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KisScratchPad</class>
<extends>QWidget</extends>
<header>kis_scratch_pad.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
......@@ -57,14 +57,17 @@
#include "kis_factory2.h"
#include "widgets/kis_popup_button.h"
#include "widgets/kis_paintop_presets_popup.h"
#include "widgets/kis_paintop_presets_chooser_popup.h"
#include <kis_paintop_settings_widget.h>
#include "ko_favorite_resource_manager.h"
#include <kis_paintop_presets_chooser_popup.h>
KisPaintopBox::KisPaintopBox(KisView2 * view, QWidget *parent, const char * name)
: QWidget(parent)
, m_resourceProvider(view->resourceProvider())
, m_optionWidget(0)
, m_settingsWidget(0)
, m_presetWidget(0)
, m_view(view)
, m_activePreset(0)
......@@ -89,18 +92,27 @@ KisPaintopBox::KisPaintopBox(KisView2 * view, QWidget *parent, const char * name
m_cmbPaintops->setAttribute(Qt::WA_MacSmallSize, true);
#endif
m_settingsWidget = new KisPopupButton(this);
m_settingsWidget->setIcon(KIcon("paintop_settings_01"));
m_settingsWidget->setToolTip(i18n("Edit brush settings"));
m_settingsWidget->setFixedSize(32, 32);
m_presetWidget = new KisPopupButton(this);
m_presetWidget->setIcon(KIcon("paintop_settings_01"));
m_presetWidget->setToolTip(i18n("Edit brush preset"));
m_presetWidget->setToolTip(i18n("Chose brush preset"));
m_presetWidget->setFixedSize(32, 32);
m_layout = new QHBoxLayout(this);
m_layout->addWidget(m_cmbPaintops);
m_layout->addWidget(m_settingsWidget);
m_layout->addWidget(m_presetWidget);
m_presetsPopup = new KisPaintOpPresetsPopup(m_resourceProvider);
m_presetWidget->setPopupWidget(m_presetsPopup);
m_settingsWidget->setPopupWidget(m_presetsPopup);
m_presetsPopup->switchDetached();
m_presetsChooserPopup = new KisPaintOpPresetsChooserPopup();
m_presetWidget->setPopupWidget(m_presetsChooserPopup);
QList<KoID> keys = KisPaintOpRegistry::instance()->listKeys();
for (QList<KoID>::Iterator it = keys.begin(); it != keys.end(); ++it) {
......@@ -117,7 +129,7 @@ KisPaintopBox::KisPaintopBox(KisView2 * view, QWidget *parent, const char * name
connect(m_presetsPopup, SIGNAL(defaultPresetClicked()), this, SLOT(slotSetupDefaultPreset()));
connect(m_presetsPopup, SIGNAL(resourceSelected(KoResource*)),
connect(m_presetsChooserPopup, SIGNAL(resourceSelected(KoResource*)),
this, SLOT(resourceSelected(KoResource*)));
}
......@@ -293,7 +305,7 @@ void KisPaintopBox::setCurrentPaintop(const KoID & paintop)
m_optionWidget->setConfiguration(preset->settings());
}
m_presetsPopup->setPaintOpSettingsWidget(m_optionWidget);
m_presetsPopup->setPresetFilter(paintop);
m_presetsChooserPopup->setPresetFilter(paintop);
Q_ASSERT(m_optionWidget);
Q_ASSERT(m_presetWidget);
connect(m_optionWidget, SIGNAL(sigConfigurationUpdated()), this, SLOT(slotUpdatePreset()));
......
......@@ -45,6 +45,7 @@ class KisView2;
class KisCanvasResourceProvider;
class KisPopupButton;
class KisPaintOpPresetsPopup;
class KisPaintOpPresetsChooserPopup;
class KisPaintOpSettingsWidget;
/**
......@@ -102,8 +103,10 @@ private:
QHBoxLayout* m_layout;
KisPaintOpSettingsWidget* m_optionWidget;
KisPopupButton* m_settingsWidget;
KisPopupButton* m_presetWidget;
KisPaintOpPresetsPopup* m_presetsPopup;
KisPaintOpPresetsChooserPopup* m_presetsChooserPopup;
KisView2* m_view;
QMap<KoID, KisPaintOpSettingsWidget*> m_paintopOptionWidgets;
......
/* This file is part of the KDE project
* Copyright (c) 2010 Sven Langkamp <sven.langkamp@gmail.com>
*
* 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_paintop_presets_chooser_popup.h"
#include <KoResource.h>
#include <ui_wdgpaintoppresets.h>
class KisPaintOpPresetsChooserPopup::Private
{
public:
Ui_WdgPaintOpPresets uiWdgPaintOpPresets;
};
KisPaintOpPresetsChooserPopup::KisPaintOpPresetsChooserPopup(QWidget * parent)
: QWidget(parent)
, m_d(new Private())
{
m_d->uiWdgPaintOpPresets.setupUi(this);
connect(m_d->uiWdgPaintOpPresets.wdgPresetChooser, SIGNAL(resourceSelected(KoResource*)),
this, SIGNAL(resourceSelected(KoResource*)));
connect(m_d->uiWdgPaintOpPresets.searchBar, SIGNAL(textChanged(const QString&)),
m_d->uiWdgPaintOpPresets.wdgPresetChooser, SLOT(searchTextChanged(const QString&)));
connect(m_d->uiWdgPaintOpPresets.showAllCheckBox, SIGNAL(toggled(bool)),
m_d->uiWdgPaintOpPresets.wdgPresetChooser, SLOT(setShowAll(bool)));
}
KisPaintOpPresetsChooserPopup::~KisPaintOpPresetsChooserPopup()
{
delete m_d;
}
void KisPaintOpPresetsChooserPopup::setPresetFilter(const KoID& paintopID)
{
m_d->uiWdgPaintOpPresets.wdgPresetChooser->setPresetFilter(paintopID);
}
\ No newline at end of file
/* This file is part of the KDE project
* Copyright (c) 2010 Sven Langkamp <sven.langkamp@gmail.com>
*
* 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_PAINTOP_PRESETS_CHOOSER_POPUP_H
#define KIS_PAINTOP_PRESETS_CHOOSER_POPUP_H
#include <QWidget>
#include <KoID.h>
class KoResource;
class KisPaintOpPresetsChooserPopup : public QWidget
{
Q_OBJECT
public:
KisPaintOpPresetsChooserPopup(QWidget * parent = 0);
virtual ~KisPaintOpPresetsChooserPopup();
///Set id for paintop to be accept by the proxy model
///@param paintopID id of the paintop for which the presets will be shown
void setPresetFilter(const KoID & paintopID);
signals:
void resourceSelected( KoResource * resource );
private:
class Private;
Private * const m_d;
};
#endif // KIS_PAINTOP_PRESETS_CHOOSER_POPUP_H
......@@ -39,7 +39,7 @@
#include <kis_canvas_resource_provider.h>
#include <widgets/kis_preset_chooser.h>
#include <ui_wdgpaintoppresets.h>
#include <ui_wdgpaintopsettings.h>
#include <kis_node.h>
#include "kis_config.h"
......@@ -48,7 +48,7 @@ class KisPaintOpPresetsPopup::Private
public:
Ui_WdgPaintOpPresets uiWdgPaintOpPresets;
Ui_WdgPaintOpSettings uiWdgPaintOpPresetSettings;
QGridLayout *layout;
QWidget *settingsWidget;
QFont smallFont;
......@@ -70,56 +70,46 @@ KisPaintOpPresetsPopup::KisPaintOpPresetsPopup(KisCanvasResourceProvider * resou
m_d->resourceProvider = resourceProvider;
m_d->uiWdgPaintOpPresets.setupUi(this);
m_d->uiWdgPaintOpPresetSettings.setupUi(this);
m_d->layout = new QGridLayout(m_d->uiWdgPaintOpPresets.frmOptionWidgetContainer);
m_d->layout = new QGridLayout(m_d->uiWdgPaintOpPresetSettings.frmOptionWidgetContainer);
m_d->layout->setSizeConstraint(QLayout::SetFixedSize);
m_d->uiWdgPaintOpPresets.scratchPad->setCanvasColor(Qt::white);
m_d->uiWdgPaintOpPresets.scratchPad->setColorSpace(KoColorSpaceRegistry::instance()->rgb8());
m_d->uiWdgPaintOpPresets.scratchPad->setCutoutOverlay(QRect(0, 0, 250, 60));
m_d->uiWdgPaintOpPresets.fillLayer->setIcon(KIcon("newlayer"));
m_d->uiWdgPaintOpPresets.fillGradient->setIcon(KIcon("krita_tool_gradient"));
m_d->uiWdgPaintOpPresets.fillSolid->setIcon(KIcon("krita_tool_color_fill"));
m_d->uiWdgPaintOpPresets.eraseScratchPad->setIcon(KIcon("list-remove"));
m_d->uiWdgPaintOpPresetSettings.scratchPad->setCanvasColor(Qt::white);
m_d->uiWdgPaintOpPresetSettings.scratchPad->setColorSpace(KoColorSpaceRegistry::instance()->rgb8());
m_d->uiWdgPaintOpPresetSettings.scratchPad->setCutoutOverlay(QRect(0, 0, 250, 60));
m_d->uiWdgPaintOpPresetSettings.fillLayer->setIcon(KIcon("newlayer"));
m_d->uiWdgPaintOpPresetSettings.fillGradient->setIcon(KIcon("krita_tool_gradient"));
m_d->uiWdgPaintOpPresetSettings.fillSolid->setIcon(KIcon("krita_tool_color_fill"));
m_d->uiWdgPaintOpPresetSettings.eraseScratchPad->setIcon(KIcon("list-remove"));
connect(m_d->uiWdgPaintOpPresets.eraseScratchPad, SIGNAL(clicked()),
m_d->uiWdgPaintOpPresets.scratchPad, SLOT(clear()));
connect(m_d->uiWdgPaintOpPresetSettings.eraseScratchPad, SIGNAL(clicked()),
m_d->uiWdgPaintOpPresetSettings.scratchPad, SLOT(clear()));
connect(m_d->resourceProvider, SIGNAL(sigFGColorChanged(const KoColor &)),
m_d->uiWdgPaintOpPresets.scratchPad, SLOT(setPaintColor(const KoColor &)));
m_d->uiWdgPaintOpPresetSettings.scratchPad, SLOT(setPaintColor(const KoColor &)));
connect(m_d->resourceProvider, SIGNAL(sigBGColorChanged(const KoColor &)),
m_d->uiWdgPaintOpPresets.scratchPad, SLOT(setBackgroundColor(const KoColor &)));
m_d->uiWdgPaintOpPresetSettings.scratchPad, SLOT(setBackgroundColor(const KoColor &)));
connect(m_d->uiWdgPaintOpPresets.fillLayer, SIGNAL(clicked()),
connect(m_d->uiWdgPaintOpPresetSettings.fillLayer, SIGNAL(clicked()),
this, SLOT(fillScratchPadLayer()));
connect(m_d->uiWdgPaintOpPresets.fillGradient, SIGNAL(clicked()),
connect(m_d->uiWdgPaintOpPresetSettings.fillGradient, SIGNAL(clicked()),
this, SLOT(fillScratchPadGradient()));
connect(m_d->uiWdgPaintOpPresets.fillSolid, SIGNAL(clicked()),
connect(m_d->uiWdgPaintOpPresetSettings.fillSolid, SIGNAL(clicked()),
this, SLOT(fillScratchPadSolid()));
m_d->settingsWidget = 0;
setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
connect(m_d->uiWdgPaintOpPresets.bnSave, SIGNAL(clicked()),
connect(m_d->uiWdgPaintOpPresetSettings.bnSave, SIGNAL(clicked()),
this, SIGNAL(savePresetClicked()));
connect(m_d->uiWdgPaintOpPresets.bnDefaultPreset, SIGNAL(clicked()),
connect(m_d->uiWdgPaintOpPresetSettings.bnDefaultPreset, SIGNAL(clicked()),
this, SIGNAL(defaultPresetClicked()));
connect(m_d->uiWdgPaintOpPresets.wdgPresetChooser, SIGNAL(resourceSelected(KoResource*)),
this, SIGNAL(resourceSelected(KoResource*)));
connect(m_d->uiWdgPaintOpPresets.searchBar, SIGNAL(textChanged(const QString&)),
m_d->uiWdgPaintOpPresets.wdgPresetChooser, SLOT(searchTextChanged(const QString&)));
connect(m_d->uiWdgPaintOpPresets.showAllCheckBox, SIGNAL(toggled(bool)),
m_d->uiWdgPaintOpPresets.wdgPresetChooser, SLOT(setShowAll(bool)));
KisConfig cfg;
m_d->detached = !cfg.paintopPopupDetached();
......@@ -142,7 +132,7 @@ void KisPaintOpPresetsPopup::setPaintOpSettingsWidget(QWidget * widget)
{
if (m_d->settingsWidget) {
m_d->layout->removeWidget(m_d->settingsWidget);
m_d->uiWdgPaintOpPresets.frmOptionWidgetContainer->updateGeometry();
m_d->uiWdgPaintOpPresetSettings.frmOptionWidgetContainer->updateGeometry();
}
m_d->layout->update();
updateGeometry();
......@@ -163,32 +153,27 @@ void KisPaintOpPresetsPopup::setPaintOpSettingsWidget(QWidget * widget)
QString KisPaintOpPresetsPopup::getPresetName() const
{
return m_d->uiWdgPaintOpPresets.txtPreset->text();
}
void KisPaintOpPresetsPopup::setPresetFilter(const KoID& paintopID)
{
m_d->uiWdgPaintOpPresets.wdgPresetChooser->setPresetFilter(paintopID);
return m_d->uiWdgPaintOpPresetSettings.txtPreset->text();
}
void KisPaintOpPresetsPopup::setPreset(KisPaintOpPresetSP preset)
{
m_d->uiWdgPaintOpPresets.scratchPad->setPreset(preset);
m_d->uiWdgPaintOpPresetSettings.scratchPad->setPreset(preset);
}
QImage KisPaintOpPresetsPopup::cutOutOverlay()
{
return m_d->uiWdgPaintOpPresets.scratchPad->cutoutOverlay();
return m_d->uiWdgPaintOpPresetSettings.scratchPad->cutoutOverlay();
}
void KisPaintOpPresetsPopup::fillScratchPadGradient()
{
m_d->uiWdgPaintOpPresets.scratchPad->fillGradient(m_d->resourceProvider->currentGradient());
m_d->uiWdgPaintOpPresetSettings.scratchPad->fillGradient(m_d->resourceProvider->currentGradient());
}
void KisPaintOpPresetsPopup::fillScratchPadSolid()
{
m_d->uiWdgPaintOpPresets.scratchPad->fillSolid(m_d->resourceProvider->bgColor());
m_d->uiWdgPaintOpPresetSettings.scratchPad->fillSolid(m_d->resourceProvider->bgColor());
}
void KisPaintOpPresetsPopup::fillScratchPadLayer()
......
......@@ -24,7 +24,6 @@
#include <kis_types.h>
class QString;