more unfinished changes, process tab for dashboard
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "configobject.hpp"
|
||||
#include "configlist.hpp"
|
||||
#include "common.hpp"
|
||||
|
||||
#include <QVariantList>
|
||||
#include <QStringList>
|
||||
@@ -9,75 +8,57 @@
|
||||
|
||||
namespace ZShell::config {
|
||||
|
||||
class UtilitiesSizes : public ConfigObject {
|
||||
Q_OBJECT
|
||||
QML_ANONYMOUS
|
||||
class UtilitiesSizes : public settings::ObjectNode {
|
||||
CONFIG_NODE(UtilitiesSizes, settings::ObjectNode)
|
||||
|
||||
CFG_PROPERTY(int, toastWidth, 430)
|
||||
CFG_PROPERTY(int, width, 430)
|
||||
|
||||
public:
|
||||
explicit UtilitiesSizes(QObject* parent = nullptr) : ConfigObject(parent) {}
|
||||
CONFIG_PROPERTY(int, toastWidth, 430)
|
||||
CONFIG_PROPERTY(int, width, 430)
|
||||
};
|
||||
|
||||
class Toasts : public ConfigObject {
|
||||
Q_OBJECT
|
||||
QML_ANONYMOUS
|
||||
class Toasts : public settings::ObjectNode {
|
||||
CONFIG_NODE(Toasts, settings::ObjectNode)
|
||||
|
||||
CFG_PROPERTY(bool, audioInputChanged, true)
|
||||
CFG_PROPERTY(bool, audioOutputChanged, true)
|
||||
CFG_PROPERTY(bool, capsLockChanged, true)
|
||||
CFG_PROPERTY(bool, chargingChanged, true)
|
||||
CFG_PROPERTY(bool, configLoaded, true)
|
||||
CFG_PROPERTY(bool, dndChanged, true)
|
||||
CFG_PROPERTY(bool, gameModeChanged, true)
|
||||
CFG_PROPERTY(bool, kbLayoutChanged, true)
|
||||
CFG_PROPERTY(bool, kbLimit, true)
|
||||
CFG_PROPERTY(bool, nowPlaying, false)
|
||||
CFG_PROPERTY(bool, numLockChanged, true)
|
||||
CFG_PROPERTY(bool, vpnChanged, true)
|
||||
|
||||
public:
|
||||
explicit Toasts(QObject* parent = nullptr) : ConfigObject(parent) {}
|
||||
CONFIG_PROPERTY(bool, audioInputChanged, true)
|
||||
CONFIG_PROPERTY(bool, audioOutputChanged, true)
|
||||
CONFIG_PROPERTY(bool, capsLockChanged, true)
|
||||
CONFIG_PROPERTY(bool, chargingChanged, true)
|
||||
CONFIG_PROPERTY(bool, configLoaded, true)
|
||||
CONFIG_PROPERTY(bool, dndChanged, true)
|
||||
CONFIG_PROPERTY(bool, gameModeChanged, true)
|
||||
CONFIG_PROPERTY(bool, kbLayoutChanged, true)
|
||||
CONFIG_PROPERTY(bool, kbLimit, true)
|
||||
CONFIG_PROPERTY(bool, nowPlaying, false)
|
||||
CONFIG_PROPERTY(bool, numLockChanged, true)
|
||||
CONFIG_PROPERTY(bool, vpnChanged, true)
|
||||
};
|
||||
|
||||
class Vpn : public ConfigObject {
|
||||
Q_OBJECT
|
||||
QML_ANONYMOUS
|
||||
class Vpn : public settings::ObjectNode {
|
||||
CONFIG_NODE(Vpn, settings::ObjectNode)
|
||||
|
||||
CFG_PROPERTY(bool, enabled, false)
|
||||
CFG_PROPERTY(QStringList, provider, (QStringList{QStringLiteral("netbird")}))
|
||||
|
||||
public:
|
||||
explicit Vpn(QObject* parent = nullptr) : ConfigObject(parent) {}
|
||||
CONFIG_PROPERTY(bool, enabled, false)
|
||||
CONFIG_PROPERTY(
|
||||
QStringList, provider, (QStringList{QStringLiteral("netbird")}))
|
||||
};
|
||||
|
||||
class Utilities : public ConfigObject {
|
||||
Q_OBJECT
|
||||
QML_ANONYMOUS
|
||||
class Utilities : public settings::ObjectNode {
|
||||
CONFIG_NODE(Utilities, settings::ObjectNode)
|
||||
|
||||
CFG_PROPERTY(bool, enabled, true)
|
||||
CFG_PROPERTY(int, maxToasts, 4)
|
||||
CONFIG_PROPERTY(bool, enabled, true)
|
||||
CONFIG_PROPERTY(int, maxToasts, 4)
|
||||
CONFIG_SUBOBJECT(UtilitiesSizes, sizes)
|
||||
CONFIG_SUBOBJECT(Toasts, toasts)
|
||||
CONFIG_SUBOBJECT(Vpn, vpn)
|
||||
CONFIG_LIST(
|
||||
EntryList,
|
||||
quickToggles,
|
||||
{LIST_ENTRY(dnd, true),
|
||||
LIST_ENTRY(wifi, true),
|
||||
LIST_ENTRY(settings, true),
|
||||
LIST_ENTRY(bluetooth, true),
|
||||
LIST_ENTRY(mic, true),
|
||||
LIST_ENTRY(audio, true),
|
||||
LIST_ENTRY(gameMode, true)})
|
||||
|
||||
public:
|
||||
explicit Utilities(QObject* parent = nullptr)
|
||||
: ConfigObject(parent)
|
||||
, m_sizes(new UtilitiesSizes(this))
|
||||
, m_toasts(new Toasts(this))
|
||||
, m_vpn(new Vpn(this)) {}
|
||||
DEFAULT_ARG(
|
||||
{LIST_ENTRY(dnd, true),
|
||||
LIST_ENTRY(wifi, true),
|
||||
LIST_ENTRY(settings, true),
|
||||
LIST_ENTRY(bluetooth, true),
|
||||
LIST_ENTRY(mic, true),
|
||||
LIST_ENTRY(audio, true),
|
||||
LIST_ENTRY(gameMode, true)}))
|
||||
};
|
||||
|
||||
} // namespace ZShell::config
|
||||
|
||||
Reference in New Issue
Block a user