12#include <kconfiggroup.h>
13#include <ksharedconfig.h>
102 result =
"RestoreShape";
105 qFatal(
"Unsupported mode");
108 return QString(
"LiquifyTool/%1").arg(result);
123 qFatal(
"Unsupported mode");
134 cfg.writeEntry(
"size",
m_size);
141 cfg.writeEntry(
"flow",
m_flow);
146 KConfigGroup globalCfg = KSharedConfig::openConfig()->group(
"LiquifyTool");
147 globalCfg.writeEntry(
"mode", (
int)
m_mode);
170 KConfigGroup globalCfg = KSharedConfig::openConfig()->group(
"LiquifyTool");
171 const int loadedMode = globalCfg.readEntry(
"mode", (
int)
m_mode);
172 if (loadedMode >= 0 && loadedMode <
N_MODES) {
174 }
else if (loadedMode ==
N_MODES) {
185 QDomDocument doc = e->ownerDocument();
186 QDomElement liqEl = doc.createElement(
"liquify_properties");
187 e->appendChild(liqEl);
224 if (result && newMode >= 0 && newMode <
N_MODES) {
226 }
else if (result && newMode ==
N_MODES) {
244 dbg.nospace() <<
"\nKisLiquifyProperties(";
245 dbg.space() <<
"\n " <<
ppVar(props.
mode());
246 dbg.space() <<
"\n " <<
ppVar(props.
size());
253 dbg.space() <<
"\n " <<
ppVar(props.
flow());
257 dbg.space() <<
"\n );\n";
258 return dbg.nospace();
bool preserveShapeScale() const
bool operator==(const KisLiquifyProperties &other) const
bool m_preserveShapeStretch
static bool supportsReverseDirection(LiquifyMode mode)
bool preserveShapeStretch() const
bool preserveShapeRotation() const
static bool supportsWashMode(LiquifyMode mode)
bool reverseDirection() const
bool sizeHasPressure() const
static KisLiquifyProperties fromXML(const QDomElement &e)
bool m_preserveShapeScale
KisLiquifyProperties & operator=(const KisLiquifyProperties &rhs)
bool amountHasPressure() const
void toXML(QDomElement *e) const
bool m_preserveShapeRotation
qreal defaultAmountForMode(KisLiquifyProperties::LiquifyMode mode)
QDebug operator<<(QDebug dbg, const KisLiquifyProperties &props)
QString liquifyModeString(KisLiquifyProperties::LiquifyMode mode)
void saveValue(QDomElement *parent, const QString &tag, const QSize &size)
bool findOnlyElement(const QDomElement &parent, const QString &tag, QDomElement *el, QStringList *errorMessages)
bool loadValue(const QDomElement &e, float *v)