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). */
29 /** Return true if a child is currently adopted. */
30 bool hasChild(QWidget *child);
33 * Add action that is visible on the tool bar (except on Symbian, where
34 * it is visible on the Options menu).
36 QAction *addToolBarAction(QObject *receiver, const char *slot,
37 const QString &iconName, const QString &text);
39 /** Add spacing to tool bar. */
40 void addToolBarSpace();
45 /** If grab is true, volume keys will generate pageUp/Down keys. */
46 void grabVolumeKeys(bool grab);
49 /** Handle settings changes. */
50 void onSettingsChanged(const QString &key);
53 void keyPressEvent(QKeyEvent *event);
55 void showEvent(QShowEvent *event);
56 void doGrabVolumeKeys(bool grab);
59 bool grabbingVolumeKeys;/**< True, if volume keys should be grabbed. */
65 #endif // ADOPTERWINDOW_H