summaryrefslogtreecommitdiff
path: root/libopie
authorzecke <zecke>2003-10-07 12:56:18 (UTC)
committer zecke <zecke>2003-10-07 12:56:18 (UTC)
commit6f807f937764d0b80d38cd5e29983ad4ec2ae3c8 (patch) (unidiff)
treea1fc0bf579e5dfa0b07813110e998d4ea97d5c78 /libopie
parent898d453b417e561cea25f6b7578814d31cec6e97 (diff)
downloadopie-6f807f937764d0b80d38cd5e29983ad4ec2ae3c8.zip
opie-6f807f937764d0b80d38cd5e29983ad4ec2ae3c8.tar.gz
opie-6f807f937764d0b80d38cd5e29983ad4ec2ae3c8.tar.bz2
Just a small example on usage of an Event Filter...
I needed that for debugging but it looks useful as an example
Diffstat (limited to 'libopie') (more/less context) (show whitespace changes)
-rw-r--r--libopie/big-screen/example/osplitter_mail.cpp12
-rw-r--r--libopie/big-screen/example/osplitter_mail.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/libopie/big-screen/example/osplitter_mail.cpp b/libopie/big-screen/example/osplitter_mail.cpp
index 91442c8..4eaf3a9 100644
--- a/libopie/big-screen/example/osplitter_mail.cpp
+++ b/libopie/big-screen/example/osplitter_mail.cpp
@@ -24,2 +24,3 @@ ListViews::ListViews( QWidget* p, const char* name, WFlags fl )
24 : QWidget( p, name, fl ) { 24 : QWidget( p, name, fl ) {
25 qApp->installEventFilter( this );
25 m_lstFolders.setAutoDelete( true ); 26 m_lstFolders.setAutoDelete( true );
@@ -70 +71,12 @@ ListViews::~ListViews() {
70} 71}
72
73
74bool ListViews::eventFilter( QObject* obj, QEvent* ev ) {
75 if (!obj->isWidgetType() )
76 return false;
77 if ( ev->type() == QEvent::MouseButtonRelease ) {
78 qWarning(" name %s, class %s", obj->name(), obj->className() );
79 }
80
81 return false;
82}
diff --git a/libopie/big-screen/example/osplitter_mail.h b/libopie/big-screen/example/osplitter_mail.h
index d76f264..b7e7efe 100644
--- a/libopie/big-screen/example/osplitter_mail.h
+++ b/libopie/big-screen/example/osplitter_mail.h
@@ -27,2 +27,3 @@ public:
27 27
28 bool eventFilter( QObject* , QEvent* );
28private: 29private: