X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=mainwindow.h;h=4f499d2b1f83c62599883a68a51f33b288e1fb2e;hb=d651145f54a754e135df407c56dc114c80e2bd52;hp=c44599ef559df7470d839c2bcabe29eebb452104;hpb=0bf9a58bf6217cbba174f991d46c003b03a52c38;p=dorian diff --git a/mainwindow.h b/mainwindow.h index c44599e..4f499d2 100755 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,8 +1,10 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include -#include "bookfinder.h" +#include +#include + +#include "adopterwindow.h" class QString; class QModelIndex; @@ -10,14 +12,17 @@ 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); - ~MainWindow(); + void initialize(); public slots: void showLibrary(); @@ -29,21 +34,32 @@ public slots: void showRegular(); void showBig(); void onSettingsChanged(const QString &key); - void onChapterLoadStart(); - void onChapterLoadEnd(int index); - void onAddBookmark(); + 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: - virtual void closeEvent(QCloseEvent *event); - virtual void timerEvent(QTimerEvent *event); + void closeEvent(QCloseEvent *event); + void timerEvent(QTimerEvent *event); + void resizeEvent(QResizeEvent *event); + +protected slots: + void placeChildren(); private: void setCurrentBook(const QModelIndex ¤t); - QAction *addToolBarAction(const QObject *receiver, const char *member, - const QString &name); BookView *view; QAction *settingsAction; QAction *libraryAction; @@ -53,17 +69,16 @@ private: QAction *fullScreenAction; QAction *forwardAction; QAction *backwardAction; - QAction *previousAction; - QAction *nextAction; QAction *chaptersAction; - QToolBar *toolBar; QDialog *settings; DevTools *devTools; QModelIndex mCurrent; FullScreenWindow *fullScreenWindow; int preventBlankingTimer; - BookFinder *bookFinder; - BookFinderThread bookFinderThread; + Progress *progress; + TranslucentButton *previousButton; + TranslucentButton *nextButton; + ProgressDialog *libraryProgress; }; #endif // MAINWINDOW_H