Krita Source Code Documentation
Loading...
Searching...
No Matches
KisGridOpOptionData.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2022 Agata Cacko <cacko.azh@gmail.com>
3 * SPDX-FileCopyrightText: 2009, 2010 Lukáš Tvrdý (lukast.dev@gmail.com)
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
8
10
11
13{
14 grid_width = qMax(1, setting->getInt(GRID_WIDTH));
15 grid_height = qMax(1, setting->getInt(GRID_HEIGHT));
16 diameter = setting->getInt(DIAMETER);
17 // If loading an old brush without a diameter set, set to grid_width as was the old logic
18 if (!diameter) {
20 }
21 else {
22 diameter = qMax(1, diameter);
23 }
32 return true;
33}
34
const QString HORIZONTAL_OFFSET
const QString GRID_SCALE
const QString GRID_RANDOM_BORDER
const QString GRID_WIDTH
const QString DIAMETER
const QString GRID_VERTICAL_BORDER
const QString GRID_PRESSURE_DIVISION
const QString GRID_HORIZONTAL_BORDER
const QString VERTICAL_OFFSET
const QString GRID_DIVISION_LEVEL
const QString GRID_HEIGHT
void write(KisPropertiesConfiguration *setting) const
bool read(const KisPropertiesConfiguration *setting)
virtual void setProperty(const QString &name, const QVariant &value)
bool getBool(const QString &name, bool def=false) const
int getInt(const QString &name, int def=0) const
double getDouble(const QString &name, double def=0.0) const