#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <QtGui>
+#include <QModelIndex>
+#include <QEvent>
#include "adopterwindow.h"
class Book;
class FullScreenWindow;
class Progress;
+class ProgressDialog;
class TranslucentButton;
class MainWindow: public AdopterWindow
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
+ void initialize();
public slots:
void showLibrary();
- void showInfo();
+ void rotate();
void showSettings();
void showDevTools();
void showBookmarks();
void onSettingsChanged(const QString &key);
void onPartLoadStart();
void onPartLoadEnd(int index);
- void onAddBookmark();
+ 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:
- void closeEvent(QCloseEvent *event);
void timerEvent(QTimerEvent *event);
- void resizeEvent(QResizeEvent *event);
private:
void setCurrentBook(const QModelIndex ¤t);
BookView *view;
QAction *settingsAction;
QAction *libraryAction;
- QAction *infoAction;
+ QAction *rotateAction;
QAction *devToolsAction;
QAction *bookmarksAction;
QAction *fullScreenAction;
QModelIndex mCurrent;
FullScreenWindow *fullScreenWindow;
int preventBlankingTimer;
- Progress *progress;
- TranslucentButton *previousButton;
- TranslucentButton *nextButton;
+ Progress *prog;
+ TranslucentButton *prev;
+ TranslucentButton *next;
+ ProgressDialog *libraryProgress;
};
#endif // MAINWINDOW_H