KColorScheme

kcolorschememodel.h
1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2013 Martin Gräßlin <mgraesslin@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KCOLORSCHEMEMODEL_H
9#define KCOLORSCHEMEMODEL_H
10
11#include "kcolorscheme_export.h"
12
13#include <QAbstractListModel>
14#include <QObject>
15#include <memory>
16
17class QModelIndex;
18
19struct KColorSchemeModelPrivate;
20
21/**
22 * A model listing the KColorSchemes available in the system.
23 *
24 * @since 5.84
25 */
27{
29public:
30 enum Roles {
31 NameRole = Qt::DisplayRole,
32 IconRole = Qt::DecorationRole,
33 PathRole = Qt::UserRole,
34 IdRole,
35 };
36
37 explicit KColorSchemeModel(QObject *parent = nullptr);
38 ~KColorSchemeModel() override;
39 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
40 int rowCount(const QModelIndex &parent = QModelIndex()) const override;
41
42private:
43 std::unique_ptr<KColorSchemeModelPrivate> d;
44};
45
46#endif
A model listing the KColorSchemes available in the system.
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
Q_OBJECTQ_OBJECT
QObject * parent() const const
DisplayRole
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:50:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.