KUnifiedPush

clientmodel.h
1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef CLIENTMODEL_H
7#define CLIENTMODEL_H
8
9#include "managementinterface.h"
10
11#include <QAbstractListModel>
12
13/** Model for all registered push notification client. */
15{
17public:
18 explicit ClientModel(org::kde::kunifiedpush::Management *iface, QObject *parent = nullptr);
20
21 enum Role {
22 NameRole = Qt::DisplayRole,
23 DescriptionRole = Qt::UserRole,
24 IconNameRole,
25 TokenRole,
26 };
27
28 int rowCount(const QModelIndex &parent) const override;
29 QVariant data(const QModelIndex &index, int role) const override;
30 QHash<int, QByteArray> roleNames() const override;
31
32public Q_SLOTS:
33 void reload();
34
35private:
36 org::kde::kunifiedpush::Management *m_iface = nullptr;
38
39};
40
41#endif // CLIENTMODEL_H
Model for all registered push notification client.
Definition clientmodel.h:15
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
DisplayRole
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:21:15 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.