You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
963 B
C
55 lines
963 B
C
4 years ago
|
/*
|
||
|
SPDX-FileCopyrightText: 2021 Michail Vourlakos <mvourlakos@gmail.com>
|
||
|
SPDX-License-Identifier: GPL-2.0-or-later
|
||
|
*/
|
||
|
|
||
|
#ifndef SETTINGSSCHEMESMODEL_H
|
||
|
#define SETTINGSSCHEMESMODEL_H
|
||
|
|
||
|
#include <QAbstractListModel>
|
||
|
|
||
|
namespace Latte {
|
||
|
namespace WindowSystem {
|
||
|
class SchemeColors;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
namespace Latte {
|
||
|
namespace Settings {
|
||
|
namespace Model {
|
||
|
|
||
|
class Schemes : public QAbstractListModel
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
enum SchemesRoles
|
||
|
{
|
||
|
IDROLE = Qt::UserRole + 1,
|
||
|
NAMEROLE,
|
||
|
TEXTCOLORROLE,
|
||
|
BACKGROUNDCOLORROLE
|
||
|
};
|
||
|
|
||
|
explicit Schemes(QObject *parent = nullptr);
|
||
|
virtual ~Schemes();
|
||
|
|
||
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||
|
|
||
|
private slots:
|
||
|
void initSchemes();
|
||
|
|
||
|
private:
|
||
|
void insertSchemeInList(QString file);
|
||
|
|
||
|
private:
|
||
|
QList<WindowSystem::SchemeColors *> m_schemes;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif
|