File indexing completed on 2024-04-28 16:42:52

0001 // SPDX-FileCopyrightText: 2021 Alexey Andreyev <aa13q@ya.ru>
0002 //
0003 // SPDX-License-Identifier: LicenseRef-KDE-Accepted-GPL
0004 
0005 #pragma once
0006 
0007 #include <QAbstractListModel>
0008 #include <QObject>
0009 #include <kTelephonyMetaTypes/dialer-types.h>
0010 
0011 class CallModel : public QAbstractListModel
0012 {
0013     Q_OBJECT
0014 public:
0015     explicit CallModel(QObject *parent = nullptr);
0016 
0017     enum Roles {
0018         EventRole = Qt::UserRole + 1,
0019         ProtocolRole,
0020         AccountRole,
0021         ProviderRole,
0022         CommunicationWithRole,
0023         DirectionRole,
0024         StateRole,
0025         StateReasonRole,
0026         CallAttemptDurationRole,
0027         StartedAtRole,
0028         DurationRole
0029     };
0030     Q_ENUM(Roles)
0031 
0032     QHash<int, QByteArray> roleNames() const override;
0033 };