File indexing completed on 2024-11-24 04:19:36

0001 #pragma once
0002 
0003 #include <QObject>
0004 
0005 #include <MauiKit3/Core/fmh.h>
0006 #include <MauiKit3/Core/mauilist.h>
0007 
0008 class HistoryModel : public MauiList
0009 {
0010     Q_OBJECT
0011 
0012 public:
0013     explicit HistoryModel(QObject *parent = nullptr);
0014     const FMH::MODEL_LIST &items() const override final;
0015 
0016     QList<QUrl> getHistory();
0017     void componentComplete() override final;
0018 
0019 public Q_SLOTS:
0020     void append(const QUrl &url);
0021     int indexOfName(const QString &query);
0022 
0023 private:
0024     FMH::MODEL_LIST m_list;
0025     void setList();
0026 
0027 };