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{
12 Q_INTERFACES(QQmlParserStatus)
14public:
15
16 enum Role
17 {
18 Name,
19 Foreground,
20 Background,
21 Description,
22 Highlight,
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
Represents a color scheme for a terminal display.
Definition ColorScheme.h:56
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual QModelIndex parent(const QModelIndex &index) const const=0
QObject(QObject *parent)
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:05:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.