4
4
* Copyright (c) 1999 Michael Koch <koch@kde.org>
5
5
* Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
6
6
* Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
7
* Copyright (c) 2012 José Luis Vergara <pentalis@gmail.com>
8
9
* This program is free software; you can redistribute it and/or modify
9
10
* it under the terms of the GNU General Public License as published by
87
94
KisImageWSP image = currentImage();
89
KisSelectionSP selection =
90
fillpainter.createFloodSelection(pos.x(), pos.y(), image->projection());
96
fillpainter.setFeather(m_feather);
97
fillpainter.setSizemod(m_sizemod);
98
KisSelectionSP selection = fillpainter.createFloodSelection(pos.x(), pos.y(), image->projection());
93
101
KisCanvas2 * kisCanvas = dynamic_cast<KisCanvas2*>(canvas());
141
159
input->setSingleStep(10);
142
160
input->setValue(20);
143
161
hbox->addWidget(input);
144
connect(input, SIGNAL(valueChanged(int)), this, SLOT(slotSetFuzziness(int)));
163
hbox = new QHBoxLayout();
165
l->insertLayout(2, hbox);
167
lbl = new QLabel(i18n("Grow/shrink selection: "), selectionWidget);
168
hbox->addWidget(lbl);
170
KisSliderSpinBox *sizemod = new KisSliderSpinBox(selectionWidget);
171
Q_CHECK_PTR(sizemod);
172
sizemod->setObjectName("sizemod");
173
sizemod->setRange(-40, 40);
174
sizemod->setSingleStep(1);
175
sizemod->setValue(0);
176
hbox->addWidget(sizemod);
178
hbox = new QHBoxLayout();
180
l->insertLayout(3, hbox);
182
hbox->addWidget(new QLabel(i18n("Feathering radius: "), selectionWidget));
184
KisSliderSpinBox *feather = new KisSliderSpinBox(selectionWidget);
185
Q_CHECK_PTR(feather);
186
feather->setObjectName("feathering");
187
feather->setRange(0, 40);
188
feather->setSingleStep(1);
189
feather->setValue(0);
190
hbox->addWidget(feather);
192
connect (input , SIGNAL(valueChanged(int)), this, SLOT(slotSetFuzziness(int) ));
193
connect (sizemod, SIGNAL(valueChanged(int)), this, SLOT(slotSetSizemod(int) ));
194
connect (feather, SIGNAL(valueChanged(int)), this, SLOT(slotSetFeather(int) ));
146
196
QCheckBox* limitToCurrentLayer = new QCheckBox(i18n("Limit to current layer"), selectionWidget);
147
l->insertWidget(2, limitToCurrentLayer);
197
l->insertWidget(4, limitToCurrentLayer);
148
198
limitToCurrentLayer->setChecked(m_limitToCurrentLayer);
149
connect(limitToCurrentLayer, SIGNAL(stateChanged(int)),
150
this, SLOT(slotLimitToCurrentLayer(int)));
199
connect (limitToCurrentLayer, SIGNAL(stateChanged(int)), this, SLOT(slotLimitToCurrentLayer(int)));
153
202
return selectionWidget;