mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-23 12:37:45 +00:00
The path list is now refreshed when importing too, which makes it even easier to get started.
29 lines
No EOL
584 B
C++
29 lines
No EOL
584 B
C++
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QSqlDatabase>
|
|
#include <QSqlQuery>
|
|
|
|
class HashDatabase : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit HashDatabase(QObject *parent = nullptr);
|
|
|
|
void addFolder(const QString &folder);
|
|
void addFile(const QString &file);
|
|
void importFileList(const QByteArray &file);
|
|
|
|
QVector<QString> getKnownFolders();
|
|
|
|
bool knowsFile(uint32_t i);
|
|
|
|
QString getFilename(uint32_t i);
|
|
|
|
private:
|
|
QSqlDatabase m_db;
|
|
}; |