Improve traces. Simplify folder management.
[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
16 class MainWindow: public BookWindow
17 {
18     Q_OBJECT
19
20 public:
21     MainWindow(QWidget *parent = 0);
22     ~MainWindow();
23
24 public slots:
25     void showLibrary();
26     void showInfo();
27     void showSettings();
28     void showDevTools();
29     void showBookmarks();
30     void onCurrentBookChanged();
31     void showRegular();
32     void showBig();
33     void onSettingsChanged(const QString &key);
34     void onPartLoadStart();
35     void onPartLoadEnd(int index);
36     void onAddBookmark();
37     void onGoToBookmark(int index);
38     void showChapters();
39     void onGoToChapter(int index);
40     void about();
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     Progress *progress;
70 };
71
72 #endif // MAINWINDOW_H