2021-09-04 19:18:17 -07:00
|
|
|
#ifndef SEARCHRESULTSWIDGET_H
|
|
|
|
#define SEARCHRESULTSWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QStringListModel>
|
2021-12-27 20:59:28 -08:00
|
|
|
#include "bookinfodialog.h"
|
2021-09-04 19:18:17 -07:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class searchResultsWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
class searchResultsWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-04-04 21:47:15 -07:00
|
|
|
QString className = this->metaObject()->className();
|
2021-09-04 19:18:17 -07:00
|
|
|
explicit searchResultsWidget(QWidget *parent = nullptr);
|
|
|
|
~searchResultsWidget();
|
|
|
|
void setListViewContents(QStringList searchResults);
|
2021-09-04 20:46:47 -07:00
|
|
|
QModelIndex index;
|
2022-03-07 11:15:54 -08:00
|
|
|
QString item;
|
2021-12-27 20:59:28 -08:00
|
|
|
bool libraryResults;
|
2021-09-04 20:46:47 -07:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_openBtn_clicked();
|
|
|
|
void on_backBtn_clicked();
|
2021-12-29 20:09:51 -08:00
|
|
|
void showToastNative(QString messageToDisplay);
|
|
|
|
void closeIndefiniteToastNative();
|
2021-09-04 19:18:17 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::searchResultsWidget *ui;
|
2021-12-27 20:59:28 -08:00
|
|
|
bookInfoDialog * bookInfoDialogWindow;
|
2021-09-04 20:46:47 -07:00
|
|
|
|
|
|
|
signals:
|
2021-09-05 06:37:07 -07:00
|
|
|
void openBookFile(QString book, bool relativePath);
|
2021-12-29 20:09:51 -08:00
|
|
|
void showToast(QString messageToDisplay);
|
|
|
|
void closeIndefiniteToast();
|
|
|
|
void hideDialog();
|
2021-09-04 19:18:17 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SEARCHRESULTSWIDGET_H
|