MauiKit Terminal

colorschemesmodel.h
1#pragma once
2#include <QObject>
3#include <QAbstractListModel>
4#include <QQmlParserStatus>
5
6namespace Konsole
7{
8class ColorScheme;
9}
10class ColorSchemesModel : public QAbstractListModel, public QQmlParserStatus
11{
14public:
15
16 enum Role
17 {
18 Name,
19 Foreground,
20 Background,
21 Description,
23 Color3,
24 Color4
25 };
26
27
28 ColorSchemesModel(QObject * parent = nullptr);
29
30 // QQmlParserStatus interface
31public:
32 void classBegin() override final;
33 void componentComplete() override final;
34
35private:
36 QList<Konsole::ColorScheme*> m_list;
37 void setList();
38
39 // QAbstractItemModel interface
40public:
41 int rowCount(const QModelIndex &parent) const override final;
42 QVariant data(const QModelIndex &index, int role) const override final;
43 QHash<int, QByteArray> roleNames() const override final;
44};
45
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.