Commit 30a15c65 authored by José Luis Vergara's avatar José Luis Vergara

Merge branch 'krita-improvedpresetcreation-pentalis'

Conflicts:
	krita/ui/forms/wdgpaintopsettings.ui
	krita/ui/kis_paintop_box.cc

o kis_paintop_box.cc was merged by rewriting the new signal with the new indenting style.
o wdgpaintopsettings.ui was a living nightmare solved by re-creating the .ui file using
master as a base and adding the improvements from krita-improvedpresetcreation-pentalis
by hand.
parents 390df7b9 66ad738c
......@@ -158,6 +158,7 @@ set(kritaui_LIB_SRCS
widgets/kis_progress_widget.cpp
widgets/kis_selection_options.cc
widgets/kis_scratch_pad.cpp
widgets/kis_preset_selector_strip.cpp
widgets/kis_tree_view_popup.cc
widgets/kis_slider_spin_box.cpp
widgets/kis_wdg_generator.cpp
......@@ -222,6 +223,7 @@ kde4_add_ui_files(kritaui_LIB_SRCS
forms/wdgpaintactioneditor.ui
forms/wdgmultipliersdoublesliderspinbox.ui
forms/wdgnodequerypatheditor.ui
forms/wdgpresetselectorstrip.ui
)
kde4_add_library(kritaui SHARED ${kritaui_LIB_SRCS} )
......
......@@ -6,40 +6,12 @@
<rect>
<x>0</x>
<y>0</y>
<width>613</width>
<width>655</width>
<height>335</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0,0">
<item row="0" column="1" 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="3" rowspan="2">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,0,0">
<item row="0" column="2" rowspan="2">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
......@@ -67,49 +39,7 @@
</layout>
</widget>
</item>
<item row="1" column="1" 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="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="bnDefaultPreset">
<property name="text">
<string>Default preset</string>
</property>
</widget>
</item>
<item row="2" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0,0">
<item>
<widget class="QPushButton" name="fillLayer">
......@@ -163,6 +93,95 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QFrame" name="frmOptionWidgetContainer">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>100</width>
<height>16777215</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>2</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<item>
<widget class="KisPresetSelectorStrip" name="presetWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>56</height>
</size>
</property>
</widget>
</item>
<item>
<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 preset</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bnSave">
<property name="toolTip">
<string>Save the current brush settings under this name</string>
</property>
<property name="text">
<string>&amp;Save to Presets</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="bnDefaultPreset">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Default preset</string>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
......@@ -172,6 +191,12 @@
<header>kis_scratch_pad.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KisPresetSelectorStrip</class>
<extends>QWidget</extends>
<header>kis_preset_selector_strip.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>KisPaintOpListWidget</class>
<extends>QWidget</extends>
......
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>WdgPresetSelectorStrip</class>
<widget class="QWidget" name="WdgPresetSelectorStrip">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>60</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>500</width>
<height>50</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="leftScrollBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>26</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&lt;</string>
</property>
<property name="autoRepeat">
<bool>true</bool>
</property>
<property name="autoRepeatDelay">
<number>65</number>
</property>
<property name="autoRepeatInterval">
<number>65</number>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="KisPresetChooser" name="smallPresetChooser" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<widget class="QPushButton" name="deletePresetBtn">
<property name="geometry">
<rect>
<x>80</x>
<y>20</y>
<width>25</width>
<height>25</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>3</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</widget>
</item>
<item>
<widget class="QPushButton" name="rightScrollBtn">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>26</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>&gt;</string>
</property>
<property name="autoRepeat">
<bool>true</bool>
</property>
<property name="autoRepeatDelay">
<number>65</number>
</property>
<property name="autoRepeatInterval">
<number>65</number>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>KisPresetChooser</class>
<extends>QWidget</extends>
<header>widgets/kis_preset_chooser.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
......@@ -184,18 +184,19 @@ KisPaintopBox::KisPaintopBox(KisView2 * view, QWidget *parent, const char * name
updatePaintops(view->image()->colorSpace());
setCurrentPaintop(defaultPaintOp());
connect(m_presetsPopup , SIGNAL(paintopActivated(QString)) , SLOT(slotSetPaintop(QString)));
connect(m_presetsPopup , SIGNAL(savePresetClicked()) , SLOT(slotSaveActivePreset()));
connect(m_presetsPopup , SIGNAL(defaultPresetClicked()) , SLOT(slotSetupDefaultPreset()));
connect(m_presetsPopup , SIGNAL(presetNameLineEditChanged(QString)), SLOT(slotWatchPresetNameLineEdit(QString)));
connect(m_presetsChooserPopup, SIGNAL(resourceSelected(KoResource*)) , SLOT(resourceSelected(KoResource*)));
connect(m_resourceProvider , SIGNAL(sigNodeChanged(const KisNodeSP)) , SLOT(slotNodeChanged(const KisNodeSP)));
connect(m_sliderOpacity , SIGNAL(valueChanged(qreal)) , SLOT(slotOpacityChanged(qreal)));
connect(m_paletteButton , SIGNAL(clicked()) , SLOT(slotSaveToFavouriteBrushes()));
connect(m_cmbCompositeOp , SIGNAL(activated(int)) , SLOT(slotSetCompositeMode(int)));
connect(eraseAction , SIGNAL(triggered(bool)) , SLOT(slotToggleEraseMode(bool)));
connect(hMirrorAction , SIGNAL(triggered(bool)) , SLOT(slotHorizontalMirrorChanged(bool)));
connect(vMirrorAction , SIGNAL(triggered(bool)) , SLOT(slotVerticalMirrorChanged(bool)));
connect(m_presetsPopup , SIGNAL(paintopActivated(QString)) , SLOT(slotSetPaintop(QString)));
connect(m_presetsPopup , SIGNAL(savePresetClicked()) , SLOT(slotSaveActivePreset()));
connect(m_presetsPopup , SIGNAL(defaultPresetClicked()) , SLOT(slotSetupDefaultPreset()));
connect(m_presetsPopup , SIGNAL(presetNameLineEditChanged(QString)) , SLOT(slotWatchPresetNameLineEdit(QString)));
connect(m_presetsPopup , SIGNAL(signalResourceSelected(KoResource*)), SLOT(resourceSelected(KoResource*)));
connect(m_presetsChooserPopup, SIGNAL(resourceSelected(KoResource*)) , SLOT(resourceSelected(KoResource*)));
connect(m_resourceProvider , SIGNAL(sigNodeChanged(const KisNodeSP)) , SLOT(slotNodeChanged(const KisNodeSP)));
connect(m_sliderOpacity , SIGNAL(valueChanged(qreal)) , SLOT(slotOpacityChanged(qreal)));
connect(m_paletteButton , SIGNAL(clicked()) , SLOT(slotSaveToFavouriteBrushes()));
connect(m_cmbCompositeOp , SIGNAL(activated(int)) , SLOT(slotSetCompositeMode(int)));
connect(eraseAction , SIGNAL(triggered(bool)) , SLOT(slotToggleEraseMode(bool)));
connect(hMirrorAction , SIGNAL(triggered(bool)) , SLOT(slotHorizontalMirrorChanged(bool)));
connect(vMirrorAction , SIGNAL(triggered(bool)) , SLOT(slotVerticalMirrorChanged(bool)));
//Needed to connect canvas to favoriate resource manager
m_view->canvasBase()->createFavoriteResourceManager(this);
......
......@@ -42,6 +42,7 @@
#include <kis_paintop_settings_widget.h>
#include <kis_canvas_resource_provider.h>
#include <widgets/kis_preset_chooser.h>
#include <widgets/kis_preset_selector_strip.h>
#include <ui_wdgpaintopsettings.h>
#include <kis_node.h>
......@@ -123,7 +124,12 @@ KisPaintOpPresetsPopup::KisPaintOpPresetsPopup(KisCanvasResourceProvider * resou
connect(m_d->uiWdgPaintOpPresetSettings.paintopList, SIGNAL(activated(const QString&)),
this, SIGNAL(paintopActivated(QString)));
connect(this, SIGNAL(paintopActivated(QString)),
m_d->uiWdgPaintOpPresetSettings.presetWidget, SLOT(currentPaintopChanged(QString)));
connect(m_d->uiWdgPaintOpPresetSettings.presetWidget->smallPresetChooser, SIGNAL(resourceSelected(KoResource*)),
this, SIGNAL(signalResourceSelected(KoResource*)));
KisConfig cfg;
m_d->detached = !cfg.paintopPopupDetached();
m_d->ignoreHideEvents = false;
......
......@@ -93,6 +93,7 @@ signals:
void defaultPresetClicked();
void presetNameLineEditChanged(const QString& presetName);
void paintopActivated(const QString& presetName);
void signalResourceSelected(KoResource* resource);
private slots:
void fillScratchPadGradient();
......
......@@ -3,6 +3,7 @@
* Copyright (c) 2009 Sven Langkamp <sven.langkamp@gmail.com>
* Copyright (C) 2011 Silvio Heinrich <plassy@web.de>
* Copyright (C) 2011 Srikanth Tiyyagura <srikanth.tulasiram@gmail.com>
* Copyright (c) 2011 José Luis Vergara <pentalis@gmail.com>
*
* 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
......@@ -230,6 +231,11 @@ void KisPresetChooser::setShowAll(bool show)
updateViewSettings();
}
void KisPresetChooser::showButtons(bool show)
{
m_chooser->showButtons(show);
}
void KisPresetChooser::setViewMode(KisPresetChooser::ViewMode mode)
{
m_mode = mode;
......@@ -260,10 +266,16 @@ void KisPresetChooser::updateViewSettings()
m_chooser->setRowHeight(floor(width/cols));
m_chooser->setColumnCount(cols);
m_delegate->setShowText(false);
} else {
} else if (m_mode == DETAIL) {
m_chooser->setColumnCount(1);
m_delegate->setShowText(true);
} else if (m_mode == STRIP) {
m_chooser->setRowCount(1);
// An offset of 7 keeps the cell exactly square, TODO: use constants, not hardcoded numbers
m_chooser->setColumnWidth(m_chooser->viewSize().height() - 7);
m_delegate->setShowText(false);
}
}
#include "kis_preset_chooser.moc"
......
/*
* Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
* Copyright (C) 2011 Silvio Heinrich <plassy@web.de>
* Copyright (c) 2011 José Luis Vergara <pentalis@gmail.com>
*
* 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
......@@ -45,7 +46,8 @@ public:
enum ViewMode{
THUMBNAIL, /// Shows thumbnails
DETAIL /// Shows thumbsnails with text next to it
DETAIL, /// Shows thumbsnails with text next to it
STRIP /// Shows thumbnails arranged in a single row
};
///Set id for paintop to be accept by the proxy model
......@@ -55,6 +57,10 @@ public:
void setViewMode(ViewMode mode);
void updateViewSettings();
void showButtons(bool show);
signals:
void resourceSelected( KoResource * resource );
......
/*
* Copyright (c) 2011 José Luis Vergara <pentalis@gmail.com>
*
* 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_preset_selector_strip.h"
#include "KoResourceModel.h"
#include "KoResourceItemView.h"
#include "KoResourceItemChooser.h"
#include "kis_paintop_registry.h"
#include <QtGui/QAbstractScrollArea>
#include <QtGui/QMouseEvent>
#include <QtCore/QTimer>
KisPresetSelectorStrip::KisPresetSelectorStrip(QWidget* parent)
: QWidget(parent)
{
setupUi(this);
smallPresetChooser->showButtons(false);
smallPresetChooser->setViewMode(KisPresetChooser::STRIP);
antiOOPHack = smallPresetChooser->findChild<KoResourceItemView*>();
antiOOPHack->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
antiOOPHack->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
refresher = new QTimer(this);
refresher->setSingleShot(true);
/* This is an heuristic to fill smallPresetChooser with only the presets
* for the paintop that comes selected by default: Pixel Brush. */
const QString PIXEL_BRUSH_ID = "paintbrush";
smallPresetChooser->setPresetFilter(KoID(PIXEL_BRUSH_ID));
const QString TRASH_ICON = "trash-empty";
deletePresetBtn->setIcon(SmallIcon(TRASH_ICON, KIconLoader::SizeSmall));
deletePresetBtn->setVisible(true);
connect(smallPresetChooser, SIGNAL(resourceSelected(KoResource*)),
this, SLOT(prepareDeleteButton()));
connect(smallPresetChooser, SIGNAL(resourceSelected(KoResource*)),
this, SLOT(startRefreshingTimer()));
connect(refresher, SIGNAL(timeout()), this, SLOT(repaintDeleteButton()));
}
KisPresetSelectorStrip::~KisPresetSelectorStrip()
{
delete refresher;
}
void KisPresetSelectorStrip::showEvent(QShowEvent* event)
{
deletePresetBtn->hide();
QWidget::showEvent(event);
}
void KisPresetSelectorStrip::currentPaintopChanged(QString paintOpID)
{
foreach (KoID paintOp, KisPaintOpRegistry::instance()->listKeys()) {
if (paintOp.id() == paintOpID) {
smallPresetChooser->setPresetFilter(paintOp);
break;
}
}
deletePresetBtn->hide();
}
void KisPresetSelectorStrip::startRefreshingTimer()
{
// Estimated time it takes for the ResourceView to scroll when a widget
// that is only partially visible becomes visible
refresher->start(450);
}
void KisPresetSelectorStrip::repaintDeleteButton()
{
if (deletePresetBtn->isVisible()) {
prepareDeleteButton();
}
}
void KisPresetSelectorStrip::prepareDeleteButton()
{
const quint8 HEURISTIC_OFFSET = 3; // This number is just conjured out of the nether to make
// things look good
quint16 buttonWidth = deletePresetBtn->width();
quint16 buttonHeight = deletePresetBtn->height();
quint16 columnWidth = antiOOPHack->columnWidth(0); // All columns assumed equal in width
quint16 currentColumn = antiOOPHack->currentIndex().column();
quint16 rowHeight = antiOOPHack->rowHeight(0); // There is only 1 row in this widget
quint16 yPos = rowHeight - deletePresetBtn->height() + HEURISTIC_OFFSET;
quint16 xPos = antiOOPHack->columnViewportPosition(currentColumn)
+ columnWidth + HEURISTIC_OFFSET - buttonWidth;
deletePresetBtn->setGeometry(xPos, yPos, buttonWidth, buttonHeight);
deletePresetBtn->setVisible(true);
}
void KisPresetSelectorStrip::on_leftScrollBtn_pressed()
{
// Deciding how far beyond the left margin (10 pixels) was an arbitrary decision
QPoint beyondLeftMargin(-10, 0);
antiOOPHack->scrollTo(antiOOPHack->indexAt(beyondLeftMargin), QAbstractItemView::EnsureVisible);
deletePresetBtn->setVisible(false);
}
void KisPresetSelectorStrip::on_rightScrollBtn_pressed()
{
// Deciding how far beyond the right margin to put the point (10 pixels) was an arbitrary decision
QPoint beyondRightMargin(10 + antiOOPHack->viewport()->width(), 0);
antiOOPHack->scrollTo(antiOOPHack->indexAt(beyondRightMargin), QAbstractItemView::EnsureVisible);
deletePresetBtn->setVisible(false);
}
void KisPresetSelectorStrip::on_deletePresetBtn_pressed()
{
KoResourceItemChooser* veryAntiOOPHack = smallPresetChooser->findChild<KoResourceItemChooser*>();
veryAntiOOPHack->slotButtonClicked(KoResourceItemChooser::Button_Remove);
}
#include "kis_preset_selector_strip.moc"
/*
* Copyright (c) 2011 José Luis Vergara <pentalis@gmail.com>
*
* 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_PRESET_SELECTOR_STRIP_H
#define KIS_PRESET_SELECTOR_STRIP_H
#include <QWidget>
#include "ui_wdgpresetselectorstrip.h"
class KoResourceItemView;
/**
*
* KisPresetSelectorStrip is a composite widget around KisPresetChooser. It provides
* a strip of icons with two scroll buttons at the sides and a small delete button
* that appears when a user selects a preset icon.
*
* KisPresetSelectorStrip makes it possible to quickly select and modify presets.
*
* Note that KisPresetSelectorStrip uses the QObject tree to access properties of the contained
* classes, and uses heuristics to approximate pixel offsets, times, and other
* properties that cannot be accessed through the QObject tree.
*
*/
class KisPresetSelectorStrip : public QWidget, public Ui::WdgPresetSelectorStrip
{
Q_OBJECT
public:
KisPresetSelectorStrip(QWidget *parent);
virtual ~KisPresetSelectorStrip();
virtual void showEvent(QShowEvent *event);
public slots:
/// Updates the contents of the strip item view, show only presets for @param paintOpID
void currentPaintopChanged(QString paintOpID);
/**
* startRefreshingTimer() and repaintDeleteButton() are heuristics
* to reposition the delete button when the strip auto-scrolls
* to show a selected item that's partly outside the item view
*/
void startRefreshingTimer();
void repaintDeleteButton();
private slots:
/**
* Properly position the delete button on the bottom right corner of the currently
* selected preset item
*/
void prepareDeleteButton();
/// Scrolls the strip's item view to the left
void on_leftScrollBtn_pressed();
/// Scrolls the strip's item view to the right
void on_rightScrollBtn_pressed();
/**
* This small button will hover over a preset when it is selected;
* and will remove the preset when pressed
*/
void on_deletePresetBtn_pressed();
private:
/**
* This is a workaround to access members of KisPresetChooser using the QObject tree
* instead of class methods
*/
KoResourceItemView* antiOOPHack;
QTimer* refresher;
};
#endif // KIS_PRESET_SELECTOR_STRIP_H
......@@ -196,6 +196,7 @@ void KisScratchPad::setPresetImage(const QImage& image)
device->convertFromQImage(image, "");
KisPainter painter(m_paintDevice);