79 lines
2.0 KiB
C++
79 lines
2.0 KiB
C++
#pragma once
|
|
|
|
#include "ConfigSection.hpp"
|
|
#include <qqmlregistration.h>
|
|
|
|
// NOTE: multiple classes per file is fine - moc processes every Q_OBJECT
|
|
// class it finds in a header, regardless of how many. Config.appearance.anim
|
|
// works purely through object composition (Appearance owns an Anim*), which
|
|
// has nothing to do with how the files are split.
|
|
|
|
class Anim : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_PROPERTY(int, mediaGifSpeedAdjustment, MediaGifSpeedAdjustment)
|
|
CFG_PROPERTY(qreal, sessionGifSpeed, SessionGifSpeed)
|
|
|
|
public:
|
|
explicit Anim(QObject *parent = nullptr);
|
|
};
|
|
|
|
class Deform : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_PROPERTY(qreal, scale, Scale)
|
|
|
|
public:
|
|
explicit Deform(QObject *parent = nullptr);
|
|
};
|
|
|
|
class FontFamily : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_PROPERTY(QString, clock, Clock)
|
|
CFG_PROPERTY(QString, material, Material)
|
|
CFG_PROPERTY(QString, mono, Mono)
|
|
CFG_PROPERTY(QString, sans, Sans)
|
|
|
|
public:
|
|
explicit FontFamily(QObject *parent = nullptr);
|
|
};
|
|
|
|
class Font : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_SECTION(FontFamily, family, Family)
|
|
|
|
public:
|
|
explicit Font(QObject *parent = nullptr);
|
|
};
|
|
|
|
class Transparency : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_PROPERTY(qreal, base, Base)
|
|
CFG_PROPERTY(bool, enabled, Enabled)
|
|
CFG_PROPERTY(qreal, layers, Layers)
|
|
|
|
public:
|
|
explicit Transparency(QObject *parent = nullptr);
|
|
};
|
|
|
|
class Appearance : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_SECTION(Anim, anim, Anim)
|
|
CFG_SECTION(Deform, deform, Deform)
|
|
CFG_SECTION(Font, font, Font)
|
|
CFG_SECTION(Transparency, transparency, Transparency)
|
|
|
|
public:
|
|
explicit Appearance(QObject *parent = nullptr);
|
|
};
|