summaryrefslogtreecommitdiffstats
path: root/ksystraycmd
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /ksystraycmd
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksystraycmd')
-rw-r--r--ksystraycmd/ksystraycmd.cpp38
-rw-r--r--ksystraycmd/ksystraycmd.h22
-rw-r--r--ksystraycmd/main.cpp10
3 files changed, 35 insertions, 35 deletions
diff --git a/ksystraycmd/ksystraycmd.cpp b/ksystraycmd/ksystraycmd.cpp
index 77edf73ea..f912c1221 100644
--- a/ksystraycmd/ksystraycmd.cpp
+++ b/ksystraycmd/ksystraycmd.cpp
@@ -1,7 +1,7 @@
-#include <qtooltip.h>
-#include <qtextstream.h>
-#include <qimage.h>
-#include <qregexp.h>
+#include <tqtooltip.h>
+#include <tqtextstream.h>
+#include <tqimage.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -21,7 +21,7 @@
KSysTrayCmd::KSysTrayCmd()
- : QLabel( 0, "systray_cmd" ),
+ : TQLabel( 0, "systray_cmd" ),
isVisible(true), lazyStart( false ), noquit( false ), quitOnHide( false ), onTop(false), ownIcon(false),
win(0), client(0), kwinmodule(0), top(0), left(0)
{
@@ -114,8 +114,8 @@ void KSysTrayCmd::setTargetWindow( WId w )
void KSysTrayCmd::setTargetWindow( const KWin::WindowInfo &info )
{
- disconnect( kwinmodule, SIGNAL(windowAdded(WId)), this, SLOT(windowAdded(WId)) );
- connect( kwinmodule, SIGNAL(windowChanged(WId)), SLOT(windowChanged(WId)) );
+ disconnect( kwinmodule, TQT_SIGNAL(windowAdded(WId)), this, TQT_SLOT(windowAdded(WId)) );
+ connect( kwinmodule, TQT_SIGNAL(windowChanged(WId)), TQT_SLOT(windowChanged(WId)) );
win = info.win();
KWin::setSystemTrayWindowFor( winId(), win );
refresh();
@@ -141,7 +141,7 @@ void KSysTrayCmd::refresh()
{
KWin::setSystemTrayWindowFor( winId(), win ? win : winId() );
- QToolTip::remove( this );
+ TQToolTip::remove( this );
if ( win ) {
KConfig *appCfg = kapp->config();
KConfigGroupSaver configSaver(appCfg, "System Tray");
@@ -157,15 +157,15 @@ void KSysTrayCmd::refresh()
setPixmap( KWin::icon( win, iconWidth, iconWidth, true ) );
}
- QToolTip::add( this, KWin::windowInfo( win ).name() );
+ TQToolTip::add( this, KWin::windowInfo( win ).name() );
}
else {
if ( !tooltip.isEmpty() )
- QToolTip::add( this, tooltip );
+ TQToolTip::add( this, tooltip );
else if ( !command.isEmpty() )
- QToolTip::add( this, command );
+ TQToolTip::add( this, command );
else
- QToolTip::add( this, window );
+ TQToolTip::add( this, window );
setPixmap( KSystemTray::loadIcon( kapp->iconName() ) );
}
@@ -179,9 +179,9 @@ bool KSysTrayCmd::startClient()
{
client = new KShellProcess();
*client << command;
- connect( kwinmodule, SIGNAL(windowAdded(WId)), SLOT(windowAdded(WId)) );
- connect( client, SIGNAL( processExited(KProcess *) ),
- this, SLOT( clientExited() ) );
+ connect( kwinmodule, TQT_SIGNAL(windowAdded(WId)), TQT_SLOT(windowAdded(WId)) );
+ connect( client, TQT_SIGNAL( processExited(KProcess *) ),
+ this, TQT_SLOT( clientExited() ) );
return client->start();
}
@@ -228,7 +228,7 @@ void KSysTrayCmd::quit()
qApp->quit();
}
-void KSysTrayCmd::execContextMenu( const QPoint &pos )
+void KSysTrayCmd::execContextMenu( const TQPoint &pos )
{
KPopupMenu *menu = new KPopupMenu();
menu->insertTitle( *pixmap(), i18n( "KSysTrayCmd" ) );
@@ -264,7 +264,7 @@ void KSysTrayCmd::execContextMenu( const QPoint &pos )
void KSysTrayCmd::checkExistingWindows()
{
- QValueList<WId>::ConstIterator it;
+ TQValueList<WId>::ConstIterator it;
for ( it = kwinmodule->windows().begin(); it != kwinmodule->windows().end(); ++it ) {
windowAdded( *it );
if ( win )
@@ -274,7 +274,7 @@ void KSysTrayCmd::checkExistingWindows()
void KSysTrayCmd::windowAdded(WId w)
{
- if ( !window.isEmpty() && ( QRegExp( window ).search( KWin::windowInfo(w).name() ) == -1 ) )
+ if ( !window.isEmpty() && ( TQRegExp( window ).search( KWin::windowInfo(w).name() ) == -1 ) )
return; // no match
setTargetWindow( w );
}
@@ -290,7 +290,7 @@ void KSysTrayCmd::windowChanged( WId w )
// Tray icon event handlers
//
-void KSysTrayCmd::mousePressEvent( QMouseEvent *e )
+void KSysTrayCmd::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == RightButton )
execContextMenu( e->globalPos() );
diff --git a/ksystraycmd/ksystraycmd.h b/ksystraycmd/ksystraycmd.h
index ecb670fd5..90e3bc36f 100644
--- a/ksystraycmd/ksystraycmd.h
+++ b/ksystraycmd/ksystraycmd.h
@@ -3,7 +3,7 @@
#ifndef KSYSTRAYCMD_H
#define KSYSTRAYCMD_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kwin.h>
class KShellProcess;
@@ -22,17 +22,17 @@ public:
~KSysTrayCmd();
void setWindow( WId w ) { win = w; }
- void setCommand( const QString &cmd ) { command = cmd; }
- void setPattern( const QString &regexp ) { window = regexp; }
+ void setCommand( const TQString &cmd ) { command = cmd; }
+ void setPattern( const TQString &regexp ) { window = regexp; }
void setStartOnShow( bool enable ) { lazyStart = enable; isVisible = !enable; }
void setNoQuit( bool enable ) { noquit = enable; }
void setQuitOnHide( bool enable ) { quitOnHide = enable; }
void setOnTop( bool enable ) { onTop = enable; }
void setOwnIcon( bool enable ) { ownIcon = enable; }
- void setDefaultTip( const QString &tip ) { tooltip = tip; }
+ void setDefaultTip( const TQString &tip ) { tooltip = tip; }
bool hasTargetWindow() const { return (win != 0); }
bool hasRunningClient() const { return (client != 0); }
- const QString &errorMsg() const { return errStr; }
+ const TQString &errorMsg() const { return errStr; }
bool start();
@@ -46,7 +46,7 @@ public slots:
void toggleWindow() { if ( isVisible ) hideWindow(); else showWindow(); }
void setTargetWindow( WId w );
- void execContextMenu( const QPoint &pos );
+ void execContextMenu( const TQPoint &pos );
void quit();
void quitClient();
@@ -62,12 +62,12 @@ protected:
void checkExistingWindows();
void setTargetWindow( const KWin::WindowInfo &info );
- void mousePressEvent( QMouseEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
private:
- QString command;
- QString window;
- QString tooltip;
+ TQString command;
+ TQString window;
+ TQString tooltip;
bool isVisible;
bool lazyStart;
bool noquit;
@@ -78,7 +78,7 @@ private:
WId win;
KShellProcess *client;
KWinModule *kwinmodule;
- QString errStr;
+ TQString errStr;
/** Memorized 'top' position of the window*/
int top;
diff --git a/ksystraycmd/main.cpp b/ksystraycmd/main.cpp
index b10728fd9..ac6b94d74 100644
--- a/ksystraycmd/main.cpp
+++ b/ksystraycmd/main.cpp
@@ -67,7 +67,7 @@ int main( int argc, char *argv[] )
KSysTrayCmd cmd;
// Read the window id
- QString wid = args->getOption( "wid" );
+ TQString wid = args->getOption( "wid" );
if ( !wid.isEmpty() ) {
int base = 10;
if ( wid.startsWith( "0x" ) ) {
@@ -85,7 +85,7 @@ int main( int argc, char *argv[] )
}
// Read window title regexp
- QString title = args->getOption( "window" );
+ TQString title = args->getOption( "window" );
if ( !title.isEmpty() )
cmd.setPattern( title );
@@ -93,14 +93,14 @@ int main( int argc, char *argv[] )
KCmdLineArgs::usage(i18n("No command or window specified"));
// Read the command
- QString command;
+ TQString command;
for ( int i = 0; i < args->count(); i++ )
- command += KProcess::quote(QString::fromLocal8Bit( args->arg(i) )) + " ";
+ command += KProcess::quote(TQString::fromLocal8Bit( args->arg(i) )) + " ";
if ( !command.isEmpty() )
cmd.setCommand( command );
// Tooltip
- QString tip = args->getOption( "tooltip" );
+ TQString tip = args->getOption( "tooltip" );
if ( !tip.isEmpty() )
cmd.setDefaultTip( tip );