Navigate by pages instead of book parts.
[dorian] / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QtGui>
5
6 #include "bookwindow.h"
7
8 class QString;
9 class QModelIndex;
10 class DevTools;
11 class BookView;
12 class Book;
13 class FullScreenWindow;
14 class Progress;
15 class TranslucentButton;
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     void about();
42
43 protected:
44     void closeEvent(QCloseEvent *event);
45     void timerEvent(QTimerEvent *event);
46     void resizeEvent(QResizeEvent *event);
47
48 private:
49     void setCurrentBook(const QModelIndex &current);
50     QAction *addToolBarAction(const QObject *receiver, const char *member,
51                               const QString &name);
52     BookView *view;
53     QAction *settingsAction;
54     QAction *libraryAction;
55     QAction *infoAction;
56     QAction *devToolsAction;
57     QAction *bookmarksAction;
58     QAction *fullScreenAction;
59     QAction *forwardAction;
60     QAction *backwardAction;
61     QAction *previousAction;
62     QAction *nextAction;
63     QAction *chaptersAction;
64     QToolBar *toolBar;
65     QDialog *settings;
66     DevTools *devTools;
67     QModelIndex mCurrent;
68     FullScreenWindow *fullScreenWindow;
69     int preventBlankingTimer;
70     Progress *progress;
71     TranslucentButton *previousButton;
72     TranslucentButton *nextButton;
73 };
74
75 #endif // MAINWINDOW_H