mirror of
https://github.com/YACReader/yacreader
synced 2025-07-17 20:44:32 -04:00
Run folder search filtering in the background
It uses the same approach used by the comics search filter
This commit is contained in:
36
YACReaderLibrary/db/folder_query_result_processor.h
Normal file
36
YACReaderLibrary/db/folder_query_result_processor.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef FOLDER_QUERY_RESULT_PROCESSOR_H
|
||||
#define FOLDER_QUERY_RESULT_PROCESSOR_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "yacreader_global_gui.h"
|
||||
#include "concurrent_queue.h"
|
||||
|
||||
class FolderItem;
|
||||
class FolderModel;
|
||||
class QSqlQuery;
|
||||
|
||||
namespace YACReader {
|
||||
|
||||
class FolderQueryResultProcessor : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
FolderQueryResultProcessor(FolderModel *model);
|
||||
|
||||
public slots:
|
||||
void createModelData(const SearchModifiers modifier, const QString &filter, bool includeComics);
|
||||
|
||||
signals:
|
||||
void newData(QMap<unsigned long long int, FolderItem *> *filteredItems, FolderItem *root);
|
||||
|
||||
private:
|
||||
ConcurrentQueue querySearchQueue;
|
||||
|
||||
FolderModel *model;
|
||||
|
||||
void setupFilteredModelData(QSqlQuery &sqlquery);
|
||||
};
|
||||
};
|
||||
|
||||
#endif // FOLDER_QUERY_RESULT_PROCESSOR_H
|
Reference in New Issue
Block a user