1 #ifndef ADOPTERWINDOW_H
2 #define ADOPTERWINDOW_H
13 * A toplevel window that can adopt a BookView and other children.
14 * On Maemo, it can also grab the volume keys.
16 class AdopterWindow: public QMainWindow
21 explicit AdopterWindow(QWidget *parent = 0);
23 /** Adopt children "bookView" and "others". */
24 void takeChildren(BookView *bookView, const QList<QWidget *> &others);
26 /** Release current children (adopted in @see takeChildren). */
30 * Add action that is visible on the tool bar (except on Symbian, where
31 * it is visible on the Options menu).
33 QAction *addToolBarAction(QObject *receiver, const char *slot,
34 const QString &iconName, const QString &text);
36 /** Add spacing to tool bar. */
37 void addToolBarSpace();
42 /** If grab is true, volume keys will generate pageUp/Down keys. */
43 void grabVolumeKeys(bool grab);
46 /** Handle settings changes. */
47 void onSettingsChanged(const QString &key);
50 void keyPressEvent(QKeyEvent *event);
52 void showEvent(QShowEvent *event);
53 void doGrabVolumeKeys(bool grab);
56 bool grabbingVolumeKeys;/**< True, if volume keys should be grabbed. */
62 #endif // ADOPTERWINDOW_H