WvDBusMsg::is_reply() had an unnecessary hack for message #1.
[wvapps.git] / unikonf / qtutils.h
blob09edf577a0430ef1e58ca03c545b62da6788a074
1 /** Some generally useful Qt utils. */
2 #ifndef __QTUTILS_H
3 #define __QTUTILS_H
5 #include <qobject.h>
6 #include <qwidget.h>
8 /**
9 * Watches for FocusIn and FocusOut events on a target widget.
10 * To use this class, create an instance (may be shared),
11 * connect to the signals, and attach the object to the widgets
12 * to be observed using:
13 * widgetInstance->installEventFilter(focusObserverInstance);
15 class FocusObserver : public QObject
17 Q_OBJECT
19 public:
20 FocusObserver() { }
21 virtual ~FocusObserver() { }
23 signals:
24 // called when target widget receives focus
25 void focusIn(QWidget *widget);
27 // called when target widget loses focus
28 void focusOut(QWidget *widget);
30 protected:
31 virtual bool eventFilter(QObject *obj, QEvent *event);
34 #endif // __QTUTILS_H