TQt4 port knemo

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knemo@1238869 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 09e6e27fe8
commit 02a6c8f363

@ -20,8 +20,8 @@
#ifndef DATA_H #ifndef DATA_H
#define DATA_H #define DATA_H
#include <qstring.h> #include <tqstring.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
/** /**
* This file contains data structures used to store information about * This file contains data structures used to store information about
@ -36,8 +36,8 @@ struct InterfaceCommand
{ {
int id; int id;
bool runAsRoot; bool runAsRoot;
QString command; TQString command;
QString menuText; TQString menuText;
}; };
struct InterfaceSettings struct InterfaceSettings
@ -59,8 +59,8 @@ struct InterfaceSettings
bool hideWhenNotAvailable; bool hideWhenNotAvailable;
bool activateStatistics; bool activateStatistics;
bool customCommands; bool customCommands;
QString alias; TQString alias;
QValueVector<InterfaceCommand> commands; TQValueVector<InterfaceCommand> commands;
}; };
enum ToolTipEnums enum ToolTipEnums
@ -82,7 +82,7 @@ enum ToolTipEnums
FREQUENCY = 0x00004000, FREQUENCY = 0x00004000,
BIT_RATE = 0x00008000, BIT_RATE = 0x00008000,
ACCESS_POINT = 0x00010000, ACCESS_POINT = 0x00010000,
LINK_QUALITY = 0x00020000, LINK_TQUALITY = 0x00020000,
BCAST_ADDRESS = 0x00040000, BCAST_ADDRESS = 0x00040000,
GATEWAY = 0x00080000, GATEWAY = 0x00080000,
DOWNLOAD_SPEED = 0x00100000, DOWNLOAD_SPEED = 0x00100000,

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

@ -20,16 +20,16 @@
#ifndef CONFIGDIALOG_H #ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H #define CONFIGDIALOG_H
#include <qdict.h> #include <tqdict.h>
#include <qpair.h> #include <tqpair.h>
#include <qstring.h> #include <tqstring.h>
#include <qlistview.h> #include <tqlistview.h>
#include <kcmodule.h> #include <kcmodule.h>
#include "data.h" #include "data.h"
class QTimer; class TQTimer;
class ConfigDlg; class ConfigDlg;
class KNemoCheckListItem; class KNemoCheckListItem;
@ -46,11 +46,12 @@ class KNemoCheckListItem;
class ConfigDialog : public KCModule class ConfigDialog : public KCModule
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
ConfigDialog( QWidget *parent, const char *name, const QStringList& ); ConfigDialog( TQWidget *tqparent, const char *name, const TQStringList& );
/** /**
* Default Destructor * Default Destructor
@ -72,8 +73,8 @@ private slots:
void buttonRemoveToolTipSelected(); void buttonRemoveToolTipSelected();
void buttonNotificationsSelected(); void buttonNotificationsSelected();
void buttonStatisticsDirSelected(); void buttonStatisticsDirSelected();
void interfaceSelected( const QString& interface ); void interfaceSelected( const TQString& interface );
void aliasChanged( const QString& text ); void aliasChanged( const TQString& text );
void iconSetChanged( int set ); void iconSetChanged( int set );
void backendChanged( int set ); void backendChanged( int set );
void checkBoxNotConnectedToggled( bool on ); void checkBoxNotConnectedToggled( bool on );
@ -84,7 +85,7 @@ private slots:
void checkBoxCustomToggled( bool on ); void checkBoxCustomToggled( bool on );
void listViewCommandsSelectionChanged(); void listViewCommandsSelectionChanged();
void listViewCommandsCheckListItemChanged( KNemoCheckListItem* item, bool state ); void listViewCommandsCheckListItemChanged( KNemoCheckListItem* item, bool state );
void listViewCommandsRenamed( QListViewItem* item, int col, const QString & text ); void listViewCommandsRenamed( TQListViewItem* item, int col, const TQString & text );
/** /**
* These three are generic. * These three are generic.
@ -93,7 +94,7 @@ private slots:
*/ */
void checkBoxToggled( bool ); void checkBoxToggled( bool );
void spinBoxValueChanged( int ); void spinBoxValueChanged( int );
void kColorButtonChanged( const QColor& ); void kColorButtonChanged( const TQColor& );
private: private:
void setupToolTipTab(); void setupToolTipTab();
@ -111,30 +112,31 @@ private:
int mToolTipContent; int mToolTipContent;
bool mLock; bool mLock;
ConfigDlg* mDlg; ConfigDlg* mDlg;
QColor mColorVLines; TQColor mColorVLines;
QColor mColorHLines; TQColor mColorHLines;
QColor mColorIncoming; TQColor mColorIncoming;
QColor mColorOutgoing; TQColor mColorOutgoing;
QColor mColorBackground; TQColor mColorBackground;
QDict<InterfaceSettings> mSettingsDict; TQDict<InterfaceSettings> mSettingsDict;
QPair<QString, int> mToolTips[25]; TQPair<TQString, int> mToolTips[25];
static const QString ICON_DISCONNECTED; static const TQString ICON_DISCONNECTED;
static const QString ICON_CONNECTED; static const TQString ICON_CONNECTED;
static const QString ICON_INCOMING; static const TQString ICON_INCOMING;
static const QString ICON_OUTGOING; static const TQString ICON_OUTGOING;
static const QString ICON_TRAFFIC; static const TQString ICON_TRAFFIC;
static const QString SUFFIX_PPP; static const TQString SUFFIX_PPP;
static const QString SUFFIX_LAN; static const TQString SUFFIX_LAN;
static const QString SUFFIX_WLAN; static const TQString SUFFIX_WLAN;
}; };
class KNemoCheckListItem : public QObject, public QCheckListItem class KNemoCheckListItem : public TQObject, public TQCheckListItem
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
KNemoCheckListItem( QListView* view ) KNemoCheckListItem( TQListView* view )
: QCheckListItem( view, QString::null, QCheckListItem::CheckBox ) : TQCheckListItem( view, TQString(), TQCheckListItem::CheckBox )
{} {}
signals: signals:

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigDlg</class> <class>ConfigDlg</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ConfigDlg</cstring> <cstring>ConfigDlg</cstring>
</property> </property>
@ -16,7 +16,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkBoxStartKNemo</cstring> <cstring>checkBoxStartKNemo</cstring>
</property> </property>
@ -24,11 +24,11 @@
<string>Use KNemo to monitor your interfaces</string> <string>Use KNemo to monitor your interfaces</string>
</property> </property>
</widget> </widget>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidgetConfiguration</cstring> <cstring>tabWidgetConfiguration</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>interfaces</cstring> <cstring>interfaces</cstring>
</property> </property>
@ -39,15 +39,15 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0" rowspan="2" colspan="1"> <widget class="TQLayoutWidget" row="0" column="0" rowspan="2" colspan="1">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>tqlayout4</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton" row="1" column="0"> <widget class="TQPushButton" row="1" column="0">
<property name="name"> <property name="name">
<cstring>pushButtonNew</cstring> <cstring>pushButtonNew</cstring>
</property> </property>
@ -58,7 +58,7 @@
<string>Add a new interface</string> <string>Add a new interface</string>
</property> </property>
</widget> </widget>
<widget class="QListBox" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQListBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>listBoxInterfaces</cstring> <cstring>listBoxInterfaces</cstring>
</property> </property>
@ -68,7 +68,7 @@ use the names understood by the command 'ifconfig',
for example 'eth0', 'wlan0' or 'ppp0'.</string> for example 'eth0', 'wlan0' or 'ppp0'.</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton" row="1" column="1"> <widget class="TQPushButton" row="1" column="1">
<property name="name"> <property name="name">
<cstring>pushButtonDelete</cstring> <cstring>pushButtonDelete</cstring>
</property> </property>
@ -81,7 +81,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="1" column="1"> <widget class="TQGroupBox" row="1" column="1">
<property name="name"> <property name="name">
<cstring>groupBox6</cstring> <cstring>groupBox6</cstring>
</property> </property>
@ -92,7 +92,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>checkBoxCustom</cstring> <cstring>checkBoxCustom</cstring>
</property> </property>
@ -100,7 +100,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>&amp;Display custom entries in context menu</string> <string>&amp;Display custom entries in context menu</string>
</property> </property>
</widget> </widget>
<widget class="QListView" row="1" column="0"> <widget class="TQListView" row="1" column="0">
<column> <column>
<property name="text"> <property name="text">
<string>Root</string> <string>Root</string>
@ -144,15 +144,15 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<enum>LastColumn</enum> <enum>LastColumn</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="1" column="1"> <widget class="TQLayoutWidget" row="1" column="1">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>tqlayout6</cstring>
</property> </property>
<vbox> <vbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>pushButtonAddCommand</cstring> <cstring>pushButtonAddCommand</cstring>
</property> </property>
@ -169,7 +169,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>Add a new entry</string> <string>Add a new entry</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>pushButtonRemoveCommand</cstring> <cstring>pushButtonRemoveCommand</cstring>
</property> </property>
@ -196,14 +196,14 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>41</width> <width>41</width>
<height>61</height> <height>61</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>pushButtonUp</cstring> <cstring>pushButtonUp</cstring>
</property> </property>
@ -214,7 +214,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>Move the selected entry up</string> <string>Move the selected entry up</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>pushButtonDown</cstring> <cstring>pushButtonDown</cstring>
</property> </property>
@ -229,7 +229,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="0" column="1"> <widget class="TQGroupBox" row="0" column="1">
<property name="name"> <property name="name">
<cstring>groupBox3</cstring> <cstring>groupBox3</cstring>
</property> </property>
@ -240,15 +240,15 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>tqlayout5</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -256,7 +256,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>Alias:</string> <string>Alias:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>lineEditAlias</cstring> <cstring>lineEditAlias</cstring>
</property> </property>
@ -269,7 +269,7 @@ icons.</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkBoxNotConnected</cstring> <cstring>checkBoxNotConnected</cstring>
</property> </property>
@ -282,9 +282,9 @@ hidden when the interface is not connected.
When reconnected the icon will be shown again.</string> When reconnected the icon will be shown again.</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>tqlayout3</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -300,14 +300,14 @@ When reconnected the icon will be shown again.</string>
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>21</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkBoxNotExisting</cstring> <cstring>checkBoxNotExisting</cstring>
</property> </property>
@ -324,7 +324,7 @@ of bluetooth adaptors.</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkBoxStatistics</cstring> <cstring>checkBoxStatistics</cstring>
</property> </property>
@ -332,15 +332,15 @@ of bluetooth adaptors.</string>
<string>Activate statistics</string> <string>Activate statistics</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7_2</cstring> <cstring>tqlayout7_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3_2</cstring> <cstring>textLabel1_3_2</cstring>
</property> </property>
@ -369,15 +369,15 @@ of bluetooth adaptors.</string>
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>tqlayout7</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -393,7 +393,7 @@ of bluetooth adaptors.</string>
<string>Iconset:</string> <string>Iconset:</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Monitor</string> <string>Monitor</string>
@ -418,27 +418,27 @@ of bluetooth adaptors.</string>
<cstring>comboBoxIconSet</cstring> <cstring>comboBoxIconSet</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>pixmapDisconnected</cstring> <cstring>pixmapDisconnected</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>pixmapConnected</cstring> <cstring>pixmapConnected</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>pixmapIncoming</cstring> <cstring>pixmapIncoming</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>pixmapOutgoing</cstring> <cstring>pixmapOutgoing</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>pixmapTraffic</cstring> <cstring>pixmapTraffic</cstring>
</property> </property>
@ -449,7 +449,7 @@ of bluetooth adaptors.</string>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tooltip</cstring> <cstring>tooltip</cstring>
</property> </property>
@ -460,7 +460,7 @@ of bluetooth adaptors.</string>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="4" column="0" rowspan="1" colspan="4"> <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="4">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -479,14 +479,14 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>70</width> <width>70</width>
<height>129</height> <height>129</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton" row="2" column="1"> <widget class="TQPushButton" row="2" column="1">
<property name="name"> <property name="name">
<cstring>pushButtonRemoveToolTip</cstring> <cstring>pushButtonRemoveToolTip</cstring>
</property> </property>
@ -507,14 +507,14 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>70</width> <width>70</width>
<height>130</height> <height>130</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton" row="2" column="2"> <widget class="TQPushButton" row="2" column="2">
<property name="name"> <property name="name">
<cstring>pushButtonAddToolTip</cstring> <cstring>pushButtonAddToolTip</cstring>
</property> </property>
@ -525,7 +525,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Add the selected entry to the list of displayed information.</string> <string>Add the selected entry to the list of displayed information.</string>
</property> </property>
</widget> </widget>
<widget class="QListBox" row="1" column="0" rowspan="3" colspan="1"> <widget class="TQListBox" row="1" column="0" rowspan="3" colspan="1">
<property name="name"> <property name="name">
<cstring>listBoxAvailable</cstring> <cstring>listBoxAvailable</cstring>
</property> </property>
@ -533,7 +533,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<enum>Extended</enum> <enum>Extended</enum>
</property> </property>
</widget> </widget>
<widget class="QListBox" row="1" column="3" rowspan="3" colspan="1"> <widget class="TQListBox" row="1" column="3" rowspan="3" colspan="1">
<property name="name"> <property name="name">
<cstring>listBoxDisplay</cstring> <cstring>listBoxDisplay</cstring>
</property> </property>
@ -541,7 +541,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<enum>Extended</enum> <enum>Extended</enum>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="3"> <widget class="TQLabel" row="0" column="3">
<property name="name"> <property name="name">
<cstring>textLabel2_3</cstring> <cstring>textLabel2_3</cstring>
</property> </property>
@ -557,7 +557,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Display:</string> <string>Display:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_4</cstring> <cstring>textLabel1_4</cstring>
</property> </property>
@ -575,7 +575,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>misc</cstring> <cstring>misc</cstring>
</property> </property>
@ -586,7 +586,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox6_2</cstring> <cstring>groupBox6_2</cstring>
</property> </property>
@ -597,7 +597,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>pushButtonNotifications</cstring> <cstring>pushButtonNotifications</cstring>
</property> </property>
@ -607,7 +607,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBoxUpdateInterval</cstring> <cstring>groupBoxUpdateInterval</cstring>
</property> </property>
@ -618,7 +618,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -636,7 +636,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>60</width> <width>60</width>
<height>21</height> <height>21</height>
@ -659,7 +659,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBoxStatistics</cstring> <cstring>groupBoxStatistics</cstring>
</property> </property>
@ -670,7 +670,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton" row="2" column="3"> <widget class="TQPushButton" row="2" column="3">
<property name="name"> <property name="name">
<cstring>pushButtonStatisticsDir</cstring> <cstring>pushButtonStatisticsDir</cstring>
</property> </property>
@ -678,7 +678,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>...</string> <string>...</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0" rowspan="1" colspan="3"> <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>textLabel1_5</cstring> <cstring>textLabel1_5</cstring>
</property> </property>
@ -686,12 +686,12 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Statistics are stored in the following directory:</string> <string>Statistics are stored in the following directory:</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" row="2" column="0" rowspan="1" colspan="3"> <widget class="TQLineEdit" row="2" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>lineEditStatisticsDir</cstring> <cstring>lineEditStatisticsDir</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_6</cstring> <cstring>textLabel1_6</cstring>
</property> </property>
@ -709,7 +709,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>131</width> <width>131</width>
<height>21</height> <height>21</height>
@ -729,7 +729,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox11_2</cstring> <cstring>groupBox11_2</cstring>
</property> </property>
@ -740,7 +740,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>textLabel1_7</cstring> <cstring>textLabel1_7</cstring>
</property> </property>
@ -748,7 +748,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Use the following backend</string> <string>Use the following backend</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -763,22 +763,22 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="text"> <property name="text">
<string>Description:</string> <string>Description:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="1" rowspan="1" colspan="3"> <widget class="TQLabel" row="1" column="1" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>textLabelBackendDescription</cstring> <cstring>textLabelBackendDescription</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>
<widget class="QComboBox" row="0" column="3"> <widget class="TQComboBox" row="0" column="3">
<property name="name"> <property name="name">
<cstring>comboBoxBackends</cstring> <cstring>comboBoxBackends</cstring>
</property> </property>
@ -793,7 +793,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>100</width> <width>100</width>
<height>21</height> <height>21</height>
@ -812,7 +812,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>30</height> <height>30</height>
@ -821,7 +821,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>trafficplotter</cstring> <cstring>trafficplotter</cstring>
</property> </property>
@ -832,7 +832,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2"> <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>groupBox7</cstring> <cstring>groupBox7</cstring>
</property> </property>
@ -854,7 +854,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>1</number> <number>1</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="2"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>textLabel8_2</cstring> <cstring>textLabel8_2</cstring>
</property> </property>
@ -862,7 +862,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Pixel per time period:</string> <string>Pixel per time period:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="2"> <widget class="TQLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>textLabel9_2_2</cstring> <cstring>textLabel9_2_2</cstring>
</property> </property>
@ -884,7 +884,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>1</number> <number>1</number>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>checkBoxAutoDetection</cstring> <cstring>checkBoxAutoDetection</cstring>
</property> </property>
@ -900,7 +900,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>49999</number> <number>49999</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel9_3</cstring> <cstring>textLabel9_3</cstring>
</property> </property>
@ -913,7 +913,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="2" column="1"> <widget class="TQGroupBox" row="2" column="1">
<property name="name"> <property name="name">
<cstring>groupBox9</cstring> <cstring>groupBox9</cstring>
</property> </property>
@ -924,7 +924,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox" row="0" column="0"> <widget class="TQCheckBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>checkBoxLabels</cstring> <cstring>checkBoxLabels</cstring>
</property> </property>
@ -932,7 +932,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>&amp;Labels</string> <string>&amp;Labels</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="1" column="0"> <widget class="TQCheckBox" row="1" column="0">
<property name="name"> <property name="name">
<cstring>checkBoxTopBar</cstring> <cstring>checkBoxTopBar</cstring>
</property> </property>
@ -940,7 +940,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Top &amp;bar</string> <string>Top &amp;bar</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3_2</cstring> <cstring>textLabel3_2</cstring>
</property> </property>
@ -967,7 +967,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="2" column="0"> <widget class="TQGroupBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>groupBox8</cstring> <cstring>groupBox8</cstring>
</property> </property>
@ -992,7 +992,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>30</number> <number>30</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabel1_2_2</cstring> <cstring>textLabel1_2_2</cstring>
</property> </property>
@ -1003,7 +1003,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<cstring>spinBoxDistance</cstring> <cstring>spinBoxDistance</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="0" column="0"> <widget class="TQCheckBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>checkBoxVLines</cstring> <cstring>checkBoxVLines</cstring>
</property> </property>
@ -1011,7 +1011,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Vertic&amp;al lines</string> <string>Vertic&amp;al lines</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="1" column="0"> <widget class="TQCheckBox" row="1" column="0">
<property name="name"> <property name="name">
<cstring>checkBoxVLinesScroll</cstring> <cstring>checkBoxVLinesScroll</cstring>
</property> </property>
@ -1033,7 +1033,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>5</number> <number>5</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>textLabel2_4</cstring> <cstring>textLabel2_4</cstring>
</property> </property>
@ -1044,7 +1044,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<cstring>spinBoxCount</cstring> <cstring>spinBoxCount</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="2" column="0"> <widget class="TQCheckBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>checkBoxHLines</cstring> <cstring>checkBoxHLines</cstring>
</property> </property>
@ -1054,7 +1054,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="3" column="0" rowspan="1" colspan="2"> <widget class="TQGroupBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>groupBox10</cstring> <cstring>groupBox10</cstring>
</property> </property>
@ -1065,7 +1065,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel4_2</cstring> <cstring>textLabel4_2</cstring>
</property> </property>
@ -1097,7 +1097,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel6_2</cstring> <cstring>textLabel6_2</cstring>
</property> </property>
@ -1113,7 +1113,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel5_2</cstring> <cstring>textLabel5_2</cstring>
</property> </property>
@ -1121,7 +1121,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Horizontal lines:</string> <string>Horizontal lines:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="2"> <widget class="TQLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>textLabel7_2_2</cstring> <cstring>textLabel7_2_2</cstring>
</property> </property>
@ -1129,7 +1129,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Outgoing traffic:</string> <string>Outgoing traffic:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="2"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>textLabel7_3</cstring> <cstring>textLabel7_3</cstring>
</property> </property>
@ -1147,7 +1147,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>groupBox15</cstring> <cstring>groupBox15</cstring>
</property> </property>
@ -1158,7 +1158,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkBoxIncoming</cstring> <cstring>checkBoxIncoming</cstring>
</property> </property>
@ -1166,7 +1166,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Sho&amp;w incoming traffic</string> <string>Sho&amp;w incoming traffic</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>checkBoxOutgoing</cstring> <cstring>checkBoxOutgoing</cstring>
</property> </property>
@ -1282,7 +1282,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<tabstop>pushButtonRemoveToolTip</tabstop> <tabstop>pushButtonRemoveToolTip</tabstop>
<tabstop>pushButtonAddToolTip</tabstop> <tabstop>pushButtonAddToolTip</tabstop>
</tabstops> </tabstops>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint>

@ -19,7 +19,7 @@
#include "backendbase.h" #include "backendbase.h"
BackendBase::BackendBase( QDict<Interface>& interfaces ) BackendBase::BackendBase( TQDict<Interface>& interfaces )
: mInterfaces( interfaces ) : mInterfaces( interfaces )
{ {
} }
@ -30,7 +30,7 @@ BackendBase::~BackendBase()
void BackendBase::updateComplete() void BackendBase::updateComplete()
{ {
QDictIterator<Interface> ifIt( mInterfaces ); TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt ) for ( ; ifIt.current(); ++ifIt )
{ {
ifIt.current()->activateMonitor(); ifIt.current()->activateMonitor();

@ -20,8 +20,8 @@
#ifndef BACKENDBASE_H #ifndef BACKENDBASE_H
#define BACKENDBASE_H #define BACKENDBASE_H
#include <qdict.h> #include <tqdict.h>
#include <qstring.h> #include <tqstring.h>
#include <klocale.h> #include <klocale.h>
@ -39,7 +39,7 @@
class BackendBase class BackendBase
{ {
public: public:
BackendBase( QDict<Interface>& interfaces ); BackendBase( TQDict<Interface>& interfaces );
virtual ~BackendBase(); virtual ~BackendBase();
/** /**
@ -50,7 +50,7 @@ public:
/** /**
* This function is called from KNemo whenever the * This function is called from KNemo whenever the
* backend shall update the information of the * backend shall update the information of the
* interfaces in the QDict. * interfaces in the TQDict.
*/ */
virtual void update() = 0; virtual void update() = 0;
@ -62,7 +62,7 @@ protected:
*/ */
void updateComplete(); void updateComplete();
const QDict<Interface>& mInterfaces; const TQDict<Interface>& mInterfaces;
}; };
#endif // BACKENDBASE_H #endif // BACKENDBASE_H

@ -20,7 +20,7 @@
#ifndef DAEMONREGISTRY_H #ifndef DAEMONREGISTRY_H
#define DAEMONREGISTRY_H #define DAEMONREGISTRY_H
#include <qstring.h> #include <tqstring.h>
#include <klocale.h> #include <klocale.h>
@ -40,15 +40,15 @@
struct DaemonRegistryEntry struct DaemonRegistryEntry
{ {
QString name; TQString name;
BackendBase* (*function) ( QDict<Interface>& ); BackendBase* (*function) ( TQDict<Interface>& );
}; };
DaemonRegistryEntry DaemonRegistry[] = DaemonRegistryEntry DaemonRegistry[] =
{ {
{ "Nettools", NetToolsBackend::createInstance }, { "Nettools", NetToolsBackend::createInstance },
{ "Sys", SysBackend::createInstance }, { "Sys", SysBackend::createInstance },
{ QString::null, 0 } { TQString(), 0 }
}; };
#endif // DAEMONREGISTRY_H #endif // DAEMONREGISTRY_H

@ -20,7 +20,7 @@
#ifndef KCMREGISTRY_H #ifndef KCMREGISTRY_H
#define KCMREGISTRY_H #define KCMREGISTRY_H
#include <qstring.h> #include <tqstring.h>
#include <klocale.h> #include <klocale.h>
@ -36,8 +36,8 @@
struct KCMRegistryEntry struct KCMRegistryEntry
{ {
QString name; TQString name;
QString description; TQString description;
}; };
KCMRegistryEntry KCMRegistry[] = KCMRegistryEntry KCMRegistry[] =
@ -55,7 +55,7 @@ KCMRegistryEntry KCMRegistry[] =
"As an advantage this backend should reduce the CPU load " \ "As an advantage this backend should reduce the CPU load " \
"and should not access the harddisc while gathering " \ "and should not access the harddisc while gathering " \
"information." ) }, "information." ) },
{ QString::null, QString::null } { TQString(), TQString() }
}; };
#endif // KCMREGISTRY_H #endif // KCMREGISTRY_H

@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qmap.h> #include <tqmap.h>
#include <qregexp.h> #include <tqregexp.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kdebug.h> #include <kdebug.h>
#include <kprocess.h> #include <kprocess.h>
@ -29,8 +29,8 @@
#include "config.h" #include "config.h"
NetToolsBackend::NetToolsBackend( QDict<Interface>& interfaces ) NetToolsBackend::NetToolsBackend( TQDict<Interface>& interfaces )
: QObject(), : TQObject(),
BackendBase( interfaces ), BackendBase( interfaces ),
mRouteProcess(0L), mRouteProcess(0L),
mIfconfigProcess(0L), mIfconfigProcess(0L),
@ -57,7 +57,7 @@ NetToolsBackend::~NetToolsBackend()
} }
} }
BackendBase* NetToolsBackend::createInstance( QDict<Interface>& interfaces ) BackendBase* NetToolsBackend::createInstance( TQDict<Interface>& interfaces )
{ {
return new NetToolsBackend( interfaces ); return new NetToolsBackend( interfaces );
} }
@ -66,15 +66,15 @@ void NetToolsBackend::update()
{ {
if ( !mIfconfigProcess ) if ( !mIfconfigProcess )
{ {
mIfconfigStdout = QString::null; mIfconfigStdout = TQString();
mIfconfigProcess = new KProcess(); mIfconfigProcess = new KProcess();
mIfconfigProcess->setEnvironment( "LANG", "C" ); mIfconfigProcess->setEnvironment( "LANG", "C" );
mIfconfigProcess->setEnvironment( "LC_ALL", "C" ); mIfconfigProcess->setEnvironment( "LC_ALL", "C" );
*mIfconfigProcess << PATH_IFCONFIG << "-a"; *mIfconfigProcess << PATH_IFCONFIG << "-a";
connect( mIfconfigProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), connect( mIfconfigProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
this, SLOT( ifconfigProcessStdout( KProcess*, char*, int ) ) ); this, TQT_SLOT( ifconfigProcessStdout( KProcess*, char*, int ) ) );
connect( mIfconfigProcess, SIGNAL( processExited( KProcess* ) ), connect( mIfconfigProcess, TQT_SIGNAL( processExited( KProcess* ) ),
this, SLOT( ifconfigProcessExited( KProcess* ) ) ); this, TQT_SLOT( ifconfigProcessExited( KProcess* ) ) );
if ( !mIfconfigProcess->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) if ( !mIfconfigProcess->start( KProcess::NotifyOnExit, KProcess::Stdout ) )
{ {
@ -86,17 +86,17 @@ void NetToolsBackend::update()
#ifdef PATH_IWCONFIG #ifdef PATH_IWCONFIG
if ( !mIwconfigProcess ) if ( !mIwconfigProcess )
{ {
mIwconfigStdout = QString::null; mIwconfigStdout = TQString();
mIwconfigProcess = new KProcess(); mIwconfigProcess = new KProcess();
mIwconfigProcess->setEnvironment( "LANG", "C" ); mIwconfigProcess->setEnvironment( "LANG", "C" );
mIwconfigProcess->setEnvironment( "LC_ALL", "C" ); mIwconfigProcess->setEnvironment( "LC_ALL", "C" );
*mIwconfigProcess << PATH_IWCONFIG; *mIwconfigProcess << PATH_IWCONFIG;
connect( mIwconfigProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), connect( mIwconfigProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
this, SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) ); this, TQT_SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) );
connect( mIwconfigProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ), connect( mIwconfigProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
this, SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) ); this, TQT_SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) );
connect( mIwconfigProcess, SIGNAL( processExited( KProcess* ) ), connect( mIwconfigProcess, TQT_SIGNAL( processExited( KProcess* ) ),
this, SLOT( iwconfigProcessExited( KProcess* ) ) ); this, TQT_SLOT( iwconfigProcessExited( KProcess* ) ) );
if ( !mIwconfigProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) if ( !mIwconfigProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{ {
@ -109,17 +109,17 @@ void NetToolsBackend::update()
#ifdef PATH_ROUTE #ifdef PATH_ROUTE
if ( !mRouteProcess ) if ( !mRouteProcess )
{ {
mRouteStdout = QString::null; mRouteStdout = TQString();
mRouteProcess = new KProcess(); mRouteProcess = new KProcess();
mRouteProcess->setEnvironment( "LANG", "C" ); mRouteProcess->setEnvironment( "LANG", "C" );
mRouteProcess->setEnvironment( "LC_ALL", "C" ); mRouteProcess->setEnvironment( "LC_ALL", "C" );
*mRouteProcess << PATH_ROUTE << "-n"; *mRouteProcess << PATH_ROUTE << "-n";
connect( mRouteProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), connect( mRouteProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
this, SLOT( routeProcessStdout( KProcess*, char*, int ) ) ); this, TQT_SLOT( routeProcessStdout( KProcess*, char*, int ) ) );
connect( mRouteProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ), connect( mRouteProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
this, SLOT( routeProcessStdout( KProcess*, char*, int ) ) ); this, TQT_SLOT( routeProcessStdout( KProcess*, char*, int ) ) );
connect( mRouteProcess, SIGNAL( processExited( KProcess* ) ), connect( mRouteProcess, TQT_SIGNAL( processExited( KProcess* ) ),
this, SLOT( routeProcessExited( KProcess* ) ) ); this, TQT_SLOT( routeProcessExited( KProcess* ) ) );
if ( !mRouteProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) if ( !mRouteProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{ {
@ -142,7 +142,7 @@ void NetToolsBackend::routeProcessExited( KProcess* process )
void NetToolsBackend::routeProcessStdout( KProcess*, char* buffer, int buflen ) void NetToolsBackend::routeProcessStdout( KProcess*, char* buffer, int buflen )
{ {
mRouteStdout += QString::fromLatin1( buffer, buflen ); mRouteStdout += TQString::tqfromLatin1( buffer, buflen );
} }
void NetToolsBackend::ifconfigProcessExited( KProcess* process ) void NetToolsBackend::ifconfigProcessExited( KProcess* process )
@ -157,7 +157,7 @@ void NetToolsBackend::ifconfigProcessExited( KProcess* process )
void NetToolsBackend::ifconfigProcessStdout( KProcess*, char* buffer, int buflen ) void NetToolsBackend::ifconfigProcessStdout( KProcess*, char* buffer, int buflen )
{ {
mIfconfigStdout += QString::fromLatin1( buffer, buflen ); mIfconfigStdout += TQString::tqfromLatin1( buffer, buflen );
} }
void NetToolsBackend::iwconfigProcessExited( KProcess* process ) void NetToolsBackend::iwconfigProcessExited( KProcess* process )
@ -172,7 +172,7 @@ void NetToolsBackend::iwconfigProcessExited( KProcess* process )
void NetToolsBackend::iwconfigProcessStdout( KProcess*, char* buffer, int buflen ) void NetToolsBackend::iwconfigProcessStdout( KProcess*, char* buffer, int buflen )
{ {
mIwconfigStdout += QString::fromLatin1( buffer, buflen ); mIwconfigStdout += TQString::tqfromLatin1( buffer, buflen );
} }
void NetToolsBackend::parseIfconfigOutput() void NetToolsBackend::parseIfconfigOutput()
@ -180,15 +180,15 @@ void NetToolsBackend::parseIfconfigOutput()
/* mIfconfigStdout contains the complete output of 'ifconfig' which we /* mIfconfigStdout contains the complete output of 'ifconfig' which we
* are going to parse here. * are going to parse here.
*/ */
QMap<QString, QString> configs; TQMap<TQString, TQString> configs;
QStringList ifList = QStringList::split( "\n\n", mIfconfigStdout ); TQStringList ifList = TQStringList::split( "\n\n", mIfconfigStdout );
QStringList::Iterator it; TQStringList::Iterator it;
for ( it = ifList.begin(); it != ifList.end(); ++it ) for ( it = ifList.begin(); it != ifList.end(); ++it )
{ {
int index = ( *it ).find( ' ' ); int index = ( *it ).tqfind( ' ' );
if ( index == -1 ) if ( index == -1 )
continue; continue;
QString key = ( *it ).left( index ); TQString key = ( *it ).left( index );
configs[key] = ( *it ).mid( index ); configs[key] = ( *it ).mid( index );
} }
@ -197,13 +197,13 @@ void NetToolsBackend::parseIfconfigOutput()
* we update its data, otherwise we mark it as * we update its data, otherwise we mark it as
* 'not existing'. * 'not existing'.
*/ */
QDictIterator<Interface> ifIt( mInterfaces ); TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt ) for ( ; ifIt.current(); ++ifIt )
{ {
QString key = ifIt.currentKey(); TQString key = ifIt.currentKey();
Interface* interface = ifIt.current(); Interface* interface = ifIt.current();
if ( configs.find( key ) == configs.end() ) if ( configs.tqfind( key ) == configs.end() )
{ {
// The interface does not exist. Meaning the driver // The interface does not exist. Meaning the driver
// isn't loaded and/or the interface has not been created. // isn't loaded and/or the interface has not been created.
@ -211,8 +211,8 @@ void NetToolsBackend::parseIfconfigOutput()
interface->getData().available = false; interface->getData().available = false;
} }
// JJ 2005-07-18: use RUNNING instead of UP to detect whether interface is connected // JJ 2005-07-18: use RUNNING instead of UP to detect whether interface is connected
else if ( !configs[key].contains( "inet " ) || else if ( !configs[key].tqcontains( "inet " ) ||
!configs[key].contains( "RUNNING" ) ) !configs[key].tqcontains( "RUNNING" ) )
{ {
// The interface is up or has an IP assigned but not both // The interface is up or has an IP assigned but not both
interface->getData().existing = true; interface->getData().existing = true;
@ -221,7 +221,7 @@ void NetToolsBackend::parseIfconfigOutput()
else else
{ {
// ...determine the type of the interface // ...determine the type of the interface
if ( configs[key].contains( "Ethernet" ) ) if ( configs[key].tqcontains( "Ethernet" ) )
interface->setType( Interface::ETHERNET ); interface->setType( Interface::ETHERNET );
else else
interface->setType( Interface::PPP ); interface->setType( Interface::PPP );
@ -235,9 +235,9 @@ void NetToolsBackend::parseIfconfigOutput()
updateComplete(); updateComplete();
} }
void NetToolsBackend::updateInterfaceData( QString& config, InterfaceData& data, int type ) void NetToolsBackend::updateInterfaceData( TQString& config, InterfaceData& data, int type )
{ {
QRegExp regExp( ".*RX.*:(\\d+).*:\\d+.*:\\d+.*:\\d+" ); TQRegExp regExp( ".*RX.*:(\\d+).*:\\d+.*:\\d+.*:\\d+" );
if ( regExp.search( config ) > -1 ) if ( regExp.search( config ) > -1 )
data.rxPackets = regExp.cap( 1 ).toULong(); data.rxPackets = regExp.cap( 1 ).toULong();
@ -345,15 +345,15 @@ void NetToolsBackend::parseIwconfigOutput()
/* mIwconfigStdout contains the complete output of 'iwconfig' which we /* mIwconfigStdout contains the complete output of 'iwconfig' which we
* are going to parse here. * are going to parse here.
*/ */
QMap<QString, QString> configs; TQMap<TQString, TQString> configs;
QStringList ifList = QStringList::split( "\n\n", mIwconfigStdout ); TQStringList ifList = TQStringList::split( "\n\n", mIwconfigStdout );
QStringList::Iterator it; TQStringList::Iterator it;
for ( it = ifList.begin(); it != ifList.end(); ++it ) for ( it = ifList.begin(); it != ifList.end(); ++it )
{ {
int index = ( *it ).find( ' ' ); int index = ( *it ).tqfind( ' ' );
if ( index == -1 ) if ( index == -1 )
continue; continue;
QString key = ( *it ).left( index ); TQString key = ( *it ).left( index );
configs[key] = ( *it ).mid( index ); configs[key] = ( *it ).mid( index );
} }
@ -361,18 +361,18 @@ void NetToolsBackend::parseIwconfigOutput()
* If we find the interface in the output of 'iwconfig' * If we find the interface in the output of 'iwconfig'
* we update its data. * we update its data.
*/ */
QDictIterator<Interface> ifIt( mInterfaces ); TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt ) for ( ; ifIt.current(); ++ifIt )
{ {
QString key = ifIt.currentKey(); TQString key = ifIt.currentKey();
Interface* interface = ifIt.current(); Interface* interface = ifIt.current();
if ( configs.find( key ) == configs.end() ) if ( configs.tqfind( key ) == configs.end() )
{ {
// The interface was not found. // The interface was not found.
continue; continue;
} }
else if ( configs[key].contains( "no wireless extensions" ) ) else if ( configs[key].tqcontains( "no wireless extensions" ) )
{ {
// The interface isn't a wireless device. // The interface isn't a wireless device.
interface->getData().wirelessDevice = false; interface->getData().wirelessDevice = false;
@ -386,9 +386,9 @@ void NetToolsBackend::parseIwconfigOutput()
} }
} }
void NetToolsBackend::updateWirelessData( QString& config, WirelessData& data ) void NetToolsBackend::updateWirelessData( TQString& config, WirelessData& data )
{ {
QRegExp regExp( "ESSID:([^\"][\\S]*)" ); TQRegExp regExp( "ESSID:([^\"][\\S]*)" );
if ( regExp.search( config ) > -1 ) if ( regExp.search( config ) > -1 )
data.essid = regExp.cap( 1 ); data.essid = regExp.cap( 1 );
else else
@ -397,7 +397,7 @@ void NetToolsBackend::updateWirelessData( QString& config, WirelessData& data )
if ( regExp.search( config ) > -1 ) if ( regExp.search( config ) > -1 )
data.essid = regExp.cap( 1 ); data.essid = regExp.cap( 1 );
else else
data.essid = QString::null; data.essid = TQString();
} }
regExp.setPattern( "Mode:(\\w*)" ); regExp.setPattern( "Mode:(\\w*)" );
@ -460,12 +460,12 @@ void NetToolsBackend::parseRouteOutput()
/* mRouteStdout contains the complete output of 'route' which we /* mRouteStdout contains the complete output of 'route' which we
* are going to parse here. * are going to parse here.
*/ */
QMap<QString, QStringList> configs; TQMap<TQString, TQStringList> configs;
QStringList routeList = QStringList::split( "\n", mRouteStdout ); TQStringList routeList = TQStringList::split( "\n", mRouteStdout );
QStringList::Iterator it; TQStringList::Iterator it;
for ( it = routeList.begin(); it != routeList.end(); ++it ) for ( it = routeList.begin(); it != routeList.end(); ++it )
{ {
QStringList routeParameter = QStringList::split( " ", *it ); TQStringList routeParameter = TQStringList::split( " ", *it );
if ( routeParameter.count() < 8 ) // no routing entry if ( routeParameter.count() < 8 ) // no routing entry
continue; continue;
if ( routeParameter[0] != "0.0.0.0" ) // no default route if ( routeParameter[0] != "0.0.0.0" ) // no default route
@ -477,22 +477,22 @@ void NetToolsBackend::parseRouteOutput()
* If we find the interface in the output of 'route' we update * If we find the interface in the output of 'route' we update
* the data of the interface. * the data of the interface.
*/ */
QDictIterator<Interface> ifIt( mInterfaces ); TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt ) for ( ; ifIt.current(); ++ifIt )
{ {
QString key = ifIt.currentKey(); TQString key = ifIt.currentKey();
Interface* interface = ifIt.current(); Interface* interface = ifIt.current();
if ( configs.find( key ) != configs.end() ) if ( configs.tqfind( key ) != configs.end() )
{ {
// Update the default gateway. // Update the default gateway.
QStringList routeParameter = configs[key]; TQStringList routeParameter = configs[key];
interface->getData().defaultGateway = routeParameter[1]; interface->getData().defaultGateway = routeParameter[1];
} }
else else
{ {
// Reset the default gateway. // Reset the default gateway.
interface->getData().defaultGateway = QString::null; interface->getData().defaultGateway = TQString();
} }
} }
} }

@ -20,7 +20,7 @@
#ifndef NETTOOLSBACKEND_H #ifndef NETTOOLSBACKEND_H
#define NETTOOLSBACKEND_H #define NETTOOLSBACKEND_H
#include <qobject.h> #include <tqobject.h>
#include "backendbase.h" #include "backendbase.h"
@ -35,14 +35,15 @@ class KProcess;
* @author Percy Leonhardt <percy@eris23.de> * @author Percy Leonhardt <percy@eris23.de>
*/ */
class NetToolsBackend : public QObject, BackendBase class NetToolsBackend : public TQObject, BackendBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
NetToolsBackend(QDict<Interface>& interfaces ); NetToolsBackend(TQDict<Interface>& interfaces );
virtual ~NetToolsBackend(); virtual ~NetToolsBackend();
static BackendBase* createInstance( QDict<Interface>& interfaces ); static BackendBase* createInstance( TQDict<Interface>& interfaces );
void update(); void update();
@ -57,13 +58,13 @@ private slots:
private: private:
void parseRouteOutput(); void parseRouteOutput();
void parseIfconfigOutput(); void parseIfconfigOutput();
void updateInterfaceData( QString& config, InterfaceData& data, int type ); void updateInterfaceData( TQString& config, InterfaceData& data, int type );
void parseIwconfigOutput(); void parseIwconfigOutput();
void updateWirelessData( QString& config, WirelessData& data ); void updateWirelessData( TQString& config, WirelessData& data );
QString mRouteStdout; TQString mRouteStdout;
QString mIfconfigStdout; TQString mIfconfigStdout;
QString mIwconfigStdout; TQString mIwconfigStdout;
KProcess* mRouteProcess; KProcess* mRouteProcess;
KProcess* mIfconfigProcess; KProcess* mIfconfigProcess;
KProcess* mIwconfigProcess; KProcess* mIwconfigProcess;

@ -24,10 +24,10 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <qmap.h> #include <tqmap.h>
#include <qdir.h> #include <tqdir.h>
#include <qregexp.h> #include <tqregexp.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kdebug.h> #include <kdebug.h>
#include <kprocess.h> #include <kprocess.h>
@ -51,7 +51,7 @@
#define SYSPATH "/sys/class/net/" #define SYSPATH "/sys/class/net/"
#define PROCROUTE "/proc/net/route" #define PROCROUTE "/proc/net/route"
SysBackend::SysBackend( QDict<Interface>& interfaces ) SysBackend::SysBackend( TQDict<Interface>& interfaces )
: BackendBase( interfaces ) : BackendBase( interfaces )
{ {
} }
@ -60,23 +60,23 @@ SysBackend::~SysBackend()
{ {
} }
BackendBase* SysBackend::createInstance( QDict<Interface>& interfaces ) BackendBase* SysBackend::createInstance( TQDict<Interface>& interfaces )
{ {
return new SysBackend( interfaces ); return new SysBackend( interfaces );
} }
void SysBackend::update() void SysBackend::update()
{ {
QDir dir( SYSPATH ); TQDir dir( SYSPATH );
QStringList ifList = dir.entryList( QDir::Dirs ); TQStringList ifList = dir.entryList( TQDir::Dirs );
QDictIterator<Interface> ifIt( mInterfaces ); TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt ) for ( ; ifIt.current(); ++ifIt )
{ {
QString key = ifIt.currentKey(); TQString key = ifIt.currentKey();
Interface* interface = ifIt.current(); Interface* interface = ifIt.current();
if ( ifList.find( key ) == ifList.end() ) if ( ifList.tqfind( key ) == ifList.end() )
{ {
// The interface does not exist. Meaning the driver // The interface does not exist. Meaning the driver
// isn't loaded and/or the interface has not been created. // isn't loaded and/or the interface has not been created.
@ -85,7 +85,7 @@ void SysBackend::update()
} }
else else
{ {
if ( QFile::exists( SYSPATH + key + "/wireless" ) ) if ( TQFile::exists( SYSPATH + key + "/wireless" ) )
{ {
interface->getData().wirelessDevice = true; interface->getData().wirelessDevice = true;
} }
@ -127,7 +127,7 @@ void SysBackend::update()
updateComplete(); updateComplete();
} }
bool SysBackend::readNumberFromFile( const QString& fileName, unsigned int& value ) bool SysBackend::readNumberFromFile( const TQString& fileName, unsigned int& value )
{ {
FILE* file = fopen( fileName.latin1(), "r" ); FILE* file = fopen( fileName.latin1(), "r" );
if ( file != NULL ) if ( file != NULL )
@ -143,7 +143,7 @@ bool SysBackend::readNumberFromFile( const QString& fileName, unsigned int& valu
return false; return false;
} }
bool SysBackend::readStringFromFile( const QString& fileName, QString& string ) bool SysBackend::readStringFromFile( const TQString& fileName, TQString& string )
{ {
char buffer[64]; char buffer[64];
FILE* file = fopen( fileName.latin1(), "r" ); FILE* file = fopen( fileName.latin1(), "r" );
@ -161,9 +161,9 @@ bool SysBackend::readStringFromFile( const QString& fileName, QString& string )
return false; return false;
} }
void SysBackend::updateInterfaceData( const QString& ifName, InterfaceData& data, int type ) void SysBackend::updateInterfaceData( const TQString& ifName, InterfaceData& data, int type )
{ {
QString ifFolder = SYSPATH + ifName + "/"; TQString ifFolder = SYSPATH + ifName + "/";
unsigned int rxPackets = 0; unsigned int rxPackets = 0;
if ( readNumberFromFile( ifFolder + "statistics/rx_packets", rxPackets ) ) if ( readNumberFromFile( ifFolder + "statistics/rx_packets", rxPackets ) )
@ -247,22 +247,22 @@ void SysBackend::updateInterfaceData( const QString& ifName, InterfaceData& data
if ( type == Interface::ETHERNET ) if ( type == Interface::ETHERNET )
{ {
QString hwAddress; TQString hwAddress;
if ( readStringFromFile( ifFolder + "address", hwAddress ) ) if ( readStringFromFile( ifFolder + "address", hwAddress ) )
{ {
data.hwAddress = hwAddress; data.hwAddress = hwAddress;
} }
// for the default gateway we use the proc filesystem // for the default gateway we use the proc filesystem
QFile routeFile( PROCROUTE ); TQFile routeFile( PROCROUTE );
if ( routeFile.open( IO_ReadOnly ) ) if ( routeFile.open( IO_ReadOnly ) )
{ {
QString routeData( routeFile.readAll().data() ); TQString routeData( routeFile.readAll().data() );
QStringList routeEntries = QStringList::split( "\n", routeData ); TQStringList routeEntries = TQStringList::split( "\n", routeData );
QStringList::Iterator it; TQStringList::Iterator it;
for ( it = routeEntries.begin(); it != routeEntries.end(); ++it ) for ( it = routeEntries.begin(); it != routeEntries.end(); ++it )
{ {
QRegExp regExp( ".*\\s+[\\w\\d]{8}\\s+([\\w\\d]{8})\\s+(\\d{4})" ); TQRegExp regExp( ".*\\s+[\\w\\d]{8}\\s+([\\w\\d]{8})\\s+(\\d{4})" );
if ( ( regExp.search( *it ) > -1 ) if ( ( regExp.search( *it ) > -1 )
&& ( regExp.cap( 2 ).toUInt() & RTF_GATEWAY ) ) && ( regExp.cap( 2 ).toUInt() & RTF_GATEWAY ) )
{ {
@ -307,14 +307,14 @@ void SysBackend::updateInterfaceData( const QString& ifName, InterfaceData& data
} }
} }
void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data ) void SysBackend::updateWirelessData( const TQString& ifName, WirelessData& data )
{ {
QString wirelessFolder = SYSPATH + ifName + "/wireless/"; TQString wirelessFolder = SYSPATH + ifName + "/wireless/";
unsigned int link = 0; unsigned int link = 0;
if ( readNumberFromFile( wirelessFolder + "link", link ) ) if ( readNumberFromFile( wirelessFolder + "link", link ) )
{ {
data.linkQuality = QString::number( link ); data.linkQuality = TQString::number( link );
} }
#ifdef HAVE_LIBIW #ifdef HAVE_LIBIW
@ -341,7 +341,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data )
} }
iw_print_freq_value( buffer, sizeof( buffer ), freq ); iw_print_freq_value( buffer, sizeof( buffer ), freq );
data.frequency = buffer; data.frequency = buffer;
data.channel = QString::number( channel ); data.channel = TQString::number( channel );
} }
} }
@ -381,7 +381,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data )
} }
else else
{ {
data.nickName = QString::null; data.nickName = TQString();
} }
} }
@ -402,7 +402,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data )
} }
else else
{ {
data.mode = QString::null; data.mode = TQString();
} }
} }

@ -36,18 +36,18 @@
class SysBackend : public BackendBase class SysBackend : public BackendBase
{ {
public: public:
SysBackend(QDict<Interface>& interfaces ); SysBackend(TQDict<Interface>& interfaces );
virtual ~SysBackend(); virtual ~SysBackend();
static BackendBase* createInstance( QDict<Interface>& interfaces ); static BackendBase* createInstance( TQDict<Interface>& interfaces );
void update(); void update();
private: private:
bool readNumberFromFile( const QString& fileName, unsigned int& value ); bool readNumberFromFile( const TQString& fileName, unsigned int& value );
bool readStringFromFile( const QString& fileName, QString& string ); bool readStringFromFile( const TQString& fileName, TQString& string );
void updateWirelessData( const QString& ifName, WirelessData& data ); void updateWirelessData( const TQString& ifName, WirelessData& data );
void updateInterfaceData( const QString& ifName, InterfaceData& data, int type ); void updateInterfaceData( const TQString& ifName, InterfaceData& data, int type );
}; };

@ -20,9 +20,9 @@
#ifndef GLOBAL_H #ifndef GLOBAL_H
#define GLOBAL_H #define GLOBAL_H
#include <qpair.h> #include <tqpair.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qstring.h> #include <tqstring.h>
/** /**
* This file contains data structures and enums used in the knemo daemon. * This file contains data structures and enums used in the knemo daemon.
@ -36,7 +36,7 @@ struct GeneralData
int toolTipContent; int toolTipContent;
int pollInterval; int pollInterval;
int saveInterval; int saveInterval;
QString statisticsDir; TQString statisticsDir;
}; };
struct InterfaceData struct InterfaceData
@ -68,28 +68,28 @@ struct InterfaceData
unsigned long prevTxBytes; unsigned long prevTxBytes;
unsigned long incomingBytes; unsigned long incomingBytes;
unsigned long outgoingBytes; unsigned long outgoingBytes;
QString ipAddress; TQString ipAddress;
QString subnetMask; TQString subnetMask;
QString hwAddress; TQString hwAddress;
QString ptpAddress; TQString ptpAddress;
QString broadcastAddress; TQString broadcastAddress;
QString defaultGateway; TQString defaultGateway;
QString rxString; TQString rxString;
QString txString; TQString txString;
Q_UINT64 rxBytes; TQ_UINT64 rxBytes;
Q_UINT64 txBytes; TQ_UINT64 txBytes;
}; };
struct WirelessData struct WirelessData
{ {
QString essid; TQString essid;
QString mode; TQString mode;
QString frequency; TQString frequency;
QString channel; TQString channel;
QString bitRate; TQString bitRate;
QString linkQuality; TQString linkQuality;
QString accessPoint; TQString accessPoint;
QString nickName; TQString nickName;
bool encryption; bool encryption;
}; };
@ -109,11 +109,11 @@ struct PlotterSettings
bool horizontalLines; bool horizontalLines;
bool automaticDetection; bool automaticDetection;
bool verticalLinesScroll; bool verticalLinesScroll;
QColor colorVLines; TQColor colorVLines;
QColor colorHLines; TQColor colorHLines;
QColor colorIncoming; TQColor colorIncoming;
QColor colorOutgoing; TQColor colorOutgoing;
QColor colorBackground; TQColor colorBackground;
}; };
struct StatisticEntry struct StatisticEntry
@ -121,10 +121,10 @@ struct StatisticEntry
int day; int day;
int month; int month;
int year; int year;
Q_UINT64 rxBytes; TQ_UINT64 rxBytes;
Q_UINT64 txBytes; TQ_UINT64 txBytes;
}; };
extern QPair<QString, int> ToolTips[]; extern TQPair<TQString, int> ToolTips[];
#endif // GLOBAL_H #endif // GLOBAL_H

@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qtimer.h> #include <tqtimer.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kwin.h> #include <kwin.h>
#include <kdebug.h> #include <kdebug.h>
@ -32,10 +32,10 @@
#include "interfacestatusdialog.h" #include "interfacestatusdialog.h"
#include "interfacestatisticsdialog.h" #include "interfacestatisticsdialog.h"
Interface::Interface( QString ifname, Interface::Interface( TQString ifname,
const GeneralData& generalData, const GeneralData& generalData,
const PlotterSettings& plotterSettings ) const PlotterSettings& plotterSettings )
: QObject(), : TQObject(),
mType( UNKNOWN_TYPE ), mType( UNKNOWN_TYPE ),
mState( UNKNOWN_STATE ), mState( UNKNOWN_STATE ),
mOutgoingPos( 0 ), mOutgoingPos( 0 ),
@ -51,20 +51,20 @@ Interface::Interface( QString ifname,
mGeneralData( generalData ), mGeneralData( generalData ),
mPlotterSettings( plotterSettings ) mPlotterSettings( plotterSettings )
{ {
connect( &mMonitor, SIGNAL( statusChanged( int ) ), connect( &mMonitor, TQT_SIGNAL( statusChanged( int ) ),
&mIcon, SLOT( updateStatus( int ) ) ); &mIcon, TQT_SLOT( updatetqStatus( int ) ) );
connect( &mMonitor, SIGNAL( available( int ) ), connect( &mMonitor, TQT_SIGNAL( available( int ) ),
&mIcon, SLOT( updateTrayStatus( int ) ) ); &mIcon, TQT_SLOT( updateTraytqStatus( int ) ) );
connect( &mMonitor, SIGNAL( notAvailable( int ) ), connect( &mMonitor, TQT_SIGNAL( notAvailable( int ) ),
&mIcon, SLOT( updateTrayStatus( int ) ) ); &mIcon, TQT_SLOT( updateTraytqStatus( int ) ) );
connect( &mMonitor, SIGNAL( notExisting( int ) ), connect( &mMonitor, TQT_SIGNAL( notExisting( int ) ),
&mIcon, SLOT( updateTrayStatus( int ) ) ); &mIcon, TQT_SLOT( updateTraytqStatus( int ) ) );
connect( &mMonitor, SIGNAL( available( int ) ), connect( &mMonitor, TQT_SIGNAL( available( int ) ),
this, SLOT( setStartTime( int ) ) ); this, TQT_SLOT( setStartTime( int ) ) );
connect( &mMonitor, SIGNAL( statusChanged( int ) ), connect( &mMonitor, TQT_SIGNAL( statusChanged( int ) ),
this, SLOT( resetData( int ) ) ); this, TQT_SLOT( resetData( int ) ) );
connect( &mIcon, SIGNAL( statisticsSelected() ), connect( &mIcon, TQT_SIGNAL( statisticsSelected() ),
this, SLOT( showStatisticsDialog() ) ); this, TQT_SLOT( showStatisticsDialog() ) );
} }
Interface::~Interface() Interface::~Interface()
@ -92,9 +92,9 @@ Interface::~Interface()
void Interface::configChanged() void Interface::configChanged()
{ {
// UNKNOWN_STATE to avoid notification // UNKNOWN_STATE to avoid notification
mIcon.updateTrayStatus( UNKNOWN_STATE ); mIcon.updateTraytqStatus( UNKNOWN_STATE );
// handle changed iconset by user // handle changed iconset by user
mIcon.updateStatus( mState ); mIcon.updatetqStatus( mState );
mIcon.updateToolTip(); mIcon.updateToolTip();
mIcon.updateMenu(); mIcon.updateMenu();
@ -127,13 +127,13 @@ void Interface::configChanged()
void Interface::activateMonitor() void Interface::activateMonitor()
{ {
mMonitor.checkStatus( this ); mMonitor.checktqStatus( this );
} }
void Interface::setStartTime( int ) void Interface::setStartTime( int )
{ {
mStartTime.setDate( QDate::currentDate() ); mStartTime.setDate( TQDate::tqcurrentDate() );
mStartTime.setTime( QTime::currentTime() ); mStartTime.setTime( TQTime::currentTime() );
} }
void Interface::showStatusDialog() void Interface::showStatusDialog()
@ -143,16 +143,16 @@ void Interface::showStatusDialog()
if ( mStatusDialog == 0L ) if ( mStatusDialog == 0L )
{ {
mStatusDialog = new InterfaceStatusDialog( this ); mStatusDialog = new InterfaceStatusDialog( this );
connect( &mMonitor, SIGNAL( available( int ) ), connect( &mMonitor, TQT_SIGNAL( available( int ) ),
mStatusDialog, SLOT( enableNetworkGroups( int ) ) ); mStatusDialog, TQT_SLOT( enableNetworkGroups( int ) ) );
connect( &mMonitor, SIGNAL( notAvailable( int ) ), connect( &mMonitor, TQT_SIGNAL( notAvailable( int ) ),
mStatusDialog, SLOT( disableNetworkGroups( int ) ) ); mStatusDialog, TQT_SLOT( disableNetworkGroups( int ) ) );
connect( &mMonitor, SIGNAL( notExisting( int ) ), connect( &mMonitor, TQT_SIGNAL( notExisting( int ) ),
mStatusDialog, SLOT( disableNetworkGroups( int ) ) ); mStatusDialog, TQT_SLOT( disableNetworkGroups( int ) ) );
if ( mStatistics != 0 ) if ( mStatistics != 0 )
{ {
connect( mStatistics, SIGNAL( currentEntryChanged() ), connect( mStatistics, TQT_SIGNAL( currentEntryChanged() ),
mStatusDialog, SLOT( statisticsChanged() ) ); mStatusDialog, TQT_SLOT( statisticsChanged() ) );
mStatusDialog->statisticsChanged(); mStatusDialog->statisticsChanged();
} }
activateOrHide( mStatusDialog, true ); activateOrHide( mStatusDialog, true );
@ -176,9 +176,9 @@ void Interface::showSignalPlotter( bool wasMiddleButton )
configurePlotter(); configurePlotter();
activateOrHide( mPlotter, true ); activateOrHide( mPlotter, true );
mPlotterTimer = new QTimer(); mPlotterTimer = new TQTimer();
connect( mPlotterTimer, SIGNAL( timeout() ), connect( mPlotterTimer, TQT_SIGNAL( timeout() ),
this, SLOT( updatePlotter() ) ); this, TQT_SLOT( updatePlotter() ) );
mPlotterTimer->start( 1000 ); mPlotterTimer->start( 1000 );
} }
else else
@ -206,20 +206,20 @@ void Interface::showStatisticsDialog()
// should never happen but you never know... // should never happen but you never know...
startStatistics(); startStatistics();
} }
connect( mStatistics, SIGNAL( dayStatisticsChanged() ), connect( mStatistics, TQT_SIGNAL( dayStatisticsChanged() ),
mStatisticsDialog, SLOT( updateDays() ) ); mStatisticsDialog, TQT_SLOT( updateDays() ) );
connect( mStatistics, SIGNAL( monthStatisticsChanged() ), connect( mStatistics, TQT_SIGNAL( monthStatisticsChanged() ),
mStatisticsDialog, SLOT( updateMonths() ) ); mStatisticsDialog, TQT_SLOT( updateMonths() ) );
connect( mStatistics, SIGNAL( yearStatisticsChanged() ), connect( mStatistics, TQT_SIGNAL( yearStatisticsChanged() ),
mStatisticsDialog, SLOT( updateYears() ) ); mStatisticsDialog, TQT_SLOT( updateYears() ) );
connect( mStatistics, SIGNAL( currentEntryChanged() ), connect( mStatistics, TQT_SIGNAL( currentEntryChanged() ),
mStatisticsDialog, SLOT( updateCurrentEntry() ) ); mStatisticsDialog, TQT_SLOT( updateCurrentEntry() ) );
connect( mStatisticsDialog, SIGNAL( clearDailyStatisticsClicked() ), connect( mStatisticsDialog, TQT_SIGNAL( clearDailyStatisticsClicked() ),
mStatistics, SLOT( clearDayStatistics() ) ); mStatistics, TQT_SLOT( clearDayStatistics() ) );
connect( mStatisticsDialog, SIGNAL( clearMonthlyStatisticsClicked() ), connect( mStatisticsDialog, TQT_SIGNAL( clearMonthlyStatisticsClicked() ),
mStatistics, SLOT( clearMonthStatistics() ) ); mStatistics, TQT_SLOT( clearMonthStatistics() ) );
connect( mStatisticsDialog, SIGNAL( clearYearlyStatisticsClicked() ), connect( mStatisticsDialog, TQT_SIGNAL( clearYearlyStatisticsClicked() ),
mStatistics, SLOT( clearYearStatistics() ) ); mStatistics, TQT_SLOT( clearYearStatistics() ) );
mStatisticsDialog->updateDays(); mStatisticsDialog->updateDays();
mStatisticsDialog->updateMonths(); mStatisticsDialog->updateMonths();
@ -252,7 +252,7 @@ void Interface::updatePlotter()
double outgoingBytes = mData.outgoingBytes / 1024.0 / (double) mGeneralData.pollInterval; double outgoingBytes = mData.outgoingBytes / 1024.0 / (double) mGeneralData.pollInterval;
double incomingBytes = mData.incomingBytes / 1024.0 / (double) mGeneralData.pollInterval; double incomingBytes = mData.incomingBytes / 1024.0 / (double) mGeneralData.pollInterval;
QValueList<double> trafficList; TQValueList<double> trafficList;
switch ( mVisibleBeams ) switch ( mVisibleBeams )
{ {
case BOTH: case BOTH:
@ -310,7 +310,7 @@ void Interface::configurePlotter()
if ( mPlotterSettings.showIncoming ) if ( mPlotterSettings.showIncoming )
nextVisibleBeams = (VisibleBeams) ( nextVisibleBeams | INCOMING_TRAFFIC ); nextVisibleBeams = (VisibleBeams) ( nextVisibleBeams | INCOMING_TRAFFIC );
QValueList<QColor>& colors = mPlotter->beamColors(); TQValueList<TQColor>& colors = mPlotter->beamColors();
switch( mVisibleBeams ) switch( mVisibleBeams )
{ {
case NONE: case NONE:
@ -398,20 +398,20 @@ void Interface::configurePlotter()
break; break;
} }
mVisibleBeams = nextVisibleBeams; mVisibleBeams = nextVisibleBeams;
mPlotter->repaint(); mPlotter->tqrepaint();
} }
void Interface::startStatistics() void Interface::startStatistics()
{ {
mStatistics = new InterfaceStatistics( this ); mStatistics = new InterfaceStatistics( this );
connect( &mMonitor, SIGNAL( incomingData( unsigned long ) ), connect( &mMonitor, TQT_SIGNAL( incomingData( unsigned long ) ),
mStatistics, SLOT( addIncomingData( unsigned long ) ) ); mStatistics, TQT_SLOT( addIncomingData( unsigned long ) ) );
connect( &mMonitor, SIGNAL( outgoingData( unsigned long ) ), connect( &mMonitor, TQT_SIGNAL( outgoingData( unsigned long ) ),
mStatistics, SLOT( addOutgoingData( unsigned long ) ) ); mStatistics, TQT_SLOT( addOutgoingData( unsigned long ) ) );
if ( mStatusDialog != 0 ) if ( mStatusDialog != 0 )
{ {
connect( mStatistics, SIGNAL( currentEntryChanged() ), connect( mStatistics, TQT_SIGNAL( currentEntryChanged() ),
mStatusDialog, SLOT( statisticsChanged() ) ); mStatusDialog, TQT_SLOT( statisticsChanged() ) );
mStatusDialog->statisticsChanged(); mStatusDialog->statisticsChanged();
} }
@ -434,7 +434,7 @@ void Interface::stopStatistics()
} }
// taken from ksystemtray.cpp // taken from ksystemtray.cpp
void Interface::activateOrHide( QWidget* widget, bool onlyActivate ) void Interface::activateOrHide( TQWidget* widget, bool onlyActivate )
{ {
if ( !widget ) if ( !widget )
return; return;
@ -456,7 +456,7 @@ void Interface::activateOrHide( QWidget* widget, bool onlyActivate )
else else
{ {
KWinModule module; KWinModule module;
for( QValueList< WId >::ConstIterator it = module.stackingOrder().fromLast(); for( TQValueList< WId >::ConstIterator it = module.stackingOrder().fromLast();
it != module.stackingOrder().end() && (*it) != widget->winId(); it != module.stackingOrder().end() && (*it) != widget->winId();
--it ) --it )
{ {
@ -464,7 +464,7 @@ void Interface::activateOrHide( QWidget* widget, bool onlyActivate )
NET::WMGeometry | NET::XAWMState | NET::WMState | NET::WMWindowType ); NET::WMGeometry | NET::XAWMState | NET::WMState | NET::WMWindowType );
if( info2.mappingState() != NET::Visible ) if( info2.mappingState() != NET::Visible )
continue; // not visible on current desktop -> ignore continue; // not visible on current desktop -> ignore
if( !info2.geometry().intersects( widget->geometry())) if( !info2.geometry().intersects( widget->tqgeometry()))
continue; // not obscuring the window -> ignore continue; // not obscuring the window -> ignore
if( !info1.hasState( NET::KeepAbove ) && info2.hasState( NET::KeepAbove )) if( !info1.hasState( NET::KeepAbove ) && info2.hasState( NET::KeepAbove ))
continue; // obscured by window kept above -> ignore continue; // obscured by window kept above -> ignore

@ -20,16 +20,16 @@
#ifndef INTERFACE_H #ifndef INTERFACE_H
#define INTERFACE_H #define INTERFACE_H
#include <qobject.h> #include <tqobject.h>
#include <qstring.h> #include <tqstring.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include "data.h" #include "data.h"
#include "global.h" #include "global.h"
#include "interfaceicon.h" #include "interfaceicon.h"
#include "interfacemonitor.h" #include "interfacemonitor.h"
class QTimer; class TQTimer;
class SignalPlotter; class SignalPlotter;
class InterfaceStatistics; class InterfaceStatistics;
class InterfaceStatusDialog; class InterfaceStatusDialog;
@ -43,14 +43,15 @@ class InterfaceStatisticsDialog;
* @short Central class for every interface * @short Central class for every interface
* @author Percy Leonhardt <percy@eris23.de> * @author Percy Leonhardt <percy@eris23.de>
*/ */
class Interface : public QObject class Interface : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Interface(QString ifname, Interface(TQString ifname,
const GeneralData& generalData, const GeneralData& generalData,
const PlotterSettings& plotterSettings ); const PlotterSettings& plotterSettings );
@ -79,12 +80,12 @@ public:
return mState; return mState;
} }
const QDateTime& getStartTime() const const TQDateTime& getStartTime() const
{ {
return mStartTime; return mStartTime;
} }
const QString& getName() const const TQString& getName() const
{ {
return mName; return mName;
} }
@ -209,7 +210,7 @@ private:
* correct show, raise, focus and hide of status dialog and * correct show, raise, focus and hide of status dialog and
* signal plotter. * signal plotter.
*/ */
void activateOrHide( QWidget* widget, bool onlyActivate = false ); void activateOrHide( TQWidget* widget, bool onlyActivate = false );
enum VisibleBeams enum VisibleBeams
{ {
@ -223,9 +224,9 @@ private:
int mState; int mState;
int mOutgoingPos; int mOutgoingPos;
int mIncomingPos; int mIncomingPos;
QString mName; TQString mName;
QTimer* mPlotterTimer; TQTimer* mPlotterTimer;
QDateTime mStartTime; TQDateTime mStartTime;
InterfaceIcon mIcon; InterfaceIcon mIcon;
InterfaceData mData; InterfaceData mData;
InterfaceMonitor mMonitor; InterfaceMonitor mMonitor;

@ -19,7 +19,7 @@
#include <unistd.h> #include <unistd.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kdebug.h> #include <kdebug.h>
#include <kglobal.h> #include <kglobal.h>
@ -37,17 +37,17 @@
#include "interfacemonitor.h" #include "interfacemonitor.h"
#include "interfacetooltip.h" #include "interfacetooltip.h"
const QString InterfaceIcon::ICON_DISCONNECTED = "network_disconnected"; const TQString InterfaceIcon::ICON_DISCONNECTED = "network_disconnected";
const QString InterfaceIcon::ICON_CONNECTED = "network_connected"; const TQString InterfaceIcon::ICON_CONNECTED = "network_connected";
const QString InterfaceIcon::ICON_INCOMING = "network_incoming"; const TQString InterfaceIcon::ICON_INCOMING = "network_incoming";
const QString InterfaceIcon::ICON_OUTGOING = "network_outgoing"; const TQString InterfaceIcon::ICON_OUTGOING = "network_outgoing";
const QString InterfaceIcon::ICON_TRAFFIC = "network_traffic"; const TQString InterfaceIcon::ICON_TRAFFIC = "network_traffic";
const QString InterfaceIcon::SUFFIX_PPP = "_ppp"; const TQString InterfaceIcon::SUFFIX_PPP = "_ppp";
const QString InterfaceIcon::SUFFIX_LAN = "_lan"; const TQString InterfaceIcon::SUFFIX_LAN = "_lan";
const QString InterfaceIcon::SUFFIX_WLAN = "_wlan"; const TQString InterfaceIcon::SUFFIX_WLAN = "_wlan";
InterfaceIcon::InterfaceIcon( Interface* interface ) InterfaceIcon::InterfaceIcon( Interface* interface )
: QObject(), : TQObject(),
mInterface( interface ), mInterface( interface ),
mTray( 0L ) mTray( 0L )
{ {
@ -59,14 +59,14 @@ InterfaceIcon::~InterfaceIcon()
delete mTray; delete mTray;
} }
void InterfaceIcon::updateStatus( int status ) void InterfaceIcon::updatetqStatus( int status )
{ {
if ( mTray == 0L ) if ( mTray == 0L )
return; return;
// If the user wants something different than the default icons // If the user wants something different than the default icons
// append the correct suffix to the filename. // append the correct suffix to the filename.
QString suffix; TQString suffix;
if ( mInterface->getSettings().iconSet == Interface::NETWORK ) if ( mInterface->getSettings().iconSet == Interface::NETWORK )
{ {
suffix = SUFFIX_LAN; suffix = SUFFIX_LAN;
@ -114,8 +114,8 @@ void InterfaceIcon::updateToolTip()
if ( mTray == 0L ) if ( mTray == 0L )
return; return;
QString toolTip = mInterface->getSettings().alias; TQString toolTip = mInterface->getSettings().alias;
if ( toolTip == QString::null ) if ( toolTip == TQString() )
toolTip = mInterface->getName(); toolTip = mInterface->getName();
new InterfaceToolTip( mInterface, mTray ); new InterfaceToolTip( mInterface, mTray );
} }
@ -137,14 +137,14 @@ void InterfaceIcon::updateMenu()
if ( settings.activateStatistics ) if ( settings.activateStatistics )
{ {
menu->insertItem( i18n( "Open &Statistics" ), this, menu->insertItem( i18n( "Open &Statistics" ), this,
SIGNAL( statisticsSelected() ) ); TQT_SIGNAL( statisticsSelected() ) );
} }
// If the user wants custom commands, add them. // If the user wants custom commands, add them.
if ( settings.customCommands ) if ( settings.customCommands )
{ {
menu->insertSeparator(); menu->insertSeparator();
QValueVector<InterfaceCommand>::iterator it; TQValueVector<InterfaceCommand>::iterator it;
for ( it = settings.commands.begin(); it != settings.commands.end(); it++ ) for ( it = settings.commands.begin(); it != settings.commands.end(); it++ )
(*it).id = menu->insertItem( (*it).menuText ); (*it).id = menu->insertItem( (*it).menuText );
} }
@ -152,10 +152,10 @@ void InterfaceIcon::updateMenu()
void InterfaceIcon::resizeIcon() void InterfaceIcon::resizeIcon()
{ {
updateTrayStatus(0); updateTraytqStatus(0);
} }
void InterfaceIcon::updateTrayStatus( int previousState ) void InterfaceIcon::updateTraytqStatus( int previousState )
{ {
bool interfaceExists = mInterface->getData().existing; bool interfaceExists = mInterface->getData().existing;
bool interfaceAvailable = mInterface->getData().available; bool interfaceAvailable = mInterface->getData().available;
@ -169,8 +169,8 @@ void InterfaceIcon::updateTrayStatus( int previousState )
/* When KNemo is starting we don't show the change in connection /* When KNemo is starting we don't show the change in connection
* status as this would be annoying when KDE starts. * status as this would be annoying when KDE starts.
*/ */
QString title; TQString title;
if ( mInterface->getSettings().alias != QString::null ) if ( mInterface->getSettings().alias != TQString() )
title = mInterface->getSettings().alias; title = mInterface->getSettings().alias;
else else
title = mInterface->getName(); title = mInterface->getName();
@ -191,8 +191,8 @@ void InterfaceIcon::updateTrayStatus( int previousState )
/* When KNemo is starting we don't show the change in connection /* When KNemo is starting we don't show the change in connection
* status as this would be annoying when KDE starts. * status as this would be annoying when KDE starts.
*/ */
QString title; TQString title;
if ( mInterface->getSettings().alias != QString::null ) if ( mInterface->getSettings().alias != TQString() )
title = mInterface->getSettings().alias; title = mInterface->getSettings().alias;
else else
title = mInterface->getName(); title = mInterface->getName();
@ -231,20 +231,20 @@ void InterfaceIcon::updateTrayStatus( int previousState )
( !interfaceExists && !hideWhenNotExisting && !hideWhenNotAvailable ) ) ) ( !interfaceExists && !hideWhenNotExisting && !hideWhenNotAvailable ) ) )
{ {
mTray = new InterfaceTray( mInterface->getName() ); mTray = new InterfaceTray( mInterface->getName() );
QToolTip::add( mTray, mInterface->getName() ); TQToolTip::add( mTray, mInterface->getName() );
KPopupMenu* menu = mTray->contextMenu(); KPopupMenu* menu = mTray->contextMenu();
connect( menu, SIGNAL( activated( int ) ), connect( menu, TQT_SIGNAL( activated( int ) ),
this, SLOT( menuActivated( int ) ) ); this, TQT_SLOT( menuActivated( int ) ) );
connect( mTray, SIGNAL( leftClicked() ), connect( mTray, TQT_SIGNAL( leftClicked() ),
mInterface, SLOT( showStatusDialog() ) ); mInterface, TQT_SLOT( showStatusDialog() ) );
connect( mTray, SIGNAL( graphSelected( bool ) ), connect( mTray, TQT_SIGNAL( graphSelected( bool ) ),
mInterface, SLOT( showSignalPlotter( bool ) ) ); mInterface, TQT_SLOT( showSignalPlotter( bool ) ) );
connect( mTray, SIGNAL( configSelected() ), connect( mTray, TQT_SIGNAL( configSelected() ),
this, SLOT( showConfigDialog() ) ); this, TQT_SLOT( showConfigDialog() ) );
connect( mTray, SIGNAL( iconResized() ), connect( mTray, TQT_SIGNAL( iconResized() ),
this, SLOT( resizeIcon() ) ); this, TQT_SLOT( resizeIcon() ) );
updateStatus( mInterface->getState() ); updatetqStatus( mInterface->getState() );
updateToolTip(); updateToolTip();
updateMenu(); updateMenu();
mTray->show(); mTray->show();
@ -257,8 +257,8 @@ void InterfaceIcon::updateTrayStatus( int previousState )
/* When KNemo is starting we don't show the change in connection /* When KNemo is starting we don't show the change in connection
* status as this would be annoying when KDE starts. * status as this would be annoying when KDE starts.
*/ */
QString title; TQString title;
if ( mInterface->getSettings().alias != QString::null ) if ( mInterface->getSettings().alias != TQString() )
title = mInterface->getSettings().alias; title = mInterface->getSettings().alias;
else else
title = mInterface->getName(); title = mInterface->getName();
@ -293,7 +293,7 @@ void InterfaceIcon::showConfigDialog()
void InterfaceIcon::menuActivated( int id ) void InterfaceIcon::menuActivated( int id )
{ {
InterfaceSettings& settings = mInterface->getSettings(); InterfaceSettings& settings = mInterface->getSettings();
QValueVector<InterfaceCommand>::iterator it; TQValueVector<InterfaceCommand>::iterator it;
for ( it = settings.commands.begin(); it != settings.commands.end(); it++ ) for ( it = settings.commands.begin(); it != settings.commands.end(); it++ )
{ {
if ( (*it).id == id ) if ( (*it).id == id )
@ -305,7 +305,7 @@ void InterfaceIcon::menuActivated( int id )
process << (*it).command; process << (*it).command;
} }
else else
process << QStringList::split( ' ', (*it).command ); process << TQStringList::split( ' ', (*it).command );
process.start( KProcess::DontCare ); process.start( KProcess::DontCare );
break; break;

@ -20,8 +20,8 @@
#ifndef INTERFACEICON_H #ifndef INTERFACEICON_H
#define INTERFACEICON_H #define INTERFACEICON_H
#include <qobject.h> #include <tqobject.h>
#include <qstring.h> #include <tqstring.h>
class Interface; class Interface;
class InterfaceTray; class InterfaceTray;
@ -35,9 +35,10 @@ class InterfaceTray;
* @author Percy Leonhardt <percy@eris23.de> * @author Percy Leonhardt <percy@eris23.de>
*/ */
class InterfaceIcon : public QObject class InterfaceIcon : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
@ -67,12 +68,12 @@ public slots:
/* /*
* Changes the icon image displayed in the tray * Changes the icon image displayed in the tray
*/ */
void updateStatus( int status ); void updatetqStatus( int status );
/* /*
* Creates or deletes the tray icon * Creates or deletes the tray icon
*/ */
void updateTrayStatus( int previousState ); void updateTraytqStatus( int previousState );
/* /*
* Resizes the tray icon * Resizes the tray icon
@ -97,14 +98,14 @@ private:
// the real tray icon // the real tray icon
InterfaceTray* mTray; InterfaceTray* mTray;
static const QString ICON_DISCONNECTED; static const TQString ICON_DISCONNECTED;
static const QString ICON_CONNECTED; static const TQString ICON_CONNECTED;
static const QString ICON_INCOMING; static const TQString ICON_INCOMING;
static const QString ICON_OUTGOING; static const TQString ICON_OUTGOING;
static const QString ICON_TRAFFIC; static const TQString ICON_TRAFFIC;
static const QString SUFFIX_PPP; static const TQString SUFFIX_PPP;
static const QString SUFFIX_LAN; static const TQString SUFFIX_LAN;
static const QString SUFFIX_WLAN; static const TQString SUFFIX_WLAN;
}; };
#endif // INTERFACEICON_H #endif // INTERFACEICON_H

@ -22,8 +22,8 @@
#include "interface.h" #include "interface.h"
#include "interfacemonitor.h" #include "interfacemonitor.h"
InterfaceMonitor::InterfaceMonitor( QObject* parent, const char* name ) InterfaceMonitor::InterfaceMonitor( TQObject* tqparent, const char* name )
: QObject( parent, name ) : TQObject( tqparent, name )
{ {
} }
@ -31,7 +31,7 @@ InterfaceMonitor::~InterfaceMonitor()
{ {
} }
void InterfaceMonitor::checkStatus( Interface* interface ) void InterfaceMonitor::checktqStatus( Interface* interface )
{ {
int currentState; int currentState;
int previousState = interface->getState(); int previousState = interface->getState();

@ -20,7 +20,7 @@
#ifndef INTERFACEMONITOR_H #ifndef INTERFACEMONITOR_H
#define INTERFACEMONITOR_H #define INTERFACEMONITOR_H
#include <qobject.h> #include <tqobject.h>
#include "data.h" #include "data.h"
@ -35,14 +35,15 @@ class Interface;
* @author Percy Leonhardt <percy@eris23.de> * @author Percy Leonhardt <percy@eris23.de>
*/ */
class InterfaceMonitor : public QObject class InterfaceMonitor : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
InterfaceMonitor(QObject* parent = 0L, const char* name = 0L); InterfaceMonitor(TQObject* tqparent = 0L, const char* name = 0L);
/** /**
* Default Destructor * Default Destructor
@ -52,7 +53,7 @@ public:
/** /**
* Tell the monitor to check the status of the interface * Tell the monitor to check the status of the interface
*/ */
void checkStatus( Interface* interface ); void checktqStatus( Interface* interface );
signals: signals:
// the interface is now connected // the interface is now connected

@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qdom.h> #include <tqdom.h>
#include <qfile.h> #include <tqfile.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qstring.h> #include <tqstring.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <kdebug.h> #include <kdebug.h>
@ -29,7 +29,7 @@
#include "interfacestatistics.h" #include "interfacestatistics.h"
InterfaceStatistics::InterfaceStatistics( Interface* interface ) InterfaceStatistics::InterfaceStatistics( Interface* interface )
: QObject(), : TQObject(),
mInterface( interface ) mInterface( interface )
{ {
mDayStatistics.setAutoDelete( true ); mDayStatistics.setAutoDelete( true );
@ -37,8 +37,8 @@ InterfaceStatistics::InterfaceStatistics( Interface* interface )
mYearStatistics.setAutoDelete( true ); mYearStatistics.setAutoDelete( true );
initStatistics(); initStatistics();
mSaveTimer = new QTimer(); mSaveTimer = new TQTimer();
connect( mSaveTimer, SIGNAL( timeout() ), this, SLOT( saveStatistics() ) ); connect( mSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( saveStatistics() ) );
mSaveTimer->start( mInterface->getGeneralData().saveInterval * 1000 ); mSaveTimer->start( mInterface->getGeneralData().saveInterval * 1000 );
} }
@ -54,9 +54,9 @@ InterfaceStatistics::~InterfaceStatistics()
void InterfaceStatistics::loadStatistics() void InterfaceStatistics::loadStatistics()
{ {
QDomDocument doc( "statistics" ); TQDomDocument doc( "statistics" );
QString dir = mInterface->getGeneralData().statisticsDir; TQString dir = mInterface->getGeneralData().statisticsDir;
QFile file( dir + "/statistics_" + mInterface->getName() ); TQFile file( dir + "/statistics_" + mInterface->getName() );
if ( !file.open( IO_ReadOnly ) ) if ( !file.open( IO_ReadOnly ) )
return; return;
@ -71,22 +71,22 @@ void InterfaceStatistics::loadStatistics()
mMonthStatistics.clear(); mMonthStatistics.clear();
mYearStatistics.clear(); mYearStatistics.clear();
QDomElement root = doc.documentElement(); TQDomElement root = doc.documentElement();
QDomNode n = root.namedItem( "days" ); TQDomNode n = root.namedItem( "days" );
if ( !n.isNull() ) if ( !n.isNull() )
{ {
QDomNode dayNode = n.firstChild(); TQDomNode dayNode = n.firstChild();
while ( !dayNode.isNull() ) while ( !dayNode.isNull() )
{ {
QDomElement day = dayNode.toElement(); TQDomElement day = dayNode.toElement();
if ( !day.isNull() ) if ( !day.isNull() )
{ {
StatisticEntry* entry = new StatisticEntry(); StatisticEntry* entry = new StatisticEntry();
entry->day = day.attribute( "day" ).toInt(); entry->day = day.attribute( "day" ).toInt();
entry->month = day.attribute( "month" ).toInt(); entry->month = day.attribute( "month" ).toInt();
entry->year = day.attribute( "year" ).toInt(); entry->year = day.attribute( "year" ).toInt();
entry->rxBytes = (Q_UINT64) day.attribute( "rxBytes" ).toDouble(); entry->rxBytes = (TQ_UINT64) day.attribute( "rxBytes" ).toDouble();
entry->txBytes = (Q_UINT64) day.attribute( "txBytes" ).toDouble(); entry->txBytes = (TQ_UINT64) day.attribute( "txBytes" ).toDouble();
mDayStatistics.append( entry ); mDayStatistics.append( entry );
} }
dayNode = dayNode.nextSibling(); dayNode = dayNode.nextSibling();
@ -97,18 +97,18 @@ void InterfaceStatistics::loadStatistics()
n = root.namedItem( "months" ); n = root.namedItem( "months" );
if ( !n.isNull() ) if ( !n.isNull() )
{ {
QDomNode monthNode = n.firstChild(); TQDomNode monthNode = n.firstChild();
while ( !monthNode.isNull() ) while ( !monthNode.isNull() )
{ {
QDomElement month = monthNode.toElement(); TQDomElement month = monthNode.toElement();
if ( !month.isNull() ) if ( !month.isNull() )
{ {
StatisticEntry* entry = new StatisticEntry(); StatisticEntry* entry = new StatisticEntry();
entry->day = 0; entry->day = 0;
entry->month = month.attribute( "month" ).toInt(); entry->month = month.attribute( "month" ).toInt();
entry->year = month.attribute( "year" ).toInt(); entry->year = month.attribute( "year" ).toInt();
entry->rxBytes = (Q_UINT64) month.attribute( "rxBytes" ).toDouble(); entry->rxBytes = (TQ_UINT64) month.attribute( "rxBytes" ).toDouble();
entry->txBytes = (Q_UINT64) month.attribute( "txBytes" ).toDouble(); entry->txBytes = (TQ_UINT64) month.attribute( "txBytes" ).toDouble();
mMonthStatistics.append( entry ); mMonthStatistics.append( entry );
} }
monthNode = monthNode.nextSibling(); monthNode = monthNode.nextSibling();
@ -119,18 +119,18 @@ void InterfaceStatistics::loadStatistics()
n = root.namedItem( "years" ); n = root.namedItem( "years" );
if ( !n.isNull() ) if ( !n.isNull() )
{ {
QDomNode yearNode = n.firstChild(); TQDomNode yearNode = n.firstChild();
while ( !yearNode.isNull() ) while ( !yearNode.isNull() )
{ {
QDomElement year = yearNode.toElement(); TQDomElement year = yearNode.toElement();
if ( !year.isNull() ) if ( !year.isNull() )
{ {
StatisticEntry* entry = new StatisticEntry(); StatisticEntry* entry = new StatisticEntry();
entry->day = 0; entry->day = 0;
entry->month = 0; entry->month = 0;
entry->year = year.attribute( "year" ).toInt(); entry->year = year.attribute( "year" ).toInt();
entry->rxBytes = (Q_UINT64) year.attribute( "rxBytes" ).toDouble(); entry->rxBytes = (TQ_UINT64) year.attribute( "rxBytes" ).toDouble();
entry->txBytes = (Q_UINT64) year.attribute( "txBytes" ).toDouble(); entry->txBytes = (TQ_UINT64) year.attribute( "txBytes" ).toDouble();
mYearStatistics.append( entry ); mYearStatistics.append( entry );
} }
yearNode = yearNode.nextSibling(); yearNode = yearNode.nextSibling();
@ -142,15 +142,15 @@ void InterfaceStatistics::loadStatistics()
void InterfaceStatistics::saveStatistics() void InterfaceStatistics::saveStatistics()
{ {
QDomDocument doc( "statistics" ); TQDomDocument doc( "statistics" );
QDomElement root = doc.createElement( "statistics" ); TQDomElement root = doc.createElement( "statistics" );
doc.appendChild( root ); doc.appendChild( root );
QDomElement days = doc.createElement( "days" ); TQDomElement days = doc.createElement( "days" );
StatisticEntry* iterator = mDayStatistics.first(); StatisticEntry* iterator = mDayStatistics.first();
while ( iterator ) while ( iterator )
{ {
QDomElement day = doc.createElement( "day" ); TQDomElement day = doc.createElement( "day" );
day.setAttribute( "day", iterator->day ); day.setAttribute( "day", iterator->day );
day.setAttribute( "month", iterator->month ); day.setAttribute( "month", iterator->month );
day.setAttribute( "year", iterator->year ); day.setAttribute( "year", iterator->year );
@ -161,11 +161,11 @@ void InterfaceStatistics::saveStatistics()
} }
root.appendChild( days ); root.appendChild( days );
QDomElement months = doc.createElement( "months" ); TQDomElement months = doc.createElement( "months" );
iterator = mMonthStatistics.first(); iterator = mMonthStatistics.first();
while ( iterator ) while ( iterator )
{ {
QDomElement month = doc.createElement( "month" ); TQDomElement month = doc.createElement( "month" );
month.setAttribute( "month", iterator->month ); month.setAttribute( "month", iterator->month );
month.setAttribute( "year", iterator->year ); month.setAttribute( "year", iterator->year );
month.setAttribute( "rxBytes", (double) iterator->rxBytes ); month.setAttribute( "rxBytes", (double) iterator->rxBytes );
@ -175,11 +175,11 @@ void InterfaceStatistics::saveStatistics()
} }
root.appendChild( months ); root.appendChild( months );
QDomElement years = doc.createElement( "years" ); TQDomElement years = doc.createElement( "years" );
iterator = mYearStatistics.first(); iterator = mYearStatistics.first();
while ( iterator ) while ( iterator )
{ {
QDomElement year = doc.createElement( "year" ); TQDomElement year = doc.createElement( "year" );
year.setAttribute( "year", iterator->year ); year.setAttribute( "year", iterator->year );
year.setAttribute( "rxBytes", (double) iterator->rxBytes ); year.setAttribute( "rxBytes", (double) iterator->rxBytes );
year.setAttribute( "txBytes", (double) iterator->txBytes ); year.setAttribute( "txBytes", (double) iterator->txBytes );
@ -188,12 +188,12 @@ void InterfaceStatistics::saveStatistics()
} }
root.appendChild( years ); root.appendChild( years );
QString dir = mInterface->getGeneralData().statisticsDir; TQString dir = mInterface->getGeneralData().statisticsDir;
QFile file( dir + "/statistics_" + mInterface->getName() ); TQFile file( dir + "/statistics_" + mInterface->getName() );
if ( !file.open( IO_WriteOnly ) ) if ( !file.open( IO_WriteOnly ) )
return; return;
QTextStream stream( &file ); TQTextStream stream( &file );
stream << doc.toString(); stream << doc.toString();
file.close(); file.close();
} }
@ -276,21 +276,21 @@ void InterfaceStatistics::clearYearStatistics()
void InterfaceStatistics::checkCurrentEntry() void InterfaceStatistics::checkCurrentEntry()
{ {
if ( mCurrentDay->day != QDate::currentDate().day() || if ( mCurrentDay->day != TQDate::tqcurrentDate().day() ||
mCurrentDay->month != QDate::currentDate().month() || mCurrentDay->month != TQDate::tqcurrentDate().month() ||
mCurrentDay->year != QDate::currentDate().year() ) mCurrentDay->year != TQDate::tqcurrentDate().year() )
{ {
// current day has changed // current day has changed
updateCurrentDay(); updateCurrentDay();
if ( mCurrentMonth->month != QDate::currentDate().month() || if ( mCurrentMonth->month != TQDate::tqcurrentDate().month() ||
mCurrentMonth->year != QDate::currentDate().year() ) mCurrentMonth->year != TQDate::tqcurrentDate().year() )
{ {
// current month has also changed // current month has also changed
updateCurrentMonth(); updateCurrentMonth();
} }
if ( mCurrentYear->year != QDate::currentDate().year() ) if ( mCurrentYear->year != TQDate::tqcurrentDate().year() )
{ {
// current year has also changed // current year has also changed
updateCurrentYear(); updateCurrentYear();
@ -312,9 +312,9 @@ void InterfaceStatistics::updateCurrentDay()
mCurrentDay = mDayStatistics.first(); mCurrentDay = mDayStatistics.first();
while ( mCurrentDay ) while ( mCurrentDay )
{ {
if ( mCurrentDay->day == QDate::currentDate().day() && if ( mCurrentDay->day == TQDate::tqcurrentDate().day() &&
mCurrentDay->month == QDate::currentDate().month() && mCurrentDay->month == TQDate::tqcurrentDate().month() &&
mCurrentDay->year == QDate::currentDate().year() ) mCurrentDay->year == TQDate::tqcurrentDate().year() )
{ {
// found current day in list // found current day in list
return; return;
@ -324,9 +324,9 @@ void InterfaceStatistics::updateCurrentDay()
// the current day is not in the list // the current day is not in the list
mCurrentDay = new StatisticEntry(); mCurrentDay = new StatisticEntry();
mCurrentDay->day = QDate::currentDate().day(); mCurrentDay->day = TQDate::tqcurrentDate().day();
mCurrentDay->month = QDate::currentDate().month(); mCurrentDay->month = TQDate::tqcurrentDate().month();
mCurrentDay->year = QDate::currentDate().year(); mCurrentDay->year = TQDate::tqcurrentDate().year();
mCurrentDay->rxBytes = 0; mCurrentDay->rxBytes = 0;
mCurrentDay->txBytes = 0; mCurrentDay->txBytes = 0;
mDayStatistics.append( mCurrentDay ); // TODO: insert at correct position mDayStatistics.append( mCurrentDay ); // TODO: insert at correct position
@ -338,8 +338,8 @@ void InterfaceStatistics::updateCurrentMonth()
mCurrentMonth = mMonthStatistics.first(); mCurrentMonth = mMonthStatistics.first();
while ( mCurrentMonth ) while ( mCurrentMonth )
{ {
if ( mCurrentMonth->month == QDate::currentDate().month() && if ( mCurrentMonth->month == TQDate::tqcurrentDate().month() &&
mCurrentMonth->year == QDate::currentDate().year() ) mCurrentMonth->year == TQDate::tqcurrentDate().year() )
{ {
// found current month in list // found current month in list
return; return;
@ -350,8 +350,8 @@ void InterfaceStatistics::updateCurrentMonth()
// the current month is not in the list // the current month is not in the list
mCurrentMonth = new StatisticEntry(); mCurrentMonth = new StatisticEntry();
mCurrentMonth->day = 0; mCurrentMonth->day = 0;
mCurrentMonth->month = QDate::currentDate().month(); mCurrentMonth->month = TQDate::tqcurrentDate().month();
mCurrentMonth->year = QDate::currentDate().year(); mCurrentMonth->year = TQDate::tqcurrentDate().year();
mCurrentMonth->rxBytes = 0; mCurrentMonth->rxBytes = 0;
mCurrentMonth->txBytes = 0; mCurrentMonth->txBytes = 0;
mMonthStatistics.append( mCurrentMonth ); // TODO: insert at correct position mMonthStatistics.append( mCurrentMonth ); // TODO: insert at correct position
@ -363,7 +363,7 @@ void InterfaceStatistics::updateCurrentYear()
mCurrentYear = mYearStatistics.first(); mCurrentYear = mYearStatistics.first();
while ( mCurrentYear ) while ( mCurrentYear )
{ {
if ( mCurrentYear->year == QDate::currentDate().year() ) if ( mCurrentYear->year == TQDate::tqcurrentDate().year() )
{ {
// found current year in list // found current year in list
return; return;
@ -375,7 +375,7 @@ void InterfaceStatistics::updateCurrentYear()
mCurrentYear = new StatisticEntry(); mCurrentYear = new StatisticEntry();
mCurrentYear->day = 0; mCurrentYear->day = 0;
mCurrentYear->month = 0; mCurrentYear->month = 0;
mCurrentYear->year = QDate::currentDate().year(); mCurrentYear->year = TQDate::tqcurrentDate().year();
mCurrentYear->rxBytes = 0; mCurrentYear->rxBytes = 0;
mCurrentYear->txBytes = 0; mCurrentYear->txBytes = 0;
mYearStatistics.append( mCurrentYear ); // TODO: insert at correct position mYearStatistics.append( mCurrentYear ); // TODO: insert at correct position

@ -20,19 +20,19 @@
#ifndef INTERFACESTATISTICS_H #ifndef INTERFACESTATISTICS_H
#define INTERFACESTATISTICS_H #define INTERFACESTATISTICS_H
#include <qobject.h> #include <tqobject.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include "global.h" #include "global.h"
class QTimer; class TQTimer;
class Interface; class Interface;
template<class type> template<class type>
class StatisticsPtrList : public QPtrList<type> class StatisticsPtrList : public TQPtrList<type>
{ {
protected: protected:
virtual int compareItems ( QPtrCollection::Item item1, QPtrCollection::Item item2 ) virtual int compareItems ( TQPtrCollection::Item item1, TQPtrCollection::Item item2 )
{ {
StatisticEntry* entry1 = static_cast<StatisticEntry*>( item1 ); StatisticEntry* entry1 = static_cast<StatisticEntry*>( item1 );
StatisticEntry* entry2 = static_cast<StatisticEntry*>( item2 ); StatisticEntry* entry2 = static_cast<StatisticEntry*>( item2 );
@ -74,9 +74,10 @@ protected:
* @author Percy Leonhardt <percy@eris23.de> * @author Percy Leonhardt <percy@eris23.de>
*/ */
class InterfaceStatistics : public QObject class InterfaceStatistics : public TQObject
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
@ -178,7 +179,7 @@ private:
*/ */
void updateCurrentYear(); void updateCurrentYear();
QTimer* mSaveTimer; TQTimer* mSaveTimer;
Interface* mInterface; Interface* mInterface;
StatisticEntry* mCurrentDay; StatisticEntry* mCurrentDay;
StatisticEntry* mCurrentMonth; StatisticEntry* mCurrentMonth;

@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qtable.h> #include <tqtable.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <klocale.h> #include <klocale.h>
#include <kio/global.h> #include <kio/global.h>
@ -36,16 +36,16 @@
* if we walk back in time, so better not play with the system date... * if we walk back in time, so better not play with the system date...
*/ */
InterfaceStatisticsDialog::InterfaceStatisticsDialog( Interface* interface, QWidget* parent, const char* name ) InterfaceStatisticsDialog::InterfaceStatisticsDialog( Interface* interface, TQWidget* tqparent, const char* name )
: InterfaceStatisticsDlg( parent, name ), : InterfaceStatisticsDlg( tqparent, name ),
mInterface( interface ) mInterface( interface )
{ {
setIcon( SmallIcon( "knemo" ) ); setIcon( SmallIcon( "knemo" ) );
setCaption( interface->getName() + " " + i18n( "Statistics" ) ); setCaption( interface->getName() + " " + i18n( "Statistics" ) );
connect( buttonClearDaily, SIGNAL( clicked() ), SIGNAL( clearDailyStatisticsClicked() ) ); connect( buttonClearDaily, TQT_SIGNAL( clicked() ), TQT_SIGNAL( clearDailyStatisticsClicked() ) );
connect( buttonClearMonthly, SIGNAL( clicked() ), SIGNAL( clearMonthlyStatisticsClicked() ) ); connect( buttonClearMonthly, TQT_SIGNAL( clicked() ), TQT_SIGNAL( clearMonthlyStatisticsClicked() ) );
connect( buttonClearYearly, SIGNAL( clicked() ), SIGNAL( clearYearlyStatisticsClicked() ) ); connect( buttonClearYearly, TQT_SIGNAL( clicked() ), TQT_SIGNAL( clearYearlyStatisticsClicked() ) );
} }
InterfaceStatisticsDialog::~InterfaceStatisticsDialog() InterfaceStatisticsDialog::~InterfaceStatisticsDialog()
@ -54,13 +54,13 @@ InterfaceStatisticsDialog::~InterfaceStatisticsDialog()
void InterfaceStatisticsDialog::updateDays() void InterfaceStatisticsDialog::updateDays()
{ {
QPtrList<StatisticEntry> dayStatistics = mInterface->getStatistics()->getDayStatistics(); TQPtrList<StatisticEntry> dayStatistics = mInterface->getStatistics()->getDayStatistics();
StatisticEntry* iterator = dayStatistics.first(); StatisticEntry* iterator = dayStatistics.first();
tableDaily->setNumRows( dayStatistics.count() ); tableDaily->setNumRows( dayStatistics.count() );
int row = 0; int row = 0;
while ( iterator ) while ( iterator )
{ {
QDate date( iterator->year, iterator->month, iterator->day ); TQDate date( iterator->year, iterator->month, iterator->day );
tableDaily->verticalHeader()->setLabel( row, KGlobal::locale()->formatDate( date, true ) ); tableDaily->verticalHeader()->setLabel( row, KGlobal::locale()->formatDate( date, true ) );
tableDaily->setText( row, 0, KIO::convertSize( iterator->txBytes ) ); tableDaily->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
tableDaily->setText( row, 1, KIO::convertSize( iterator->rxBytes ) ); tableDaily->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
@ -75,14 +75,14 @@ void InterfaceStatisticsDialog::updateDays()
void InterfaceStatisticsDialog::updateMonths() void InterfaceStatisticsDialog::updateMonths()
{ {
QPtrList<StatisticEntry> monthStatistics = mInterface->getStatistics()->getMonthStatistics(); TQPtrList<StatisticEntry> monthStatistics = mInterface->getStatistics()->getMonthStatistics();
StatisticEntry* iterator = monthStatistics.first(); StatisticEntry* iterator = monthStatistics.first();
tableMonthly->setNumRows( monthStatistics.count() ); tableMonthly->setNumRows( monthStatistics.count() );
int row = 0; int row = 0;
while ( iterator ) while ( iterator )
{ {
const KCalendarSystem* calendar = KGlobal::locale()->calendar(); const KCalendarSystem* calendar = KGlobal::locale()->calendar();
QString monthName = calendar->monthName( iterator->month, iterator->year ) + " " + QString::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, KIO::convertSize( iterator->txBytes ) );
tableMonthly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) ); tableMonthly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
@ -97,13 +97,13 @@ void InterfaceStatisticsDialog::updateMonths()
void InterfaceStatisticsDialog::updateYears() void InterfaceStatisticsDialog::updateYears()
{ {
QPtrList<StatisticEntry> yearStatistics = mInterface->getStatistics()->getYearStatistics(); TQPtrList<StatisticEntry> yearStatistics = mInterface->getStatistics()->getYearStatistics();
StatisticEntry* iterator = yearStatistics.first(); StatisticEntry* iterator = yearStatistics.first();
tableYearly->setNumRows( yearStatistics.count() ); tableYearly->setNumRows( yearStatistics.count() );
int row = 0; int row = 0;
while ( iterator ) while ( iterator )
{ {
tableYearly->verticalHeader()->setLabel( row, QString::number( iterator->year ) ); tableYearly->verticalHeader()->setLabel( row, TQString::number( iterator->year ) );
tableYearly->setText( row, 0, KIO::convertSize( iterator->txBytes ) ); tableYearly->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
tableYearly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) ); tableYearly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
tableYearly->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) ); tableYearly->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) );

@ -20,11 +20,11 @@
#ifndef INTERFACESTATISTICSDIALOG_H #ifndef INTERFACESTATISTICSDIALOG_H
#define INTERFACESTATISTICSDIALOG_H #define INTERFACESTATISTICSDIALOG_H
#include <qwidget.h> #include <tqwidget.h>
#include "interfacestatisticsdlg.h" #include "interfacestatisticsdlg.h"
class QTimer; class TQTimer;
class Interface; class Interface;
/** /**
@ -38,12 +38,13 @@ class Interface;
class InterfaceStatisticsDialog : public InterfaceStatisticsDlg class InterfaceStatisticsDialog : public InterfaceStatisticsDlg
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
InterfaceStatisticsDialog( Interface* interface, InterfaceStatisticsDialog( Interface* interface,
QWidget* parent = 0L, const char* name = 0L ); TQWidget* tqparent = 0L, const char* name = 0L );
/** /**
* Default Destructor * Default Destructor

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>InterfaceStatisticsDlg</class> <class>InterfaceStatisticsDlg</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>InterfaceStatisticsDlg</cstring> <cstring>InterfaceStatisticsDlg</cstring>
</property> </property>
@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QPushButton" row="1" column="1"> <widget class="TQPushButton" row="1" column="1">
<property name="name"> <property name="name">
<cstring>buttonClose</cstring> <cstring>buttonClose</cstring>
</property> </property>
@ -30,11 +30,11 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="3"> <widget class="TQTabWidget" row="0" column="0" rowspan="1" colspan="3">
<property name="name"> <property name="name">
<cstring>tabWidget</cstring> <cstring>tabWidget</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>daily</cstring> <cstring>daily</cstring>
</property> </property>
@ -45,7 +45,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTable"> <widget class="TQTable">
<column> <column>
<property name="text"> <property name="text">
<string>Sent</string> <string>Sent</string>
@ -74,7 +74,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonClearDaily</cstring> <cstring>buttonClearDaily</cstring>
</property> </property>
@ -84,7 +84,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>monthy</cstring> <cstring>monthy</cstring>
</property> </property>
@ -95,7 +95,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTable"> <widget class="TQTable">
<column> <column>
<property name="text"> <property name="text">
<string>Sent</string> <string>Sent</string>
@ -121,7 +121,7 @@
<number>3</number> <number>3</number>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonClearMonthly</cstring> <cstring>buttonClearMonthly</cstring>
</property> </property>
@ -131,7 +131,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>yearly</cstring> <cstring>yearly</cstring>
</property> </property>
@ -142,7 +142,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTable"> <widget class="TQTable">
<column> <column>
<property name="text"> <property name="text">
<string>Sent</string> <string>Sent</string>
@ -171,7 +171,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonClearYearly</cstring> <cstring>buttonClearYearly</cstring>
</property> </property>
@ -192,7 +192,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>211</width> <width>211</width>
<height>31</height> <height>31</height>
@ -209,7 +209,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>201</width> <width>201</width>
<height>31</height> <height>31</height>
@ -226,5 +226,5 @@
<slot>close()</slot> <slot>close()</slot>
</connection> </connection>
</connections> </connections>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qtimer.h> #include <tqtimer.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qstring.h> #include <tqstring.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <kdebug.h> #include <kdebug.h>
#include <kconfig.h> #include <kconfig.h>
@ -37,13 +37,13 @@
#include "interfacestatistics.h" #include "interfacestatistics.h"
#include "interfacestatusdialog.h" #include "interfacestatusdialog.h"
InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, QWidget* parent, const char* name ) InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, TQWidget* tqparent, const char* name )
: InterfaceStatusDlg( parent, name ), : InterfaceStatusDlg( tqparent, name ),
mPosInitialized( false ), mPosInitialized( false ),
mInterface( interface ) mInterface( interface )
{ {
setIcon( SmallIcon( "knemo" ) ); setIcon( SmallIcon( "knemo" ) );
setCaption( interface->getName() + " " + i18n( "Interface Status" ) ); setCaption( interface->getName() + " " + i18n( "Interface tqStatus" ) );
updateDialog(); updateDialog();
if ( interface->getData().available ) if ( interface->getData().available )
{ {
@ -55,7 +55,7 @@ InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, QWidget* par
} }
if ( !interface->getData().wirelessDevice ) if ( !interface->getData().wirelessDevice )
{ {
QWidget* wirelessTab = tabWidget->page( 2 ); TQWidget* wirelessTab = tabWidget->page( 2 );
tabWidget->removePage( wirelessTab ); tabWidget->removePage( wirelessTab );
delete wirelessTab; delete wirelessTab;
} }
@ -84,8 +84,8 @@ InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, QWidget* par
statisticsChanged(); statisticsChanged();
mTimer = new QTimer(); mTimer = new TQTimer();
connect( mTimer, SIGNAL( timeout() ), this, SLOT( updateDialog() ) ); connect( mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateDialog() ) );
mTimer->start( 1000 ); mTimer->start( 1000 );
} }
@ -112,12 +112,12 @@ void InterfaceStatusDialog::hide()
{ {
mPos = pos(); mPos = pos();
mPosInitialized = true; mPosInitialized = true;
QDialog::hide(); TQDialog::hide();
} }
void InterfaceStatusDialog::show() void InterfaceStatusDialog::show()
{ {
QDialog::show(); TQDialog::show();
/** /**
* mPosInitialized should always be true, except when * mPosInitialized should always be true, except when
* starting KNemo for the very first time. * starting KNemo for the very first time.
@ -141,34 +141,34 @@ void InterfaceStatusDialog::updateDialog()
textLabelAlias->setText( settings.alias ); textLabelAlias->setText( settings.alias );
if ( data.available ) if ( data.available )
{ {
textLabelStatus->setText( i18n( "Connection established." ) ); textLabeltqStatus->setText( i18n( "Connection established." ) );
int upsecs = mInterface->getStartTime().secsTo( QDateTime::currentDateTime() ); int upsecs = mInterface->getStartTime().secsTo( TQDateTime::tqcurrentDateTime() );
int updays = upsecs / 86400; // don't use QDateTime::daysTo() because int updays = upsecs / 86400; // don't use TQDateTime::daysTo() because
// we only want complete days // we only want complete days
QString uptime; TQString uptime;
if ( updays == 1 ) if ( updays == 1 )
uptime = "1 day, "; uptime = "1 day, ";
else if ( updays > 1 ) else if ( updays > 1 )
uptime = QString( "%1 days, " ).arg( updays ); uptime = TQString( "%1 days, " ).tqarg( updays );
upsecs -= 86400 * updays; // we only want the seconds of today upsecs -= 86400 * updays; // we only want the seconds of today
int hrs = upsecs / 3600; int hrs = upsecs / 3600;
int mins = ( upsecs - hrs * 3600 ) / 60; int mins = ( upsecs - hrs * 3600 ) / 60;
int secs = upsecs - hrs * 3600 - mins * 60; int secs = upsecs - hrs * 3600 - mins * 60;
QString time; TQString time;
time.sprintf( "%02d:%02d:%02d", hrs, mins, secs ); time.sprintf( "%02d:%02d:%02d", hrs, mins, secs );
uptime += time; uptime += time;
textLabelUptime->setText( uptime ); textLabelUptime->setText( uptime );
} }
else if ( data.existing ) else if ( data.existing )
{ {
textLabelStatus->setText( i18n( "Not connected." ) ); textLabeltqStatus->setText( i18n( "Not connected." ) );
textLabelUptime->setText( "00:00:00" ); textLabelUptime->setText( "00:00:00" );
} }
else else
{ {
textLabelStatus->setText( i18n( "Not existing." ) ); textLabeltqStatus->setText( i18n( "Not existing." ) );
textLabelUptime->setText( "00:00:00" ); textLabelUptime->setText( "00:00:00" );
} }
@ -190,25 +190,25 @@ void InterfaceStatusDialog::updateDialog()
{ {
variableLabel1->setText( i18n( "PtP-Address:" ) ); variableLabel1->setText( i18n( "PtP-Address:" ) );
variableText1->setText( data.ptpAddress ); variableText1->setText( data.ptpAddress );
variableLabel2->setText( QString::null ); variableLabel2->setText( TQString() );
variableText2->setText( QString::null ); variableText2->setText( TQString() );
variableLabel3->setText( QString::null ); variableLabel3->setText( TQString() );
variableText3->setText( QString::null ); variableText3->setText( TQString() );
} }
else else
{ {
// shouldn't happen // shouldn't happen
variableLabel1->setText( QString::null ); variableLabel1->setText( TQString() );
variableText1->setText( QString::null ); variableText1->setText( TQString() );
variableLabel2->setText( QString::null ); variableLabel2->setText( TQString() );
variableText2->setText( QString::null ); variableText2->setText( TQString() );
variableLabel3->setText( QString::null ); variableLabel3->setText( TQString() );
variableText3->setText( QString::null ); variableText3->setText( TQString() );
} }
// traffic tab // traffic tab
textLabelPacketsSend->setText( QString::number( data.txPackets ) ); textLabelPacketsSend->setText( TQString::number( data.txPackets ) );
textLabelPacketsReceived->setText( QString::number( data.rxPackets ) ); textLabelPacketsReceived->setText( TQString::number( data.rxPackets ) );
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;
@ -252,31 +252,31 @@ void InterfaceStatusDialog::disableNetworkGroups( int )
groupBoxCurrentConnection->setEnabled( false ); groupBoxCurrentConnection->setEnabled( false );
// clear IP group // clear IP group
textLabelIP->setText( QString::null ); textLabelIP->setText( TQString() );
textLabelSubnet->setText( QString::null ); textLabelSubnet->setText( TQString() );
variableText1->setText( QString::null ); variableText1->setText( TQString() );
variableText2->setText( QString::null ); variableText2->setText( TQString() );
variableText3->setText( QString::null ); variableText3->setText( TQString() );
// clear current connection group // clear current connection group
textLabelPacketsSend->setText( QString::null ); textLabelPacketsSend->setText( TQString() );
textLabelPacketsReceived->setText( QString::null ); textLabelPacketsReceived->setText( TQString() );
textLabelBytesSend->setText( QString::null ); textLabelBytesSend->setText( TQString() );
textLabelBytesReceived->setText( QString::null ); textLabelBytesReceived->setText( TQString() );
textLabelSpeedSend->setText( QString::null ); textLabelSpeedSend->setText( TQString() );
textLabelSpeedReceived->setText( QString::null ); textLabelSpeedReceived->setText( TQString() );
// clear wireless tab // clear wireless tab
if ( mInterface->getData().wirelessDevice ) if ( mInterface->getData().wirelessDevice )
{ {
textLabelESSID->setText( QString::null ); textLabelESSID->setText( TQString() );
textLabelAccessPoint->setText( QString::null ); textLabelAccessPoint->setText( TQString() );
textLabelNickName->setText( QString::null ); textLabelNickName->setText( TQString() );
textLabelMode->setText( QString::null ); textLabelMode->setText( TQString() );
textLabelFreqChannel->setText( QString::null ); textLabelFreqChannel->setText( TQString() );
textLabelBitRate->setText( QString::null ); textLabelBitRate->setText( TQString() );
textLabelLinkQuality->setText( QString::null ); textLabelLinkQuality->setText( TQString() );
textLabelEncryption->setText( QString::null ); textLabelEncryption->setText( TQString() );
} }
} }

@ -20,11 +20,11 @@
#ifndef INTERFACESTATUSDIALOG_H #ifndef INTERFACESTATUSDIALOG_H
#define INTERFACESTATUSDIALOG_H #define INTERFACESTATUSDIALOG_H
#include <qwidget.h> #include <tqwidget.h>
#include "interfacestatusdlg.h" #include "interfacestatusdlg.h"
class QTimer; class TQTimer;
class Interface; class Interface;
/** /**
@ -38,12 +38,13 @@ class Interface;
class InterfaceStatusDialog : public InterfaceStatusDlg class InterfaceStatusDialog : public InterfaceStatusDlg
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
InterfaceStatusDialog( Interface* interface, InterfaceStatusDialog( Interface* interface,
QWidget* parent = 0L, const char* name = 0L ); TQWidget* tqparent = 0L, const char* name = 0L );
/** /**
* Default Destructor * Default Destructor
@ -79,10 +80,10 @@ private slots:
void updateDialog(); void updateDialog();
private: private:
QPoint mPos; TQPoint mPos;
bool mPosInitialized; bool mPosInitialized;
QTimer* mTimer; TQTimer* mTimer;
Interface* mInterface; Interface* mInterface;
}; };

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>InterfaceStatusDlg</class> <class>InterfaceStatusDlg</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>InterfaceStatusDlg</cstring> <cstring>InterfaceStatusDlg</cstring>
</property> </property>
@ -13,7 +13,7 @@
</rect> </rect>
</property> </property>
<property name="caption"> <property name="caption">
<string>Interface Status</string> <string>Interface tqStatus</string>
</property> </property>
<property name="sizeGripEnabled"> <property name="sizeGripEnabled">
<bool>true</bool> <bool>true</bool>
@ -22,11 +22,11 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidget</cstring> <cstring>tabWidget</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>connection</cstring> <cstring>connection</cstring>
</property> </property>
@ -47,14 +47,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>81</width> <width>81</width>
<height>30</height> <height>30</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="2"> <widget class="TQGroupBox" row="4" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>groupBoxIP</cstring> <cstring>groupBoxIP</cstring>
</property> </property>
@ -65,47 +65,47 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabelIP</cstring> <cstring>textLabelIP</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabelSubnet</cstring> <cstring>textLabelSubnet</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>variableText1</cstring> <cstring>variableText1</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="1"> <widget class="TQLabel" row="3" column="1">
<property name="name"> <property name="name">
<cstring>variableText2</cstring> <cstring>variableText2</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="1"> <widget class="TQLabel" row="4" column="1">
<property name="name"> <property name="name">
<cstring>variableText3</cstring> <cstring>variableText3</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel4_2</cstring> <cstring>textLabel4_2</cstring>
</property> </property>
@ -113,7 +113,7 @@
<string>IP-Address:</string> <string>IP-Address:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel5_2</cstring> <cstring>textLabel5_2</cstring>
</property> </property>
@ -121,7 +121,7 @@
<string>Subnet Mask:</string> <string>Subnet Mask:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>variableLabel1</cstring> <cstring>variableLabel1</cstring>
</property> </property>
@ -129,7 +129,7 @@
<string>Broadcast Address:</string> <string>Broadcast Address:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>variableLabel2</cstring> <cstring>variableLabel2</cstring>
</property> </property>
@ -137,7 +137,7 @@
<string>Default Gateway:</string> <string>Default Gateway:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>variableLabel3</cstring> <cstring>variableLabel3</cstring>
</property> </property>
@ -147,51 +147,51 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabelAlias</cstring> <cstring>textLabelAlias</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabelInterface</cstring> <cstring>textLabelInterface</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>textLabelStatus</cstring> <cstring>textLabeltqStatus</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="1"> <widget class="TQLabel" row="3" column="1">
<property name="name"> <property name="name">
<cstring>textLabelUptime</cstring> <cstring>textLabelUptime</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel24</cstring> <cstring>textLabel24</cstring>
</property> </property>
@ -199,7 +199,7 @@
<string>Interface:</string> <string>Interface:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel14</cstring> <cstring>textLabel14</cstring>
</property> </property>
@ -207,15 +207,15 @@
<string>Alias:</string> <string>Alias:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Status:</string> <string>tqStatus:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -225,7 +225,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>traffic</cstring> <cstring>traffic</cstring>
</property> </property>
@ -236,7 +236,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBoxCurrentConnection</cstring> <cstring>groupBoxCurrentConnection</cstring>
</property> </property>
@ -247,45 +247,45 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="2"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>textLabel8</cstring> <cstring>textLabel8</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Received</string> <string>Received</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabel7</cstring> <cstring>textLabel7</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Sent</string> <string>Sent</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabelPacketsSend</cstring> <cstring>textLabelPacketsSend</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="2"> <widget class="TQLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>textLabelPacketsReceived</cstring> <cstring>textLabelPacketsReceived</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel9</cstring> <cstring>textLabel9</cstring>
</property> </property>
@ -293,63 +293,63 @@
<string>Packets:</string> <string>Packets:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel10</cstring> <cstring>textLabel10</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Bytes:</string> <string>Bytes:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel10_2</cstring> <cstring>textLabel10_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Speed:</string> <string>Speed:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>textLabelBytesSend</cstring> <cstring>textLabelBytesSend</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="2"> <widget class="TQLabel" row="2" column="2">
<property name="name"> <property name="name">
<cstring>textLabelBytesReceived</cstring> <cstring>textLabelBytesReceived</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="1"> <widget class="TQLabel" row="3" column="1">
<property name="name"> <property name="name">
<cstring>textLabelSpeedSend</cstring> <cstring>textLabelSpeedSend</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="2"> <widget class="TQLabel" row="3" column="2">
<property name="name"> <property name="name">
<cstring>textLabelSpeedReceived</cstring> <cstring>textLabelSpeedReceived</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBoxStatistics</cstring> <cstring>groupBoxStatistics</cstring>
</property> </property>
@ -360,7 +360,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel9_2_2</cstring> <cstring>textLabel9_2_2</cstring>
</property> </property>
@ -368,130 +368,130 @@
<string>Today:</string> <string>Today:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel10_2_2_2</cstring> <cstring>textLabel10_2_2_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>This year:</string> <string>This year:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="2"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>textLabel8_2_3</cstring> <cstring>textLabel8_2_3</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Received</string> <string>Received</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="3"> <widget class="TQLabel" row="0" column="3">
<property name="name"> <property name="name">
<cstring>textLabel8_2_2_2</cstring> <cstring>textLabel8_2_2_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Total</string> <string>Total</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel10_3_2</cstring> <cstring>textLabel10_3_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>This month:</string> <string>This month:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="2"> <widget class="TQLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>textLabelTodayReceived</cstring> <cstring>textLabelTodayReceived</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="2"> <widget class="TQLabel" row="2" column="2">
<property name="name"> <property name="name">
<cstring>textLabelMonthReceived</cstring> <cstring>textLabelMonthReceived</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="2"> <widget class="TQLabel" row="3" column="2">
<property name="name"> <property name="name">
<cstring>textLabelYearReceived</cstring> <cstring>textLabelYearReceived</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="3"> <widget class="TQLabel" row="1" column="3">
<property name="name"> <property name="name">
<cstring>textLabelTodayTotal</cstring> <cstring>textLabelTodayTotal</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="3"> <widget class="TQLabel" row="2" column="3">
<property name="name"> <property name="name">
<cstring>textLabelMonthTotal</cstring> <cstring>textLabelMonthTotal</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="3"> <widget class="TQLabel" row="3" column="3">
<property name="name"> <property name="name">
<cstring>textLabelYearTotal</cstring> <cstring>textLabelYearTotal</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabel7_2_2</cstring> <cstring>textLabel7_2_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Sent</string> <string>Sent</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>textLabelMonthSent</cstring> <cstring>textLabelMonthSent</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="1"> <widget class="TQLabel" row="3" column="1">
<property name="name"> <property name="name">
<cstring>textLabelYearSent</cstring> <cstring>textLabelYearSent</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabelTodaySent</cstring> <cstring>textLabelTodaySent</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -507,7 +507,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>81</width> <width>81</width>
<height>16</height> <height>16</height>
@ -516,7 +516,7 @@
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>wireless</cstring> <cstring>wireless</cstring>
</property> </property>
@ -527,7 +527,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3_2</cstring> <cstring>textLabel3_2</cstring>
</property> </property>
@ -535,18 +535,18 @@
<string>Connected to:</string> <string>Connected to:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabelESSID</cstring> <cstring>textLabelESSID</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3_2_2_2</cstring> <cstring>textLabel3_2_2_2</cstring>
</property> </property>
@ -554,18 +554,18 @@
<string>Access point:</string> <string>Access point:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>textLabelAccessPoint</cstring> <cstring>textLabelAccessPoint</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="5" column="0"> <widget class="TQLabel" row="5" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3_2_4</cstring> <cstring>textLabel3_2_4</cstring>
</property> </property>
@ -573,7 +573,7 @@
<string>Bit Rate:</string> <string>Bit Rate:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>textLabelFC</cstring> <cstring>textLabelFC</cstring>
</property> </property>
@ -581,7 +581,7 @@
<string>Frequency [Channel]:</string> <string>Frequency [Channel]:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3_2_2</cstring> <cstring>textLabel3_2_2</cstring>
</property> </property>
@ -589,42 +589,42 @@
<string>Mode:</string> <string>Mode:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="5" column="1"> <widget class="TQLabel" row="5" column="1">
<property name="name"> <property name="name">
<cstring>textLabelBitRate</cstring> <cstring>textLabelBitRate</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="1"> <widget class="TQLabel" row="4" column="1">
<property name="name"> <property name="name">
<cstring>textLabelFreqChannel</cstring> <cstring>textLabelFreqChannel</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="1"> <widget class="TQLabel" row="3" column="1">
<property name="name"> <property name="name">
<cstring>textLabelMode</cstring> <cstring>textLabelMode</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>textLabelNickName</cstring> <cstring>textLabelNickName</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3_2_5</cstring> <cstring>textLabel3_2_5</cstring>
</property> </property>
@ -642,14 +642,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>81</width> <width>81</width>
<height>50</height> <height>50</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="6" column="0"> <widget class="TQLabel" row="6" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3_2_6</cstring> <cstring>textLabel3_2_6</cstring>
</property> </property>
@ -657,7 +657,7 @@
<string>Link Quality:</string> <string>Link Quality:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="7" column="0"> <widget class="TQLabel" row="7" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -665,34 +665,34 @@
<string>Encryption:</string> <string>Encryption:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="6" column="1"> <widget class="TQLabel" row="6" column="1">
<property name="name"> <property name="name">
<cstring>textLabelLinkQuality</cstring> <cstring>textLabelLinkQuality</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="7" column="1"> <widget class="TQLabel" row="7" column="1">
<property name="name"> <property name="name">
<cstring>textLabelEncryption</cstring> <cstring>textLabelEncryption</cstring>
</property> </property>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>tqlayout2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -708,14 +708,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>0</width> <width>0</width>
<height>21</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonClose</cstring> <cstring>buttonClose</cstring>
</property> </property>
@ -736,7 +736,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>0</width> <width>0</width>
<height>21</height> <height>21</height>
@ -755,5 +755,5 @@
<slot>accept()</slot> <slot>accept()</slot>
</connection> </connection>
</connections> </connections>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qrect.h> #include <tqrect.h>
#include <qstring.h> #include <tqstring.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <klocale.h>
@ -29,8 +29,8 @@
#include "interfacetooltip.h" #include "interfacetooltip.h"
InterfaceToolTip::InterfaceToolTip( Interface* interface, InterfaceToolTip::InterfaceToolTip( Interface* interface,
QWidget* parent ) TQWidget* tqparent )
: QToolTip( parent ), : TQToolTip( tqparent ),
mInterface( interface ) mInterface( interface )
{ {
setupToolTipArray(); setupToolTipArray();
@ -40,25 +40,25 @@ InterfaceToolTip::~InterfaceToolTip()
{ {
} }
void InterfaceToolTip::maybeTip( const QPoint& ) void InterfaceToolTip::maybeTip( const TQPoint& )
{ {
QRect rect( parentWidget()->rect() ); TQRect rect( tqparentWidget()->rect() );
if ( !rect.isValid() ) if ( !rect.isValid() )
return; return;
QString tooltip; TQString tooltip;
setupText( tooltip ); setupText( tooltip );
tip( rect, tooltip ); tip( rect, tooltip );
} }
void InterfaceToolTip::setupText( QString& text ) void InterfaceToolTip::setupText( TQString& text )
{ {
int toolTipContent = mInterface->getGeneralData().toolTipContent; int toolTipContent = mInterface->getGeneralData().toolTipContent;
InterfaceData& data = mInterface->getData(); InterfaceData& data = mInterface->getData();
text += "<table cellspacing=0 cellpadding=0 border=0>"; text += "<table cellspacing=0 cellpadding=0 border=0>";
if ( ( toolTipContent & ALIAS ) && if ( ( toolTipContent & ALIAS ) &&
mInterface->getSettings().alias != QString::null ) mInterface->getSettings().alias != TQString() )
text += "<tr><th colspan=2 align=center>" + mInterface->getSettings().alias + "</th></tr>"; text += "<tr><th colspan=2 align=center>" + mInterface->getSettings().alias + "</th></tr>";
if ( toolTipContent & INTERFACE ) if ( toolTipContent & INTERFACE )
text += "<tr><td>" + mToolTips[0].first + "</td><td>" + mInterface->getName() + "</td></tr>"; text += "<tr><td>" + mToolTips[0].first + "</td><td>" + mInterface->getName() + "</td></tr>";
@ -68,21 +68,21 @@ void InterfaceToolTip::setupText( QString& text )
text += "<tr><td>" + mToolTips[2].first + "</td><td>" + i18n( "Connection established." ) + "</td></tr>"; text += "<tr><td>" + mToolTips[2].first + "</td><td>" + i18n( "Connection established." ) + "</td></tr>";
if ( toolTipContent & UPTIME ) if ( toolTipContent & UPTIME )
{ {
int upsecs = mInterface->getStartTime().secsTo( QDateTime::currentDateTime() ); int upsecs = mInterface->getStartTime().secsTo( TQDateTime::tqcurrentDateTime() );
int updays = upsecs / 86400; // don't use QDateTime::daysTo() because int updays = upsecs / 86400; // don't use TQDateTime::daysTo() because
// we only want complete days // we only want complete days
QString uptime; TQString uptime;
if ( updays == 1 ) if ( updays == 1 )
uptime = "1 day, "; uptime = "1 day, ";
else if ( updays > 1 ) else if ( updays > 1 )
uptime = QString( "%1 days, " ).arg( updays ); uptime = TQString( "%1 days, " ).tqarg( updays );
upsecs -= 86400 * updays; // we only want the seconds of today upsecs -= 86400 * updays; // we only want the seconds of today
int hrs = upsecs / 3600; int hrs = upsecs / 3600;
int mins = ( upsecs - hrs * 3600 ) / 60; int mins = ( upsecs - hrs * 3600 ) / 60;
int secs = upsecs - hrs * 3600 - mins * 60; int secs = upsecs - hrs * 3600 - mins * 60;
QString time; TQString time;
time.sprintf( "%02d:%02d:%02d", hrs, mins, secs ); time.sprintf( "%02d:%02d:%02d", hrs, mins, secs );
uptime += time; uptime += time;
text += "<tr><td>" + mToolTips[3].first + "</td><td>" + uptime + "</td></tr>"; text += "<tr><td>" + mToolTips[3].first + "</td><td>" + uptime + "</td></tr>";
@ -120,9 +120,9 @@ void InterfaceToolTip::setupText( QString& text )
text += "<tr><td>" + mToolTips[7].first + "</td><td>" + data.ptpAddress + "</td></tr>"; text += "<tr><td>" + mToolTips[7].first + "</td><td>" + data.ptpAddress + "</td></tr>";
} }
if ( toolTipContent & RX_PACKETS ) if ( toolTipContent & RX_PACKETS )
text += "<tr><td>" + mToolTips[8].first + "</td><td>" + QString::number( data.rxPackets ) + "</td></tr>"; text += "<tr><td>" + mToolTips[8].first + "</td><td>" + TQString::number( data.rxPackets ) + "</td></tr>";
if ( toolTipContent & TX_PACKETS ) if ( toolTipContent & TX_PACKETS )
text += "<tr><td>" + mToolTips[9].first + "</td><td>" + QString::number( data.txPackets ) + "</td></tr>"; text += "<tr><td>" + mToolTips[9].first + "</td><td>" + TQString::number( data.txPackets ) + "</td></tr>";
if ( toolTipContent & RX_BYTES ) if ( toolTipContent & RX_BYTES )
text += "<tr><td>" + mToolTips[10].first + "</td><td>" + data.rxString + "</td></tr>"; text += "<tr><td>" + mToolTips[10].first + "</td><td>" + data.rxString + "</td></tr>";
if ( toolTipContent & TX_BYTES ) if ( toolTipContent & TX_BYTES )
@ -152,7 +152,7 @@ void InterfaceToolTip::setupText( QString& text )
text += "<tr><td>" + mToolTips[15].first + "</td><td>" + wdata.bitRate + "</td></tr>"; text += "<tr><td>" + mToolTips[15].first + "</td><td>" + wdata.bitRate + "</td></tr>";
if ( toolTipContent & ACCESS_POINT ) if ( toolTipContent & ACCESS_POINT )
text += "<tr><td>" + mToolTips[16].first + "</td><td>" + wdata.accessPoint + "</td></tr>"; text += "<tr><td>" + mToolTips[16].first + "</td><td>" + wdata.accessPoint + "</td></tr>";
if ( toolTipContent & LINK_QUALITY ) if ( toolTipContent & LINK_TQUALITY )
text += "<tr><td>" + mToolTips[17].first + "</td><td>" + wdata.linkQuality + "</td></tr>"; text += "<tr><td>" + mToolTips[17].first + "</td><td>" + wdata.linkQuality + "</td></tr>";
if ( toolTipContent & NICK_NAME ) if ( toolTipContent & NICK_NAME )
text += "<tr><td>" + mToolTips[22].first + "</td><td>" + wdata.nickName + "</td></tr>"; text += "<tr><td>" + mToolTips[22].first + "</td><td>" + wdata.nickName + "</td></tr>";
@ -175,30 +175,30 @@ void InterfaceToolTip::setupToolTipArray()
{ {
// Cannot make this data static as the i18n macro doesn't seem // Cannot make this data static as the i18n macro doesn't seem
// to work when called to early i.e. before setting the catalogue. // to work when called to early i.e. before setting the catalogue.
mToolTips[0] = QPair<QString, int>( i18n( "Interface" ), INTERFACE ); mToolTips[0] = TQPair<TQString, int>( i18n( "Interface" ), INTERFACE );
mToolTips[1] = QPair<QString, int>( i18n( "Alias" ), ALIAS ); mToolTips[1] = TQPair<TQString, int>( i18n( "Alias" ), ALIAS );
mToolTips[2] = QPair<QString, int>( i18n( "Status" ), STATUS ); mToolTips[2] = TQPair<TQString, int>( i18n( "tqStatus" ), STATUS );
mToolTips[3] = QPair<QString, int>( i18n( "Uptime" ), UPTIME ); mToolTips[3] = TQPair<TQString, int>( i18n( "Uptime" ), UPTIME );
mToolTips[4] = QPair<QString, int>( i18n( "IP-Address" ), IP_ADDRESS ); mToolTips[4] = TQPair<TQString, int>( i18n( "IP-Address" ), IP_ADDRESS );
mToolTips[5] = QPair<QString, int>( i18n( "Subnet Mask" ), SUBNET_MASK ); mToolTips[5] = TQPair<TQString, int>( i18n( "Subnet Mask" ), SUBNET_MASK );
mToolTips[6] = QPair<QString, int>( i18n( "HW-Address" ), HW_ADDRESS ); mToolTips[6] = TQPair<TQString, int>( i18n( "HW-Address" ), HW_ADDRESS );
mToolTips[7] = QPair<QString, int>( i18n( "PtP-Address" ), PTP_ADDRESS ); mToolTips[7] = TQPair<TQString, int>( i18n( "PtP-Address" ), PTP_ADDRESS );
mToolTips[8] = QPair<QString, int>( i18n( "Packets Received" ), RX_PACKETS ); mToolTips[8] = TQPair<TQString, int>( i18n( "Packets Received" ), RX_PACKETS );
mToolTips[9] = QPair<QString, int>( i18n( "Packets Sent" ), TX_PACKETS ); mToolTips[9] = TQPair<TQString, int>( i18n( "Packets Sent" ), TX_PACKETS );
mToolTips[10] = QPair<QString, int>( i18n( "Bytes Received" ), RX_BYTES ); mToolTips[10] = TQPair<TQString, int>( i18n( "Bytes Received" ), RX_BYTES );
mToolTips[11] = QPair<QString, int>( i18n( "Bytes Sent" ), TX_BYTES ); mToolTips[11] = TQPair<TQString, int>( i18n( "Bytes Sent" ), TX_BYTES );
mToolTips[12] = QPair<QString, int>( i18n( "ESSID" ), ESSID ); mToolTips[12] = TQPair<TQString, int>( i18n( "ESSID" ), ESSID );
mToolTips[13] = QPair<QString, int>( i18n( "Mode" ), MODE ); mToolTips[13] = TQPair<TQString, int>( i18n( "Mode" ), MODE );
mToolTips[14] = QPair<QString, int>( i18n( "Frequency" ), FREQUENCY ); mToolTips[14] = TQPair<TQString, int>( i18n( "Frequency" ), FREQUENCY );
mToolTips[15] = QPair<QString, int>( i18n( "Bit Rate" ), BIT_RATE ); mToolTips[15] = TQPair<TQString, int>( i18n( "Bit Rate" ), BIT_RATE );
mToolTips[16] = QPair<QString, int>( i18n( "Access Point" ), ACCESS_POINT ); mToolTips[16] = TQPair<TQString, int>( i18n( "Access Point" ), ACCESS_POINT );
mToolTips[17] = QPair<QString, int>( i18n( "Link Quality" ), LINK_QUALITY ); mToolTips[17] = TQPair<TQString, int>( i18n( "Link Quality" ), LINK_TQUALITY );
mToolTips[18] = QPair<QString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS ); mToolTips[18] = TQPair<TQString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS );
mToolTips[19] = QPair<QString, int>( i18n( "Default Gateway" ), LINK_QUALITY ); mToolTips[19] = TQPair<TQString, int>( i18n( "Default Gateway" ), LINK_TQUALITY );
mToolTips[20] = QPair<QString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED ); mToolTips[20] = TQPair<TQString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED );
mToolTips[21] = QPair<QString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED ); mToolTips[21] = TQPair<TQString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED );
mToolTips[22] = QPair<QString, int>( i18n( "Nickname" ), NICK_NAME ); mToolTips[22] = TQPair<TQString, int>( i18n( "Nickname" ), NICK_NAME );
mToolTips[23] = QPair<QString, int>( i18n( "Encryption" ), ENCRYPTION ); mToolTips[23] = TQPair<TQString, int>( i18n( "Encryption" ), ENCRYPTION );
mToolTips[24] = QPair<QString, int>(); mToolTips[24] = TQPair<TQString, int>();
} }

@ -20,28 +20,28 @@
#ifndef INTERFACETOOLTIP_H #ifndef INTERFACETOOLTIP_H
#define INTERFACETOOLTIP_H #define INTERFACETOOLTIP_H
#include <qpair.h> #include <tqpair.h>
#include <qtooltip.h> #include <tqtooltip.h>
class Interface; class Interface;
/** /**
* This call is responsible for displaying the tooltip of an * This call is responsible for displaying the tooltip of an
* interface icon. It is derived from QToolTip and overwrites * interface icon. It is derived from TQToolTip and overwrites
* the function maybeTip(const QPoint & p) to update the tooltip * the function maybeTip(const TQPoint & p) to update the tooltip
* text just before it is going to be displayed. * text just before it is going to be displayed.
* *
* @short Display tooltip according to user settings * @short Display tooltip according to user settings
* @author Percy Leonhardt <percy@eris23.de> * @author Percy Leonhardt <percy@eris23.de>
*/ */
class InterfaceToolTip : public QToolTip class InterfaceToolTip : public TQToolTip
{ {
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
InterfaceToolTip( Interface* interface, QWidget* parent = 0L ); InterfaceToolTip( Interface* interface, TQWidget* tqparent = 0L );
/** /**
* Default Destructor * Default Destructor
@ -49,24 +49,24 @@ public:
virtual ~InterfaceToolTip(); virtual ~InterfaceToolTip();
/** /**
* From the Qt documentation: * From the TQt documentation:
* It is called when there is a possibility that a tool tip should * It is called when there is a possibility that a tool tip should
* be shown and must decide whether there is a tool tip for the point p * be shown and must decide whether there is a tool tip for the point p
* in the widget that this QToolTip object relates to. If so, maybeTip() * in the widget that this TQToolTip object relates to. If so, maybeTip()
* must call tip() with the rectangle the tip applies to, the tip's text * must call tip() with the rectangle the tip applies to, the tip's text
* and optionally the QToolTipGroup details and the geometry in screen * and optionally the TQToolTipGroup details and the tqgeometry in screen
* coordinates. * coordinates.
*/ */
void maybeTip( const QPoint& ); void maybeTip( const TQPoint& );
private: private:
void setupText( QString& text ); void setupText( TQString& text );
void setupToolTipArray(); void setupToolTipArray();
// the interface this tooltip belongs to // the interface this tooltip belongs to
Interface* mInterface; Interface* mInterface;
// the tooltip text for each information // the tooltip text for each information
QPair<QString, int> mToolTips[25]; TQPair<TQString, int> mToolTips[25];
}; };
#endif // INTERFACETOOLTIP_H #endif // INTERFACETOOLTIP_H

@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qwidget.h> #include <tqwidget.h>
#include <kdebug.h> #include <kdebug.h>
#include <kglobal.h> #include <kglobal.h>
@ -37,9 +37,9 @@ static const char description[] =
static const char version[] = "0.4.8"; static const char version[] = "0.4.8";
InterfaceTray::InterfaceTray( const QString& ifname, InterfaceTray::InterfaceTray( const TQString& ifname,
QWidget* parent, const char* name ) TQWidget* tqparent, const char* name )
: KSystemTray( parent, name ) : KSystemTray( tqparent, name )
{ {
actionCollection()->clear(); // remove the quit entry actionCollection()->clear(); // remove the quit entry
@ -49,42 +49,42 @@ InterfaceTray::InterfaceTray( const QString& ifname,
"KNemo - " + ifname ); "KNemo - " + ifname );
popup->insertItem( SmallIcon( "knemo" ), popup->insertItem( SmallIcon( "knemo" ),
i18n( "&About KNemo" ), this, i18n( "&About KNemo" ), this,
SLOT( showAboutDialog() ) ); TQT_SLOT( showAboutDialog() ) );
popup->insertItem( i18n( "&Report Bug..." ), this, popup->insertItem( i18n( "&Report Bug..." ), this,
SLOT( showReportBugDialog() ) ); TQT_SLOT( showReportBugDialog() ) );
popup->insertSeparator(); popup->insertSeparator();
popup->insertItem( SmallIcon( "configure" ), popup->insertItem( SmallIcon( "configure" ),
i18n( "&Configure KNemo..." ), this, i18n( "&Configure KNemo..." ), this,
SIGNAL( configSelected() ) ); TQT_SIGNAL( configSelected() ) );
popup->insertItem( SmallIcon( "ksysguard" ), popup->insertItem( SmallIcon( "ksysguard" ),
i18n( "&Open Traffic Plotter" ), this, i18n( "&Open Traffic Plotter" ), this,
SLOT( showGraph() ) ); TQT_SLOT( showGraph() ) );
} }
InterfaceTray::~InterfaceTray() InterfaceTray::~InterfaceTray()
{ {
} }
void InterfaceTray::resizeEvent ( QResizeEvent * ) void InterfaceTray::resizeEvent ( TQResizeEvent * )
{ {
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
emit iconResized(); emit iconResized();
} }
void InterfaceTray::mousePressEvent( QMouseEvent* e ) void InterfaceTray::mousePressEvent( TQMouseEvent* e )
{ {
if ( !rect().contains( e->pos() ) ) if ( !TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) )
return; return;
switch( e->button() ) switch( e->button() )
{ {
case LeftButton: case Qt::LeftButton:
emit leftClicked(); emit leftClicked();
break; break;
case MidButton: case Qt::MidButton:
emit graphSelected( true ); emit graphSelected( true );
break; break;
case RightButton: case Qt::RightButton:
KSystemTray::mousePressEvent( e ); KSystemTray::mousePressEvent( e );
break; break;
default: default:

@ -22,7 +22,7 @@
#include <ksystemtray.h> #include <ksystemtray.h>
class QWidget; class TQWidget;
/** /**
* This class is the graphical representation of and interface * This class is the graphical representation of and interface
@ -36,12 +36,13 @@ class QWidget;
class InterfaceTray : public KSystemTray class InterfaceTray : public KSystemTray
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
InterfaceTray( const QString& ifname, InterfaceTray( const TQString& ifname,
QWidget* parent = 0L, const char* name = 0L ); TQWidget* tqparent = 0L, const char* name = 0L );
/** /**
* Default Destructor * Default Destructor
@ -57,8 +58,8 @@ signals:
void iconResized(); void iconResized();
protected: protected:
void mousePressEvent( QMouseEvent* e ); void mousePressEvent( TQMouseEvent* e );
void resizeEvent ( QResizeEvent * ); void resizeEvent ( TQResizeEvent * );
protected slots: protected slots:
/** /**

@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <qtimer.h> #include <tqtimer.h>
#include <qstrlist.h> #include <tqstrlist.h>
#include <kdebug.h> #include <kdebug.h>
#include <kglobal.h> #include <kglobal.h>
@ -34,15 +34,15 @@
#include "backendbase.h" #include "backendbase.h"
#include "daemonregistry.h" #include "daemonregistry.h"
QString KNemoDaemon::sSelectedInterface = QString::null; TQString KNemoDaemon::sSelectedInterface = TQString();
extern "C" { extern "C" {
KDE_EXPORT KDEDModule *create_knemod(const QCString &name) { KDE_EXPORT KDEDModule *create_knemod(const TQCString &name) {
return new KNemoDaemon(name); return new KNemoDaemon(name);
} }
} }
KNemoDaemon::KNemoDaemon( const QCString& name ) KNemoDaemon::KNemoDaemon( const TQCString& name )
: KDEDModule( name ), : KDEDModule( name ),
mColorVLines( 0x04FB1D ), mColorVLines( 0x04FB1D ),
mColorHLines( 0x04FB1D ), mColorHLines( 0x04FB1D ),
@ -63,7 +63,7 @@ KNemoDaemon::KNemoDaemon( const QCString& name )
bool foundBackend = false; bool foundBackend = false;
int i; int i;
for ( i = 0; DaemonRegistry[i].name != QString::null; i++ ) for ( i = 0; DaemonRegistry[i].name != TQString(); i++ )
{ {
if ( DaemonRegistry[i].name == mBackendName ) if ( DaemonRegistry[i].name == mBackendName )
{ {
@ -80,8 +80,8 @@ KNemoDaemon::KNemoDaemon( const QCString& name )
mInterfaceDict.setAutoDelete( true ); mInterfaceDict.setAutoDelete( true );
mPollTimer = new QTimer(); mPollTimer = new TQTimer();
connect( mPollTimer, SIGNAL( timeout() ), this, SLOT( updateInterfaces() ) ); connect( mPollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateInterfaces() ) );
mPollTimer->start( mGeneralData.pollInterval * 1000 ); mPollTimer->start( mGeneralData.pollInterval * 1000 );
} }
@ -93,7 +93,7 @@ KNemoDaemon::~KNemoDaemon()
delete mNotifyInstance; delete mNotifyInstance;
delete mInstance; delete mInstance;
QDictIterator<Interface> it( mInterfaceDict ); TQDictIterator<Interface> it( mInterfaceDict );
for ( ; it.current(); ) for ( ; it.current(); )
{ {
mInterfaceDict.remove( it.currentKey() ); mInterfaceDict.remove( it.currentKey() );
@ -110,7 +110,7 @@ void KNemoDaemon::readConfig()
mGeneralData.saveInterval = config->readNumEntry( "SaveInterval", 60 ); mGeneralData.saveInterval = config->readNumEntry( "SaveInterval", 60 );
mGeneralData.statisticsDir = config->readEntry( "StatisticsDir", KGlobal::dirs()->saveLocation( "data", "knemo/" ) ); mGeneralData.statisticsDir = config->readEntry( "StatisticsDir", KGlobal::dirs()->saveLocation( "data", "knemo/" ) );
mGeneralData.toolTipContent = config->readNumEntry( "ToolTipContent", 2 ); mGeneralData.toolTipContent = config->readNumEntry( "ToolTipContent", 2 );
QStrList list; TQStrList list;
int numEntries = config->readListEntry( "Interfaces", list ); int numEntries = config->readListEntry( "Interfaces", list );
if ( numEntries == 0 ) if ( numEntries == 0 )
@ -120,7 +120,7 @@ void KNemoDaemon::readConfig()
for ( interface = list.first(); interface; interface = list.next() ) for ( interface = list.first(); interface; interface = list.next() )
{ {
Interface* iface = new Interface( interface, mGeneralData, mPlotterSettings ); Interface* iface = new Interface( interface, mGeneralData, mPlotterSettings );
QString group( "Interface_" ); TQString group( "Interface_" );
group += interface; group += interface;
if ( config->hasGroup( group ) ) if ( config->hasGroup( group ) )
{ {
@ -138,13 +138,13 @@ void KNemoDaemon::readConfig()
int numCommands = config->readNumEntry( "NumCommands" ); int numCommands = config->readNumEntry( "NumCommands" );
for ( int i = 0; i < numCommands; i++ ) for ( int i = 0; i < numCommands; i++ )
{ {
QString entry; TQString entry;
InterfaceCommand cmd; InterfaceCommand cmd;
entry = QString( "RunAsRoot%1" ).arg( i + 1 ); entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 );
cmd.runAsRoot = config->readBoolEntry( entry ); cmd.runAsRoot = config->readBoolEntry( entry );
entry = QString( "Command%1" ).arg( i + 1 ); entry = TQString( "Command%1" ).tqarg( i + 1 );
cmd.command = config->readEntry( entry ); cmd.command = config->readEntry( entry );
entry = QString( "MenuText%1" ).arg( i + 1 ); entry = TQString( "MenuText%1" ).tqarg( i + 1 );
cmd.menuText = config->readEntry( entry ); cmd.menuText = config->readEntry( entry );
settings.commands.append( cmd ); settings.commands.append( cmd );
} }
@ -182,7 +182,7 @@ void KNemoDaemon::readConfig()
void KNemoDaemon::reparseConfiguration() void KNemoDaemon::reparseConfiguration()
{ {
// Read the settings from the config file. // Read the settings from the config file.
QDict<InterfaceSettings> settingsDict; TQDict<InterfaceSettings> settingsDict;
KConfig* config = new KConfig( "knemorc", false ); KConfig* config = new KConfig( "knemorc", false );
config->setGroup( "General" ); config->setGroup( "General" );
@ -195,14 +195,14 @@ void KNemoDaemon::reparseConfiguration()
mPollTimer->changeInterval( mGeneralData.pollInterval * 1000 ); mPollTimer->changeInterval( mGeneralData.pollInterval * 1000 );
// select the backend from the config file // select the backend from the config file
QString backend = config->readEntry( "Backend", "Nettools" ); TQString backend = config->readEntry( "Backend", "Nettools" );
if ( mBackendName != backend ) if ( mBackendName != backend )
{ {
bool foundBackend = false; bool foundBackend = false;
mBackendName = backend; mBackendName = backend;
int i; int i;
for ( i = 0; DaemonRegistry[i].name != QString::null; i++ ) for ( i = 0; DaemonRegistry[i].name != TQString(); i++ )
{ {
if ( DaemonRegistry[i].name == backend ) if ( DaemonRegistry[i].name == backend )
{ {
@ -218,7 +218,7 @@ void KNemoDaemon::reparseConfiguration()
} }
} }
QStrList list; TQStrList list;
int numEntries = config->readListEntry( "Interfaces", list ); int numEntries = config->readListEntry( "Interfaces", list );
if ( numEntries == 0 ) if ( numEntries == 0 )
@ -227,7 +227,7 @@ void KNemoDaemon::reparseConfiguration()
char* interface; char* interface;
for ( interface = list.first(); interface; interface = list.next() ) for ( interface = list.first(); interface; interface = list.next() )
{ {
QString group( "Interface_" ); TQString group( "Interface_" );
group += interface; group += interface;
InterfaceSettings* settings = new InterfaceSettings(); InterfaceSettings* settings = new InterfaceSettings();
if ( config->hasGroup( group ) ) if ( config->hasGroup( group ) )
@ -245,13 +245,13 @@ void KNemoDaemon::reparseConfiguration()
int numCommands = config->readNumEntry( "NumCommands" ); int numCommands = config->readNumEntry( "NumCommands" );
for ( int i = 0; i < numCommands; i++ ) for ( int i = 0; i < numCommands; i++ )
{ {
QString entry; TQString entry;
InterfaceCommand cmd; InterfaceCommand cmd;
entry = QString( "RunAsRoot%1" ).arg( i + 1 ); entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 );
cmd.runAsRoot = config->readBoolEntry( entry ); cmd.runAsRoot = config->readBoolEntry( entry );
entry = QString( "Command%1" ).arg( i + 1 ); entry = TQString( "Command%1" ).tqarg( i + 1 );
cmd.command = config->readEntry( entry ); cmd.command = config->readEntry( entry );
entry = QString( "MenuText%1" ).arg( i + 1 ); entry = TQString( "MenuText%1" ).tqarg( i + 1 );
cmd.menuText = config->readEntry( entry ); cmd.menuText = config->readEntry( entry );
settings->commands.append( cmd ); settings->commands.append( cmd );
} }
@ -284,10 +284,10 @@ void KNemoDaemon::reparseConfiguration()
// Remove all interfaces that the user deleted from // Remove all interfaces that the user deleted from
// the internal list. // the internal list.
QDictIterator<Interface> it( mInterfaceDict ); TQDictIterator<Interface> it( mInterfaceDict );
for ( ; it.current(); ) for ( ; it.current(); )
{ {
if ( settingsDict.find( it.currentKey() ) == 0 ) if ( settingsDict.tqfind( it.currentKey() ) == 0 )
{ {
config->deleteGroup( "Interface_" + it.currentKey() ); config->deleteGroup( "Interface_" + it.currentKey() );
mInterfaceDict.remove( it.currentKey() ); mInterfaceDict.remove( it.currentKey() );
@ -300,11 +300,11 @@ void KNemoDaemon::reparseConfiguration()
delete config; delete config;
// Update all other interfaces and add new ones. // Update all other interfaces and add new ones.
QDictIterator<InterfaceSettings> setIt( settingsDict ); TQDictIterator<InterfaceSettings> setIt( settingsDict );
for ( ; setIt.current(); ++setIt ) for ( ; setIt.current(); ++setIt )
{ {
Interface* iface; Interface* iface;
if ( mInterfaceDict.find( setIt.currentKey() ) == 0 ) if ( mInterfaceDict.tqfind( setIt.currentKey() ) == 0 )
{ {
iface = new Interface( setIt.currentKey(), mGeneralData, mPlotterSettings ); iface = new Interface( setIt.currentKey(), mGeneralData, mPlotterSettings );
mInterfaceDict.insert( setIt.currentKey(), iface ); mInterfaceDict.insert( setIt.currentKey(), iface );
@ -325,13 +325,13 @@ void KNemoDaemon::reparseConfiguration()
} }
} }
QString KNemoDaemon::getSelectedInterface() TQString KNemoDaemon::getSelectedInterface()
{ {
// Reset the variable to avoid preselecting an interface when // Reset the variable to avoid preselecting an interface when
// the user opens the control center module from the control // the user opens the control center module from the control
// center afterwards. // center afterwards.
QString tmp = sSelectedInterface; TQString tmp = sSelectedInterface;
sSelectedInterface = QString::null; sSelectedInterface = TQString();
return tmp; return tmp;
} }

@ -20,10 +20,10 @@
#ifndef KNEMODAEMON_H #ifndef KNEMODAEMON_H
#define KNEMODAEMON_H #define KNEMODAEMON_H
#include <qdict.h> #include <tqdict.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qcstring.h> #include <tqcstring.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <kdedmodule.h> #include <kdedmodule.h>
#include <knotifyclient.h> #include <knotifyclient.h>
@ -31,7 +31,7 @@
#include "data.h" #include "data.h"
#include "global.h" #include "global.h"
class QTimer; class TQTimer;
class KInstance; class KInstance;
class Interface; class Interface;
class BackendBase; class BackendBase;
@ -49,11 +49,12 @@ class KNemoDaemon : public KDEDModule
{ {
K_DCOP K_DCOP
Q_OBJECT Q_OBJECT
// TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
KNemoDaemon( const QCString& name ); KNemoDaemon( const TQCString& name );
/** /**
* Default Destructor * Default Destructor
@ -61,7 +62,7 @@ public:
virtual ~KNemoDaemon(); virtual ~KNemoDaemon();
// tell the control center module which interface the user selected // tell the control center module which interface the user selected
static QString sSelectedInterface; static TQString sSelectedInterface;
k_dcop: k_dcop:
/* /*
@ -77,7 +78,7 @@ k_dcop:
* user opened the dialog and can preselect the appropriate * user opened the dialog and can preselect the appropriate
* interface in the list. * interface in the list.
*/ */
virtual QString getSelectedInterface(); virtual TQString getSelectedInterface();
private: private:
/* /*
@ -92,15 +93,15 @@ private slots:
void updateInterfaces(); void updateInterfaces();
private: private:
QColor mColorVLines; TQColor mColorVLines;
QColor mColorHLines; TQColor mColorHLines;
QColor mColorIncoming; TQColor mColorIncoming;
QColor mColorOutgoing; TQColor mColorOutgoing;
QColor mColorBackground; TQColor mColorBackground;
// every time this timer expires we will // every time this timer expires we will
// gather new informations from the backend // gather new informations from the backend
QTimer* mPollTimer; TQTimer* mPollTimer;
// our own instance // our own instance
KInstance* mInstance; KInstance* mInstance;
// needed so that KNotifyClient::event will work // needed so that KNotifyClient::event will work
@ -110,11 +111,11 @@ private:
// settings for the traffic plotter are stored here // settings for the traffic plotter are stored here
PlotterSettings mPlotterSettings; PlotterSettings mPlotterSettings;
// the name of backend we currently use // the name of backend we currently use
QString mBackendName; TQString mBackendName;
// the backend used to update the interface informations // the backend used to update the interface informations
BackendBase* mBackend; BackendBase* mBackend;
// a list of all interfaces the user wants to monitor // a list of all interfaces the user wants to monitor
QDict<Interface> mInterfaceDict; TQDict<Interface> mInterfaceDict;
}; };
#endif // KNEMODAEMON_H #endif // KNEMODAEMON_H

@ -25,8 +25,8 @@
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kdebug.h> #include <kdebug.h>
#include <kconfig.h> #include <kconfig.h>
@ -38,8 +38,8 @@ static inline int min( int a, int b )
return ( a < b ? a : b ); return ( a < b ? a : b );
} }
SignalPlotter::SignalPlotter( QWidget *parent, const char *name ) SignalPlotter::SignalPlotter( TQWidget *tqparent, const char *name )
: QDialog( parent, name ), : TQDialog( tqparent, name ),
mPosInitialized( false ), mPosInitialized( false ),
mName( name ) mName( name )
{ {
@ -56,25 +56,25 @@ SignalPlotter::SignalPlotter( QWidget *parent, const char *name )
// Anything smaller than this does not make sense. // Anything smaller than this does not make sense.
setMinimumSize( 16, 16 ); setMinimumSize( 16, 16 );
setSizePolicy( QSizePolicy( QSizePolicy::Expanding, tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
QSizePolicy::Expanding, false ) ); TQSizePolicy::Expanding, false ) );
mShowVerticalLines = true; mShowVerticalLines = true;
mVerticalLinesColor = QColor( 0x04FB1D ); mVerticalLinesColor = TQColor( 0x04FB1D );
mVerticalLinesDistance = 30; mVerticalLinesDistance = 30;
mVerticalLinesScroll = true; mVerticalLinesScroll = true;
mVerticalLinesOffset = 0; mVerticalLinesOffset = 0;
mHorizontalScale = 1; mHorizontalScale = 1;
mShowHorizontalLines = true; mShowHorizontalLines = true;
mHorizontalLinesColor = QColor( 0x04FB1D ); mHorizontalLinesColor = TQColor( 0x04FB1D );
mHorizontalLinesCount = 5; mHorizontalLinesCount = 5;
mShowLabels = true; mShowLabels = true;
mShowTopBar = false; mShowTopBar = false;
mFontSize = 8; mFontSize = 8;
mBackgroundColor = QColor( 0x313031 ); mBackgroundColor = TQColor( 0x313031 );
// Restore window size and position. // Restore window size and position.
KConfig* config = new KConfig( "knemorc", false ); KConfig* config = new KConfig( "knemorc", false );
@ -117,12 +117,12 @@ void SignalPlotter::hide()
{ {
mPos = pos(); mPos = pos();
mPosInitialized = true; mPosInitialized = true;
QDialog::hide(); TQDialog::hide();
} }
void SignalPlotter::show() void SignalPlotter::show()
{ {
QDialog::show(); TQDialog::show();
/** /**
* mPosInitialized should always be true, except when * mPosInitialized should always be true, except when
* starting KNemo for the very first time. * starting KNemo for the very first time.
@ -131,7 +131,7 @@ void SignalPlotter::show()
move( mPos ); move( mPos );
} }
bool SignalPlotter::addBeam( const QColor &color ) bool SignalPlotter::addBeam( const TQColor &color )
{ {
double* d = new double[ mSamples ]; double* d = new double[ mSamples ];
memset( d, 0, sizeof(double) * mSamples ); memset( d, 0, sizeof(double) * mSamples );
@ -141,7 +141,7 @@ bool SignalPlotter::addBeam( const QColor &color )
return true; return true;
} }
void SignalPlotter::addSample( const QValueList<double>& sampleBuf ) void SignalPlotter::addSample( const TQValueList<double>& sampleBuf )
{ {
if ( mBeamData.count() != sampleBuf.count() ) if ( mBeamData.count() != sampleBuf.count() )
return; return;
@ -160,7 +160,7 @@ void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
/* If the vertical lines are scrolling, increment the offset /* If the vertical lines are scrolling, increment the offset
* so they move with the data. The vOffset / hScale confusion * so they move with the data. The vOffset / hScale confusion
* is because v refers to Vertical Lines, and h to the horizontal * is because v refers toQt::Vertical Lines, and h to the horizontal
* distance between the vertical lines. */ * distance between the vertical lines. */
if ( mVerticalLinesScroll ) { if ( mVerticalLinesScroll ) {
mVerticalLinesOffset = ( mVerticalLinesOffset + mHorizontalScale) mVerticalLinesOffset = ( mVerticalLinesOffset + mHorizontalScale)
@ -168,7 +168,7 @@ void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
} }
// Shift data buffers one sample down and insert new samples. // Shift data buffers one sample down and insert new samples.
QValueList<double>::ConstIterator s; TQValueList<double>::ConstIterator s;
for ( d = mBeamData.first(), s = sampleBuf.begin(); d; d = mBeamData.next(), ++s ) { for ( d = mBeamData.first(), s = sampleBuf.begin(); d; d = mBeamData.next(), ++s ) {
memmove( d, d + 1, ( mSamples - 1 ) * sizeof( double ) ); memmove( d, d + 1, ( mSamples - 1 ) * sizeof( double ) );
d[ mSamples - 1 ] = *s; d[ mSamples - 1 ] = *s;
@ -187,7 +187,7 @@ void SignalPlotter::changeRange( int beam, double min, double max )
mMaxValue = max; mMaxValue = max;
} }
QValueList<QColor> &SignalPlotter::beamColors() TQValueList<TQColor> &SignalPlotter::beamColors()
{ {
return mBeamColor; return mBeamColor;
} }
@ -198,12 +198,12 @@ void SignalPlotter::removeBeam( uint pos )
mBeamData.remove( pos ); mBeamData.remove( pos );
} }
void SignalPlotter::setTitle( const QString &title ) void SignalPlotter::setTitle( const TQString &title )
{ {
mTitle = title; mTitle = title;
} }
QString SignalPlotter::title() const TQString SignalPlotter::title() const
{ {
return mTitle; return mTitle;
} }
@ -273,12 +273,12 @@ bool SignalPlotter::showVerticalLines() const
return mShowVerticalLines; return mShowVerticalLines;
} }
void SignalPlotter::setVerticalLinesColor( const QColor &color ) void SignalPlotter::setVerticalLinesColor( const TQColor &color )
{ {
mVerticalLinesColor = color; mVerticalLinesColor = color;
} }
QColor SignalPlotter::verticalLinesColor() const TQColor SignalPlotter::verticalLinesColor() const
{ {
return mVerticalLinesColor; return mVerticalLinesColor;
} }
@ -313,12 +313,12 @@ bool SignalPlotter::showHorizontalLines() const
return mShowHorizontalLines; return mShowHorizontalLines;
} }
void SignalPlotter::setHorizontalLinesColor( const QColor &color ) void SignalPlotter::setHorizontalLinesColor( const TQColor &color )
{ {
mHorizontalLinesColor = color; mHorizontalLinesColor = color;
} }
QColor SignalPlotter::horizontalLinesColor() const TQColor SignalPlotter::horizontalLinesColor() const
{ {
return mHorizontalLinesColor; return mHorizontalLinesColor;
} }
@ -363,17 +363,17 @@ int SignalPlotter::fontSize() const
return mFontSize; return mFontSize;
} }
void SignalPlotter::setBackgroundColor( const QColor &color ) void SignalPlotter::setBackgroundColor( const TQColor &color )
{ {
mBackgroundColor = color; mBackgroundColor = color;
} }
QColor SignalPlotter::backgroundColor() const TQColor SignalPlotter::backgroundColor() const
{ {
return mBackgroundColor; return mBackgroundColor;
} }
void SignalPlotter::resizeEvent( QResizeEvent* ) void SignalPlotter::resizeEvent( TQResizeEvent* )
{ {
Q_ASSERT( width() > 2 ); Q_ASSERT( width() > 2 );
@ -418,23 +418,23 @@ void SignalPlotter::updateDataBuffers()
mSamples = newSampleNum; mSamples = newSampleNum;
} }
void SignalPlotter::paintEvent( QPaintEvent* ) void SignalPlotter::paintEvent( TQPaintEvent* )
{ {
uint w = width(); uint w = width();
uint h = height(); uint h = height();
/* Do not do repaints when the widget is not yet setup properly. */ /* Do not do tqrepaints when the widget is not yet setup properly. */
if ( w <= 2 ) if ( w <= 2 )
return; return;
QPixmap pm( w, h ); TQPixmap pm( w, h );
QPainter p; TQPainter p;
p.begin( &pm, this ); p.tqbegin( TQT_TQPAINTDEVICE(&pm), this );
pm.fill( mBackgroundColor ); pm.fill( mBackgroundColor );
/* Draw white line along the bottom and the right side of the /* Draw white line along the bottom and the right side of the
* widget to create a 3D like look. */ * widget to create a 3D like look. */
p.setPen( QColor( colorGroup().light() ) ); p.setPen( TQColor( tqcolorGroup().light() ) );
p.drawLine( 0, h - 1, w - 1, h - 1 ); p.drawLine( 0, h - 1, w - 1, h - 1 );
p.drawLine( w - 1, 0, w - 1, h - 1 ); p.drawLine( w - 1, 0, w - 1, h - 1 );
@ -470,7 +470,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
/* Draw horizontal bar with current sensor values at top of display. */ /* Draw horizontal bar with current sensor values at top of display. */
p.setPen( mHorizontalLinesColor ); p.setPen( mHorizontalLinesColor );
int x0 = w / 2; int x0 = w / 2;
p.setFont( QFont( p.font().family(), mFontSize ) ); p.setFont( TQFont( p.font().family(), mFontSize ) );
top = p.fontMetrics().height(); top = p.fontMetrics().height();
h -= top; h -= top;
int h0 = top - 2; int h0 = top - 2;
@ -492,24 +492,24 @@ void SignalPlotter::paintEvent( QPaintEvent* )
// - upload speed (numerically, from the value shown by the bar on the right) // - upload speed (numerically, from the value shown by the bar on the right)
// title // title
p.drawText(0, 0, x0/3, top - 2, Qt::AlignCenter, mTitle ); p.drawText(0, 0, x0/3, top - 2, TQt::AlignCenter, mTitle );
QValueList<QColor>::Iterator col_speeds; TQValueList<TQColor>::Iterator col_speeds;
col_speeds = mBeamColor.begin(); col_speeds = mBeamColor.begin();
QColor UploadColor = *(col_speeds++); TQColor UploadColor = *(col_speeds++);
QColor DownloadColor = *(col_speeds); TQColor DownloadColor = *(col_speeds);
// download speed // download speed
QString DownloadSpeedText; TQString DownloadSpeedText;
DownloadSpeedText.sprintf("in: %0.2f KB/s", DownloadSpeed); DownloadSpeedText.sprintf("in: %0.2f KB/s", DownloadSpeed);
p.setPen( DownloadColor ); p.setPen( DownloadColor );
p.drawText(x0/3, 0, x0/3, top - 2, Qt::AlignCenter, DownloadSpeedText ); p.drawText(x0/3, 0, x0/3, top - 2, TQt::AlignCenter, DownloadSpeedText );
// upload speed // upload speed
QString UploadSpeedText; TQString UploadSpeedText;
UploadSpeedText.sprintf("out: %0.2f KB/s", UploadSpeed); UploadSpeedText.sprintf("out: %0.2f KB/s", UploadSpeed);
p.setPen( UploadColor ); p.setPen( UploadColor );
p.drawText(2*x0/3, 0, x0/3, top - 2, Qt::AlignCenter, UploadSpeedText ); p.drawText(2*x0/3, 0, x0/3, top - 2, TQt::AlignCenter, UploadSpeedText );
// restore correct pen color for the separator lines // restore correct pen color for the separator lines
p.setPen( mHorizontalLinesColor ); p.setPen( mHorizontalLinesColor );
@ -520,7 +520,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
double bias = -minValue; double bias = -minValue;
double scaleFac = ( w - x0 - 2 ) / range; double scaleFac = ( w - x0 - 2 ) / range;
QValueList<QColor>::Iterator col; TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin(); col = mBeamColor.begin();
for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) { for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) {
int start = x0 + (int)( bias * scaleFac ); int start = x0 + (int)( bias * scaleFac );
@ -570,7 +570,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
int xPos = 0; int xPos = 0;
for ( int i = 0; i < mSamples; i++, xPos += mHorizontalScale ) { for ( int i = 0; i < mSamples; i++, xPos += mHorizontalScale ) {
double bias = -minValue; double bias = -minValue;
QValueList<QColor>::Iterator col; TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin(); col = mBeamColor.begin();
double sum = 0.0; double sum = 0.0;
for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) { for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) {
@ -604,7 +604,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
int x1 = w - ( ( mSamples + 1 ) * mHorizontalScale ); int x1 = w - ( ( mSamples + 1 ) * mHorizontalScale );
for ( int i = 0; i < mSamples; i++ ) { for ( int i = 0; i < mSamples; i++ ) {
QValueList<QColor>::Iterator col; TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin(); col = mBeamColor.begin();
double sum = 0.0; double sum = 0.0;
int y = top + h - 2; int y = top + h - 2;
@ -630,10 +630,10 @@ void SignalPlotter::paintEvent( QPaintEvent* )
/* If the line is longer than 2 pixels we draw only the last /* If the line is longer than 2 pixels we draw only the last
* 2 pixels with the bright color. The rest is painted with * 2 pixels with the bright color. The rest is painted with
* a 50% darker color. */ * a 50% darker color. */
QPen lastPen = QPen( p.pen() ); TQPen lastPen = TQPen( p.pen() );
p.setPen( (*col).dark( 150 ) ); p.setPen( (*col).dark( 150 ) );
p.setBrush( (*col).dark( 150 ) ); p.setBrush( (*col).dark( 150 ) );
QPointArray pa( 4 ); TQPointArray pa( 4 );
int prevY = ( i == 0 ) ? y : prevVals[ j ]; int prevY = ( i == 0 ) ? y : prevVals[ j ];
pa.putPoints( 0, 1, x1, prevY ); pa.putPoints( 0, 1, x1, prevY );
pa.putPoints( 1, 1, x2, y ); pa.putPoints( 1, 1, x2, y );
@ -680,21 +680,21 @@ void SignalPlotter::paintEvent( QPaintEvent* )
* when width is greater than 60 */ * when width is greater than 60 */
if ( mShowHorizontalLines && h > ( 10 * ( mHorizontalLinesCount + 1 ) ) ) { if ( mShowHorizontalLines && h > ( 10 * ( mHorizontalLinesCount + 1 ) ) ) {
p.setPen( mHorizontalLinesColor ); p.setPen( mHorizontalLinesColor );
p.setFont( QFont( p.font().family(), mFontSize ) ); p.setFont( TQFont( p.font().family(), mFontSize ) );
QString val; TQString val;
for ( uint y = 1; y < mHorizontalLinesCount; y++ ) { for ( uint y = 1; y < mHorizontalLinesCount; y++ ) {
p.drawLine( 0, top + y * ( h / mHorizontalLinesCount ), w - 2, p.drawLine( 0, top + y * ( h / mHorizontalLinesCount ), w - 2,
top + y * ( h / mHorizontalLinesCount ) ); top + y * ( h / mHorizontalLinesCount ) );
if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 ) if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 )
&& w > 60 ) { && w > 60 ) {
val = QString( "%1" ).arg( maxValue - y * ( range / mHorizontalLinesCount ) ); val = TQString( "%1" ).tqarg( maxValue - y * ( range / mHorizontalLinesCount ) );
p.drawText( 6, top + y * ( h / mHorizontalLinesCount ) - 1, val ); p.drawText( 6, top + y * ( h / mHorizontalLinesCount ) - 1, val );
} }
} }
if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 ) if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 )
&& w > 60 ) { && w > 60 ) {
val = QString( "%1" ).arg( minValue ); val = TQString( "%1" ).tqarg( minValue );
p.drawText( 6, top + h - 2, val ); p.drawText( 6, top + h - 2, val );
} }
} }

@ -25,23 +25,24 @@
#ifndef KSG_SIGNALPLOTTER_H #ifndef KSG_SIGNALPLOTTER_H
#define KSG_SIGNALPLOTTER_H #define KSG_SIGNALPLOTTER_H
#include <qpoint.h> #include <tqpoint.h>
#include <qdialog.h> #include <tqdialog.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qstring.h> #include <tqstring.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#define GRAPH_POLYGON 0 #define GRAPH_POLYGON 0
#define GRAPH_ORIGINAL 1 #define GRAPH_ORIGINAL 1
class QColor; class TQColor;
class SignalPlotter : public QDialog class SignalPlotter : public TQDialog
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SignalPlotter( QWidget *parent = 0, const char *name = 0 ); SignalPlotter( TQWidget *tqparent = 0, const char *name = 0 );
~SignalPlotter(); ~SignalPlotter();
/** /**
@ -50,17 +51,17 @@ class SignalPlotter : public QDialog
void hide(); void hide();
void show(); void show();
bool addBeam( const QColor &color ); bool addBeam( const TQColor &color );
void addSample( const QValueList<double> &samples ); void addSample( const TQValueList<double> &samples );
void removeBeam( uint pos ); void removeBeam( uint pos );
void changeRange( int beam, double min, double max ); void changeRange( int beam, double min, double max );
QValueList<QColor> &beamColors(); TQValueList<TQColor> &beamColors();
void setTitle( const QString &title ); void setTitle( const TQString &title );
QString title() const; TQString title() const;
void setUseAutoRange( bool value ); void setUseAutoRange( bool value );
bool useAutoRange() const; bool useAutoRange() const;
@ -80,8 +81,8 @@ class SignalPlotter : public QDialog
void setShowVerticalLines( bool value ); void setShowVerticalLines( bool value );
bool showVerticalLines() const; bool showVerticalLines() const;
void setVerticalLinesColor( const QColor &color ); void setVerticalLinesColor( const TQColor &color );
QColor verticalLinesColor() const; TQColor verticalLinesColor() const;
void setVerticalLinesDistance( int distance ); void setVerticalLinesDistance( int distance );
int verticalLinesDistance() const; int verticalLinesDistance() const;
@ -92,8 +93,8 @@ class SignalPlotter : public QDialog
void setShowHorizontalLines( bool value ); void setShowHorizontalLines( bool value );
bool showHorizontalLines() const; bool showHorizontalLines() const;
void setHorizontalLinesColor( const QColor &color ); void setHorizontalLinesColor( const TQColor &color );
QColor horizontalLinesColor() const; TQColor horizontalLinesColor() const;
void setHorizontalLinesCount( int count ); void setHorizontalLinesCount( int count );
int horizontalLinesCount() const; int horizontalLinesCount() const;
@ -107,17 +108,17 @@ class SignalPlotter : public QDialog
void setFontSize( int size ); void setFontSize( int size );
int fontSize() const; int fontSize() const;
void setBackgroundColor( const QColor &color ); void setBackgroundColor( const TQColor &color );
QColor backgroundColor() const; TQColor backgroundColor() const;
protected: protected:
void updateDataBuffers(); void updateDataBuffers();
virtual void resizeEvent( QResizeEvent* ); virtual void resizeEvent( TQResizeEvent* );
virtual void paintEvent( QPaintEvent* ); virtual void paintEvent( TQPaintEvent* );
private: private:
QPoint mPos; TQPoint mPos;
bool mPosInitialized; bool mPosInitialized;
double mMinValue; double mMinValue;
@ -127,34 +128,34 @@ class SignalPlotter : public QDialog
uint mGraphStyle; uint mGraphStyle;
bool mShowVerticalLines; bool mShowVerticalLines;
QColor mVerticalLinesColor; TQColor mVerticalLinesColor;
uint mVerticalLinesDistance; uint mVerticalLinesDistance;
bool mVerticalLinesScroll; bool mVerticalLinesScroll;
uint mVerticalLinesOffset; uint mVerticalLinesOffset;
uint mHorizontalScale; uint mHorizontalScale;
bool mShowHorizontalLines; bool mShowHorizontalLines;
QColor mHorizontalLinesColor; TQColor mHorizontalLinesColor;
uint mHorizontalLinesCount; uint mHorizontalLinesCount;
bool mShowLabels; bool mShowLabels;
bool mShowTopBar; bool mShowTopBar;
uint mFontSize; uint mFontSize;
QColor mBackgroundColor; TQColor mBackgroundColor;
QPtrList<double> mBeamData; TQPtrList<double> mBeamData;
QValueList<QColor> mBeamColor; TQValueList<TQColor> mBeamColor;
int mSamples; int mSamples;
/** /**
* The name of the interface. * The name of the interface.
* Needed to store the geometry of the plotter in the right * Needed to store the tqgeometry of the plotter in the right
* group of the config file. * group of the config file.
*/ */
QString mName; TQString mName;
QString mTitle; TQString mTitle;
}; };
#endif #endif

Loading…
Cancel
Save