File indexing completed on 2024-09-22 04:08:41

0001 /*
0002  *  SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef KIS_ROUNDMARKEROP_OPTION_DATA_H
0007 #define KIS_ROUNDMARKEROP_OPTION_DATA_H
0008 
0009 
0010 #include "kis_types.h"
0011 #include <boost/operators.hpp>
0012 
0013 class KisPropertiesConfiguration;
0014 
0015 struct KisRoundMarkerOpOptionData : boost::equality_comparable<KisRoundMarkerOpOptionData>
0016 {
0017     inline friend bool operator==(const KisRoundMarkerOpOptionData &lhs, const KisRoundMarkerOpOptionData &rhs) {
0018         return qFuzzyCompare(lhs.diameter, rhs.diameter)
0019             && qFuzzyCompare(lhs.spacing, rhs.spacing)
0020             && lhs.useAutoSpacing == rhs.useAutoSpacing
0021             && qFuzzyCompare(lhs.autoSpacingCoeff, rhs.autoSpacingCoeff);
0022     }
0023     
0024     qreal diameter {30.0};
0025     qreal spacing {0.02};
0026     bool useAutoSpacing {false};
0027     qreal autoSpacingCoeff {1.0};
0028 
0029     bool read(const KisPropertiesConfiguration *setting);
0030     void write(KisPropertiesConfiguration *setting) const;
0031 };
0032 
0033 #endif // KIS_ROUNDMARKEROP_OPTION_DATA_H