6#include <phosphortileengine_export.h>
43 const QVariant& a = it.value();
44 const QVariant& b = oit.value();
47 const bool aBool = a.typeId() == QMetaType::Bool;
48 const bool bBool = b.typeId() == QMetaType::Bool;
49 if (aNumeric && bNumeric) {
50 if (!qFuzzyCompare(1.0 + a.toDouble(), 1.0 + b.toDouble())) {
53 }
else if (aBool && bBool) {
54 if (a.toBool() != b.toBool()) {
148 bool usePerSideOuterGap =
false;
176 bool focusFollowsMouse =
false;
183 bool focusNewWindows =
true;
194 bool smartGaps =
true;
202 bool respectMinimumSize =
true;
Algorithm-layer constants for the autotile/tile primitives.
Definition AutotileConfig.h:14
constexpr int DefaultMasterCount
Single master window.
Definition AutotileConstants.h:40
constexpr int DefaultInnerGap
Definition AutotileConstants.h:51
constexpr int DefaultOuterGap
Definition AutotileConstants.h:52
constexpr bool isNumericMetaType(int typeId)
Returns true if typeId is a numeric QMetaType (Double, Float, Int, UInt, LongLong,...
Definition AutotileConstants.h:90
constexpr QLatin1String DefaultAlgorithmId
Default tiling algorithm.
Definition AutotileConstants.h:42
constexpr qreal DefaultSplitRatio
50/50 split when nothing else specified
Definition AutotileConstants.h:39
constexpr int DefaultMaxWindows
Maximum tiled windows before overflow.
Definition AutotileConstants.h:41
constexpr qreal DefaultSplitRatioStep
Definition AutotileConstants.h:43
AutotileInsertPosition
Definition AutotileConstants.h:174
AutotileOverflowBehavior
Definition AutotileConstants.h:169
Per-algorithm saved settings (split ratio + master count)
Definition AutotileConfig.h:23
bool operator==(const AlgorithmSettings &other) const
Definition AutotileConfig.h:27
QVariantMap customParams
Algorithm-declared custom parameter values.
Definition AutotileConfig.h:26
int masterCount
Definition AutotileConfig.h:25
qreal splitRatio
Definition AutotileConfig.h:24
Configuration for autotiling behavior.
Definition AutotileConfig.h:81
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:118
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.