diff options
author | Timothy Pearson <[email protected]> | 2013-01-24 13:43:14 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-24 13:43:14 -0600 |
commit | 79b21d47bce1ee428affc97534cd8b257232a871 (patch) | |
tree | 0df1fa0109d9f2bcef932eda8b5c25b2e06669ed /ksysguard/gui | |
parent | 9a898d493f493adbc404f7223043c85f3817472b (diff) | |
download | tdebase-79b21d47bce1ee428affc97534cd8b257232a871.tar.gz tdebase-79b21d47bce1ee428affc97534cd8b257232a871.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'ksysguard/gui')
-rw-r--r-- | ksysguard/gui/KSysGuardApplet.cc | 6 | ||||
-rw-r--r-- | ksysguard/gui/SensorBrowser.cc | 4 | ||||
-rw-r--r-- | ksysguard/gui/SensorDisplayLib/ListView.cc | 12 | ||||
-rw-r--r-- | ksysguard/gui/SensorDisplayLib/ProcessList.cc | 16 | ||||
-rw-r--r-- | ksysguard/gui/SensorDisplayLib/SensorDisplay.cc | 2 | ||||
-rw-r--r-- | ksysguard/gui/Workspace.cc | 4 | ||||
-rw-r--r-- | ksysguard/gui/ksgrd/SensorAgent.h | 2 | ||||
-rw-r--r-- | ksysguard/gui/ksgrd/SensorShellAgent.cc | 30 | ||||
-rw-r--r-- | ksysguard/gui/ksgrd/SensorShellAgent.h | 12 | ||||
-rw-r--r-- | ksysguard/gui/ksysguard.cc | 12 |
10 files changed, 50 insertions, 50 deletions
diff --git a/ksysguard/gui/KSysGuardApplet.cc b/ksysguard/gui/KSysGuardApplet.cc index 0019cdd5c..adf6b7b7c 100644 --- a/ksysguard/gui/KSysGuardApplet.cc +++ b/ksysguard/gui/KSysGuardApplet.cc @@ -52,7 +52,7 @@ extern "C" { KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile ) { - KGlobal::locale()->insertCatalogue( "ksysguard" ); + TDEGlobal::locale()->insertCatalogue( "ksysguard" ); return new KSysGuardApplet( configFile, KPanelApplet::Normal, KPanelApplet::Preferences, parent, "ksysguardapplet" ); @@ -309,7 +309,7 @@ void KSysGuardApplet::resizeDocks( uint newDockCount ) bool KSysGuardApplet::load() { - KStandardDirs* kstd = KGlobal::dirs(); + KStandardDirs* kstd = TDEGlobal::dirs(); kstd->addResourceType( "data", "share/apps/ksysguard" ); TQString fileName = kstd->findResource( "data", "KSysGuardApplet.xml" ); @@ -458,7 +458,7 @@ bool KSysGuardApplet::save() ((KSGRD::SensorDisplay*)mDockList[ i ])->saveSettings( doc, element ); } - KStandardDirs* kstd = KGlobal::dirs(); + KStandardDirs* kstd = TDEGlobal::dirs(); kstd->addResourceType( "data", "share/apps/ksysguard" ); TQString fileName = kstd->saveLocation( "data", "ksysguard" ); fileName += "/KSysGuardApplet.xml"; diff --git a/ksysguard/gui/SensorBrowser.cc b/ksysguard/gui/SensorBrowser.cc index 694e16ef2..06cbc7507 100644 --- a/ksysguard/gui/SensorBrowser.cc +++ b/ksysguard/gui/SensorBrowser.cc @@ -128,7 +128,7 @@ void SensorBrowser::update() TQString hostName = mSensorManager->hostName( host ); HostItem* lvi = new HostItem( this, hostName, id, host ); - TQPixmap pix = KGlobal::iconLoader()->loadIcon( "computer", KIcon::Desktop, KIcon::SizeSmall ); + TQPixmap pix = TDEGlobal::iconLoader()->loadIcon( "computer", KIcon::Desktop, KIcon::SizeSmall ); lvi->setPixmap( 0, pix ); HostInfo* hostInfo = new HostInfo( id, host, hostName, lvi ); @@ -214,7 +214,7 @@ void SensorBrowser::answerReceived( int id, const TQString &answer ) if ( !found ) { TQListViewItem* lvi = new TQListViewItem( parent, name ); if ( j == absolutePath.count() - 1 ) { - TQPixmap pix = KGlobal::iconLoader()->loadIcon( "ksysguardd", KIcon::Desktop, + TQPixmap pix = TDEGlobal::iconLoader()->loadIcon( "ksysguardd", KIcon::Desktop, KIcon::SizeSmall ); lvi->setPixmap( 0, pix ); lvi->setText( 1, KSGRD::SensorMgr->translateSensorType( sensorType ) ); diff --git a/ksysguard/gui/SensorDisplayLib/ListView.cc b/ksysguard/gui/SensorDisplayLib/ListView.cc index 97b1a3c0f..d11826177 100644 --- a/ksysguard/gui/SensorDisplayLib/ListView.cc +++ b/ksysguard/gui/SensorDisplayLib/ListView.cc @@ -51,8 +51,8 @@ int PrivateListViewItem::compare( TQListViewItem *item, int col, bool ascending int type = ((PrivateListView*)listView())->columnType( col ); if ( type == PrivateListView::Int ) { - int prev = (int)KGlobal::locale()->readNumber( key( col, ascending ) ); - int next = (int)KGlobal::locale()->readNumber( item->key( col, ascending ) ); + int prev = (int)TDEGlobal::locale()->readNumber( key( col, ascending ) ); + int next = (int)TDEGlobal::locale()->readNumber( item->key( col, ascending ) ); if ( prev < next ) return -1; else if ( prev == next ) @@ -60,8 +60,8 @@ int PrivateListViewItem::compare( TQListViewItem *item, int col, bool ascending else return 1; } else if ( type == PrivateListView::Float ) { - double prev = KGlobal::locale()->readNumber( key( col, ascending ) ); - double next = KGlobal::locale()->readNumber( item->key( col, ascending ) ); + double prev = TDEGlobal::locale()->readNumber( key( col, ascending ) ); + double next = TDEGlobal::locale()->readNumber( item->key( col, ascending ) ); if ( prev < next ) return -1; else @@ -130,9 +130,9 @@ void PrivateListView::update(const TQString& answer) KSGRD::SensorTokenizer records(lines[i], '\t'); for (uint j = 0; j < records.count(); j++) { if ( mColumnTypes[ j ] == "f" ) - item->setText(j, KGlobal::locale()->formatNumber( records[j].toFloat() ) ); + item->setText(j, TDEGlobal::locale()->formatNumber( records[j].toFloat() ) ); else if ( mColumnTypes[ j ] == "D" ) - item->setText(j, KGlobal::locale()->formatNumber( records[j].toDouble(), 0 ) ); + item->setText(j, TDEGlobal::locale()->formatNumber( records[j].toDouble(), 0 ) ); else item->setText(j, records[j]); } diff --git a/ksysguard/gui/SensorDisplayLib/ProcessList.cc b/ksysguard/gui/SensorDisplayLib/ProcessList.cc index 44ce491db..86b5b17ee 100644 --- a/ksysguard/gui/SensorDisplayLib/ProcessList.cc +++ b/ksysguard/gui/SensorDisplayLib/ProcessList.cc @@ -64,8 +64,8 @@ int ProcessLVI::compare( TQListViewItem *item, int col, bool ascending ) const int type = ((ProcessList*)listView())->columnType( col ); if ( type == ProcessList::Int ) { - int prev = (int)KGlobal::locale()->readNumber( key( col, ascending ) ); - int next = (int)KGlobal::locale()->readNumber( item->key( col, ascending ) ); + int prev = (int)TDEGlobal::locale()->readNumber( key( col, ascending ) ); + int next = (int)TDEGlobal::locale()->readNumber( item->key( col, ascending ) ); if ( prev < next ) return -1; else if ( prev == next ) @@ -75,8 +75,8 @@ int ProcessLVI::compare( TQListViewItem *item, int col, bool ascending ) const } if ( type == ProcessList::Float ) { - double prev = KGlobal::locale()->readNumber( key( col, ascending ) ); - double next = KGlobal::locale()->readNumber( item->key( col, ascending ) ); + double prev = TDEGlobal::locale()->readNumber( key( col, ascending ) ); + double next = TDEGlobal::locale()->readNumber( item->key( col, ascending ) ); if ( prev < next ) return -1; else @@ -613,11 +613,11 @@ ProcessList::addProcess(KSGRD::SensorPSLine* p, ProcessLVI* pli) TQPixmap pix; if (!iconCache[name]) { - pix = KGlobal::iconLoader()->loadIcon(name, KIcon::Small, + pix = TDEGlobal::iconLoader()->loadIcon(name, KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, 0L, true); if (pix.isNull() || !pix.mask()) - pix = KGlobal::iconLoader()->loadIcon("unknownapp", KIcon::User, + pix = TDEGlobal::iconLoader()->loadIcon("unknownapp", KIcon::User, KIcon::SizeSmall); if (pix.width() != 16 || pix.height() != 16) @@ -659,9 +659,9 @@ ProcessList::addProcess(KSGRD::SensorPSLine* p, ProcessLVI* pli) if (mColumnTypes[col] == "S" && columnDict[(*p)[col]]) pli->setText(col, *columnDict[(*p)[col]]); else if ( mColumnTypes[col] == "f" ) - pli->setText( col, KGlobal::locale()->formatNumber( (*p)[col].toFloat() ) ); + pli->setText( col, TDEGlobal::locale()->formatNumber( (*p)[col].toFloat() ) ); else if ( mColumnTypes[col] == "D" ) - pli->setText( col, KGlobal::locale()->formatNumber( (*p)[col].toInt(), 0 ) ); + pli->setText( col, TDEGlobal::locale()->formatNumber( (*p)[col].toInt(), 0 ) ); else pli->setText(col, (*p)[col]); } diff --git a/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc b/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc index 03ee4b991..593dcb00a 100644 --- a/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc +++ b/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc @@ -439,7 +439,7 @@ void SensorDisplay::setSensorOk( bool ok ) if ( mErrorIndicator ) return; - TQPixmap errorIcon = KGlobal::iconLoader()->loadIcon( "connect_creating", KIcon::Desktop, + TQPixmap errorIcon = TDEGlobal::iconLoader()->loadIcon( "connect_creating", KIcon::Desktop, KIcon::SizeSmall ); if ( !mPlotterWdg ) return; diff --git a/ksysguard/gui/Workspace.cc b/ksysguard/gui/Workspace.cc index 3c1a92a56..1fb1e1e62 100644 --- a/ksysguard/gui/Workspace.cc +++ b/ksysguard/gui/Workspace.cc @@ -91,7 +91,7 @@ void Workspace::readProperties( KConfig *cfg ) /* If workDir is not specified in the config file, it's * probably the first time the user has started KSysGuard. We * then "restore" a special default configuration. */ - KStandardDirs* kstd = KGlobal::dirs(); + KStandardDirs* kstd = TDEGlobal::dirs(); kstd->addResourceType( "data", "share/apps/ksysguard" ); mWorkDir = kstd->saveLocation( "data", "ksysguard" ); @@ -440,7 +440,7 @@ void Workspace::applyStyle() void Workspace::showProcesses() { - KStandardDirs* kstd = KGlobal::dirs(); + KStandardDirs* kstd = TDEGlobal::dirs(); kstd->addResourceType( "data", "share/apps/ksysguard" ); TQString file = kstd->findResource( "data", "ProcessTable.sgrd" ); diff --git a/ksysguard/gui/ksgrd/SensorAgent.h b/ksysguard/gui/ksgrd/SensorAgent.h index 177bb76d6..36c44095c 100644 --- a/ksysguard/gui/ksgrd/SensorAgent.h +++ b/ksysguard/gui/ksgrd/SensorAgent.h @@ -24,7 +24,7 @@ #include <tqobject.h> #include <tqptrlist.h> -class KProcess; +class TDEProcess; class KShellProcess; class TQString; diff --git a/ksysguard/gui/ksgrd/SensorShellAgent.cc b/ksysguard/gui/ksgrd/SensorShellAgent.cc index 8081aa49d..7e137ad56 100644 --- a/ksysguard/gui/ksgrd/SensorShellAgent.cc +++ b/ksysguard/gui/ksgrd/SensorShellAgent.cc @@ -49,20 +49,20 @@ bool SensorShellAgent::start( const TQString &host, const TQString &shell, const TQString &command, int ) { mRetryCount = 3; - mDaemon = new KProcess; + mDaemon = new TDEProcess; mDaemon->setUseShell(true); setHostName( host ); mShell = shell; mCommand = command; - connect( mDaemon, TQT_SIGNAL( processExited( KProcess* ) ), - TQT_SLOT( daemonExited( KProcess* ) ) ); - connect( mDaemon, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), - TQT_SLOT( msgRcvd( KProcess*, char*, int ) ) ); - connect( mDaemon, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), - TQT_SLOT( errMsgRcvd( KProcess*, char*, int ) ) ); - connect( mDaemon, TQT_SIGNAL( wroteStdin( KProcess* ) ), - TQT_SLOT( msgSent( KProcess* ) ) ); + connect( mDaemon, TQT_SIGNAL( processExited( TDEProcess* ) ), + TQT_SLOT( daemonExited( TDEProcess* ) ) ); + connect( mDaemon, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), + TQT_SLOT( msgRcvd( TDEProcess*, char*, int ) ) ); + connect( mDaemon, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), + TQT_SLOT( errMsgRcvd( TDEProcess*, char*, int ) ) ); + connect( mDaemon, TQT_SIGNAL( wroteStdin( TDEProcess* ) ), + TQT_SLOT( msgSent( TDEProcess* ) ) ); TQString cmd; if ( !command.isEmpty() ) @@ -71,7 +71,7 @@ bool SensorShellAgent::start( const TQString &host, const TQString &shell, cmd = mShell + " " + hostName() + " ksysguardd"; *mDaemon << cmd; - if ( !mDaemon->start( KProcess::NotifyOnExit, KProcess::All ) ) { + if ( !mDaemon->start( TDEProcess::NotifyOnExit, TDEProcess::All ) ) { sensorManager()->hostLost( this ); kdDebug (1215) << "Command '" << cmd << "' failed" << endl; return false; @@ -88,7 +88,7 @@ void SensorShellAgent::hostInfo( TQString &shell, TQString &command, port = -1; } -void SensorShellAgent::msgSent( KProcess* ) +void SensorShellAgent::msgSent( TDEProcess* ) { setTransmitting( false ); @@ -96,7 +96,7 @@ void SensorShellAgent::msgSent( KProcess* ) executeCommand(); } -void SensorShellAgent::msgRcvd( KProcess*, char *buffer, int buflen ) +void SensorShellAgent::msgRcvd( TDEProcess*, char *buffer, int buflen ) { if ( !buffer || buflen == 0 ) return; @@ -106,7 +106,7 @@ void SensorShellAgent::msgRcvd( KProcess*, char *buffer, int buflen ) processAnswer( aux ); } -void SensorShellAgent::errMsgRcvd( KProcess*, char *buffer, int buflen ) +void SensorShellAgent::errMsgRcvd( TDEProcess*, char *buffer, int buflen ) { if ( !buffer || buflen == 0 ) return; @@ -117,10 +117,10 @@ void SensorShellAgent::errMsgRcvd( KProcess*, char *buffer, int buflen ) << endl << buf << endl; } -void SensorShellAgent::daemonExited( KProcess *process ) +void SensorShellAgent::daemonExited( TDEProcess *process ) { kdDebug() << "daemonExited" << endl; - if ( mRetryCount-- <= 0 || !mDaemon->start( KProcess::NotifyOnExit, KProcess::All ) ) { + if ( mRetryCount-- <= 0 || !mDaemon->start( TDEProcess::NotifyOnExit, TDEProcess::All ) ) { kdDebug() << "daemon could not be restart" << endl; setDaemonOnLine( false ); sensorManager()->hostLost( this ); diff --git a/ksysguard/gui/ksgrd/SensorShellAgent.h b/ksysguard/gui/ksgrd/SensorShellAgent.h index cf3e29cc3..2befd346b 100644 --- a/ksysguard/gui/ksgrd/SensorShellAgent.h +++ b/ksysguard/gui/ksgrd/SensorShellAgent.h @@ -29,7 +29,7 @@ class TQString; -class KProcess; +class TDEProcess; namespace KSGRD { @@ -57,16 +57,16 @@ class SensorShellAgent : public SensorAgent void hostInfo( TQString &shell, TQString &command, int &port) const; private slots: - void msgSent( KProcess* ); - void msgRcvd( KProcess*, char *buffer, int buflen ); - void errMsgRcvd( KProcess*, char *buffer, int buflen ); - void daemonExited( KProcess* ); + void msgSent( TDEProcess* ); + void msgRcvd( TDEProcess*, char *buffer, int buflen ); + void errMsgRcvd( TDEProcess*, char *buffer, int buflen ); + void daemonExited( TDEProcess* ); private: bool writeMsg( const char *msg, int len ); bool txReady(); - TQGuardedPtr<KProcess> mDaemon; + TQGuardedPtr<TDEProcess> mDaemon; TQString mShell; TQString mCommand; int mRetryCount; diff --git a/ksysguard/gui/ksysguard.cc b/ksysguard/gui/ksysguard.cc index 9b8fb0722..00d3ac727 100644 --- a/ksysguard/gui/ksysguard.cc +++ b/ksysguard/gui/ksysguard.cc @@ -77,7 +77,7 @@ TopLevel::TopLevel( const char *name ) mSplitter = new TQSplitter( this ); mSplitter->setOrientation( Qt::Horizontal ); - mSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() ); + mSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); setCentralWidget( mSplitter ); mSensorBrowser = new SensorBrowser( mSplitter, KSGRD::SensorMgr ); @@ -162,7 +162,7 @@ void TopLevel::resetWorkSheets() mWorkSpace->removeAllWorkSheets(); - KStandardDirs* kstd = KGlobal::dirs(); + KStandardDirs* kstd = TDEGlobal::dirs(); kstd->addResourceType( "data", "share/apps/ksysguard" ); TQString workDir = kstd->saveLocation( "data", "ksysguard" ); @@ -444,8 +444,8 @@ void TopLevel::answerReceived( int id, const TQString &answer ) case 2: mUsed = answer.toLong(); s = i18n( "Memory: %1 %2 used, %3 %4 free" ) - .arg( KGlobal::locale()->formatNumber( mUsed, 0 ) ).arg( unit ) - .arg( KGlobal::locale()->formatNumber( mFree, 0 ) ).arg( unit ); + .arg( TDEGlobal::locale()->formatNumber( mUsed, 0 ) ).arg( unit ) + .arg( TDEGlobal::locale()->formatNumber( mFree, 0 ) ).arg( unit ); statusBar()->changeItem( s, 1 ); break; @@ -504,8 +504,8 @@ void TopLevel::setSwapInfo( long used, long free, const TQString &unit ) msg = i18n( "No swap space available" ); else { msg = i18n( "Swap: %1 %2 used, %3 %4 free" ) - .arg( KGlobal::locale()->formatNumber( used, 0 ) ).arg( unit ) - .arg( KGlobal::locale()->formatNumber( free, 0 ) ).arg( unit ); + .arg( TDEGlobal::locale()->formatNumber( used, 0 ) ).arg( unit ) + .arg( TDEGlobal::locale()->formatNumber( free, 0 ) ).arg( unit ); } statusBar()->changeItem( msg, 2 ); |