Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_liquify_properties.cpp File Reference
#include "kis_liquify_properties.h"
#include <QDomElement>
#include <kconfig.h>
#include <kconfiggroup.h>
#include <ksharedconfig.h>
#include "kis_debug.h"
#include "kis_dom_utils.h"

Go to the source code of this file.

Functions

qreal defaultAmountForMode (KisLiquifyProperties::LiquifyMode mode)
 
QString liquifyModeString (KisLiquifyProperties::LiquifyMode mode)
 
QDebug operator<< (QDebug dbg, const KisLiquifyProperties &props)
 

Function Documentation

◆ defaultAmountForMode()

◆ liquifyModeString()

QString liquifyModeString ( KisLiquifyProperties::LiquifyMode mode)

Definition at line 81 of file kis_liquify_properties.cpp.

82{
83 QString result;
84
85 switch (mode) {
87 result = "Move";
88 break;
90 result = "Scale";
91 break;
93 result = "Rotate";
94 break;
96 result = "Offset";
97 break;
99 result = "Undo";
100 break;
102 result = "RestoreShape";
103 break;
105 qFatal("Unsupported mode");
106 }
107
108 return QString("LiquifyTool/%1").arg(result);
109}

References KisLiquifyProperties::MOVE, KisLiquifyProperties::N_MODES, KisLiquifyProperties::OFFSET, KisLiquifyProperties::RESTORE_SHAPE, KisLiquifyProperties::ROTATE, KisLiquifyProperties::SCALE, and KisLiquifyProperties::UNDO.

◆ operator<<()

QDebug operator<< ( QDebug dbg,
const KisLiquifyProperties & props )

Definition at line 242 of file kis_liquify_properties.cpp.

243{
244 dbg.nospace() << "\nKisLiquifyProperties(";
245 dbg.space() << "\n " << ppVar(props.mode());
246 dbg.space() << "\n " << ppVar(props.size());
247 dbg.space() << "\n " << ppVar(props.amount());
248 dbg.space() << "\n " << ppVar(props.spacing());
249 dbg.space() << "\n " << ppVar(props.sizeHasPressure());
250 dbg.space() << "\n " << ppVar(props.amountHasPressure());
251 dbg.space() << "\n " << ppVar(props.reverseDirection());
252 dbg.space() << "\n " << ppVar(props.useWashMode());
253 dbg.space() << "\n " << ppVar(props.flow());
254 dbg.space() << "\n " << ppVar(props.preserveShapeRotation());
255 dbg.space() << "\n " << ppVar(props.preserveShapeScale());
256 dbg.space() << "\n " << ppVar(props.preserveShapeStretch());
257 dbg.space() << "\n );\n";
258 return dbg.nospace();
259}
#define ppVar(var)
Definition kis_debug.h:159

References KisLiquifyProperties::amount(), KisLiquifyProperties::amountHasPressure(), KisLiquifyProperties::flow(), KisLiquifyProperties::mode(), ppVar, KisLiquifyProperties::preserveShapeRotation(), KisLiquifyProperties::preserveShapeScale(), KisLiquifyProperties::preserveShapeStretch(), KisLiquifyProperties::reverseDirection(), KisLiquifyProperties::size(), KisLiquifyProperties::sizeHasPressure(), KisLiquifyProperties::spacing(), and KisLiquifyProperties::useWashMode().