Draft: Big overhaul of the settings

This commit is contained in:
Carl Schwan
2021-06-04 23:46:31 +02:00
parent d9eaa95b9d
commit 23bd73c499
11 changed files with 467 additions and 69 deletions

26
src/colorschemer.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
#include <QObject>
#include <QIdentityProxyModel>
class QAbstractItemModel;
class KColorSchemeManager;
class ColorSchemer : public QObject
{
Q_OBJECT
Q_PROPERTY(QAbstractItemModel *model READ model CONSTANT)
public:
ColorSchemer(QObject* parent = nullptr);
~ColorSchemer();
QAbstractItemModel* model() const;
Q_INVOKABLE void apply(int idx);
Q_INVOKABLE void apply(const QString &name);
Q_INVOKABLE int indexForScheme(const QString &name) const;
Q_INVOKABLE QString nameForIndex(int index) const;
private:
KColorSchemeManager* c;
};