New version. Update home page link in About box.
[dorian] / fullscreenwindow.h
1 #ifndef FULLSCREENWINDOW_H
2 #define FULLSCREENWINDOW_H
3
4 #include <QRect>
5 #include <QObject>
6
7 #include "adopterwindow.h"
8
9 class QWidget;
10 class QMouseEvent;
11 class QResizeEvent;
12 class TranslucentButton;
13 class Progress;
14
15 /** A full screen window with a restore button. */
16 class FullScreenWindow: public AdopterWindow
17 {
18     Q_OBJECT
19
20 public:
21     explicit FullScreenWindow(QWidget *parent);
22
23     /** Swith to full screen, and flash the restore button. */
24     void showFullScreen();
25
26     /**
27      * Adopt children.
28      * Same as @AdopterWindow::takeChildren(), but saves prog, previous
29      * and next, before calling base class method.
30      */
31     void takeChildren(BookView *bookView, Progress *prog,
32                       TranslucentButton *previous, TranslucentButton *next);
33
34 signals:
35     /** Emitted when the restore button is pressed. */
36     void restore();
37
38 protected:
39     /** Handle size (and orientation) change. */
40     void resizeEvent(QResizeEvent *e);
41
42 protected slots:
43     /** Re-align adopted child windows. */
44     void placeChildren();
45
46 private:
47     TranslucentButton *restoreButton;
48     Progress *progress;
49     TranslucentButton *previousButton;
50     TranslucentButton *nextButton;
51 };
52
53 #endif // FULLSCREENWINDOW_H