X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=fullscreenwindow.h;h=d91408cf11a93cbf78e4489f1648e3a39ed7e2a3;hb=85c0b056445b61ed2b914b407b2c8839c999010b;hp=5c8a15f5c67cdd8483fd16bee857bfb889ba1da3;hpb=7eeee0f83bd4f8118c2692045458ced9fbdb4491;p=dorian diff --git a/fullscreenwindow.h b/fullscreenwindow.h index 5c8a15f..d91408c 100644 --- a/fullscreenwindow.h +++ b/fullscreenwindow.h @@ -1,35 +1,50 @@ #ifndef FULLSCREENWINDOW_H #define FULLSCREENWINDOW_H -#include +#include +#include +#include "adopterwindow.h" + +class QWidget; +class QMouseEvent; +class QResizeEvent; class TranslucentButton; +class Progress; -class FullScreenWindow: public QMainWindow +/** A full screen window with a restore button. */ +class FullScreenWindow: public AdopterWindow { Q_OBJECT + public: explicit FullScreenWindow(QWidget *parent); - void showFullScreen(); - void takeChild(QWidget *child); - void leaveChild(); + + /** + * Adopt children. + * Same as @AdopterWindow::takeChildren(), but saves prog, previous + * and next, before calling base class method. + */ + void takeChildren(BookView *bookView, Progress *prog, + TranslucentButton *previous, TranslucentButton *next); signals: + /** Emitted when the restore button is pressed. */ void restore(); -public slots: - protected: -#ifdef Q_WS_MAEMO_5 -# define MOUSE_ACTIVATE_EVENT mouseReleaseEvent -#else -# define MOUSE_ACTIVATE_EVENT mousePressEvent -#endif - virtual void MOUSE_ACTIVATE_EVENT(QMouseEvent *event); - virtual void resizeEvent(QResizeEvent *event); - QRect fullScreenZone() const; + /** Handle size (and orientation) change. */ + void resizeEvent(QResizeEvent *e); + + /** Handle show event. */ + void showEvent(QShowEvent *e); + +protected slots: + /** Re-align adopted child windows. */ + void placeChildren(); + +private: TranslucentButton *restoreButton; - QWidget *child; }; #endif // FULLSCREENWINDOW_H