Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent ed6b24997e
commit b6f3912adc

@ -66,7 +66,7 @@ typedef KGenericFactory<ConfigDialog, TQWidget> KNemoFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_knemo, KNemoFactory("kcm_knemo") ) K_EXPORT_COMPONENT_FACTORY( kcm_knemo, KNemoFactory("kcm_knemo") )
ConfigDialog::ConfigDialog( TQWidget *parent, const char *name, const TQStringList& ) ConfigDialog::ConfigDialog( TQWidget *parent, const char *name, const TQStringList& )
: KCModule( KNemoFactory::instance(), parent, name ), : TDECModule( KNemoFactory::instance(), parent, name ),
mLock( false ), mLock( false ),
mDlg( new ConfigDlg( this ) ), mDlg( new ConfigDlg( this ) ),
mColorVLines( 0x04FB1D ), mColorVLines( 0x04FB1D ),
@ -109,7 +109,7 @@ ConfigDialog::ConfigDialog( TQWidget *parent, const char *name, const TQStringLi
"<b>Root</b> CheckBox.") ); "<b>Root</b> CheckBox.") );
mSettingsDict.setAutoDelete( true ); mSettingsDict.setAutoDelete( true );
setButtons( KCModule::Default | KCModule::Apply ); setButtons( TDECModule::Default | TDECModule::Apply );
connect( mDlg->pushButtonNew, TQT_SIGNAL( clicked() ), connect( mDlg->pushButtonNew, TQT_SIGNAL( clicked() ),
this, TQT_SLOT( buttonNewSelected() ) ); this, TQT_SLOT( buttonNewSelected() ) );
@ -256,7 +256,7 @@ void ConfigDialog::load()
{ {
mSettingsDict.clear(); mSettingsDict.clear();
mDlg->listBoxInterfaces->clear(); mDlg->listBoxInterfaces->clear();
KConfig* config = new KConfig( "knemorc", true ); TDEConfig* config = new TDEConfig( "knemorc", true );
config->setGroup( "General" ); config->setGroup( "General" );
bool startKNemo = config->readBoolEntry( "StartKNemo", false ); bool startKNemo = config->readBoolEntry( "StartKNemo", false );
@ -361,7 +361,7 @@ void ConfigDialog::load()
void ConfigDialog::save() void ConfigDialog::save()
{ {
KConfig* config = new KConfig( "knemorc", false ); TDEConfig* config = new TDEConfig( "knemorc", false );
TQStringList list; TQStringList list;
TQDictIterator<InterfaceSettings> it( mSettingsDict ); TQDictIterator<InterfaceSettings> it( mSettingsDict );
@ -982,7 +982,7 @@ void ConfigDialog::checkBoxStartKNemoToggled( bool on )
{ {
if ( on ) if ( on )
{ {
KConfig* config = new KConfig( "knemorc", false ); TDEConfig* config = new TDEConfig( "knemorc", false );
config->setGroup( "General" ); config->setGroup( "General" );
if ( config->readBoolEntry( "FirstStart", true ) ) if ( config->readBoolEntry( "FirstStart", true ) )
{ {

@ -43,7 +43,7 @@ class KNemoCheckListItem;
* @author Percy Leonhardt <percy@eris23.de> * @author Percy Leonhardt <percy@eris23.de>
*/ */
class ConfigDialog : public KCModule class ConfigDialog : public TDECModule
{ {
Q_OBJECT Q_OBJECT

@ -277,7 +277,7 @@ void NetToolsBackend::updateInterfaceData( TQString& config, InterfaceData& data
data.incomingBytes = currentRxBytes - data.prevRxBytes; data.incomingBytes = currentRxBytes - data.prevRxBytes;
data.prevRxBytes = currentRxBytes; data.prevRxBytes = currentRxBytes;
data.rxString = KIO::convertSize( data.rxBytes ); data.rxString = TDEIO::convertSize( data.rxBytes );
} }
regExp.setPattern( "TX bytes:(\\d+)\\s*\\(\\d+\\.\\d+\\s*\\w+\\)" ); regExp.setPattern( "TX bytes:(\\d+)\\s*\\(\\d+\\.\\d+\\s*\\w+\\)" );
@ -312,7 +312,7 @@ void NetToolsBackend::updateInterfaceData( TQString& config, InterfaceData& data
data.outgoingBytes = currentTxBytes - data.prevTxBytes; data.outgoingBytes = currentTxBytes - data.prevTxBytes;
data.prevTxBytes = currentTxBytes; data.prevTxBytes = currentTxBytes;
data.txString = KIO::convertSize( data.txBytes ); data.txString = TDEIO::convertSize( data.txBytes );
} }
regExp.setPattern( "inet\\s+\\w+:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})" ); regExp.setPattern( "inet\\s+\\w+:(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})" );

@ -208,7 +208,7 @@ void SysBackend::updateInterfaceData( const TQString& ifName, InterfaceData& dat
data.incomingBytes = rxBytes - data.prevRxBytes; data.incomingBytes = rxBytes - data.prevRxBytes;
data.prevRxBytes = rxBytes; data.prevRxBytes = rxBytes;
data.rxString = KIO::convertSize( data.rxBytes ); data.rxString = TDEIO::convertSize( data.rxBytes );
} }
unsigned int txBytes = 0; unsigned int txBytes = 0;
@ -242,7 +242,7 @@ void SysBackend::updateInterfaceData( const TQString& ifName, InterfaceData& dat
data.outgoingBytes = txBytes - data.prevTxBytes; data.outgoingBytes = txBytes - data.prevTxBytes;
data.prevTxBytes = txBytes; data.prevTxBytes = txBytes;
data.txString = KIO::convertSize( data.txBytes ); data.txString = TDEIO::convertSize( data.txBytes );
} }
if ( type == Interface::ETHERNET ) if ( type == Interface::ETHERNET )

@ -62,9 +62,9 @@ void InterfaceStatisticsDialog::updateDays()
{ {
TQDate date( iterator->year, iterator->month, iterator->day ); TQDate date( iterator->year, iterator->month, iterator->day );
tableDaily->verticalHeader()->setLabel( row, TDEGlobal::locale()->formatDate( date, true ) ); tableDaily->verticalHeader()->setLabel( row, TDEGlobal::locale()->formatDate( date, true ) );
tableDaily->setText( row, 0, KIO::convertSize( iterator->txBytes ) ); tableDaily->setText( row, 0, TDEIO::convertSize( iterator->txBytes ) );
tableDaily->setText( row, 1, KIO::convertSize( iterator->rxBytes ) ); tableDaily->setText( row, 1, TDEIO::convertSize( iterator->rxBytes ) );
tableDaily->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) ); tableDaily->setText( row, 2, TDEIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
row++; row++;
iterator = dayStatistics.next(); iterator = dayStatistics.next();
} }
@ -84,9 +84,9 @@ void InterfaceStatisticsDialog::updateMonths()
const KCalendarSystem* calendar = TDEGlobal::locale()->calendar(); const KCalendarSystem* calendar = TDEGlobal::locale()->calendar();
TQString monthName = calendar->monthName( iterator->month, iterator->year ) + " " + TQString::number( iterator->year ); TQString monthName = calendar->monthName( iterator->month, iterator->year ) + " " + TQString::number( iterator->year );
tableMonthly->verticalHeader()->setLabel( row, monthName ); tableMonthly->verticalHeader()->setLabel( row, monthName );
tableMonthly->setText( row, 0, KIO::convertSize( iterator->txBytes ) ); tableMonthly->setText( row, 0, TDEIO::convertSize( iterator->txBytes ) );
tableMonthly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) ); tableMonthly->setText( row, 1, TDEIO::convertSize( iterator->rxBytes ) );
tableMonthly->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) ); tableMonthly->setText( row, 2, TDEIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
row++; row++;
iterator = monthStatistics.next(); iterator = monthStatistics.next();
} }
@ -104,9 +104,9 @@ void InterfaceStatisticsDialog::updateYears()
while ( iterator ) while ( iterator )
{ {
tableYearly->verticalHeader()->setLabel( row, TQString::number( iterator->year ) ); tableYearly->verticalHeader()->setLabel( row, TQString::number( iterator->year ) );
tableYearly->setText( row, 0, KIO::convertSize( iterator->txBytes ) ); tableYearly->setText( row, 0, TDEIO::convertSize( iterator->txBytes ) );
tableYearly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) ); tableYearly->setText( row, 1, TDEIO::convertSize( iterator->rxBytes ) );
tableYearly->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) ); tableYearly->setText( row, 2, TDEIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
row++; row++;
iterator = yearStatistics.next(); iterator = yearStatistics.next();
} }
@ -119,21 +119,21 @@ void InterfaceStatisticsDialog::updateCurrentEntry()
{ {
int lastRow = tableDaily->numRows() - 1; int lastRow = tableDaily->numRows() - 1;
const StatisticEntry* currentEntry = mInterface->getStatistics()->getCurrentDay(); const StatisticEntry* currentEntry = mInterface->getStatistics()->getCurrentDay();
tableDaily->setText( lastRow, 0, KIO::convertSize( currentEntry->txBytes ) ); tableDaily->setText( lastRow, 0, TDEIO::convertSize( currentEntry->txBytes ) );
tableDaily->setText( lastRow, 1, KIO::convertSize( currentEntry->rxBytes ) ); tableDaily->setText( lastRow, 1, TDEIO::convertSize( currentEntry->rxBytes ) );
tableDaily->setText( lastRow, 2, KIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) ); tableDaily->setText( lastRow, 2, TDEIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
lastRow = tableMonthly->numRows() - 1; lastRow = tableMonthly->numRows() - 1;
currentEntry = mInterface->getStatistics()->getCurrentMonth(); currentEntry = mInterface->getStatistics()->getCurrentMonth();
tableMonthly->setText( lastRow, 0, KIO::convertSize( currentEntry->txBytes ) ); tableMonthly->setText( lastRow, 0, TDEIO::convertSize( currentEntry->txBytes ) );
tableMonthly->setText( lastRow, 1, KIO::convertSize( currentEntry->rxBytes ) ); tableMonthly->setText( lastRow, 1, TDEIO::convertSize( currentEntry->rxBytes ) );
tableMonthly->setText( lastRow, 2, KIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) ); tableMonthly->setText( lastRow, 2, TDEIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
lastRow = tableYearly->numRows() - 1; lastRow = tableYearly->numRows() - 1;
currentEntry = mInterface->getStatistics()->getCurrentYear(); currentEntry = mInterface->getStatistics()->getCurrentYear();
tableYearly->setText( lastRow, 0, KIO::convertSize( currentEntry->txBytes ) ); tableYearly->setText( lastRow, 0, TDEIO::convertSize( currentEntry->txBytes ) );
tableYearly->setText( lastRow, 1, KIO::convertSize( currentEntry->rxBytes ) ); tableYearly->setText( lastRow, 1, TDEIO::convertSize( currentEntry->rxBytes ) );
tableYearly->setText( lastRow, 2, KIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) ); tableYearly->setText( lastRow, 2, TDEIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
} }
#include "interfacestatisticsdialog.moc" #include "interfacestatisticsdialog.moc"

@ -66,7 +66,7 @@ InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, TQWidget* pa
} }
// Restore window size and position. // Restore window size and position.
KConfig* config = new KConfig( "knemorc", false ); TDEConfig* config = new TDEConfig( "knemorc", false );
if ( config->hasGroup( "Interface_" + mInterface->getName() ) ) if ( config->hasGroup( "Interface_" + mInterface->getName() ) )
{ {
config->setGroup( "Interface_" + mInterface->getName() ); config->setGroup( "Interface_" + mInterface->getName() );
@ -95,7 +95,7 @@ InterfaceStatusDialog::~InterfaceStatusDialog()
delete mTimer; delete mTimer;
// Store window size and position. // Store window size and position.
KConfig* config = new KConfig( "knemorc", false ); TDEConfig* config = new TDEConfig( "knemorc", false );
if ( config->hasGroup( "Interface_" + mInterface->getName() ) ) if ( config->hasGroup( "Interface_" + mInterface->getName() ) )
{ {
config->setGroup( "Interface_" + mInterface->getName() ); config->setGroup( "Interface_" + mInterface->getName() );
@ -212,9 +212,9 @@ void InterfaceStatusDialog::updateDialog()
textLabelBytesSend->setText( data.txString ); textLabelBytesSend->setText( data.txString );
textLabelBytesReceived->setText( data.rxString ); textLabelBytesReceived->setText( data.rxString );
unsigned long bytesPerSecond = data.outgoingBytes / mInterface->getGeneralData().pollInterval; unsigned long bytesPerSecond = data.outgoingBytes / mInterface->getGeneralData().pollInterval;
textLabelSpeedSend->setText( KIO::convertSize( bytesPerSecond ) + i18n( "/s" ) ); textLabelSpeedSend->setText( TDEIO::convertSize( bytesPerSecond ) + i18n( "/s" ) );
bytesPerSecond = data.incomingBytes / mInterface->getGeneralData().pollInterval; bytesPerSecond = data.incomingBytes / mInterface->getGeneralData().pollInterval;
textLabelSpeedReceived->setText( KIO::convertSize( bytesPerSecond ) + i18n( "/s" ) ); textLabelSpeedReceived->setText( TDEIO::convertSize( bytesPerSecond ) + i18n( "/s" ) );
if ( data.wirelessDevice ) if ( data.wirelessDevice )
{ {
@ -290,19 +290,19 @@ void InterfaceStatusDialog::statisticsChanged()
} }
const StatisticEntry* entry = statistics->getCurrentDay(); const StatisticEntry* entry = statistics->getCurrentDay();
textLabelTodaySent->setText( KIO::convertSize( entry->txBytes ) ); textLabelTodaySent->setText( TDEIO::convertSize( entry->txBytes ) );
textLabelTodayReceived->setText( KIO::convertSize( entry->rxBytes ) ); textLabelTodayReceived->setText( TDEIO::convertSize( entry->rxBytes ) );
textLabelTodayTotal->setText( KIO::convertSize( entry->txBytes + entry->rxBytes ) ); textLabelTodayTotal->setText( TDEIO::convertSize( entry->txBytes + entry->rxBytes ) );
entry = statistics->getCurrentMonth(); entry = statistics->getCurrentMonth();
textLabelMonthSent->setText( KIO::convertSize( entry->txBytes ) ); textLabelMonthSent->setText( TDEIO::convertSize( entry->txBytes ) );
textLabelMonthReceived->setText( KIO::convertSize( entry->rxBytes ) ); textLabelMonthReceived->setText( TDEIO::convertSize( entry->rxBytes ) );
textLabelMonthTotal->setText( KIO::convertSize( entry->txBytes + entry->rxBytes ) ); textLabelMonthTotal->setText( TDEIO::convertSize( entry->txBytes + entry->rxBytes ) );
entry = statistics->getCurrentYear(); entry = statistics->getCurrentYear();
textLabelYearSent->setText( KIO::convertSize( entry->txBytes ) ); textLabelYearSent->setText( TDEIO::convertSize( entry->txBytes ) );
textLabelYearReceived->setText( KIO::convertSize( entry->rxBytes ) ); textLabelYearReceived->setText( TDEIO::convertSize( entry->rxBytes ) );
textLabelYearTotal->setText( KIO::convertSize( entry->txBytes + entry->rxBytes ) ); textLabelYearTotal->setText( TDEIO::convertSize( entry->txBytes + entry->rxBytes ) );
} }
#include "interfacestatusdialog.moc" #include "interfacestatusdialog.moc"

@ -130,12 +130,12 @@ void InterfaceToolTip::setupText( TQString& text )
if ( toolTipContent & DOWNLOAD_SPEED ) if ( toolTipContent & DOWNLOAD_SPEED )
{ {
unsigned long bytesPerSecond = data.incomingBytes / mInterface->getGeneralData().pollInterval; unsigned long bytesPerSecond = data.incomingBytes / mInterface->getGeneralData().pollInterval;
text += "<tr><td>" + mToolTips[20].first + "</td><td>" + KIO::convertSize( bytesPerSecond ) + i18n( "/s" ) + "</td></tr>"; text += "<tr><td>" + mToolTips[20].first + "</td><td>" + TDEIO::convertSize( bytesPerSecond ) + i18n( "/s" ) + "</td></tr>";
} }
if ( toolTipContent & UPLOAD_SPEED ) if ( toolTipContent & UPLOAD_SPEED )
{ {
unsigned long bytesPerSecond = data.outgoingBytes / mInterface->getGeneralData().pollInterval; unsigned long bytesPerSecond = data.outgoingBytes / mInterface->getGeneralData().pollInterval;
text += "<tr><td>" + mToolTips[21].first + "</td><td>" + KIO::convertSize( bytesPerSecond ) + i18n( "/s" ) + "</td></tr>"; text += "<tr><td>" + mToolTips[21].first + "</td><td>" + TDEIO::convertSize( bytesPerSecond ) + i18n( "/s" ) + "</td></tr>";
} }
} }

@ -56,7 +56,7 @@ KNemoDaemon::KNemoDaemon( const TQCString& name )
readConfig(); readConfig();
// select the backend from the config file // select the backend from the config file
KConfig* config = new KConfig( "knemorc", true ); TDEConfig* config = new TDEConfig( "knemorc", true );
config->setGroup( "General" ); config->setGroup( "General" );
mBackendName = config->readEntry( "Backend", "Nettools" ); mBackendName = config->readEntry( "Backend", "Nettools" );
delete config; delete config;
@ -103,7 +103,7 @@ KNemoDaemon::~KNemoDaemon()
void KNemoDaemon::readConfig() void KNemoDaemon::readConfig()
{ {
KConfig* config = new KConfig( "knemorc", true ); TDEConfig* config = new TDEConfig( "knemorc", true );
config->setGroup( "General" ); config->setGroup( "General" );
mGeneralData.pollInterval = config->readNumEntry( "PollInterval", 1 ); mGeneralData.pollInterval = config->readNumEntry( "PollInterval", 1 );
@ -183,7 +183,7 @@ void KNemoDaemon::reparseConfiguration()
{ {
// Read the settings from the config file. // Read the settings from the config file.
TQDict<InterfaceSettings> settingsDict; TQDict<InterfaceSettings> settingsDict;
KConfig* config = new KConfig( "knemorc", false ); TDEConfig* config = new TDEConfig( "knemorc", false );
config->setGroup( "General" ); config->setGroup( "General" );
mGeneralData.pollInterval = config->readNumEntry( "PollInterval", 1 ); mGeneralData.pollInterval = config->readNumEntry( "PollInterval", 1 );

@ -77,7 +77,7 @@ SignalPlotter::SignalPlotter( TQWidget *parent, const char *name )
mBackgroundColor = TQColor( 0x313031 ); mBackgroundColor = TQColor( 0x313031 );
// Restore window size and position. // Restore window size and position.
KConfig* config = new KConfig( "knemorc", false ); TDEConfig* config = new TDEConfig( "knemorc", false );
if ( config->hasGroup( "Interface_" + mName ) ) if ( config->hasGroup( "Interface_" + mName ) )
{ {
config->setGroup( "Interface_" + mName ); config->setGroup( "Interface_" + mName );
@ -100,7 +100,7 @@ SignalPlotter::~SignalPlotter()
delete [] p; delete [] p;
// Store window size and position. // Store window size and position.
KConfig* config = new KConfig( "knemorc", false ); TDEConfig* config = new TDEConfig( "knemorc", false );
if ( config->hasGroup( "Interface_" + mName ) ) if ( config->hasGroup( "Interface_" + mName ) )
{ {
config->setGroup( "Interface_" + mName ); config->setGroup( "Interface_" + mName );

Loading…
Cancel
Save