6#include "phosphortileengine_export.h"
44 const QVariant& a = it.value();
45 const QVariant& b = oit.value();
48 const bool aBool = a.typeId() == QMetaType::Bool;
49 const bool bBool = b.typeId() == QMetaType::Bool;
50 if (aNumeric && bNumeric) {
51 if (!qFuzzyCompare(1.0 + a.toDouble(), 1.0 + b.toDouble())) {
54 }
else if (aBool && bBool) {
55 if (a.toBool() != b.toBool()) {
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:58
constexpr int DefaultOuterGap
Definition AutotileConstants.h:59
constexpr bool isNumericMetaType(int typeId)
Returns true if typeId is a numeric QMetaType (Double, Float, Int, UInt, LongLong,...
Definition AutotileConstants.h:139
constexpr QLatin1String DefaultAlgorithmId
Default tiling algorithm.
Definition AutotileConstants.h:49
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:50
AutotileInsertPosition
Definition AutotileConstants.h:207
AutotileOverflowBehavior
Definition AutotileConstants.h:202
@ Float
Definition AutotileConstants.h:203
Per-algorithm saved settings (split ratio, master count, max windows).
Definition AutotileConfig.h:22
int maxWindows
Definition AutotileConfig.h:25
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:24
qreal splitRatio
Definition AutotileConfig.h:23
Configuration for autotiling behavior.
Definition AutotileConfig.h:82
static AutotileConfig defaults()
Get default configuration.
bool focusNewWindows
Automatically focus newly opened windows.
Definition AutotileConfig.h:184
bool usePerSideOuterGap
Whether to use per-side outer gaps instead of uniform.
Definition AutotileConfig.h:149
int outerGapBottom
Definition AutotileConfig.h:155
PhosphorTiles::AutotileInsertPosition InsertPosition
Definition AutotileConfig.h:163
int outerGapLeft
Definition AutotileConfig.h:156
int maxWindows
Maximum number of windows to tile.
Definition AutotileConfig.h:216
bool smartGaps
Hide gaps when only one window is tiled.
Definition AutotileConfig.h:195
bool respectMinimumSize
Respect window minimum size constraints.
Definition AutotileConfig.h:203
int innerGap
Gap between tiled windows in pixels.
Definition AutotileConfig.h:136
PhosphorTiles::AutotileOverflowBehavior overflowBehavior
Overflow behavior when window count exceeds maxWindows.
Definition AutotileConfig.h:237
int outerGap
Gap from screen edges in pixels (uniform).
Definition AutotileConfig.h:144
static QVariantMap perAlgoToVariantMap(const QHash< QString, AlgorithmSettings > &hash)
Convert internal hash to QVariantMap for the Settings layer.
qreal splitRatio
Ratio of screen width for master area.
Definition AutotileConfig.h:105
int outerGapRight
Definition AutotileConfig.h:157
int outerGapTop
Per-side outer gap values (used when usePerSideOuterGap is true).
Definition AutotileConfig.h:154
static QHash< QString, AlgorithmSettings > perAlgoFromVariantMap(const QVariantMap &map)
Convert per-algorithm settings from QVariantMap (Settings layer) to internal hash.
qreal splitRatioStep
Definition AutotileConfig.h:106
bool focusFollowsMouse
Focus follows mouse pointer.
Definition AutotileConfig.h:177
InsertPosition insertPosition
Definition AutotileConfig.h:165
QHash< QString, AlgorithmSettings > savedAlgorithmSettings
Per-algorithm saved settings (split ratio, master count, max windows).
Definition AutotileConfig.h:119
QJsonObject toJson() const
Serialize to JSON.
bool operator!=(const AutotileConfig &other) const
bool operator==(const AutotileConfig &other) const
int masterCount
Number of windows in master area.
Definition AutotileConfig.h:114
static AutotileConfig fromJson(const QJsonObject &json)
Deserialize from JSON.
QString algorithmId
ID of the tiling algorithm to use.
Definition AutotileConfig.h:93