Improve icons. Move some menu items to the toolbar. Don't show buttons in current...
[dorian] / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QtGui>
5
6 #include "adopterwindow.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 AdopterWindow
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     void goToNextPage();
43     void goToPreviousPage();
44
45 protected:
46     void closeEvent(QCloseEvent *event);
47     void timerEvent(QTimerEvent *event);
48     void resizeEvent(QResizeEvent *event);
49
50 private:
51     void setCurrentBook(const QModelIndex &current);
52     QAction *addToolBarAction(const QObject *receiver, const char *member,
53                               const QString &name);
54     BookView *view;
55     QAction *settingsAction;
56     QAction *libraryAction;
57     QAction *infoAction;
58     QAction *devToolsAction;
59     QAction *bookmarksAction;
60     QAction *fullScreenAction;
61     QAction *forwardAction;
62     QAction *backwardAction;
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