New JSON config format

This commit is contained in:
GriffinR
2026-02-06 23:47:06 -05:00
parent e3e42f39f0
commit 3571b4ea4b
56 changed files with 2005 additions and 1883 deletions

30
include/core/orderedset.h Normal file
View File

@@ -0,0 +1,30 @@
#pragma once
#ifndef ORDERED_SET_H
#define ORDERED_SET_H
#include <QJsonArray>
template <typename T>
class OrderedSet : public std::set<T>
{
using std::set<T>::set;
public:
// Not introduced to std::set until C++20
#if __cplusplus < 202002L
bool contains(const T& value) const {
return this->find(value) != this->end();
}
#endif
QSet<T> toQSet() const {
return QSet<T>(this->begin(), this->end());
}
static QSet<T> fromQSet(const QSet<T>& set) {
return OrderedSet<T>(set.begin(), set.end());
}
bool isEmpty() const {
return this->empty();
}
};
#endif // ORDERED_SET_H