2023-09-12 14:15:40 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2024-01-01 17:07:58 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
|
2023-09-12 14:15:40 +00:00
|
|
|
|
|
|
|
#ifndef FEATHER_DOCSDIALOG_H
|
|
|
|
#define FEATHER_DOCSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
#include <QStringListModel>
|
|
|
|
#include <QTreeWidgetItem>
|
|
|
|
|
|
|
|
#include "components.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class DocsDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class DocsDialog : public WindowModalDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit DocsDialog(QWidget *parent = nullptr);
|
|
|
|
~DocsDialog() override;
|
|
|
|
|
|
|
|
void filterIndex(const QString &text);
|
|
|
|
void showDoc(const QString &doc, const QString& highlight = "");
|
|
|
|
void updateHighlights(const QString &highlight, bool scrollToCursor = false);
|
|
|
|
bool wordMatch(QString &search);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QScopedPointer<Ui::DocsDialog> ui;
|
|
|
|
|
|
|
|
QString m_currentSource = "";
|
|
|
|
|
|
|
|
QMap<QString, QString> m_docs;
|
|
|
|
QMap<QString, QStringList> m_categoryIndex;
|
|
|
|
QMap<QString, QString> m_navTitleIndex;
|
|
|
|
|
|
|
|
QMap<QString, QTreeWidgetItem *> m_items;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //FEATHER_DOCSDIALOG_H
|