gui: mainwindow: Reorder members for readability
Esse commit está contido em:
pai
42e9ac5f41
commit
48ca25abe3
@ -23,16 +23,6 @@ class MainWindow : public QMainWindow
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
|
||||||
explicit MainWindow(QWidget *parent, QString socketPath);
|
|
||||||
~MainWindow();
|
|
||||||
signals:
|
|
||||||
void beginSearch(const QString &query);
|
|
||||||
void startPdfPreviewGeneration(QVector<SearchResult> paths, double scalefactor);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void closeEvent(QCloseEvent *event) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DatabaseFactory *dbFactory;
|
DatabaseFactory *dbFactory;
|
||||||
SqliteDbService *dbService;
|
SqliteDbService *dbService;
|
||||||
@ -40,40 +30,39 @@ class MainWindow : public QMainWindow
|
|||||||
IPCPreviewClient ipcPreviewClient;
|
IPCPreviewClient ipcPreviewClient;
|
||||||
QThread ipcClientThread;
|
QThread ipcClientThread;
|
||||||
QThread syncerThread;
|
QThread syncerThread;
|
||||||
|
Indexer *indexer;
|
||||||
IndexSyncer *indexSyncer;
|
IndexSyncer *indexSyncer;
|
||||||
QProgressDialog progressDialog;
|
QProgressDialog progressDialog;
|
||||||
|
|
||||||
Indexer *indexer;
|
|
||||||
QFileIconProvider iconProvider;
|
QFileIconProvider iconProvider;
|
||||||
bool previewDirty;
|
|
||||||
QSqlDatabase db;
|
QSqlDatabase db;
|
||||||
QFutureWatcher<QVector<SearchResult>> searchWatcher;
|
QFutureWatcher<QVector<SearchResult>> searchWatcher;
|
||||||
void add(QString path, unsigned int page);
|
|
||||||
QVector<SearchResult> previewableSearchResults;
|
QVector<SearchResult> previewableSearchResults;
|
||||||
void connectSignals();
|
|
||||||
void makePreviews(int page);
|
|
||||||
bool previewTabActive();
|
|
||||||
bool indexerTabActive();
|
|
||||||
void keyPressEvent(QKeyEvent *event) override;
|
|
||||||
unsigned int processedPdfPreviews;
|
|
||||||
void handleSearchResults(const QVector<SearchResult> &results);
|
|
||||||
void handleSearchError(QString error);
|
|
||||||
LooqsQuery contentSearchQuery;
|
LooqsQuery contentSearchQuery;
|
||||||
int previewsPerPage;
|
|
||||||
void createSearchResutlMenu(QMenu &menu, const QFileInfo &fileInfo);
|
|
||||||
void openDocument(QString path, int num);
|
|
||||||
void openFile(QString path);
|
|
||||||
unsigned int currentPreviewGeneration = 1;
|
|
||||||
void initSettingsTabs();
|
|
||||||
int currentSelectedScale();
|
|
||||||
void processShortcut(int key);
|
|
||||||
bool eventFilter(QObject *object, QEvent *event);
|
|
||||||
QVector<QString> searchHistory;
|
QVector<QString> searchHistory;
|
||||||
int currentSearchHistoryIndex = 0;
|
int currentSearchHistoryIndex = 0;
|
||||||
QString currentSavedSearchText;
|
QString currentSavedSearchText;
|
||||||
QHash<QString, int> previewOrder; /* Quick lookup for the order a preview should have */
|
QHash<QString, int> previewOrder; /* Quick lookup for the order a preview should have */
|
||||||
QMap<int, QWidget *>
|
QMap<int, QWidget *>
|
||||||
previewWidgetOrderCache /* Saves those that arrived out of order to be inserted later at the correct pos */;
|
previewWidgetOrderCache /* Saves those that arrived out of order to be inserted later at the correct pos */;
|
||||||
|
bool previewDirty;
|
||||||
|
int previewsPerPage;
|
||||||
|
unsigned int processedPdfPreviews;
|
||||||
|
unsigned int currentPreviewGeneration = 1;
|
||||||
|
|
||||||
|
void connectSignals();
|
||||||
|
void makePreviews(int page);
|
||||||
|
bool previewTabActive();
|
||||||
|
bool indexerTabActive();
|
||||||
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
void handleSearchResults(const QVector<SearchResult> &results);
|
||||||
|
void handleSearchError(QString error);
|
||||||
|
void createSearchResutlMenu(QMenu &menu, const QFileInfo &fileInfo);
|
||||||
|
void openDocument(QString path, int num);
|
||||||
|
void openFile(QString path);
|
||||||
|
void initSettingsTabs();
|
||||||
|
int currentSelectedScale();
|
||||||
|
void processShortcut(int key);
|
||||||
|
bool eventFilter(QObject *object, QEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void lineEditReturnPressed();
|
void lineEditReturnPressed();
|
||||||
@ -94,6 +83,16 @@ class MainWindow : public QMainWindow
|
|||||||
void startIpcPreviews(RenderConfig config, const QVector<RenderTarget> &targets);
|
void startIpcPreviews(RenderConfig config, const QVector<RenderTarget> &targets);
|
||||||
void stopIpcPreviews();
|
void stopIpcPreviews();
|
||||||
void beginIndexSync();
|
void beginIndexSync();
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit MainWindow(QWidget *parent, QString socketPath);
|
||||||
|
~MainWindow();
|
||||||
|
signals:
|
||||||
|
void beginSearch(const QString &query);
|
||||||
|
void startPdfPreviewGeneration(QVector<SearchResult> paths, double scalefactor);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
Carregando…
Referência em uma nova issue
Block a user