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