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