6#include <phosphortileengine_export.h>
42 const QVariant& a = it.value();
43 const QVariant& b = oit.value();
46 const bool aBool = a.typeId() == QMetaType::Bool;
47 const bool bBool = b.typeId() == QMetaType::Bool;
48 if (aNumeric && bNumeric) {
49 if (!qFuzzyCompare(1.0 + a.toDouble(), 1.0 + b.toDouble())) {
52 }
else if (aBool && bBool) {
53 if (a.toBool() != b.toBool()) {
147 bool usePerSideOuterGap =
false;
175 bool focusFollowsMouse =
false;
182 bool focusNewWindows =
true;
193 bool smartGaps =
true;
201 bool respectMinimumSize =
true;
Algorithm-layer constants for the autotile/tile primitives.
Definition AutotileConfig.h:13
constexpr int DefaultMasterCount
Single master window.
Definition AutotileConstants.h:42
constexpr int DefaultInnerGap
Definition AutotileConstants.h:53
constexpr int DefaultOuterGap
Definition AutotileConstants.h:54
constexpr bool isNumericMetaType(int typeId)
Returns true if typeId is a numeric QMetaType (Double, Float, Int, UInt, LongLong,...
Definition AutotileConstants.h:100
constexpr QLatin1String DefaultAlgorithmId
Default tiling algorithm.
Definition AutotileConstants.h:44
constexpr qreal DefaultSplitRatio
50/50 split when nothing else specified
Definition AutotileConstants.h:41
constexpr int DefaultMaxWindows
Maximum tiled windows before overflow.
Definition AutotileConstants.h:43
constexpr qreal DefaultSplitRatioStep
Definition AutotileConstants.h:45
AutotileInsertPosition
Definition AutotileConstants.h:170
AutotileOverflowBehavior
Definition AutotileConstants.h:165
Per-algorithm saved settings (split ratio + master count)
Definition AutotileConfig.h:22
bool operator==(const AlgorithmSettings &other) const
Definition AutotileConfig.h:26
QVariantMap customParams
Algorithm-declared custom parameter values.
Definition AutotileConfig.h:25
int masterCount
Definition AutotileConfig.h:24
qreal splitRatio
Definition AutotileConfig.h:23
Configuration for autotiling behavior.
Definition AutotileConfig.h:80
static AutotileConfig defaults()
Get default configuration.
static QVariantMap perAlgoToVariantMap(const QHash< QString, AlgorithmSettings > &hash)
Convert internal hash to QVariantMap for the Settings layer.
static QHash< QString, AlgorithmSettings > perAlgoFromVariantMap(const QVariantMap &map)
Convert per-algorithm settings from QVariantMap (Settings layer) to internal hash.
QHash< QString, AlgorithmSettings > savedAlgorithmSettings
Per-algorithm saved settings (split ratio + master count).
Definition AutotileConfig.h:117
QJsonObject toJson() const
Serialize to JSON.
bool operator!=(const AutotileConfig &other) const
bool operator==(const AutotileConfig &other) const
static AutotileConfig fromJson(const QJsonObject &json)
Deserialize from JSON.