#ifndef MAINWINDOW_H #define MAINWINDOW_H #include #include #include #include #include #include #include #include "pdfworker.h" #include "../shared/qssquery.h" namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); signals: void beginSearch(const QString &query); void startPdfPreviewGeneration(QVector paths, double scalefactor); private: Ui::MainWindow *ui; QFileIconProvider iconProvider; bool pdfDirty; QSqlDatabase db; QFutureWatcher> searchWatcher; QFutureWatcher pdfWorkerWatcher; void add(QString path, unsigned int page); QVector pdfSearchResults; void connectSignals(); void makePdfPreview(int page); bool pdfTabActive(); void keyPressEvent(QKeyEvent *event) override; unsigned int processedPdfPreviews; void handleSearchResults(const QVector &results); void handleSearchError(QString error); QSSQuery currentQuery; int pdfPreviewsPerPage; void createSearchResutlMenu(QMenu &menu, const QFileInfo &fileInfo); private slots: void lineEditReturnPressed(); void treeSearchItemActivated(QTreeWidgetItem *item, int i); void showSearchResultsContextMenu(const QPoint &point); void tabChanged(); void pdfPreviewReceived(PdfPreview preview); void comboScaleChanged(QString text); void spinPdfPreviewPageValueChanged(int val); }; #endif // MAINWINDOW_H