From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdeui/ksystemtray.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'kdeui/ksystemtray.cpp') diff --git a/kdeui/ksystemtray.cpp b/kdeui/ksystemtray.cpp index 5742eb174..de06be65b 100644 --- a/kdeui/ksystemtray.cpp +++ b/kdeui/ksystemtray.cpp @@ -67,7 +67,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) d->actionCollection = new KActionCollection(this); #ifdef Q_WS_X11 - KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): qt_xrootwin() ); + KWin::setSystemTrayWindowFor( winId(), parent?parent->tqtopLevelWidget()->winId(): qt_xrootwin() ); #endif setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); @@ -77,13 +77,13 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) move( -1000, -1000 ); KStdAction::quit(this, TQT_SLOT(maybeQuit()), d->actionCollection); - if (parentWidget()) + if (tqparentWidget()) { new KAction(i18n("Minimize"), KShortcut(), this, TQT_SLOT( minimizeRestoreAction() ), d->actionCollection, "minimizeRestore"); #ifdef Q_WS_X11 - KWin::WindowInfo info = KWin::windowInfo( parentWidget()->winId()); + KWin::WindowInfo info = KWin::windowInfo( tqparentWidget()->winId()); d->on_all_desktops = info.onAllDesktops(); #else d->on_all_desktops = false; @@ -94,7 +94,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) d->on_all_desktops = false; } setCaption( KGlobal::instance()->aboutData()->programName()); - setAlignment( alignment() | Qt::AlignVCenter | Qt::AlignHCenter ); + tqsetAlignment( tqalignment() | Qt::AlignVCenter | Qt::AlignHCenter ); // Handle the possibility that the requested system tray size is something other than 22x22 pixels, per the Free Desktop specifications setScaledContents(true); @@ -142,7 +142,7 @@ KPopupMenu* KSystemTray::contextMenu() const void KSystemTray::mousePressEvent( TQMouseEvent *e ) { - if ( !rect().contains( e->pos() ) ) + if ( !rect().tqcontains( e->pos() ) ) return; switch ( e->button() ) { @@ -152,9 +152,9 @@ void KSystemTray::mousePressEvent( TQMouseEvent *e ) case MidButton: // fall through case RightButton: - if ( parentWidget() ) { + if ( tqparentWidget() ) { KAction* action = d->actionCollection->action("minimizeRestore"); - if ( parentWidget()->isVisible() ) + if ( tqparentWidget()->isVisible() ) action->setText( i18n("&Minimize") ); else action->setText( i18n("&Restore") ); @@ -182,8 +182,8 @@ void KSystemTray::contextMenuAboutToShow( KPopupMenu* ) // entry is "minimize", otherwise it's "restore" void KSystemTray::minimizeRestoreAction() { - if ( parentWidget() ) { - bool restore = !( parentWidget()->isVisible() ); + if ( tqparentWidget() ) { + bool restore = !( tqparentWidget()->isVisible() ); minimizeRestore( restore ); } } @@ -207,13 +207,13 @@ void KSystemTray::maybeQuit() // KDE4: stop closing the parent widget? it results in complex application code // instead make applications connect to the quitSelected() signal - if (parentWidget()) + if (tqparentWidget()) { - parentWidget()->close(); + tqparentWidget()->close(); } else { - qApp->closeAllWindows(); + tqApp->closeAllWindows(); } } @@ -237,7 +237,7 @@ void KSystemTray::setInactive() // (just like taskbar); otherwise hide it void KSystemTray::activateOrHide() { - TQWidget *pw = parentWidget(); + TQWidget *pw = tqparentWidget(); if ( !pw ) return; @@ -263,7 +263,7 @@ void KSystemTray::activateOrHide() NET::WMGeometry | NET::XAWMState | NET::WMState | NET::WMWindowType ); if( info2.mappingState() != NET::Visible ) continue; // not visible on current desktop -> ignore - if( !info2.geometry().intersects( pw->geometry())) + if( !info2.tqgeometry().intersects( pw->tqgeometry())) continue; // not obscuring the window -> ignore if( !info1.hasState( NET::KeepAbove ) && info2.hasState( NET::KeepAbove )) continue; // obscured by window kept above -> ignore @@ -283,7 +283,7 @@ void KSystemTray::activateOrHide() void KSystemTray::minimizeRestore( bool restore ) { - TQWidget* pw = parentWidget(); + TQWidget* pw = tqparentWidget(); if( !pw ) return; #ifdef Q_WS_X11 @@ -294,7 +294,7 @@ void KSystemTray::minimizeRestore( bool restore ) KWin::setOnAllDesktops( pw->winId(), true ); else KWin::setCurrentDesktop( info.desktop() ); - pw->move( info.geometry().topLeft() ); // avoid placement policies + pw->move( info.tqgeometry().topLeft() ); // avoid placement policies pw->show(); pw->raise(); KWin::activateWindow( pw->winId() ); -- cgit v1.2.1