File indexing completed on 2024-12-22 04:48:18

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2023 Louis Schul <schul9louis@gmail.com>
0004 */
0005 #pragma once
0006 
0007 #include <QJsonObject>
0008 #include <QObject>
0009 #include <QRegularExpression>
0010 
0011 class NoteMapperUtils : public QObject
0012 {
0013     Q_OBJECT
0014 public:
0015     explicit NoteMapperUtils(QObject *parent = nullptr);
0016 
0017     enum SpecialValues {
0018         InvalidHeaderLevel = -1,
0019     };
0020 
0021     static QString cleanHeader(const QString &header);
0022     static int headerLevel(const QString &header);
0023     static QString headerText(const QString &_header);
0024     static QVariantMap convertSavedMap(const QJsonObject &savedMap);
0025     static bool entirelyChecked(const QVariantMap &pathInfo);
0026     static QStringList getNoteHeaders(const QVariantMap &pathInfo);
0027     static QList<QVariantMap> getHeadersComboList(const QStringList &headers);
0028 };