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 #include "call-model.h"
0006 
0007 CallModel::CallModel(QObject *parent)
0008     : QAbstractListModel(parent)
0009 {
0010 }
0011 
0012 QHash<int, QByteArray> CallModel::roleNames() const
0013 {
0014     QHash<int, QByteArray> roleNames;
0015     roleNames[EventRole] = "event";
0016     roleNames[ProtocolRole] = "protocol";
0017     roleNames[AccountRole] = "account";
0018     roleNames[ProviderRole] = "provider";
0019     roleNames[CommunicationWithRole] = "communicationWith";
0020     roleNames[DirectionRole] = "direction";
0021     roleNames[StateRole] = "state";
0022     roleNames[StateReasonRole] = "stateReason";
0023     roleNames[CallAttemptDurationRole] = "callAttemptDuration";
0024     roleNames[StartedAtRole] = "startedAt";
0025     roleNames[DurationRole] = "duration";
0026     return roleNames;
0027 }