X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=mainwindow.h;h=c33f33b97336017cedb8ed90a5ebb03d073c3be2;hb=HEAD;hp=8698e8c80c9c2c9d57fc801c08ca6e6a17cb4e19;hpb=3cbc168158c28a1ae9c30bdf2dc16504c9dab16c;p=dorian diff --git a/mainwindow.h b/mainwindow.h index 8698e8c..c33f33b 100755 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,68 +1,80 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include +#include + +#include "adopterwindow.h" class QString; +class QModelIndex; class DevTools; class BookView; class Book; +class FullScreenWindow; +class Progress; +class ProgressDialog; class TranslucentButton; -class MainWindow: public QMainWindow +class MainWindow: public AdopterWindow { Q_OBJECT public: MainWindow(QWidget *parent = 0); - virtual ~MainWindow() {} + ~MainWindow(); + void initialize(); public slots: void showLibrary(); - void showInfo(); + void rotate(); void showSettings(); void showDevTools(); void showBookmarks(); void onCurrentBookChanged(); - void showNormal(); - void showFullScreen(); + void showRegular(); + void showBig(); void onSettingsChanged(const QString &key); - void onChapterLoaded(int index); + void onPartLoadStart(); + void onPartLoadEnd(int index); + void onAddBookmark(const QString ¬e); + void onGoToBookmark(int index); + void showChapters(); + void onGoToChapter(int index); + void about(); + void goToNextPage(); + void goToPreviousPage(); + void onBeginUpgrade(int total); + void onUpgrading(const QString &book); + void onEndUpgrade(); + void onBeginLoad(int total); + void onLoading(const QString &book); + void onEndLoad(); protected: -#ifdef Q_WS_MAEMO5 -# define MOUSE_ACTIVATE_EVENT mouseReleaseEvent -#else -# define MOUSE_ACTIVATE_EVENT mousePressEvent -#endif - virtual void MOUSE_ACTIVATE_EVENT(QMouseEvent *event); - virtual void resizeEvent(QResizeEvent *event); - virtual void closeEvent(QCloseEvent *event); + void timerEvent(QTimerEvent *event); private: - void setCurrentBook(Book *book); - QAction *addToolBarAction(const QObject *receiver, const char *member, - const QString &name); - QRect fullScreenZone() const; + void setCurrentBook(const QModelIndex ¤t); BookView *view; QAction *settingsAction; QAction *libraryAction; - QAction *infoAction; + QAction *rotateAction; QAction *devToolsAction; QAction *bookmarksAction; QAction *fullScreenAction; QAction *forwardAction; QAction *backwardAction; - QAction *previousAction; - QAction *nextAction; - QToolBar *toolBar; + QAction *chaptersAction; QDialog *settings; DevTools *devTools; - Book *book; - Qt::WindowFlags normalFlags; - TranslucentButton *restoreButton; - bool isFullscreen; - QRect normalGeometry; + QModelIndex mCurrent; + FullScreenWindow *fullScreenWindow; + int preventBlankingTimer; + Progress *prog; + TranslucentButton *prev; + TranslucentButton *next; + ProgressDialog *libraryProgress; }; #endif // MAINWINDOW_H