diff options
Diffstat (limited to 'src/kcm/configdialog.cpp')
-rw-r--r-- | src/kcm/configdialog.cpp | 444 |
1 files changed, 222 insertions, 222 deletions
diff --git a/src/kcm/configdialog.cpp b/src/kcm/configdialog.cpp index 9c5ca9a..dd25b06 100644 --- a/src/kcm/configdialog.cpp +++ b/src/kcm/configdialog.cpp @@ -17,21 +17,21 @@ Boston, MA 02110-1301, USA. */ -#include <qfile.h> -#include <qdict.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcstring.h> -#include <qlistbox.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qwhatsthis.h> -#include <qtabwidget.h> -#include <qpushbutton.h> -#include <qstringlist.h> -#include <qdatastream.h> +#include <tqfile.h> +#include <tqdict.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcstring.h> +#include <tqlistbox.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqwhatsthis.h> +#include <tqtabwidget.h> +#include <tqpushbutton.h> +#include <tqstringlist.h> +#include <tqdatastream.h> #include <kglobal.h> #include <kconfig.h> @@ -53,20 +53,20 @@ #include "kcmregistry.h" #include "configdialog.h" -const QString ConfigDialog::ICON_DISCONNECTED = "network_disconnected"; -const QString ConfigDialog::ICON_CONNECTED = "network_connected"; -const QString ConfigDialog::ICON_INCOMING = "network_incoming"; -const QString ConfigDialog::ICON_OUTGOING = "network_outgoing"; -const QString ConfigDialog::ICON_TRAFFIC = "network_traffic"; -const QString ConfigDialog::SUFFIX_PPP = "_ppp"; -const QString ConfigDialog::SUFFIX_LAN = "_lan"; -const QString ConfigDialog::SUFFIX_WLAN = "_wlan"; +const TQString ConfigDialog::ICON_DISCONNECTED = "network_disconnected"; +const TQString ConfigDialog::ICON_CONNECTED = "network_connected"; +const TQString ConfigDialog::ICON_INCOMING = "network_incoming"; +const TQString ConfigDialog::ICON_OUTGOING = "network_outgoing"; +const TQString ConfigDialog::ICON_TRAFFIC = "network_traffic"; +const TQString ConfigDialog::SUFFIX_PPP = "_ppp"; +const TQString ConfigDialog::SUFFIX_LAN = "_lan"; +const TQString ConfigDialog::SUFFIX_WLAN = "_wlan"; -typedef KGenericFactory<ConfigDialog, QWidget> KNemoFactory; +typedef KGenericFactory<ConfigDialog, TQWidget> KNemoFactory; K_EXPORT_COMPONENT_FACTORY( kcm_knemo, KNemoFactory("kcm_knemo") ) -ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList& ) - : KCModule( KNemoFactory::instance(), parent, name ), +ConfigDialog::ConfigDialog( TQWidget *tqparent, const char *name, const TQStringList& ) + : KCModule( KNemoFactory::instance(), tqparent, name ), mLock( false ), mDlg( new ConfigDlg( this ) ), mColorVLines( 0x04FB1D ), @@ -79,14 +79,14 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList setupToolTipArray(); // fill the backends combobox - for ( int i = 0; KCMRegistry[i].name != QString::null; i++ ) + for ( int i = 0; KCMRegistry[i].name != TQString(); i++ ) { mDlg->comboBoxBackends->insertItem( KCMRegistry[i].name ); } load(); - QVBoxLayout* top = new QVBoxLayout(this); + TQVBoxLayout* top = new TQVBoxLayout(this); mDlg->pushButtonNew->setPixmap( SmallIcon( "filenew" ) ); mDlg->pushButtonDelete->setPixmap( SmallIcon( "editdelete" ) ); mDlg->pushButtonAddCommand->setPixmap( SmallIcon( "filenew" ) ); @@ -96,7 +96,7 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList mDlg->pushButtonAddToolTip->setPixmap( SmallIcon( "1rightarrow" ) ); mDlg->pushButtonRemoveToolTip->setPixmap( SmallIcon( "1leftarrow" ) ); mDlg->listViewCommands->setSorting( -1 ); - QWhatsThis::add( mDlg->listViewCommands, + TQWhatsThis::add( mDlg->listViewCommands, i18n("<p>In this area you can add the custom entries " \ "for your context menu: <ol><li>check <b>Display " \ "custom entries in context menu</b>;</li>" \ @@ -111,94 +111,94 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList mSettingsDict.setAutoDelete( true ); setButtons( KCModule::Default | KCModule::Apply ); - connect( mDlg->pushButtonNew, SIGNAL( clicked() ), - this, SLOT( buttonNewSelected() ) ); - connect( mDlg->pushButtonDelete, SIGNAL( clicked() ), - this, SLOT( buttonDeleteSelected() ) ); - connect( mDlg->pushButtonAddCommand, SIGNAL( clicked() ), - this, SLOT( buttonAddCommandSelected() ) ); - connect( mDlg->pushButtonRemoveCommand, SIGNAL( clicked() ), - this, SLOT( buttonRemoveCommandSelected() ) ); - connect( mDlg->pushButtonUp, SIGNAL( clicked() ), - this, SLOT( buttonCommandUpSelected() ) ); - connect( mDlg->pushButtonDown, SIGNAL( clicked() ), - this, SLOT( buttonCommandDownSelected() ) ); - connect( mDlg->pushButtonAddToolTip, SIGNAL( clicked() ), - this, SLOT( buttonAddToolTipSelected() ) ); - connect( mDlg->pushButtonRemoveToolTip, SIGNAL( clicked() ), - this, SLOT( buttonRemoveToolTipSelected() ) ); - connect( mDlg->pushButtonNotifications, SIGNAL( clicked() ), - this, SLOT( buttonNotificationsSelected() ) ); - connect( mDlg->pushButtonStatisticsDir, SIGNAL( clicked() ), - this, SLOT( buttonStatisticsDirSelected() ) ); - connect( mDlg->lineEditAlias, SIGNAL( textChanged( const QString& ) ), - this, SLOT( aliasChanged( const QString& ) ) ); - connect( mDlg->comboBoxIconSet, SIGNAL( activated( int ) ), - this, SLOT( iconSetChanged( int ) ) ); - connect( mDlg->comboBoxBackends, SIGNAL( activated( int ) ), - this, SLOT( backendChanged( int ) ) ); - connect( mDlg->checkBoxNotConnected, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxNotConnectedToggled ( bool ) ) ); - connect( mDlg->checkBoxNotExisting, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxNotExistingToggled ( bool ) ) ); - connect( mDlg->checkBoxStatistics, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxStatisticsToggled ( bool ) ) ); - connect( mDlg->checkBoxStartKNemo, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxStartKNemoToggled( bool ) ) ); - connect( mDlg->spinBoxTrafficThreshold, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxTrafficValueChanged ( int ) ) ); - connect( mDlg->checkBoxCustom, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxCustomToggled ( bool ) ) ); - connect( mDlg->listBoxInterfaces, SIGNAL( highlighted( const QString& ) ), - this, SLOT( interfaceSelected( const QString& ) ) ); - connect( mDlg->listViewCommands, SIGNAL( selectionChanged() ), - this, SLOT( listViewCommandsSelectionChanged() ) ); - connect( mDlg->listViewCommands, SIGNAL( itemRenamed( QListViewItem*, int, const QString& ) ), - this, SLOT( listViewCommandsRenamed( QListViewItem*, int, const QString& ) ) ); + connect( mDlg->pushButtonNew, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonNewSelected() ) ); + connect( mDlg->pushButtonDelete, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonDeleteSelected() ) ); + connect( mDlg->pushButtonAddCommand, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonAddCommandSelected() ) ); + connect( mDlg->pushButtonRemoveCommand, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonRemoveCommandSelected() ) ); + connect( mDlg->pushButtonUp, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonCommandUpSelected() ) ); + connect( mDlg->pushButtonDown, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonCommandDownSelected() ) ); + connect( mDlg->pushButtonAddToolTip, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonAddToolTipSelected() ) ); + connect( mDlg->pushButtonRemoveToolTip, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonRemoveToolTipSelected() ) ); + connect( mDlg->pushButtonNotifications, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonNotificationsSelected() ) ); + connect( mDlg->pushButtonStatisticsDir, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( buttonStatisticsDirSelected() ) ); + connect( mDlg->lineEditAlias, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( aliasChanged( const TQString& ) ) ); + connect( mDlg->comboBoxIconSet, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( iconSetChanged( int ) ) ); + connect( mDlg->comboBoxBackends, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( backendChanged( int ) ) ); + connect( mDlg->checkBoxNotConnected, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxNotConnectedToggled ( bool ) ) ); + connect( mDlg->checkBoxNotExisting, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxNotExistingToggled ( bool ) ) ); + connect( mDlg->checkBoxStatistics, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxStatisticsToggled ( bool ) ) ); + connect( mDlg->checkBoxStartKNemo, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxStartKNemoToggled( bool ) ) ); + connect( mDlg->spinBoxTrafficThreshold, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxTrafficValueChanged ( int ) ) ); + connect( mDlg->checkBoxCustom, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxCustomToggled ( bool ) ) ); + connect( mDlg->listBoxInterfaces, TQT_SIGNAL( highlighted( const TQString& ) ), + this, TQT_SLOT( interfaceSelected( const TQString& ) ) ); + connect( mDlg->listViewCommands, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( listViewCommandsSelectionChanged() ) ); + connect( mDlg->listViewCommands, TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString& ) ), + this, TQT_SLOT( listViewCommandsRenamed( TQListViewItem*, int, const TQString& ) ) ); // connect the plotter widgets - connect( mDlg->checkBoxTopBar, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->checkBoxLabels, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->checkBoxVLines, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->checkBoxHLines, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->checkBoxIncoming, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->checkBoxOutgoing, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->checkBoxVLinesScroll, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->checkBoxAutoDetection, SIGNAL( toggled( bool ) ), - this, SLOT( checkBoxToggled( bool ) ) ); - connect( mDlg->spinBoxCount, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->spinBoxPixel, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->spinBoxDistance, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->spinBoxFontSize, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->spinBoxMinValue, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->spinBoxMaxValue, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->numInputPollInterval, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->numInputSaveInterval, SIGNAL( valueChanged( int ) ), - this, SLOT( spinBoxValueChanged( int ) ) ); - connect( mDlg->kColorButtonVLines, SIGNAL( changed( const QColor& ) ), - this, SLOT( kColorButtonChanged( const QColor& ) ) ); - connect( mDlg->kColorButtonHLines, SIGNAL( changed( const QColor& ) ), - this, SLOT( kColorButtonChanged( const QColor& ) ) ); - connect( mDlg->kColorButtonIncoming, SIGNAL( changed( const QColor& ) ), - this, SLOT( kColorButtonChanged( const QColor& ) ) ); - connect( mDlg->kColorButtonOutgoing, SIGNAL( changed( const QColor& ) ), - this, SLOT( kColorButtonChanged( const QColor& ) ) ); - connect( mDlg->kColorButtonBackground, SIGNAL( changed( const QColor& ) ), - this, SLOT( kColorButtonChanged( const QColor& ) ) ); + connect( mDlg->checkBoxTopBar, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->checkBoxLabels, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->checkBoxVLines, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->checkBoxHLines, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->checkBoxIncoming, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->checkBoxOutgoing, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->checkBoxVLinesScroll, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->checkBoxAutoDetection, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( checkBoxToggled( bool ) ) ); + connect( mDlg->spinBoxCount, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->spinBoxPixel, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->spinBoxDistance, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->spinBoxFontSize, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->spinBoxMinValue, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->spinBoxMaxValue, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->numInputPollInterval, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->numInputSaveInterval, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( spinBoxValueChanged( int ) ) ); + connect( mDlg->kColorButtonVLines, TQT_SIGNAL( changed( const TQColor& ) ), + this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) ); + connect( mDlg->kColorButtonHLines, TQT_SIGNAL( changed( const TQColor& ) ), + this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) ); + connect( mDlg->kColorButtonIncoming, TQT_SIGNAL( changed( const TQColor& ) ), + this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) ); + connect( mDlg->kColorButtonOutgoing, TQT_SIGNAL( changed( const TQColor& ) ), + this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) ); + connect( mDlg->kColorButtonBackground, TQT_SIGNAL( changed( const TQColor& ) ), + this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) ); // No dcop call if KNemo is not activated by the user. Otherwise // load-on-demand will start KNemo. @@ -207,22 +207,22 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList // In case the user opened the control center via the context menu // this call to the daemon will deliver the interface the menu // belongs to. This way we can preselect the appropriate entry in the list. - QCString replyType; - QByteArray replyData, arg; - QString selectedInterface = QString::null; + TQCString replyType; + TQByteArray replyData, arg; + TQString selectedInterface = TQString(); if ( kapp->dcopClient()->call( "kded", "knemod", "getSelectedInterface()", arg, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); reply >> selectedInterface; } - if ( selectedInterface != QString::null ) + if ( selectedInterface != TQString() ) { // Try to preselect the interface. unsigned int i; for ( i = 0; i < mDlg->listBoxInterfaces->count(); i++ ) { - QListBoxItem* item = mDlg->listBoxInterfaces->item( i ); + TQListBoxItem* item = mDlg->listBoxInterfaces->item( i ); if ( item->text() == selectedInterface ) { // Found it. @@ -269,9 +269,9 @@ void ConfigDialog::load() // select the backend from the config file bool foundBackend = false; - QString backend = config->readEntry( "Backend", "Nettools" ); + TQString backend = config->readEntry( "Backend", "Nettools" ); int i; - for ( i = 0; KCMRegistry[i].name != QString::null; i++ ) + for ( i = 0; KCMRegistry[i].name != TQString(); i++ ) { if ( KCMRegistry[i].name == backend ) { @@ -287,7 +287,7 @@ void ConfigDialog::load() mDlg->comboBoxBackends->setCurrentItem( i ); mDlg->textLabelBackendDescription->setText( KCMRegistry[i].description ); - QStrList list; + TQStrList list; int numEntries = config->readListEntry( "Interfaces", list ); if ( numEntries == 0 ) @@ -296,7 +296,7 @@ void ConfigDialog::load() char* interface; for ( interface = list.first(); interface; interface = list.next() ) { - QString group( "Interface_" ); + TQString group( "Interface_" ); group += interface; InterfaceSettings* settings = new InterfaceSettings(); if ( config->hasGroup( group ) ) @@ -312,13 +312,13 @@ void ConfigDialog::load() int numCommands = config->readNumEntry( "NumCommands" ); for ( int i = 0; i < numCommands; i++ ) { - QString entry; + TQString entry; InterfaceCommand cmd; - entry = QString( "RunAsRoot%1" ).arg( i + 1 ); + entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 ); cmd.runAsRoot = config->readBoolEntry( entry ); - entry = QString( "Command%1" ).arg( i + 1 ); + entry = TQString( "Command%1" ).tqarg( i + 1 ); cmd.command = config->readEntry( entry ); - entry = QString( "MenuText%1" ).arg( i + 1 ); + entry = TQString( "MenuText%1" ).tqarg( i + 1 ); cmd.menuText = config->readEntry( entry ); settings->commands.append( cmd ); } @@ -363,8 +363,8 @@ void ConfigDialog::save() { KConfig* config = new KConfig( "knemorc", false ); - QStringList list; - QDictIterator<InterfaceSettings> it( mSettingsDict ); + TQStringList list; + TQDictIterator<InterfaceSettings> it( mSettingsDict ); for ( ; it.current(); ++it ) { list.append( it.currentKey() ); @@ -383,12 +383,12 @@ void ConfigDialog::save() config->writeEntry( "NumCommands", settings->commands.size() ); for ( uint i = 0; i < settings->commands.size(); i++ ) { - QString entry; - entry = QString( "RunAsRoot%1" ).arg( i + 1 ); + TQString entry; + entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 ); config->writeEntry( entry, settings->commands[i].runAsRoot ); - entry = QString( "Command%1" ).arg( i + 1 ); + entry = TQString( "Command%1" ).tqarg( i + 1 ); config->writeEntry( entry, settings->commands[i].command ); - entry = QString( "MenuText%1" ).arg( i + 1 ); + entry = TQString( "MenuText%1" ).tqarg( i + 1 ); config->writeEntry( entry, settings->commands[i].menuText ); } } @@ -430,15 +430,15 @@ void ConfigDialog::save() if ( mDlg->checkBoxStartKNemo->isChecked() ) { // This call will implicitly start KNemo if it is not yet running. - kapp->dcopClient()->send( "kded", "knemod", "reparseConfiguration()", "" ); + kapp->dcopClient()->send( "kded", "knemod", "reparseConfiguration()", TQString("") ); desktop->writeEntry( "X-KDE-Kded-autoload", true ); } else { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << "knemod"; - kapp->dcopClient()->send("kded", "kded", "unloadModule(QCString)", data); + kapp->dcopClient()->send("kded", "kded", "unloadModule(TQCString)", data); desktop->deleteEntry( "X-KDE-Kded-autoload" ); } desktop->sync(); @@ -448,20 +448,20 @@ void ConfigDialog::save() void ConfigDialog::defaults() { // Default interfaces - QFile proc( "/proc/net/dev" ); + TQFile proc( "/proc/net/dev" ); if ( proc.open( IO_ReadOnly ) ) { mSettingsDict.clear(); mDlg->listBoxInterfaces->clear(); - QString file = proc.readAll(); - QStringList content = QStringList::split( "\n", file ); + TQString file = proc.readAll(); + TQStringList content = TQStringList::split( "\n", file ); if ( content.count() > 2 ) { for ( unsigned int i = 2; i < content.count(); i++ ) { - QString interface = content[i].simplifyWhiteSpace(); - interface = interface.left( interface.find( ':' ) ); + TQString interface = content[i].simplifyWhiteSpace(); + interface = interface.left( interface.tqfind( ':' ) ); if ( interface == "lo" ) continue; @@ -479,7 +479,7 @@ void ConfigDialog::defaults() } else { - mDlg->lineEditAlias->setText( QString::null ); + mDlg->lineEditAlias->setText( TQString() ); mDlg->comboBoxIconSet->setCurrentItem( 0 ); mDlg->checkBoxNotConnected->setChecked( false ); mDlg->checkBoxNotExisting->setChecked( false ); @@ -528,9 +528,9 @@ void ConfigDialog::defaults() void ConfigDialog::buttonNewSelected() { bool ok = false; - QString ifname = KInputDialog::getText( i18n( "Add new interface" ), + TQString ifname = KInputDialog::getText( i18n( "Add new interface" ), i18n( "Please enter the name of the interface to be monitored.\nIt should be something like 'eth1', 'wlan2' or 'ppp0'." ), - QString::null, + TQString(), &ok ); if ( ok ) @@ -544,7 +544,7 @@ void ConfigDialog::buttonNewSelected() void ConfigDialog::buttonDeleteSelected() { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -552,7 +552,7 @@ void ConfigDialog::buttonDeleteSelected() // TODO: find a better way than blocking signals mSettingsDict.remove( selected->text() ); mDlg->lineEditAlias->blockSignals( true ); - mDlg->lineEditAlias->setText( QString::null ); + mDlg->lineEditAlias->setText( TQString() ); mDlg->lineEditAlias->blockSignals( false ); mDlg->comboBoxIconSet->blockSignals( true ); mDlg->comboBoxIconSet->setCurrentItem( 0 ); @@ -575,7 +575,7 @@ void ConfigDialog::buttonDeleteSelected() void ConfigDialog::buttonAddCommandSelected() { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -583,12 +583,12 @@ void ConfigDialog::buttonAddCommandSelected() KNemoCheckListItem* item = new KNemoCheckListItem( mDlg->listViewCommands ); item->setRenameEnabled( 1, true ); item->setRenameEnabled( 2, true ); - connect( item, SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ), - this, SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) ); + connect( item, TQT_SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ), + this, TQT_SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) ); InterfaceSettings* settings = mSettingsDict[selected->text()]; - QValueVector<InterfaceCommand> cmds; - QListViewItem* i = mDlg->listViewCommands->firstChild(); + TQValueVector<InterfaceCommand> cmds; + TQListViewItem* i = mDlg->listViewCommands->firstChild(); for ( ; i != 0; i = i->nextSibling() ) { InterfaceCommand cmd; @@ -604,7 +604,7 @@ void ConfigDialog::buttonAddCommandSelected() void ConfigDialog::buttonRemoveCommandSelected() { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -612,8 +612,8 @@ void ConfigDialog::buttonRemoveCommandSelected() delete mDlg->listViewCommands->selectedItem(); InterfaceSettings* settings = mSettingsDict[selected->text()]; - QValueVector<InterfaceCommand> cmds; - QListViewItem* i = mDlg->listViewCommands->firstChild(); + TQValueVector<InterfaceCommand> cmds; + TQListViewItem* i = mDlg->listViewCommands->firstChild(); for ( ; i != 0; i = i->nextSibling() ) { InterfaceCommand cmd; @@ -629,15 +629,15 @@ void ConfigDialog::buttonRemoveCommandSelected() void ConfigDialog::buttonCommandUpSelected() { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; - QListViewItem* item = mDlg->listViewCommands->selectedItem(); + TQListViewItem* item = mDlg->listViewCommands->selectedItem(); if ( item ) { - QListViewItem* previous = item->itemAbove(); + TQListViewItem* previous = item->itemAbove(); if ( previous ) { // We can move one up. @@ -655,8 +655,8 @@ void ConfigDialog::buttonCommandUpSelected() InterfaceSettings* settings = mSettingsDict[selected->text()]; - QValueVector<InterfaceCommand> cmds; - QListViewItem* i = mDlg->listViewCommands->firstChild(); + TQValueVector<InterfaceCommand> cmds; + TQListViewItem* i = mDlg->listViewCommands->firstChild(); for ( ; i != 0; i = i->nextSibling() ) { InterfaceCommand cmd; @@ -672,15 +672,15 @@ void ConfigDialog::buttonCommandUpSelected() void ConfigDialog::buttonCommandDownSelected() { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; - QListViewItem* item = mDlg->listViewCommands->selectedItem(); + TQListViewItem* item = mDlg->listViewCommands->selectedItem(); if ( item ) { - QListViewItem* next = item->itemBelow(); + TQListViewItem* next = item->itemBelow(); if ( next ) { // We can move one down. @@ -690,8 +690,8 @@ void ConfigDialog::buttonCommandDownSelected() InterfaceSettings* settings = mSettingsDict[selected->text()]; - QValueVector<InterfaceCommand> cmds; - QListViewItem* i = mDlg->listViewCommands->firstChild(); + TQValueVector<InterfaceCommand> cmds; + TQListViewItem* i = mDlg->listViewCommands->firstChild(); for ( ; i != 0; i = i->nextSibling() ) { InterfaceCommand cmd; @@ -713,14 +713,14 @@ void ConfigDialog::buttonAddToolTipSelected() if ( !mDlg->listBoxAvailable->isSelected( k ) ) continue; - QListBoxItem* selected = mDlg->listBoxAvailable->item( k ); + TQListBoxItem* selected = mDlg->listBoxAvailable->item( k ); if ( selected == 0 ) continue; // Find the index of the selected item in the tooltip array. int itemIndex = 0; - for ( int i = 0; mToolTips[i].first != QString::null; i++ ) + for ( int i = 0; mToolTips[i].first != TQString(); i++ ) { if ( mToolTips[i].first == selected->text() ) { @@ -738,8 +738,8 @@ void ConfigDialog::buttonAddToolTipSelected() // For every item in the display list find its index in // the tooltip array. int siblingIndex = 0; - QListBoxItem* item = mDlg->listBoxDisplay->item( i ); - for ( int j = 0; mToolTips[j].first != QString::null; j++ ) + TQListBoxItem* item = mDlg->listBoxDisplay->item( i ); + for ( int j = 0; mToolTips[j].first != TQString(); j++ ) { if ( mToolTips[j].first == item->text() ) { @@ -780,14 +780,14 @@ void ConfigDialog::buttonRemoveToolTipSelected() if ( !mDlg->listBoxDisplay->isSelected( k ) ) continue; - QListBoxItem* selected = mDlg->listBoxDisplay->item( k ); + TQListBoxItem* selected = mDlg->listBoxDisplay->item( k ); if ( selected == 0 ) continue; // Find the index of the selected item in the tooltip array. int itemIndex = 0; - for ( int i = 0; mToolTips[i].first != QString::null; i++ ) + for ( int i = 0; mToolTips[i].first != TQString(); i++ ) { if ( mToolTips[i].first == selected->text() ) { @@ -805,8 +805,8 @@ void ConfigDialog::buttonRemoveToolTipSelected() // For every item in the available list find its index in // the tooltip array. int siblingIndex = 0; - QListBoxItem* item = mDlg->listBoxAvailable->item( i ); - for ( int j = 0; mToolTips[j].first != QString::null; j++ ) + TQListBoxItem* item = mDlg->listBoxAvailable->item( i ); + for ( int j = 0; mToolTips[j].first != TQString(); j++ ) { if ( mToolTips[j].first == item->text() ) { @@ -849,14 +849,14 @@ void ConfigDialog::buttonNotificationsSelected() void ConfigDialog:: buttonStatisticsDirSelected() { KURL url = KDirSelectDialog::selectDirectory(); - if ( url.path() != QString::null ) + if ( url.path() != TQString() ) { mDlg->lineEditStatisticsDir->setText( url.path() ); changed( true ); } } -void ConfigDialog::interfaceSelected( const QString& interface ) +void ConfigDialog::interfaceSelected( const TQString& interface ) { InterfaceSettings* settings = mSettingsDict[interface]; mLock = true; @@ -877,17 +877,17 @@ void ConfigDialog::interfaceSelected( const QString& interface ) item->setRenameEnabled( 1, true ); item->setText( 2, settings->commands[i].command ); item->setRenameEnabled( 2, true ); - connect( item, SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ), - this, SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) ); + connect( item, TQT_SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ), + this, TQT_SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) ); } iconSetChanged( settings->iconSet ); // to update iconset preview mLock = false; } -void ConfigDialog::aliasChanged( const QString& text ) +void ConfigDialog::aliasChanged( const TQString& text ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -899,7 +899,7 @@ void ConfigDialog::aliasChanged( const QString& text ) void ConfigDialog::iconSetChanged( int set ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -908,7 +908,7 @@ void ConfigDialog::iconSetChanged( int set ) settings->iconSet = set; // Update the preview of the iconset. - QString suffix; + TQString suffix; switch ( set ) { case NETWORK: @@ -940,7 +940,7 @@ void ConfigDialog::backendChanged( int backend ) void ConfigDialog::checkBoxNotConnectedToggled( bool on ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -952,7 +952,7 @@ void ConfigDialog::checkBoxNotConnectedToggled( bool on ) void ConfigDialog::checkBoxNotExistingToggled( bool on ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -965,7 +965,7 @@ void ConfigDialog::checkBoxNotExistingToggled( bool on ) void ConfigDialog::checkBoxStatisticsToggled( bool on ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -1001,7 +1001,7 @@ void ConfigDialog::checkBoxStartKNemoToggled( bool on ) void ConfigDialog::spinBoxTrafficValueChanged( int value ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -1013,7 +1013,7 @@ void ConfigDialog::spinBoxTrafficValueChanged( int value ) void ConfigDialog::checkBoxCustomToggled( bool on ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -1034,7 +1034,7 @@ void ConfigDialog::setupToolTipTab() mDlg->listBoxDisplay->clear(); mDlg->listBoxAvailable->clear(); - for ( int i = 0; mToolTips[i].first != QString::null; i++ ) + for ( int i = 0; mToolTips[i].first != TQString(); i++ ) { if ( mToolTipContent & mToolTips[i].second ) mDlg->listBoxDisplay->insertItem( mToolTips[i].first ); @@ -1063,37 +1063,37 @@ void ConfigDialog::setupToolTipArray() { // Cannot make this data static as the i18n macro doesn't seem // to work when called to early i.e. before setting the catalogue. - mToolTips[0] = QPair<QString, int>( i18n( "Interface" ), INTERFACE ); - mToolTips[1] = QPair<QString, int>( i18n( "Alias" ), ALIAS ); - mToolTips[2] = QPair<QString, int>( i18n( "Status" ), STATUS ); - mToolTips[3] = QPair<QString, int>( i18n( "Uptime" ), UPTIME ); - mToolTips[4] = QPair<QString, int>( i18n( "IP-Address" ), IP_ADDRESS ); - mToolTips[5] = QPair<QString, int>( i18n( "Subnet Mask" ), SUBNET_MASK ); - mToolTips[6] = QPair<QString, int>( i18n( "HW-Address" ), HW_ADDRESS ); - mToolTips[7] = QPair<QString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS ); - mToolTips[8] = QPair<QString, int>( i18n( "Default Gateway" ), GATEWAY ); - mToolTips[9] = QPair<QString, int>( i18n( "PtP-Address" ), PTP_ADDRESS ); - mToolTips[10] = QPair<QString, int>( i18n( "Packets Received" ), RX_PACKETS ); - mToolTips[11] = QPair<QString, int>( i18n( "Packets Sent" ), TX_PACKETS ); - mToolTips[12] = QPair<QString, int>( i18n( "Bytes Received" ), RX_BYTES ); - mToolTips[13] = QPair<QString, int>( i18n( "Bytes Sent" ), TX_BYTES ); - mToolTips[14] = QPair<QString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED ); - mToolTips[15] = QPair<QString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED ); - mToolTips[16] = QPair<QString, int>( i18n( "ESSID" ), ESSID ); - mToolTips[17] = QPair<QString, int>( i18n( "Mode" ), MODE ); - mToolTips[18] = QPair<QString, int>( i18n( "Frequency" ), FREQUENCY ); - mToolTips[19] = QPair<QString, int>( i18n( "Bit Rate" ), BIT_RATE ); - mToolTips[20] = QPair<QString, int>( i18n( "Access Point" ), ACCESS_POINT ); - mToolTips[21] = QPair<QString, int>( i18n( "Link Quality" ), LINK_QUALITY ); - mToolTips[22] = QPair<QString, int>( i18n( "Nickname" ), NICK_NAME ); - mToolTips[23] = QPair<QString, int>( i18n( "Encryption" ), ENCRYPTION ); - mToolTips[24] = QPair<QString, int>(); + mToolTips[0] = TQPair<TQString, int>( i18n( "Interface" ), INTERFACE ); + mToolTips[1] = TQPair<TQString, int>( i18n( "Alias" ), ALIAS ); + mToolTips[2] = TQPair<TQString, int>( i18n( "tqStatus" ), STATUS ); + mToolTips[3] = TQPair<TQString, int>( i18n( "Uptime" ), UPTIME ); + mToolTips[4] = TQPair<TQString, int>( i18n( "IP-Address" ), IP_ADDRESS ); + mToolTips[5] = TQPair<TQString, int>( i18n( "Subnet Mask" ), SUBNET_MASK ); + mToolTips[6] = TQPair<TQString, int>( i18n( "HW-Address" ), HW_ADDRESS ); + mToolTips[7] = TQPair<TQString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS ); + mToolTips[8] = TQPair<TQString, int>( i18n( "Default Gateway" ), GATEWAY ); + mToolTips[9] = TQPair<TQString, int>( i18n( "PtP-Address" ), PTP_ADDRESS ); + mToolTips[10] = TQPair<TQString, int>( i18n( "Packets Received" ), RX_PACKETS ); + mToolTips[11] = TQPair<TQString, int>( i18n( "Packets Sent" ), TX_PACKETS ); + mToolTips[12] = TQPair<TQString, int>( i18n( "Bytes Received" ), RX_BYTES ); + mToolTips[13] = TQPair<TQString, int>( i18n( "Bytes Sent" ), TX_BYTES ); + mToolTips[14] = TQPair<TQString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED ); + mToolTips[15] = TQPair<TQString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED ); + mToolTips[16] = TQPair<TQString, int>( i18n( "ESSID" ), ESSID ); + mToolTips[17] = TQPair<TQString, int>( i18n( "Mode" ), MODE ); + mToolTips[18] = TQPair<TQString, int>( i18n( "Frequency" ), FREQUENCY ); + mToolTips[19] = TQPair<TQString, int>( i18n( "Bit Rate" ), BIT_RATE ); + mToolTips[20] = TQPair<TQString, int>( i18n( "Access Point" ), ACCESS_POINT ); + mToolTips[21] = TQPair<TQString, int>( i18n( "Link Quality" ), LINK_TQUALITY ); + mToolTips[22] = TQPair<TQString, int>( i18n( "Nickname" ), NICK_NAME ); + mToolTips[23] = TQPair<TQString, int>( i18n( "Encryption" ), ENCRYPTION ); + mToolTips[24] = TQPair<TQString, int>(); } void ConfigDialog::updateStatisticsEntries( void ) { bool statisticsActive = false; - QDictIterator<InterfaceSettings> it( mSettingsDict ); + TQDictIterator<InterfaceSettings> it( mSettingsDict ); for ( ; it.current(); ++it ) { if ( it.current()->activateStatistics ) @@ -1117,14 +1117,14 @@ void ConfigDialog::spinBoxValueChanged( int ) changed( true ); } -void ConfigDialog::kColorButtonChanged( const QColor& ) +void ConfigDialog::kColorButtonChanged( const TQColor& ) { changed( true ); } void ConfigDialog::listViewCommandsSelectionChanged() { - QListViewItem* item = mDlg->listViewCommands->selectedItem(); + TQListViewItem* item = mDlg->listViewCommands->selectedItem(); if ( item ) mDlg->pushButtonRemoveCommand->setEnabled( true ); else @@ -1133,7 +1133,7 @@ void ConfigDialog::listViewCommandsSelectionChanged() void ConfigDialog::listViewCommandsCheckListItemChanged( KNemoCheckListItem* item, bool state ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -1141,7 +1141,7 @@ void ConfigDialog::listViewCommandsCheckListItemChanged( KNemoCheckListItem* ite // Find the row of the item. int row = 0; bool foundItem = false; - QListViewItem* i = mDlg->listViewCommands->firstChild(); + TQListViewItem* i = mDlg->listViewCommands->firstChild(); for ( ; i != 0; i = i->nextSibling() ) { if ( i == item ) @@ -1162,9 +1162,9 @@ void ConfigDialog::listViewCommandsCheckListItemChanged( KNemoCheckListItem* ite } } -void ConfigDialog::listViewCommandsRenamed( QListViewItem* item, int col, const QString & text ) +void ConfigDialog::listViewCommandsRenamed( TQListViewItem* item, int col, const TQString & text ) { - QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); + TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem(); if ( selected == 0 ) return; @@ -1172,7 +1172,7 @@ void ConfigDialog::listViewCommandsRenamed( QListViewItem* item, int col, const // Find the row of the item. int row = 0; bool foundItem = false; - QListViewItem* i = mDlg->listViewCommands->firstChild(); + TQListViewItem* i = mDlg->listViewCommands->firstChild(); for ( ; i != 0; i = i->nextSibling() ) { if ( i == item ) |