summaryrefslogtreecommitdiff
path: root/library/qpemenubar.cpp
authorzecke <zecke>2002-09-10 12:09:49 (UTC)
committer zecke <zecke>2002-09-10 12:09:49 (UTC)
commit6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4 (patch) (unidiff)
tree6ebc93c6432f4ed9d00ef1448b6a047ef522a79a /library/qpemenubar.cpp
parentd10cddb3c9ce75bc90b14add14bc133737fe35aa (diff)
downloadopie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.zip
opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.gz
opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.bz2
Qtopia1-6 merge
still to test bic changes to be resolved more changes to be made?
Diffstat (limited to 'library/qpemenubar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpemenubar.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/library/qpemenubar.cpp b/library/qpemenubar.cpp
index bb3ad8d..f0171ba 100644
--- a/library/qpemenubar.cpp
+++ b/library/qpemenubar.cpp
@@ -1,5 +1,5 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2001 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
@@ -249,7 +249,9 @@ bool QPEMenuToolFocusManager::eventFilter( QObject *object, QEvent *event )
249 QChildEvent *ce = (QChildEvent *)event; 249 QChildEvent *ce = (QChildEvent *)event;
250 if ( ce->child()->inherits( "QMenuBar" ) ) { 250 if ( ce->child()->isWidgetType() ) {
251 addWidget( (QWidget *)ce->child() ); 251 if ( ce->child()->inherits( "QMenuBar" ) ) {
252 ce->child()->installEventFilter( this ); 252 addWidget( (QWidget *)ce->child() );
253 } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) { 253 ce->child()->installEventFilter( this );
254 addWidget( (QWidget *)ce->child() ); 254 } else if ( object->inherits( "QToolBar" ) ) {
255 addWidget( (QWidget *)ce->child() );
256 }
255 } 257 }
@@ -257,7 +259,9 @@ bool QPEMenuToolFocusManager::eventFilter( QObject *object, QEvent *event )
257 QChildEvent *ce = (QChildEvent *)event; 259 QChildEvent *ce = (QChildEvent *)event;
258 if ( ce->child()->inherits( "QMenuBar" ) ) { 260 if ( ce->child()->isWidgetType() ) {
259 removeWidget( (QWidget *)ce->child() ); 261 if ( ce->child()->inherits( "QMenuBar" ) ) {
260 ce->child()->removeEventFilter( this ); 262 removeWidget( (QWidget *)ce->child() );
261 } else if ( object->inherits( "QToolBar" ) && ce->child()->isWidgetType() ) { 263 ce->child()->removeEventFilter( this );
262 removeWidget( (QWidget *)ce->child() ); 264 } else if ( object->inherits( "QToolBar" ) ) {
265 removeWidget( (QWidget *)ce->child() );
266 }
263 } 267 }
@@ -281,3 +285,2 @@ void QPEMenuToolFocusManager::deactivate()
281 285
282 \sa QMenuBar
283*/ 286*/
@@ -308,16 +311,14 @@ void QPEMenuBar::keyPressEvent( QKeyEvent *e )
308 311
309 312/*!
310void QPEMenuBar::activateItem( int index ) 313 \internal
311{ 314*/
315void QPEMenuBar::activateItem( int index ) {
312 activateItemAt( index ); 316 activateItemAt( index );
313} 317}
314 318void QPEMenuBar::goodbye() {
315void QPEMenuBar::goodbye()
316{
317 activateItemAt(-1); 319 activateItemAt(-1);
318 for ( unsigned int i = 0; i < count(); i++ ) { 320 for ( uint i = 0; i < count(); i++ ) {
319 QMenuItem *mi = findItem( idAt(i) ); 321 QMenuItem* mi = findItem( idAt(i) );
320 if ( mi->popup() ) { 322 if (mi->popup() )
321 mi->popup()->hide(); 323 mi->popup()->hide();
322 }
323 } 324 }