summaryrefslogtreecommitdiffstats
path: root/kdeui/ksystemtray.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /kdeui/ksystemtray.cpp
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/ksystemtray.cpp')
-rw-r--r--kdeui/ksystemtray.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kdeui/ksystemtray.cpp b/kdeui/ksystemtray.cpp
index 5742eb174..c9bebc47d 100644
--- a/kdeui/ksystemtray.cpp
+++ b/kdeui/ksystemtray.cpp
@@ -57,7 +57,7 @@ public:
};
KSystemTray::KSystemTray( TQWidget* parent, const char* name )
- : TQLabel( parent, name, WType_TopLevel )
+ : TQLabel( parent, name, (WFlags)WType_TopLevel )
{
#ifdef Q_WS_X11
QXEmbed::initialize();
@@ -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);
@@ -75,15 +75,15 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name )
menu = new KPopupMenu( this );
menu->insertTitle( kapp->miniIcon(), kapp->caption() );
move( -1000, -1000 );
- KStdAction::quit(this, TQT_SLOT(maybeQuit()), d->actionCollection);
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(maybeQuit()), d->actionCollection);
- if (parentWidget())
+ if (tqparentWidget())
{
new KAction(i18n("Minimize"), KShortcut(),
- this, TQT_SLOT( minimizeRestoreAction() ),
+ TQT_TQOBJECT(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);
@@ -146,15 +146,15 @@ void KSystemTray::mousePressEvent( TQMouseEvent *e )
return;
switch ( e->button() ) {
- case LeftButton:
+ case Qt::LeftButton:
toggleActive();
break;
- case MidButton:
+ case Qt::MidButton:
// fall through
- case RightButton:
- if ( parentWidget() ) {
+ case Qt::RightButton:
+ 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;
@@ -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