First attempts towards monitoring folders with books.
[dorian] / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QtGui>
5 #include "bookfinder.h"
6
7 class QString;
8 class QModelIndex;
9 class DevTools;
10 class BookView;
11 class Book;
12 class FullScreenWindow;
13
14 class MainWindow: public QMainWindow
15 {
16     Q_OBJECT
17
18 public:
19     MainWindow(QWidget *parent = 0);
20     ~MainWindow();
21
22 public slots:
23     void showLibrary();
24     void showInfo();
25     void showSettings();
26     void showDevTools();
27     void showBookmarks();
28     void onCurrentBookChanged();
29     void showRegular();
30     void showBig();
31     void onSettingsChanged(const QString &key);
32     void onChapterLoadStart();
33     void onChapterLoadEnd(int index);
34     void onAddBookmark();
35     void onGoToBookmark(int index);
36     void showChapters();
37     void onGoToChapter(int index);
38
39 protected:
40     virtual void closeEvent(QCloseEvent *event);
41     virtual void timerEvent(QTimerEvent *event);
42
43 private:
44     void setCurrentBook(const QModelIndex &current);
45     QAction *addToolBarAction(const QObject *receiver, const char *member,
46                               const QString &name);
47     BookView *view;
48     QAction *settingsAction;
49     QAction *libraryAction;
50     QAction *infoAction;
51     QAction *devToolsAction;
52     QAction *bookmarksAction;
53     QAction *fullScreenAction;
54     QAction *forwardAction;
55     QAction *backwardAction;
56     QAction *previousAction;
57     QAction *nextAction;
58     QAction *chaptersAction;
59     QToolBar *toolBar;
60     QDialog *settings;
61     DevTools *devTools;
62     QModelIndex mCurrent;
63     FullScreenWindow *fullScreenWindow;
64     int preventBlankingTimer;
65     BookFinder *bookFinder;
66     BookFinderThread bookFinderThread;
67 };
68
69 #endif // MAINWINDOW_H