53 lines
1.6 KiB
C++
53 lines
1.6 KiB
C++
#pragma once
|
|
#include "ConfigSection.hpp"
|
|
#include <qqmlregistration.h>
|
|
#include <QVariantList>
|
|
|
|
class Popouts : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_PROPERTY(bool, statusIcons, StatusIcons)
|
|
CFG_PROPERTY(bool, tray, Tray)
|
|
|
|
public:
|
|
explicit Popouts(QObject *parent = nullptr);
|
|
};
|
|
|
|
class Tray : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_PROPERTY(bool, recolorIcons, RecolorIcons)
|
|
CFG_PROPERTY(bool, showOnHover, ShowOnHover)
|
|
// Array of { enabled, id } objects. QML can't mutate array elements in
|
|
// place - assign the whole list back to change it, e.g.
|
|
// Config.bar.tray.statusIcons = updatedList
|
|
CFG_PROPERTY(QVariantList, statusIcons, StatusIcons)
|
|
CFG_PROPERTY(int, trayIconSize, TrayIconSize)
|
|
|
|
public:
|
|
explicit Tray(QObject *parent = nullptr);
|
|
};
|
|
|
|
class Bar : public ConfigSection {
|
|
Q_OBJECT
|
|
QML_UNCREATABLE("Instantiated internally by Config")
|
|
|
|
CFG_PROPERTY(bool, autoHide, AutoHide)
|
|
CFG_PROPERTY(int, border, Border)
|
|
// Array of { enabled, id } objects, in display order.
|
|
CFG_PROPERTY(QVariantList, entries, Entries)
|
|
CFG_PROPERTY(bool, fullscreenReveal, FullscreenReveal)
|
|
CFG_PROPERTY(int, height, Height)
|
|
CFG_PROPERTY(bool, hideWhenNotif, HideWhenNotif)
|
|
CFG_SECTION(Popouts, popouts, Popouts)
|
|
CFG_PROPERTY(int, revealDelay, RevealDelay)
|
|
CFG_PROPERTY(int, rounding, Rounding)
|
|
CFG_PROPERTY(int, smoothing, Smoothing)
|
|
CFG_SECTION(Tray, tray, Tray)
|
|
|
|
public:
|
|
explicit Bar(QObject *parent = nullptr);
|
|
};
|