Krita Source Code Documentation
Loading...
Searching...
No Matches
KoFillConfigWidget Class Reference

A widget for configuring the fill of a shape. More...

#include <KoFillConfigWidget.h>

+ Inheritance diagram for KoFillConfigWidget:

Signals

void sigFillChanged ()
 
void sigInternalRecoverColorInResourceManager ()
 
void sigInternalRequestColorToResourceManager ()
 
void sigMeshGradientResetted ()
 

Public Member Functions

void activate ()
 
KoShapeStrokeSP createShapeStroke ()
 
QList< KoShape * > currentShapes ()
 
void deactivate ()
 
void forceUpdateOnSelectionChanged ()
 
 KoFillConfigWidget (KoCanvasBase *canvas, KoFlake::FillVariant fillVariant, bool trackShapeSelection, QWidget *parent)
 
 Private (KoFlake::FillVariant _fillVariant, KoFillConfigWidget *q)
 
int selectedFillIndex ()
 returns the selected index of the fill type
 
void setNoSelectionTrackingMode (bool value)
 
void setSelectedMeshGradientHandle (const SvgMeshPosition &position)
 
 ~KoFillConfigWidget () override
 

Public Attributes

KoStopGradientSP activeGradient
 
QScopedPointer< SvgMeshGradientactiveMeshGradient
 
KoCanvasBasecanvas {nullptr}
 
KoColorPopupActioncolorAction {nullptr}
 
KisSignalCompressorWithParam< std::pair< QColor, KoFlake::FillVariant > > colorChangedCompressor
 
std::vector< KisAcyclicSignalConnector::BlockerdeactivationLocks
 
KoFlake::FillVariant fillVariant
 
KoResourcePopupActiongradientAction {nullptr}
 
KisSignalCompressor gradientChangedCompressor
 
QButtonGroup * group {nullptr}
 
SvgMeshPosition meshposition
 
bool noSelectionTrackingMode {false}
 
std::array< boost::optional< KoColor >, 2 > overriddenColorFromProvider
 
KoResourcePopupActionpatternAction {nullptr}
 
KisAcyclicSignalConnector resourceManagerAcyclicConnector
 
KoFillConfigWidget::StyleButton selectedFillIndex {KoFillConfigWidget::None}
 
KisSignalCompressor shapeChangedCompressor
 
QScopedPointer< Ui_KoFillConfigWidget > ui
 

Private Types

enum  StyleButton {
  None = 0 , Solid , Gradient , Pattern ,
  MeshGradient
}
 

Private Slots

void activeGradientChanged ()
 
void colorChanged (std::pair< QColor, KoFlake::FillVariant > resource)
 apply color changes to the selected shape
 
void gradientResourceChanged ()
 
void noColorSelected ()
 
void patternChanged (QSharedPointer< KoShapeBackground > background)
 the pattern of the fill changed, apply the changes
 
void shapeChanged ()
 
void slotCanvasResourceChanged (int key, const QVariant &value)
 
void slotGradientRepeatChanged ()
 
void slotGradientTypeChanged ()
 
void slotMeshGradientChanged ()
 this won't preserve the rows and columns
 
void slotMeshGradientShadingChanged (int index)
 
void slotMeshHandleColorChanged (const KoColor &c)
 
void slotProposeCurrentColorToResourceManager ()
 
void slotRecoverColorInResourceManager ()
 
void slotSavePredefinedGradientClicked ()
 
void slotUpdateFillTitle ()
 
void styleButtonPressed (int buttonId)
 

Private Member Functions

void createNewDefaultMeshGradientBackground ()
 
void createNewMeshGradientBackground ()
 sets the active gradient either from the shape (if present) or creates a new one
 
void loadCurrentFillFromResourceServer ()
 
void setNewGradientBackgroundToShape ()
 
void setNewMeshGradientBackgroundToShape ()
 
void updateGradientSaveButtonAvailability ()
 
void updateGradientUi (const QGradient *gradient)
 
void updateMeshGradientUI ()
 
void updateUiFromFillType (KoShape *shape)
 updates the UI based on KoFlake::FillType it gets from the shape.
 
void updateWidgetComponentVisibility ()
 
- Private Member Functions inherited from Private
 Private (KisCanvas2 *c)
 

Private Attributes

Private *const d {nullptr}
 
- Private Attributes inherited from Private
KisCanvas2canvas
 
int displayedFrame
 
int intendedFrame
 

Detailed Description

A widget for configuring the fill of a shape.

Definition at line 165 of file KoFillConfigWidget.cpp.

Member Enumeration Documentation

◆ StyleButton

Enumerator
None 
Solid 
Gradient 
Pattern 
MeshGradient 

Definition at line 29 of file KoFillConfigWidget.h.

Constructor & Destructor Documentation

◆ KoFillConfigWidget()

KoFillConfigWidget::KoFillConfigWidget ( KoCanvasBase * canvas,
KoFlake::FillVariant fillVariant,
bool trackShapeSelection,
QWidget * parent )
explicit
Parameters
trackShapeSelectioncontrols if the widget connects to the canvas's selectionChanged signal. If you decide to pass 'false', then don't forget to call forceUpdateOnSelectionChanged() manually of every selectionChanged() and selectionContentChanged() signals.

Definition at line 206 of file KoFillConfigWidget.cpp.

207 : QWidget(parent)
208 , d(new Private(fillVariant, this))
209{
210 d->canvas = canvas;
211
212 if (trackShapeSelection) {
213 connect(d->canvas->selectedShapesProxy(), SIGNAL(selectionChanged()), &d->shapeChangedCompressor,
214 SLOT(start()));
215 connect(&d->shapeChangedCompressor, SIGNAL(timeout()), this, SLOT(shapeChanged()));
216 }
217
218 d->resourceManagerAcyclicConnector.connectBackwardResourcePair(
219 d->canvas->resourceManager(), SIGNAL(canvasResourceChanged(int,QVariant)),
220 this, SLOT(slotCanvasResourceChanged(int,QVariant)));
221
222 d->resourceManagerAcyclicConnector.connectForwardVoid(
225
226 KisAcyclicSignalConnector *resetConnector = d->resourceManagerAcyclicConnector.createCoordinatedConnector();
227 resetConnector->connectForwardVoid(
230
231 // configure GUI
232
233 d->ui.reset(new Ui_KoFillConfigWidget());
234 d->ui->setupUi(this);
235
236 d->group = new QButtonGroup(this);
237 d->group->setExclusive(true);
238
239 d->ui->btnNoFill->setIcon(QPixmap((const char **) buttonnone));
240 d->group->addButton(d->ui->btnNoFill, None);
241
242 d->ui->btnSolidFill->setIcon(QPixmap((const char **) buttonsolid));
243 d->group->addButton(d->ui->btnSolidFill, Solid);
244
245 d->ui->btnGradientFill->setIcon(QPixmap((const char **) buttongradient));
246 d->group->addButton(d->ui->btnGradientFill, Gradient);
247
248 d->ui->btnPatternFill->setIcon(QPixmap((const char **) buttonpattern));
249 d->group->addButton(d->ui->btnPatternFill, Pattern);
250 d->ui->btnPatternFill->setVisible(false);
251
252 if (fillVariant == KoFlake::Fill) {
253 // FIXME: different button
254 d->ui->btnMeshFill->setIcon(QPixmap((const char**) buttonpattern));
255 d->group->addButton(d->ui->btnMeshFill, MeshGradient);
256 } else {
257 d->ui->btnMeshFill->setVisible(false);
258 }
259
260 d->colorAction = new KoColorPopupAction(d->ui->btnChooseSolidColor);
261 d->colorAction->setToolTip(i18n("Change the filling color"));
262 d->colorAction->setCurrentColor(Qt::white);
263
264 d->ui->btnChooseSolidColor->setDefaultAction(d->colorAction);
265 d->ui->btnChooseSolidColor->setPopupMode(QToolButton::InstantPopup);
266 d->ui->btnSolidColorSample->setIcon(KisIconUtils::loadIcon("krita_tool_color_sampler"));
267
268 // TODO: for now the color sampling button is disabled!
269 d->ui->btnSolidColorSample->setEnabled(false);
270 d->ui->btnSolidColorSample->setVisible(false);
271
272 connect(d->colorAction, &KoColorPopupAction::colorChanged, [this](KoColor color) {
273 d->colorChangedCompressor.start({color.toQColor(), d->fillVariant});
274 });
275
276 connect(d->ui->btnChooseSolidColor, SIGNAL(iconSizeChanged()), d->colorAction, SLOT(updateIcon()));
277
278 connect(d->group, SIGNAL(idClicked(int)), SLOT(styleButtonPressed(int)));
279
280 connect(d->group, SIGNAL(idClicked(int)), SLOT(slotUpdateFillTitle()));
281
283 styleButtonPressed(d->group->checkedId());
284
285
286 // Gradient selector
287 d->ui->wdgGradientEditor->setCompactMode(true);
288 d->ui->wdgGradientEditor->setCanvasResourcesInterface(canvas->resourceManager()->canvasResourcesInterface());
289 connect(d->ui->wdgGradientEditor, SIGNAL(sigGradientChanged()), &d->gradientChangedCompressor, SLOT(start()));
290 connect(&d->gradientChangedCompressor, SIGNAL(timeout()), SLOT(activeGradientChanged()));
291
292 d->gradientAction = new KoResourcePopupAction(ResourceType::Gradients, canvas->resourceManager()->canvasResourcesInterface(), d->ui->btnChoosePredefinedGradient);
293
294 d->gradientAction->setToolTip(i18n("Change filling gradient"));
295 d->ui->btnChoosePredefinedGradient->setDefaultAction(d->gradientAction);
296 d->ui->btnChoosePredefinedGradient->setPopupMode(QToolButton::InstantPopup);
297
298 connect(d->gradientAction, SIGNAL(resourceSelected(QSharedPointer<KoShapeBackground>)),
300 connect(d->ui->btnChoosePredefinedGradient, SIGNAL(iconSizeChanged()), d->gradientAction, SLOT(updateIcon()));
301
302 d->ui->btnSaveGradient->setIcon(KisIconUtils::loadIcon("document-save"));
303 connect(d->ui->btnSaveGradient, SIGNAL(clicked()), SLOT(slotSavePredefinedGradientClicked()));
304
305 connect(d->ui->cmbGradientRepeat, SIGNAL(currentIndexChanged(int)), SLOT(slotGradientRepeatChanged()));
306 connect(d->ui->cmbGradientType, SIGNAL(currentIndexChanged(int)), SLOT(slotGradientTypeChanged()));
307
308 // meshgradient
309 connect(d->ui->meshStopColorButton, SIGNAL(changed(const KoColor&)), this, SLOT(slotMeshHandleColorChanged(const KoColor&)));
310
311 d->ui->spinbRows->setRange(1, 20);
312 d->ui->spinbColumns->setRange(1, 20);
313 connect(d->ui->spinbRows, SIGNAL(valueChanged(int)), SLOT(slotMeshGradientChanged()));
314 connect(d->ui->spinbColumns, SIGNAL(valueChanged(int)), SLOT(slotMeshGradientChanged()));
315 connect(d->ui->cmbSmoothingType, SIGNAL(currentIndexChanged(int)), SLOT(slotMeshGradientShadingChanged(int)));
316
317 // initialize deactivation locks
318 d->deactivationLocks.push_back(KisAcyclicSignalConnector::Blocker(d->resourceManagerAcyclicConnector));
319
320
321/*
322 // Pattern selector
323 d->patternAction = new KoResourcePopupAction(ResourceType::Patterns, d->colorButton);
324 d->patternAction->setToolTip(i18n("Change the filling pattern"));
325 connect(d->patternAction, SIGNAL(resourceSelected(QSharedPointer<KoShapeBackground>)), this, SLOT(patternChanged(QSharedPointer<KoShapeBackground>)));
326 connect(d->colorButton, SIGNAL(iconSizeChanged()), d->patternAction, SLOT(updateIcon()));
327*/
328
329
330}
static const char *const buttongradient[]
static const char *const buttonsolid[]
static const char *const buttonnone[]
static const char *const buttonpattern[]
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
std::unique_lock< KisAcyclicSignalConnector > Blocker
void connectForwardVoid(QObject *sender, const char *signal, QObject *receiver, const char *method)
KisSelectedShapesProxy selectedShapesProxy
QPointer< KoCanvasResourceProvider > resourceManager
void colorChanged(const KoColor &color)
void sigInternalRequestColorToResourceManager()
void slotCanvasResourceChanged(int key, const QVariant &value)
void sigInternalRecoverColorInResourceManager()
void slotMeshHandleColorChanged(const KoColor &c)
void slotMeshGradientChanged()
this won't preserve the rows and columns
KoFlake::FillVariant fillVariant
void styleButtonPressed(int buttonId)
void slotMeshGradientShadingChanged(int index)
void slotProposeCurrentColorToResourceManager()
QIcon loadIcon(const QString &name)
void updateIcon(QAbstractButton *button)
@ Fill
Definition KoFlake.h:29
const QString Gradients
KisCanvas2 * canvas

References buttongradient, buttonnone, buttonpattern, buttonsolid, Private::canvas, canvas, KoColorPopupAction::colorChanged(), connect(), KisAcyclicSignalConnector::connectForwardVoid(), d, KoFlake::Fill, fillVariant, Gradient, KisIconUtils::loadIcon(), MeshGradient, None, Pattern, KoCanvasBase::resourceManager, KisCanvas2::selectedShapesProxy, shapeChanged(), sigInternalRecoverColorInResourceManager(), sigInternalRequestColorToResourceManager(), slotCanvasResourceChanged(), slotProposeCurrentColorToResourceManager(), slotRecoverColorInResourceManager(), and Solid.

◆ ~KoFillConfigWidget()

KoFillConfigWidget::~KoFillConfigWidget ( )
override

Definition at line 332 of file KoFillConfigWidget.cpp.

333{
334 delete d;
335}

References d.

Member Function Documentation

◆ activate()

void KoFillConfigWidget::activate ( )

Definition at line 337 of file KoFillConfigWidget.cpp.

338{
339 KIS_SAFE_ASSERT_RECOVER_NOOP(!d->deactivationLocks.empty());
340 d->deactivationLocks.clear();
341
342 if (!d->noSelectionTrackingMode) {
343 d->shapeChangedCompressor.start();
344 } else {
346 }
347
349}
#define KIS_SAFE_ASSERT_RECOVER_NOOP(cond)
Definition kis_assert.h:130

References d, KIS_SAFE_ASSERT_RECOVER_NOOP, loadCurrentFillFromResourceServer(), and updateWidgetComponentVisibility().

◆ activeGradientChanged

◆ colorChanged

void KoFillConfigWidget::colorChanged ( std::pair< QColor, KoFlake::FillVariant > resource)
privateslot

apply color changes to the selected shape

Definition at line 518 of file KoFillConfigWidget.cpp.

519{
520 QColor color = resource.first;
521 KoFlake::FillVariant fillVariant = resource.second;
522 if (!color.isValid()) {
523 return;
524 }
525
526 QList<KoShape*> selectedShapes = currentShapes();
527 if (selectedShapes.isEmpty()) {
529 Q_EMIT sigFillChanged();
530 return;
531 }
532
533 d->overriddenColorFromProvider[fillVariant] = boost::none;
534
535 KoShapeFillWrapper wrapper(selectedShapes, fillVariant);
536
537 KUndo2Command *command = wrapper.setColor(color);
538 if (command) {
539 d->canvas->addCommand(command);
540 }
541
542 // only returns true if it is a stroke object that has a 0 for line width
543 if (wrapper.hasZeroLineWidth() ) {
544 KUndo2Command *lineCommand = wrapper.setLineWidth(1.0);
545 if (lineCommand) {
546 d->canvas->addCommand(lineCommand);
547 }
548
549 // * line to test out
550 QColor solidColor = d->colorAction->currentColor();
551 solidColor.setAlpha(255);
552 command = wrapper.setColor(solidColor);
553 if (command) {
554 d->canvas->addCommand(command);
555 }
556
557 }
558
559 Q_EMIT sigFillChanged();
561}
void addCommand(KUndo2Command *command) override
QList< KoShape * > currentShapes()
FillVariant
Definition KoFlake.h:28

References KisCanvas2::addCommand(), Private::canvas, currentShapes(), d, fillVariant, KoShapeFillWrapper::hasZeroLineWidth(), KoShapeFillWrapper::setColor(), KoShapeFillWrapper::setLineWidth(), sigFillChanged(), and sigInternalRequestColorToResourceManager().

◆ createNewDefaultMeshGradientBackground()

void KoFillConfigWidget::createNewDefaultMeshGradientBackground ( )
private

Definition at line 860 of file KoFillConfigWidget.cpp.

861{
862 QList<KoShape*> selectedShapes = currentShapes();
863 if (selectedShapes.isEmpty()) {
864 return;
865 }
866
867 // use this for mesh creation
868 QSizeF maxSize;
869 for (const auto& shape: selectedShapes) {
870 QSizeF size = shape->boundingRect().size();
871 if (size.height() > maxSize.height()) {
872 maxSize.rheight() = size.height();
873 }
874 if (size.width() > maxSize.width()) {
875 maxSize.rwidth() = size.width();
876 }
877 }
878
879 SvgMeshGradient *gradient = new SvgMeshGradient;
880
881 QColor color = d->canvas->resourceManager()->resource(KoFlake::Background).value<KoColor>().toQColor();
882
883 int nrows = d->ui->spinbRows->value();
884 int ncols = d->ui->spinbColumns->value();
885
886 if (d->ui->cmbSmoothingType->currentIndex()) {
888 } else {
890 }
891
892 gradient->getMeshArray()->createDefaultMesh(nrows, ncols, color, maxSize);
894 d->activeMeshGradient.reset(gradient);
895}
void setType(Shading type)
const QScopedPointer< SvgMeshArray > & getMeshArray() const
void setGradientUnits(KoFlake::CoordinateSystem units=KoFlake::UserSpaceOnUse)
int size(const Forest< T > &forest)
Definition KisForest.h:1232
@ Background
the background / fill style is active
Definition KoFlake.h:81

References KoFlake::Background, SvgMeshGradient::BICUBIC, SvgMeshGradient::BILINEAR, Private::canvas, currentShapes(), d, SvgMeshGradient::getMeshArray(), KoFlake::ObjectBoundingBox, KoCanvasBase::resourceManager, SvgMeshGradient::setGradientUnits(), and SvgMeshGradient::setType().

◆ createNewMeshGradientBackground()

void KoFillConfigWidget::createNewMeshGradientBackground ( )
private

sets the active gradient either from the shape (if present) or creates a new one

Definition at line 842 of file KoFillConfigWidget.cpp.

843{
844 QList<KoShape*> selectedShapes = currentShapes();
845 if (selectedShapes.isEmpty()) {
846 return;
847 }
848
849 KoShapeFillWrapper wrapper(selectedShapes, d->fillVariant);
850 const SvgMeshGradient *g = wrapper.meshgradient();
851 if (g) {
852 d->activeMeshGradient.reset(new SvgMeshGradient(*g));
853 } else {
855 }
856
858}
void createNewDefaultMeshGradientBackground()

References createNewDefaultMeshGradientBackground(), currentShapes(), d, KoShapeFillWrapper::meshgradient(), and updateMeshGradientUI().

◆ createShapeStroke()

KoShapeStrokeSP KoFillConfigWidget::createShapeStroke ( )

Definition at line 474 of file KoFillConfigWidget.cpp.

475{
476 KoShapeStrokeSP stroke(new KoShapeStroke());
478
479 switch (d->group->checkedId()) {
481 stroke->setColor(Qt::transparent);
482 break;
484 stroke->setColor(d->colorAction->currentColor());
485 break;
487 QScopedPointer<QGradient> g(d->activeGradient->toQGradient());
488 QBrush newBrush = *g;
489 stroke->setLineBrush(newBrush);
490 stroke->setColor(Qt::transparent);
491 break;
492 }
494 break;
495 }
496
497 return stroke;
498}
#define KIS_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:85
@ StrokeFill
Definition KoFlake.h:30

References d, Gradient, KIS_ASSERT_RECOVER_RETURN_VALUE, None, Pattern, Solid, and KoFlake::StrokeFill.

◆ currentShapes()

QList< KoShape * > KoFillConfigWidget::currentShapes ( )

Returns the list of the selected shape If you need to use only one shape, call currentShape()

Definition at line 421 of file KoFillConfigWidget.cpp.

422{
424}
KoSelection * selection() override
const QList< KoShape * > selectedEditableShapes() const

References Private::canvas, d, KoSelection::selectedEditableShapes(), KisCanvas2::selectedShapesProxy, and KisSelectedShapesProxy::selection().

◆ deactivate()

void KoFillConfigWidget::deactivate ( )

Definition at line 351 of file KoFillConfigWidget.cpp.

352{
354
355 KIS_SAFE_ASSERT_RECOVER_NOOP(d->deactivationLocks.empty());
356 d->deactivationLocks.push_back(KisAcyclicSignalConnector::Blocker(d->resourceManagerAcyclicConnector));
357}

References d, KIS_SAFE_ASSERT_RECOVER_NOOP, and sigInternalRecoverColorInResourceManager().

◆ forceUpdateOnSelectionChanged()

void KoFillConfigWidget::forceUpdateOnSelectionChanged ( )

Definition at line 359 of file KoFillConfigWidget.cpp.

360{
361 d->shapeChangedCompressor.start();
362}

References d.

◆ gradientResourceChanged

void KoFillConfigWidget::gradientResourceChanged ( )
privateslot

Definition at line 682 of file KoFillConfigWidget.cpp.

683{
685 qSharedPointerDynamicCast<KoGradientBackground>(
686 d->gradientAction->currentBackground());
687
688 updateGradientUi(bg->gradient());
689
692}
void updateGradientUi(const QGradient *gradient)

References d, setNewGradientBackgroundToShape(), updateGradientSaveButtonAvailability(), and updateGradientUi().

◆ loadCurrentFillFromResourceServer()

void KoFillConfigWidget::loadCurrentFillFromResourceServer ( )
private

Definition at line 824 of file KoFillConfigWidget.cpp.

825{
826 {
827 KoColor color = d->canvas->resourceManager()->foregroundColor();
828 if (d->group->checkedId() == -1 || d->group->checkedId() == None) {
829 d->group->button(Solid)->setChecked(true);
830 }
831 d->selectedFillIndex = Solid;
832 d->colorAction->setCurrentColor(color);
833 }
834
835 Q_FOREACH (QAbstractButton *button, d->group->buttons()) {
836 button->setEnabled(true);
837 }
838
839 Q_EMIT sigFillChanged();
840}
QString button(const QWheelEvent &ev)

References button(), Private::canvas, d, None, KoCanvasBase::resourceManager, sigFillChanged(), and Solid.

◆ noColorSelected

void KoFillConfigWidget::noColorSelected ( )
privateslot

Definition at line 500 of file KoFillConfigWidget.cpp.

501{
502 QList<KoShape*> selectedShapes = currentShapes();
503 if (selectedShapes.isEmpty()) {
504 Q_EMIT sigFillChanged();
505 return;
506 }
507
508 KoShapeFillWrapper wrapper(selectedShapes, d->fillVariant);
509 KUndo2Command *command = wrapper.setColor(QColor());
510
511 if (command) {
512 d->canvas->addCommand(command);
513 }
514
515 Q_EMIT sigFillChanged();
516}

References KisCanvas2::addCommand(), Private::canvas, currentShapes(), d, KoShapeFillWrapper::setColor(), and sigFillChanged().

◆ patternChanged

void KoFillConfigWidget::patternChanged ( QSharedPointer< KoShapeBackground > background)
privateslot

the pattern of the fill changed, apply the changes

Definition at line 765 of file KoFillConfigWidget.cpp.

766{
767 Q_UNUSED(background);
768
769#if 0
770 QSharedPointer<KoPatternBackground> patternBackground = qSharedPointerDynamicCast<KoPatternBackground>(background);
771 if (! patternBackground) {
772 return;
773 }
774
775 QList<KoShape*> selectedShapes = currentShapes();
776 if (selectedShapes.isEmpty()) {
777 return;
778 }
779
781 fill->setPattern(patternBackground->pattern());
782 d->canvas->addCommand(new KoShapeBackgroundCommand(selectedShapes, fill));
783
784#endif
785}
A pattern shape background.
The undo / redo command for setting the shape background.

References KisCanvas2::addCommand(), Private::canvas, currentShapes(), and d.

◆ Private()

KoFillConfigWidget::Private ( KoFlake::FillVariant _fillVariant,
KoFillConfigWidget * q )
inline

Definition at line 168 of file KoFillConfigWidget.cpp.

169 : canvas(0),
173 fillVariant(_fillVariant),
175 {
176 }
KisSignalCompressorWithParam< std::pair< QColor, KoFlake::FillVariant > > colorChangedCompressor
void colorChanged(std::pair< QColor, KoFlake::FillVariant > resource)
apply color changes to the selected shape
KisSignalCompressor gradientChangedCompressor
KisSignalCompressor shapeChangedCompressor

◆ selectedFillIndex()

int KoFillConfigWidget::selectedFillIndex ( )

returns the selected index of the fill type

◆ setNewGradientBackgroundToShape()

void KoFillConfigWidget::setNewGradientBackgroundToShape ( )
private

Definition at line 728 of file KoFillConfigWidget.cpp.

729{
730 QList<KoShape*> selectedShapes = currentShapes();
731 if (selectedShapes.isEmpty()) {
732 Q_EMIT sigFillChanged();
733 return;
734 }
735
736 KoShapeFillWrapper wrapper(selectedShapes, d->fillVariant);
737 QScopedPointer<QGradient> srcQGradient(d->activeGradient->toQGradient());
738 KUndo2Command *command = wrapper.applyGradientStopsOnly(srcQGradient.data());
739
740 if (command) {
741 d->canvas->addCommand(command);
742 }
743
744 Q_EMIT sigFillChanged();
745}

References KisCanvas2::addCommand(), KoShapeFillWrapper::applyGradientStopsOnly(), Private::canvas, currentShapes(), d, and sigFillChanged().

◆ setNewMeshGradientBackgroundToShape()

void KoFillConfigWidget::setNewMeshGradientBackgroundToShape ( )
private

Definition at line 897 of file KoFillConfigWidget.cpp.

898{
899 QList<KoShape*> selectedShapes = currentShapes();
900 // if called by "manager"
901 if (selectedShapes.isEmpty()) {
902 Q_EMIT sigFillChanged();
903 return;
904 }
905
906 KoShapeFillWrapper wrapper(selectedShapes, d->fillVariant);
907
908 KUndo2Command *command = wrapper.setMeshGradient(d->activeMeshGradient.data(), QTransform());
909 if (command) {
910 d->canvas->addCommand(command);
911 }
912
913 Q_EMIT sigFillChanged();
914}

References KisCanvas2::addCommand(), Private::canvas, currentShapes(), d, KoShapeFillWrapper::setMeshGradient(), and sigFillChanged().

◆ setNoSelectionTrackingMode()

void KoFillConfigWidget::setNoSelectionTrackingMode ( bool value)

Definition at line 370 of file KoFillConfigWidget.cpp.

371{
372 d->noSelectionTrackingMode = value;
373 if (!d->noSelectionTrackingMode) {
374 d->shapeChangedCompressor.start();
375 }
376}
float value(const T *src, size_t ch)

References d, and value().

◆ setSelectedMeshGradientHandle()

void KoFillConfigWidget::setSelectedMeshGradientHandle ( const SvgMeshPosition & position)

Definition at line 364 of file KoFillConfigWidget.cpp.

365{
366 d->meshposition = position;
368}

References d, and updateMeshGradientUI().

◆ shapeChanged

void KoFillConfigWidget::shapeChanged ( )
privateslot

Definition at line 942 of file KoFillConfigWidget.cpp.

943{
944 if (d->noSelectionTrackingMode) return;
945
947
948 bool shouldUploadColorToResourceManager = false;
949
950 // Disable the buttons if there aren't any selected shapes or we have a several shapes with different
951 // gradient backgrounds.
952 if (shapes.isEmpty() ||
953 (shapes.size() > 1 && KoShapeFillWrapper(shapes, d->fillVariant).isMixedFill())) {
954
955 Q_FOREACH (QAbstractButton *button, d->group->buttons()) {
956 button->setEnabled(!shapes.isEmpty());
957 }
958 } else {
959 // only one vector object selected
960 Q_FOREACH (QAbstractButton *button, d->group->buttons()) {
961 button->setEnabled(true);
962 }
963
964 // update active index of shape
965 KoShape *shape = shapes.first();
966 updateUiFromFillType(shape); // updates tool options fields
967
968 shouldUploadColorToResourceManager = true;
969 }
970
971 // updates the UI
972 d->group->button(d->selectedFillIndex)->setChecked(true);
973
976
977 if (shouldUploadColorToResourceManager) {
979 } else {
981 }
982}
void updateUiFromFillType(KoShape *shape)
updates the UI based on KoFlake::FillType it gets from the shape.

References button(), currentShapes(), d, KoShapeFillWrapper::isMixedFill(), sigInternalRecoverColorInResourceManager(), sigInternalRequestColorToResourceManager(), slotUpdateFillTitle(), updateUiFromFillType(), and updateWidgetComponentVisibility().

◆ sigFillChanged

void KoFillConfigWidget::sigFillChanged ( )
signal

◆ sigInternalRecoverColorInResourceManager

void KoFillConfigWidget::sigInternalRecoverColorInResourceManager ( )
signal

◆ sigInternalRequestColorToResourceManager

void KoFillConfigWidget::sigInternalRequestColorToResourceManager ( )
signal

◆ sigMeshGradientResetted

void KoFillConfigWidget::sigMeshGradientResetted ( )
signal

◆ slotCanvasResourceChanged

void KoFillConfigWidget::slotCanvasResourceChanged ( int key,
const QVariant & value )
privateslot

Definition at line 385 of file KoFillConfigWidget.cpp.

386{
389
390 KoColor color = value.value<KoColor>();
391
392 const int checkedId = d->group->checkedId();
393
394 if (checkedId < 0 || checkedId == None || checkedId == Solid) {
395
396 d->group->button(Solid)->setChecked(true);
397 d->selectedFillIndex = Solid;
398
402
403 if (key == d->fillVariant) {
404 d->colorAction->setCurrentColor(color);
405 }
406 colorChanged({color.toQColor(), colorSlot});
407 } else if (checkedId == Gradient && key == KoCanvasResource::ForegroundColor) {
408 d->ui->wdgGradientEditor->notifyGlobalColorChanged(color);
409 }
410 } else if (key == KoCanvasResource::CurrentGradient) {
411 KoResourceSP gradient = value.value<KoAbstractGradientSP>();
412 const int checkedId = d->group->checkedId();
413
414 if (gradient && (checkedId < 0 || checkedId == None || checkedId == Gradient)) {
415 d->group->button(Gradient)->setChecked(true);
416 d->gradientAction->setCurrentResource(gradient);
417 }
418 }
419}
void toQColor(QColor *c) const
a convenience method for the above.
Definition KoColor.cpp:198
@ BackgroundColor
The active background color selected for this canvas.
@ ForegroundColor
The active foreground color selected for this canvas.

References KoCanvasResource::BackgroundColor, colorChanged(), KoCanvasResource::CurrentGradient, d, KoFlake::Fill, KoCanvasResource::ForegroundColor, Gradient, None, Solid, KoFlake::StrokeFill, KoColor::toQColor(), and value().

◆ slotGradientRepeatChanged

void KoFillConfigWidget::slotGradientRepeatChanged ( )
privateslot

Definition at line 704 of file KoFillConfigWidget.cpp.

705{
706 QGradient::Spread spread =
707 QGradient::Spread(d->ui->cmbGradientRepeat->currentIndex());
708
709 d->activeGradient->setSpread(spread);
711}

References activeGradientChanged(), and d.

◆ slotGradientTypeChanged

void KoFillConfigWidget::slotGradientTypeChanged ( )
privateslot

Definition at line 694 of file KoFillConfigWidget.cpp.

695{
696 QGradient::Type type =
697 d->ui->cmbGradientType->currentIndex() == 0 ?
698 QGradient::LinearGradient : QGradient::RadialGradient;
699
700 d->activeGradient->setType(type);
702}

References activeGradientChanged(), and d.

◆ slotMeshGradientChanged

void KoFillConfigWidget::slotMeshGradientChanged ( )
privateslot

◆ slotMeshGradientShadingChanged

void KoFillConfigWidget::slotMeshGradientShadingChanged ( int index)
privateslot

Definition at line 795 of file KoFillConfigWidget.cpp.

796{
797 d->activeMeshGradient->setType(static_cast<SvgMeshGradient::Shading>(index));
799}

References d, and setNewMeshGradientBackgroundToShape().

◆ slotMeshHandleColorChanged

void KoFillConfigWidget::slotMeshHandleColorChanged ( const KoColor & c)
privateslot

Definition at line 801 of file KoFillConfigWidget.cpp.

802{
803 QList<KoShape*> selectedShapes = currentShapes();
804 KIS_SAFE_ASSERT_RECOVER_RETURN(!selectedShapes.isEmpty());
805
806 KoShapeFillWrapper wrapper(selectedShapes, d->fillVariant);
807 const SvgMeshGradient *gradient = wrapper.meshgradient();
808
809 // if we changed the handle, the gradient *has* to exist
811
812 if (d->meshposition.isValid()) {
813 // We don't have any signals firing when we change the structure (i.e position of stops etc) of a
814 // meshgradient. So, activeMeshGradient isn't updated when this happens. Hence we update it here and
815 // then modify the color.
816 d->activeMeshGradient.reset(new SvgMeshGradient(*gradient));
817
818 d->activeMeshGradient->getMeshArray()->modifyColor(d->meshposition, c.toQColor());
820 }
821 return;
822}
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128

References currentShapes(), d, KIS_SAFE_ASSERT_RECOVER_RETURN, KoShapeFillWrapper::meshgradient(), setNewMeshGradientBackgroundToShape(), and KoColor::toQColor().

◆ slotProposeCurrentColorToResourceManager

void KoFillConfigWidget::slotProposeCurrentColorToResourceManager ( )
privateslot

Don't let opacity leak to our resource manager system

NOTE: theoretically, we could guarantee it on a level of the resource manager itself,

Definition at line 563 of file KoFillConfigWidget.cpp.

564{
565 const int checkedId = d->group->checkedId();
566
567 auto uploadColorToResourceManager = [this](KoCanvasResource::CanvasResourceId res,
568 KoFlake::FillVariant var, KoColor &color) {
569 if (!d->overriddenColorFromProvider[var]) {
570 d->overriddenColorFromProvider[var] =
571 d->canvas->resourceManager()->resource(res).value<KoColor>();
572 }
573
581 d->canvas->resourceManager()->setResource(res, QVariant::fromValue(color));
582 };
583
584 auto uploadColorFromShape = [&](KoCanvasResource::CanvasResourceId res, KoFlake::FillVariant fill) {
585 KoShapeFillWrapper wrapper(currentShapes(), fill);
586 if (!wrapper.color().isValid()) {
587 return;
588 }
589 KoColor color;
590 color.fromQColor(wrapper.color());
591 uploadColorToResourceManager(res, fill, color);
592 };
593
594 if (checkedId == Solid) {
595 if (currentShapes().isEmpty()) {
599 KoColor color = d->colorAction->currentKoColor();
600 uploadColorToResourceManager(res, d->fillVariant, color);
601 } else {
604 }
605 } else if (checkedId == Gradient) {
606 if (boost::optional<KoColor> gradientColor =
607 d->ui->wdgGradientEditor->currentActiveStopColor()) {
608 KoColor color = *gradientColor;
612 uploadColorToResourceManager(res, d->fillVariant, color);
613 }
614 }
615}
const quint8 OPACITY_OPAQUE_U8
void setOpacity(quint8 alpha)
Definition KoColor.cpp:333
void fromQColor(const QColor &c)
Convenient function for converting from a QColor.
Definition KoColor.cpp:213

References KoCanvasResource::BackgroundColor, Private::canvas, KoShapeFillWrapper::color(), currentShapes(), d, KoFlake::Fill, KoCanvasResource::ForegroundColor, KoColor::fromQColor(), Gradient, OPACITY_OPAQUE_U8, KoCanvasBase::resourceManager, KoColor::setOpacity(), Solid, and KoFlake::StrokeFill.

◆ slotRecoverColorInResourceManager

void KoFillConfigWidget::slotRecoverColorInResourceManager ( )
privateslot

Definition at line 617 of file KoFillConfigWidget.cpp.

618{
619 auto checkAndRecover = [this](KoCanvasResource::CanvasResourceId res,
621 if (d->overriddenColorFromProvider[var]) {
622 d->canvas->resourceManager()->setResource(
623 res, QVariant::fromValue(*d->overriddenColorFromProvider[var]));
624 d->overriddenColorFromProvider[var] = boost::none;
625 }
626 };
627
630}

References KoCanvasResource::BackgroundColor, Private::canvas, d, KoFlake::Fill, KoCanvasResource::ForegroundColor, KoCanvasBase::resourceManager, and KoFlake::StrokeFill.

◆ slotSavePredefinedGradientClicked

void KoFillConfigWidget::slotSavePredefinedGradientClicked ( )
privateslot

Definition at line 632 of file KoFillConfigWidget.cpp.

633{
635 auto server = serverProvider->gradientServer();
636
637 const QString defaultGradientNamePrefix = i18nc("default prefix for the saved gradient", "gradient");
638 const QString saveLocation = server->saveLocation();
639
640 QString name = d->activeGradient->name().isEmpty() ? defaultGradientNamePrefix : d->activeGradient->name();
641 QFileInfo fileInfo(saveLocation + name.split(" ").join("_") + d->activeGradient->defaultFileExtension());
642 bool fileOverWriteAccepted = false;
643
644 while(!fileOverWriteAccepted) {
645 name = QInputDialog::getText(this,
646 i18nc("@title:window", "Save Gradient"),
647 i18n("Enter gradient name:"),
648 QLineEdit::Normal, name);
649 if (name.isNull() || name.isEmpty()) {
650 return;
651 } else {
652 fileInfo = QFileInfo(saveLocation + name.split(" ").join("_") + d->activeGradient->defaultFileExtension());
653 if (fileInfo.exists()) {
654 int res = QMessageBox::warning(this, i18nc("@title:window", "Name Already Exists")
655 , i18n("The name '%1' already exists, do you wish to overwrite it?", name)
656 , QMessageBox::Yes | QMessageBox::No);
657 if (res == QMessageBox::Yes) fileOverWriteAccepted = true;
658 } else {
659 fileOverWriteAccepted = true;
660 }
661 }
662 }
663
664 d->activeGradient->setName(name);
665 d->activeGradient->setFilename(name.split(" ").join("_") + d->activeGradient->defaultFileExtension());
666
667 KoAbstractGradientSP newGradient = d->activeGradient->clone().dynamicCast<KoAbstractGradient>();
668
670
671 d->gradientAction->setCurrentResource(newGradient);
672}
static bool addResourceWithUserInput(QWidget *widgetParent, KoResourceSP resource, QString storageLocation="")
const char * name(StandardAction id)
static KoResourceServerProvider * instance()
KoResourceServer< KoAbstractGradient > * gradientServer

References KisResourceUserOperations::addResourceWithUserInput(), d, KoResourceServerProvider::gradientServer, and KoResourceServerProvider::instance().

◆ slotUpdateFillTitle

void KoFillConfigWidget::slotUpdateFillTitle ( )
privateslot

Definition at line 378 of file KoFillConfigWidget.cpp.

379{
380 QString text = d->group->checkedButton() ? d->group->checkedButton()->text() : QString();
381 text.replace('&', QString());
382 d->ui->lblFillTitle->setText(text);
383}

References d.

◆ styleButtonPressed

void KoFillConfigWidget::styleButtonPressed ( int buttonId)
privateslot

Definition at line 430 of file KoFillConfigWidget.cpp.

431{
433
434 switch (buttonId) {
437 break;
439 colorChanged({d->colorAction->currentColor(), d->fillVariant});
440 break;
442 if (d->activeGradient) {
445 } else {
447 }
448 break;
450 // Only select mode in the widget, don't set actual pattern :/
451 //d->colorButton->setDefaultAction(d->patternAction);
452 //patternChanged(d->patternAction->currentBackground());
453 break;
455 if (d->activeMeshGradient) {
457 } else {
460 }
461 break;
462 }
463
464
465 // update tool option fields with first selected object
466 if (shapes.isEmpty() == false) {
467 KoShape *firstShape = shapes.first();
468 updateUiFromFillType(firstShape);
469 }
470
472}
void createNewMeshGradientBackground()
sets the active gradient either from the shape (if present) or creates a new one

References colorChanged(), createNewMeshGradientBackground(), currentShapes(), d, Gradient, gradientResourceChanged(), MeshGradient, noColorSelected(), None, Pattern, setNewGradientBackgroundToShape(), setNewMeshGradientBackgroundToShape(), Solid, updateGradientSaveButtonAvailability(), updateUiFromFillType(), and updateWidgetComponentVisibility().

◆ updateGradientSaveButtonAvailability()

void KoFillConfigWidget::updateGradientSaveButtonAvailability ( )
private

Definition at line 747 of file KoFillConfigWidget.cpp.

748{
749 bool savingEnabled = false;
750
751 QScopedPointer<QGradient> currentGradient(d->activeGradient->toQGradient());
752 QSharedPointer<KoShapeBackground> bg = d->gradientAction->currentBackground();
753 if (bg) {
754 QSharedPointer<KoGradientBackground> resourceBackground =
755 qSharedPointerDynamicCast<KoGradientBackground>(bg);
756
757 savingEnabled = resourceBackground->gradient()->stops() != currentGradient->stops();
758 savingEnabled |= resourceBackground->gradient()->type() != currentGradient->type();
759 savingEnabled |= resourceBackground->gradient()->spread() != currentGradient->spread();
760 }
761
762 d->ui->btnSaveGradient->setEnabled(savingEnabled);
763}

References d.

◆ updateGradientUi()

void KoFillConfigWidget::updateGradientUi ( const QGradient * gradient)
private

Definition at line 713 of file KoFillConfigWidget.cpp.

714{
715 KisSignalsBlocker b1(d->ui->wdgGradientEditor,
716 d->ui->cmbGradientType,
717 d->ui->cmbGradientRepeat);
718
719 d->ui->wdgGradientEditor->setGradient(0);
720
721 d->activeGradient = KoStopGradient::fromQGradient(gradient);
722
723 d->ui->wdgGradientEditor->setGradient(d->activeGradient);
724 d->ui->cmbGradientType->setCurrentIndex(d->activeGradient->type() != QGradient::LinearGradient);
725 d->ui->cmbGradientRepeat->setCurrentIndex(int(d->activeGradient->spread()));
726}
static QSharedPointer< KoStopGradient > fromQGradient(const QGradient *gradient)
Creates KoStopGradient from a QGradient.

References d, and KoStopGradient::fromQGradient().

◆ updateMeshGradientUI()

void KoFillConfigWidget::updateMeshGradientUI ( )
private

Definition at line 916 of file KoFillConfigWidget.cpp.

917{
918 if (!d->activeMeshGradient) return;
919
920 KisSignalsBlocker b(d->ui->spinbRows,
921 d->ui->spinbColumns,
922 d->ui->cmbSmoothingType,
923 d->ui->meshStopColorButton);
924
925 SvgMeshArray *mesharray = d->activeMeshGradient->getMeshArray().data();
926 d->ui->spinbRows->setValue(mesharray->numRows());
927 d->ui->spinbColumns->setValue(mesharray->numColumns());
928 d->ui->cmbSmoothingType->setCurrentIndex(d->activeMeshGradient->type());
929 if (d->meshposition.isValid()) {
930 QColor qc = d->activeMeshGradient->getMeshArray()->getStop(d->meshposition).color;
931
932 KoColor c = d->ui->meshStopColorButton->color();
933 c.fromQColor(qc);
934
935 d->ui->meshStopColorButton->setColor(c);
936 d->ui->meshStopColorButton->setDisabled(false);
937 } else {
938 d->ui->meshStopColorButton->setDisabled(true);
939 }
940}
int numRows() const
int numColumns() const

References d, KoColor::fromQColor(), SvgMeshArray::numColumns(), and SvgMeshArray::numRows().

◆ updateUiFromFillType()

void KoFillConfigWidget::updateUiFromFillType ( KoShape * shape)
private

updates the UI based on KoFlake::FillType it gets from the shape.

Definition at line 984 of file KoFillConfigWidget.cpp.

985{
987 KoShapeFillWrapper wrapper(shape, d->fillVariant);
988
989 switch (wrapper.type()) {
990 case KoFlake::None:
991 d->selectedFillIndex = KoFillConfigWidget::None;
992 break;
993 case KoFlake::Solid: {
994 d->selectedFillIndex = KoFillConfigWidget::Solid;
995 QColor color = wrapper.color();
996 if (color.alpha() > 0) {
997 d->colorAction->setCurrentColor(wrapper.color());
998 }
999 break;
1000 }
1001 case KoFlake::Gradient:
1002 d->selectedFillIndex = KoFillConfigWidget::Gradient;
1003 updateGradientUi(wrapper.gradient());
1005 break;
1006 case KoFlake::Pattern:
1007 d->selectedFillIndex = KoFillConfigWidget::Pattern;
1008 break;
1010 d->selectedFillIndex = KoFillConfigWidget::MeshGradient;
1012 break;
1013 }
1014}
@ None
Definition KoFlake.h:34
@ Pattern
Definition KoFlake.h:37
@ Solid
Definition KoFlake.h:35
@ MeshGradient
Definition KoFlake.h:38
@ Gradient
Definition KoFlake.h:36

References KoShapeFillWrapper::color(), createNewMeshGradientBackground(), d, KoFlake::Gradient, KoShapeFillWrapper::gradient(), Gradient, KIS_SAFE_ASSERT_RECOVER_RETURN, KoFlake::MeshGradient, MeshGradient, KoFlake::None, None, KoFlake::Pattern, Pattern, KoFlake::Solid, Solid, KoShapeFillWrapper::type(), updateGradientSaveButtonAvailability(), and updateGradientUi().

◆ updateWidgetComponentVisibility()

void KoFillConfigWidget::updateWidgetComponentVisibility ( )
private

Definition at line 1017 of file KoFillConfigWidget.cpp.

1018{
1019 // The UI is showing/hiding things like this because the 'stacked widget' isn't very flexible
1020 // and makes it difficult to put anything underneath it without a lot empty space
1021
1022 // hide everything first
1023 d->ui->wdgGradientEditor->setVisible(false);
1024 d->ui->btnChoosePredefinedGradient->setVisible(false);
1025 d->ui->btnChooseSolidColor->setVisible(false);
1026 d->ui->typeLabel->setVisible(false);
1027 d->ui->repeatLabel->setVisible(false);
1028 d->ui->cmbGradientRepeat->setVisible(false);
1029 d->ui->cmbGradientType->setVisible(false);
1030 d->ui->btnSolidColorSample->setVisible(false);
1031 d->ui->btnSaveGradient->setVisible(false);
1032 d->ui->gradientTypeLine->setVisible(false);
1033 d->ui->soldStrokeColorLabel->setVisible(false);
1034 d->ui->presetLabel->setVisible(false);
1035 d->ui->stopColorLabel->setVisible(false);
1036 d->ui->meshStopColorButton->setVisible(false);
1037 d->ui->rowsLabel->setVisible(false);
1038 d->ui->spinbRows->setVisible(false);
1039 d->ui->columnsLabel->setVisible(false);
1040 d->ui->spinbColumns->setVisible(false);
1041 d->ui->smoothingTypeLabel->setVisible(false);
1042 d->ui->cmbSmoothingType->setVisible(false);
1043
1044 // keep options hidden if no vector shapes are selected
1045 if(currentShapes().isEmpty()) {
1046 return;
1047 }
1048
1049
1050 switch (d->selectedFillIndex) {
1052 break;
1054 d->ui->btnChooseSolidColor->setVisible(true);
1055 d->ui->btnSolidColorSample->setVisible(false);
1056 d->ui->soldStrokeColorLabel->setVisible(true);
1057 break;
1059 d->ui->wdgGradientEditor->setVisible(true);
1060 d->ui->btnChoosePredefinedGradient->setVisible(true);
1061 d->ui->typeLabel->setVisible(true);
1062 d->ui->repeatLabel->setVisible(true);
1063 d->ui->cmbGradientRepeat->setVisible(true);
1064 d->ui->cmbGradientType->setVisible(true);
1065 d->ui->btnSaveGradient->setVisible(true);
1066 d->ui->gradientTypeLine->setVisible(true);
1067 d->ui->presetLabel->setVisible(true);
1068 break;
1070 break;
1072 d->ui->stopColorLabel->setVisible(true);
1073 d->ui->meshStopColorButton->setVisible(true);
1074 d->ui->rowsLabel->setVisible(true);
1075 d->ui->spinbRows->setVisible(true);
1076 d->ui->columnsLabel->setVisible(true);
1077 d->ui->spinbColumns->setVisible(true);
1078 d->ui->smoothingTypeLabel->setVisible(true);
1079 d->ui->cmbSmoothingType->setVisible(true);
1080 d->ui->meshStopColorButton->setAlphaChannelEnabled(true);
1081 break;
1082 }
1083
1084}

References currentShapes(), d, Gradient, MeshGradient, None, Pattern, and Solid.

Member Data Documentation

◆ activeGradient

KoStopGradientSP KoFillConfigWidget::activeGradient

Definition at line 189 of file KoFillConfigWidget.cpp.

◆ activeMeshGradient

QScopedPointer<SvgMeshGradient> KoFillConfigWidget::activeMeshGradient

Definition at line 197 of file KoFillConfigWidget.cpp.

◆ canvas

KoCanvasBase* KoFillConfigWidget::canvas {nullptr}

Definition at line 183 of file KoFillConfigWidget.cpp.

183{nullptr};

◆ colorAction

KoColorPopupAction* KoFillConfigWidget::colorAction {nullptr}

Definition at line 178 of file KoFillConfigWidget.cpp.

178{nullptr};

◆ colorChangedCompressor

KisSignalCompressorWithParam<std::pair<QColor, KoFlake::FillVariant> > KoFillConfigWidget::colorChangedCompressor

Definition at line 185 of file KoFillConfigWidget.cpp.

◆ d

Private* const KoFillConfigWidget::d {nullptr}
private

Definition at line 125 of file KoFillConfigWidget.h.

125{nullptr};

◆ deactivationLocks

std::vector<KisAcyclicSignalConnector::Blocker> KoFillConfigWidget::deactivationLocks

Definition at line 201 of file KoFillConfigWidget.cpp.

◆ fillVariant

KoFlake::FillVariant KoFillConfigWidget::fillVariant

Definition at line 192 of file KoFillConfigWidget.cpp.

◆ gradientAction

KoResourcePopupAction* KoFillConfigWidget::gradientAction {nullptr}

Definition at line 179 of file KoFillConfigWidget.cpp.

179{nullptr};

◆ gradientChangedCompressor

KisSignalCompressor KoFillConfigWidget::gradientChangedCompressor

Definition at line 190 of file KoFillConfigWidget.cpp.

◆ group

QButtonGroup* KoFillConfigWidget::group {nullptr}

Definition at line 181 of file KoFillConfigWidget.cpp.

181{nullptr};

◆ meshposition

SvgMeshPosition KoFillConfigWidget::meshposition

Definition at line 196 of file KoFillConfigWidget.cpp.

◆ noSelectionTrackingMode

bool KoFillConfigWidget::noSelectionTrackingMode {false}

Definition at line 194 of file KoFillConfigWidget.cpp.

194{false};

◆ overriddenColorFromProvider

std::array<boost::optional<KoColor>, 2> KoFillConfigWidget::overriddenColorFromProvider

Definition at line 203 of file KoFillConfigWidget.cpp.

◆ patternAction

KoResourcePopupAction* KoFillConfigWidget::patternAction {nullptr}

Definition at line 180 of file KoFillConfigWidget.cpp.

180{nullptr};

◆ resourceManagerAcyclicConnector

KisAcyclicSignalConnector KoFillConfigWidget::resourceManagerAcyclicConnector

Definition at line 186 of file KoFillConfigWidget.cpp.

◆ selectedFillIndex

int KoFillConfigWidget::selectedFillIndex {KoFillConfigWidget::None}

Definition at line 187 of file KoFillConfigWidget.cpp.

◆ shapeChangedCompressor

KisSignalCompressor KoFillConfigWidget::shapeChangedCompressor

Definition at line 191 of file KoFillConfigWidget.cpp.

◆ ui

QScopedPointer<Ui_KoFillConfigWidget> KoFillConfigWidget::ui

Definition at line 199 of file KoFillConfigWidget.cpp.


The documentation for this class was generated from the following files: