File indexing completed on 2024-05-12 04:42:45
0001 /* 0002 SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KPUBLICTRANSPORT_NOTESUTIL_P_H 0008 #define KPUBLICTRANSPORT_NOTESUTIL_P_H 0009 0010 #include <QtContainerFwd> 0011 0012 class QString; 0013 0014 namespace KPublicTransport { 0015 0016 /** Utilities around free-form notes attached to transport objects. 0017 * Used for code sharing between those objects. 0018 */ 0019 namespace NotesUtil 0020 { 0021 /** Normalize a note string. */ 0022 QString normalizeNote(const QString ¬e); 0023 0024 /** Check if a note should be added, or replace an existing entry. */ 0025 int needsAdding(const QStringList ¬es, const QString ¬e); 0026 /** Add or replace a note. */ 0027 void performAdd(QStringList ¬es, const QString ¬e, int index); 0028 0029 /** Merge two notes. */ 0030 QStringList mergeNotes(const QStringList &lhs, const QStringList &rhs);} 0031 0032 } 0033 0034 #endif // KPUBLICTRANSPORT_NOTESUTIL_P_H