1 #ifndef ADOPTERWINDOW_H
2 #define ADOPTERWINDOW_H
8 # include "mediakeysobserver.h"
16 * A main window that can adopt other windows' children, and grabs the
17 * zoom (volume) keys on Maemo.
19 class AdopterWindow: public QMainWindow
23 explicit AdopterWindow(QWidget *parent = 0);
25 /* If true, zoom (volume) keys will generate Key_F7 and Key_F8 events. */
26 void grabZoomKeys(bool grab);
28 /** Adopt children "main" and "others". */
29 void takeChildren(QWidget *main, const QList<QWidget *> &others);
31 /** Release current children (adopted in @see takeChildren). */
35 * Add action that is visible on the tool bar (except on Symbian, where
36 * it is visible on the Options menu).
38 QAction *addToolBarAction(QObject *receiver, const char *slot,
39 const QString &iconName, const QString &text);
42 void addToolBarSpace();
51 void onMediaKeysPressed(MediaKeysObserver::MediaKeys key);
55 void showEvent(QShowEvent *e);
56 void doGrabZoomKeys(bool grab);
57 bool grabbingZoomKeys;
64 #endif // ADOPTERWINDOW_H