diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
commit | 10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch) | |
tree | 4bc444c00a79e88105f2cfce5b6209994c413ca0 /kdeui/kmenubar.cpp | |
parent | 307136d8eef0ba133b78ceee8e901138d4c996a1 (diff) | |
download | tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/kmenubar.cpp')
-rw-r--r-- | kdeui/kmenubar.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kdeui/kmenubar.cpp b/kdeui/kmenubar.cpp index 5660b4cad..d2accb61d 100644 --- a/kdeui/kmenubar.cpp +++ b/kdeui/kmenubar.cpp @@ -136,7 +136,7 @@ KMenuBar::KMenuBar(TQWidget *parent, const char *name) connect( &d->selection_timer, TQT_SIGNAL( timeout()), this, TQT_SLOT( selectionTimeout())); - connect( tqApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( updateFallbackSize())); + connect( qApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( updateFallbackSize())); if ( kapp ) // toolbarAppearanceChanged(int) is sent when changing macstyle @@ -163,8 +163,8 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) top_level = true; d->wasTopLevel = top_level; - if( tqparentWidget() - && tqparentWidget()->tqtopLevelWidget()->isFullScreen()) + if( parentWidget() + && parentWidget()->topLevelWidget()->isFullScreen()) top_level = false; if ( isTopLevelMenu() == top_level ) @@ -185,19 +185,19 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) d->margin = margin(); d->fallback_mode = false; bool wasShown = !isHidden(); - reparent( tqparentWidget(), WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder, TQPoint(0,0), false ); + reparent( parentWidget(), WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder, TQPoint(0,0), false ); #ifdef Q_WS_X11 KWin::setType( winId(), NET::TopMenu ); - if( tqparentWidget()) - XSetTransientForHint( qt_xdisplay(), winId(), tqparentWidget()->tqtopLevelWidget()->winId()); + if( parentWidget()) + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #endif TQMenuBar::setFrameStyle( NoFrame ); TQMenuBar::setLineWidth( 0 ); TQMenuBar::setMargin( 0 ); updateFallbackSize(); d->min_size = TQSize( 0, 0 ); - if( tqparentWidget() && !tqparentWidget()->isTopLevel()) - setShown( tqparentWidget()->isVisible()); + if( parentWidget() && !parentWidget()->isTopLevel()) + setShown( parentWidget()->isVisible()); else if ( wasShown ) show(); } else @@ -213,8 +213,8 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) setMinimumSize( 0, 0 ); setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX ); updateMenuBarSize(); - if ( tqparentWidget() ) - reparent( tqparentWidget(), TQPoint(0,0), !isHidden()); + if ( parentWidget() ) + reparent( parentWidget(), TQPoint(0,0), !isHidden()); } } @@ -240,34 +240,34 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) { if ( d->topLevel ) { - if ( tqparentWidget() && obj == tqparentWidget()->tqtopLevelWidget() ) + if ( parentWidget() && obj == parentWidget()->topLevelWidget() ) { if( ev->type() == TQEvent::Resize ) return false; // ignore resizing of parent, TQMenuBar would try to adjust size if ( ev->type() == TQEvent::Accel || ev->type() == TQEvent::AccelAvailable ) { - if ( TQApplication::sendEvent( tqtopLevelWidget(), ev ) ) + if ( TQApplication::sendEvent( topLevelWidget(), ev ) ) return true; } if(ev->type() == TQEvent::ShowFullScreen ) // will update the state properly setTopLevelMenuInternal( d->topLevel ); } - if( tqparentWidget() && obj == tqparentWidget() && ev->type() == TQEvent::Reparent ) + if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent ) { #ifdef Q_WS_X11 - XSetTransientForHint( qt_xdisplay(), winId(), tqparentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? #endif - setShown( tqparentWidget()->isTopLevel() || tqparentWidget()->isVisible()); + setShown( parentWidget()->isTopLevel() || parentWidget()->isVisible()); } - if( tqparentWidget() && !tqparentWidget()->isTopLevel() && obj == tqparentWidget()) + if( parentWidget() && !parentWidget()->isTopLevel() && obj == parentWidget()) { // if the parent is not toplevel, KMenuBar needs to match its visibility status if( ev->type() == TQEvent::Show ) { #ifdef Q_WS_X11 - XSetTransientForHint( qt_xdisplay(), winId(), tqparentWidget()->tqtopLevelWidget()->winId()); + XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? #endif @@ -279,10 +279,10 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) } else { - if( tqparentWidget() && obj == tqparentWidget()->tqtopLevelWidget()) + if( parentWidget() && obj == parentWidget()->topLevelWidget()) { if( ev->type() == TQEvent::WindowStateChange - && !tqparentWidget()->tqtopLevelWidget()->isFullScreen() ) + && !parentWidget()->topLevelWidget()->isFullScreen() ) setTopLevelMenuInternal( d->wasTopLevel ); } } @@ -330,7 +330,7 @@ void KMenuBar::selectionTimeout() TQApplication::desktop()->screenNumber(TQPoint(0,0)) ); TQRect area; if (kapp->desktop()->numScreens() < 2) - area = kapp->desktop()->tqgeometry(); + area = kapp->desktop()->geometry(); else area = kapp->desktop()->screenGeometry(screen); int margin = 0; @@ -372,7 +372,7 @@ void KMenuBar::setGeometry( int x, int y, int w, int h ) return; } checkSize( w, h ); - if( tqgeometry() != TQRect( x, y, w, h )) + if( geometry() != TQRect( x, y, w, h )) TQMenuBar::setGeometry( x, y, w, h ); } @@ -390,7 +390,7 @@ void KMenuBar::checkSize( int& w, int& h ) { if( !d->topLevel || d->fallback_mode ) return; - TQSize s = tqsizeHint(); + TQSize s = sizeHint(); w = s.width(); h = s.height(); // This is not done as setMinimumSize(), because that would set the minimum @@ -400,17 +400,17 @@ void KMenuBar::checkSize( int& w, int& h ) h = KMAX( h, d->min_size.height()); } -// QMenuBar's tqsizeHint() gives wrong size (insufficient width), which causes wrapping in the kicker applet -TQSize KMenuBar::tqsizeHint() const +// QMenuBar's sizeHint() gives wrong size (insufficient width), which causes wrapping in the kicker applet +TQSize KMenuBar::sizeHint() const { if( !d->topLevel || block_resize > 0 ) - return TQMenuBar::tqsizeHint(); - // Since TQMenuBar::tqsizeHint() may indirectly call resize(), + return TQMenuBar::sizeHint(); + // Since TQMenuBar::sizeHint() may indirectly call resize(), // avoid infinite recursion. ++block_resize; - // tqfind the minimum useful height, and enlarge the width until the menu fits in that height (one row) + // find the minimum useful height, and enlarge the width until the menu fits in that height (one row) int h = heightForWidth( 1000000 ); - int w = TQMenuBar::tqsizeHint().width(); + int w = TQMenuBar::sizeHint().width(); // optimization - don't call heightForWidth() too many times while( heightForWidth( w + 12 ) > h ) w += 12; @@ -444,7 +444,7 @@ bool KMenuBar::x11Event( XEvent* ev ) void KMenuBar::updateMenuBarSize() { menuContentsChanged(); // trigger invalidating calculated size - resize( tqsizeHint()); // and resize to preferred size + resize( sizeHint()); // and resize to preferred size } void KMenuBar::setFrameStyle( int style ) @@ -509,16 +509,16 @@ void KMenuBar::drawContents( TQPainter* p ) p->eraseRect( rect() ); erase(); - TQColorGroup g = tqcolorGroup(); + TQColorGroup g = colorGroup(); bool e; for ( int i=0; i<(int)count(); i++ ) { - TQMenuItem *mi = tqfindItem( idAt( i ) ); + TQMenuItem *mi = findItem( idAt( i ) ); if ( !mi->text().isNull() || mi->pixmap() ) { - TQRect r = tqitemRect(i); + TQRect r = itemRect(i); if(r.isEmpty() || !mi->isVisible()) continue; @@ -544,7 +544,7 @@ void KMenuBar::drawContents( TQPainter* p ) flags |= TQStyle::Style_Down; flags |= TQStyle::Style_HasFocus; - style().tqdrawControl(TQStyle::CE_MenuBarItem, p, this, + style().drawControl(TQStyle::CE_MenuBarItem, p, this, r, g, flags, TQStyleOption(mi)); } else |