summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 18:16:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 18:16:06 +0000
commit02a6c8f36311eb6225066df35adf8d00f9cd942b (patch)
treeceb91c373877f7a69209e184c81b53dc6f9402d7 /src
parent09e6e27fe85b2efb28072f1c81f6581fa6837d92 (diff)
downloadknemo-02a6c8f36311eb6225066df35adf8d00f9cd942b.tar.gz
knemo-02a6c8f36311eb6225066df35adf8d00f9cd942b.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/common/data.h14
-rw-r--r--src/kcm/configdialog.cpp444
-rw-r--r--src/kcm/configdialog.h60
-rw-r--r--src/kcm/configdlg.ui198
-rw-r--r--src/knemod/backends/backendbase.cpp4
-rw-r--r--src/knemod/backends/backendbase.h10
-rw-r--r--src/knemod/backends/daemonregistry.h8
-rw-r--r--src/knemod/backends/kcmregistry.h8
-rw-r--r--src/knemod/backends/nettoolsbackend.cpp124
-rw-r--r--src/knemod/backends/nettoolsbackend.h19
-rw-r--r--src/knemod/backends/sysbackend.cpp56
-rw-r--r--src/knemod/backends/sysbackend.h12
-rw-r--r--src/knemod/global.h60
-rw-r--r--src/knemod/interface.cpp120
-rw-r--r--src/knemod/interface.h25
-rw-r--r--src/knemod/interfaceicon.cpp78
-rw-r--r--src/knemod/interfaceicon.h27
-rw-r--r--src/knemod/interfacemonitor.cpp6
-rw-r--r--src/knemod/interfacemonitor.h9
-rw-r--r--src/knemod/interfacestatistics.cpp108
-rw-r--r--src/knemod/interfacestatistics.h15
-rw-r--r--src/knemod/interfacestatisticsdialog.cpp28
-rw-r--r--src/knemod/interfacestatisticsdialog.h7
-rw-r--r--src/knemod/interfacestatisticsdlg.ui30
-rw-r--r--src/knemod/interfacestatusdialog.cpp106
-rw-r--r--src/knemod/interfacestatusdialog.h11
-rw-r--r--src/knemod/interfacestatusdlg.ui242
-rw-r--r--src/knemod/interfacetooltip.cpp84
-rw-r--r--src/knemod/interfacetooltip.h24
-rw-r--r--src/knemod/interfacetray.cpp28
-rw-r--r--src/knemod/interfacetray.h11
-rw-r--r--src/knemod/knemodaemon.cpp62
-rw-r--r--src/knemod/knemodaemon.h33
-rw-r--r--src/knemod/signalplotter.cpp98
-rw-r--r--src/knemod/signalplotter.h61
35 files changed, 1121 insertions, 1109 deletions
diff --git a/src/common/data.h b/src/common/data.h
index e8de9a2..68c82db 100644
--- a/src/common/data.h
+++ b/src/common/data.h
@@ -20,8 +20,8 @@
#ifndef DATA_H
#define DATA_H
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
/**
* This file contains data structures used to store information about
@@ -36,8 +36,8 @@ struct InterfaceCommand
{
int id;
bool runAsRoot;
- QString command;
- QString menuText;
+ TQString command;
+ TQString menuText;
};
struct InterfaceSettings
@@ -59,8 +59,8 @@ struct InterfaceSettings
bool hideWhenNotAvailable;
bool activateStatistics;
bool customCommands;
- QString alias;
- QValueVector<InterfaceCommand> commands;
+ TQString alias;
+ TQValueVector<InterfaceCommand> commands;
};
enum ToolTipEnums
@@ -82,7 +82,7 @@ enum ToolTipEnums
FREQUENCY = 0x00004000,
BIT_RATE = 0x00008000,
ACCESS_POINT = 0x00010000,
- LINK_QUALITY = 0x00020000,
+ LINK_TQUALITY = 0x00020000,
BCAST_ADDRESS = 0x00040000,
GATEWAY = 0x00080000,
DOWNLOAD_SPEED = 0x00100000,
diff --git a/src/kcm/configdialog.cpp b/src/kcm/configdialog.cpp
index 9c5ca9a..dd25b06 100644
--- a/src/kcm/configdialog.cpp
+++ b/src/kcm/configdialog.cpp
@@ -17,21 +17,21 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdict.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcstring.h>
-#include <qlistbox.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qwhatsthis.h>
-#include <qtabwidget.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qdatastream.h>
+#include <tqfile.h>
+#include <tqdict.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcstring.h>
+#include <tqlistbox.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqtabwidget.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqdatastream.h>
#include <kglobal.h>
#include <kconfig.h>
@@ -53,20 +53,20 @@
#include "kcmregistry.h"
#include "configdialog.h"
-const QString ConfigDialog::ICON_DISCONNECTED = "network_disconnected";
-const QString ConfigDialog::ICON_CONNECTED = "network_connected";
-const QString ConfigDialog::ICON_INCOMING = "network_incoming";
-const QString ConfigDialog::ICON_OUTGOING = "network_outgoing";
-const QString ConfigDialog::ICON_TRAFFIC = "network_traffic";
-const QString ConfigDialog::SUFFIX_PPP = "_ppp";
-const QString ConfigDialog::SUFFIX_LAN = "_lan";
-const QString ConfigDialog::SUFFIX_WLAN = "_wlan";
+const TQString ConfigDialog::ICON_DISCONNECTED = "network_disconnected";
+const TQString ConfigDialog::ICON_CONNECTED = "network_connected";
+const TQString ConfigDialog::ICON_INCOMING = "network_incoming";
+const TQString ConfigDialog::ICON_OUTGOING = "network_outgoing";
+const TQString ConfigDialog::ICON_TRAFFIC = "network_traffic";
+const TQString ConfigDialog::SUFFIX_PPP = "_ppp";
+const TQString ConfigDialog::SUFFIX_LAN = "_lan";
+const TQString ConfigDialog::SUFFIX_WLAN = "_wlan";
-typedef KGenericFactory<ConfigDialog, QWidget> KNemoFactory;
+typedef KGenericFactory<ConfigDialog, TQWidget> KNemoFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_knemo, KNemoFactory("kcm_knemo") )
-ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList& )
- : KCModule( KNemoFactory::instance(), parent, name ),
+ConfigDialog::ConfigDialog( TQWidget *tqparent, const char *name, const TQStringList& )
+ : KCModule( KNemoFactory::instance(), tqparent, name ),
mLock( false ),
mDlg( new ConfigDlg( this ) ),
mColorVLines( 0x04FB1D ),
@@ -79,14 +79,14 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList
setupToolTipArray();
// fill the backends combobox
- for ( int i = 0; KCMRegistry[i].name != QString::null; i++ )
+ for ( int i = 0; KCMRegistry[i].name != TQString(); i++ )
{
mDlg->comboBoxBackends->insertItem( KCMRegistry[i].name );
}
load();
- QVBoxLayout* top = new QVBoxLayout(this);
+ TQVBoxLayout* top = new TQVBoxLayout(this);
mDlg->pushButtonNew->setPixmap( SmallIcon( "filenew" ) );
mDlg->pushButtonDelete->setPixmap( SmallIcon( "editdelete" ) );
mDlg->pushButtonAddCommand->setPixmap( SmallIcon( "filenew" ) );
@@ -96,7 +96,7 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList
mDlg->pushButtonAddToolTip->setPixmap( SmallIcon( "1rightarrow" ) );
mDlg->pushButtonRemoveToolTip->setPixmap( SmallIcon( "1leftarrow" ) );
mDlg->listViewCommands->setSorting( -1 );
- QWhatsThis::add( mDlg->listViewCommands,
+ TQWhatsThis::add( mDlg->listViewCommands,
i18n("<p>In this area you can add the custom entries " \
"for your context menu: <ol><li>check <b>Display " \
"custom entries in context menu</b>;</li>" \
@@ -111,94 +111,94 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList
mSettingsDict.setAutoDelete( true );
setButtons( KCModule::Default | KCModule::Apply );
- connect( mDlg->pushButtonNew, SIGNAL( clicked() ),
- this, SLOT( buttonNewSelected() ) );
- connect( mDlg->pushButtonDelete, SIGNAL( clicked() ),
- this, SLOT( buttonDeleteSelected() ) );
- connect( mDlg->pushButtonAddCommand, SIGNAL( clicked() ),
- this, SLOT( buttonAddCommandSelected() ) );
- connect( mDlg->pushButtonRemoveCommand, SIGNAL( clicked() ),
- this, SLOT( buttonRemoveCommandSelected() ) );
- connect( mDlg->pushButtonUp, SIGNAL( clicked() ),
- this, SLOT( buttonCommandUpSelected() ) );
- connect( mDlg->pushButtonDown, SIGNAL( clicked() ),
- this, SLOT( buttonCommandDownSelected() ) );
- connect( mDlg->pushButtonAddToolTip, SIGNAL( clicked() ),
- this, SLOT( buttonAddToolTipSelected() ) );
- connect( mDlg->pushButtonRemoveToolTip, SIGNAL( clicked() ),
- this, SLOT( buttonRemoveToolTipSelected() ) );
- connect( mDlg->pushButtonNotifications, SIGNAL( clicked() ),
- this, SLOT( buttonNotificationsSelected() ) );
- connect( mDlg->pushButtonStatisticsDir, SIGNAL( clicked() ),
- this, SLOT( buttonStatisticsDirSelected() ) );
- connect( mDlg->lineEditAlias, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( aliasChanged( const QString& ) ) );
- connect( mDlg->comboBoxIconSet, SIGNAL( activated( int ) ),
- this, SLOT( iconSetChanged( int ) ) );
- connect( mDlg->comboBoxBackends, SIGNAL( activated( int ) ),
- this, SLOT( backendChanged( int ) ) );
- connect( mDlg->checkBoxNotConnected, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxNotConnectedToggled ( bool ) ) );
- connect( mDlg->checkBoxNotExisting, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxNotExistingToggled ( bool ) ) );
- connect( mDlg->checkBoxStatistics, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxStatisticsToggled ( bool ) ) );
- connect( mDlg->checkBoxStartKNemo, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxStartKNemoToggled( bool ) ) );
- connect( mDlg->spinBoxTrafficThreshold, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxTrafficValueChanged ( int ) ) );
- connect( mDlg->checkBoxCustom, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxCustomToggled ( bool ) ) );
- connect( mDlg->listBoxInterfaces, SIGNAL( highlighted( const QString& ) ),
- this, SLOT( interfaceSelected( const QString& ) ) );
- connect( mDlg->listViewCommands, SIGNAL( selectionChanged() ),
- this, SLOT( listViewCommandsSelectionChanged() ) );
- connect( mDlg->listViewCommands, SIGNAL( itemRenamed( QListViewItem*, int, const QString& ) ),
- this, SLOT( listViewCommandsRenamed( QListViewItem*, int, const QString& ) ) );
+ connect( mDlg->pushButtonNew, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonNewSelected() ) );
+ connect( mDlg->pushButtonDelete, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonDeleteSelected() ) );
+ connect( mDlg->pushButtonAddCommand, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonAddCommandSelected() ) );
+ connect( mDlg->pushButtonRemoveCommand, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonRemoveCommandSelected() ) );
+ connect( mDlg->pushButtonUp, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonCommandUpSelected() ) );
+ connect( mDlg->pushButtonDown, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonCommandDownSelected() ) );
+ connect( mDlg->pushButtonAddToolTip, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonAddToolTipSelected() ) );
+ connect( mDlg->pushButtonRemoveToolTip, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonRemoveToolTipSelected() ) );
+ connect( mDlg->pushButtonNotifications, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonNotificationsSelected() ) );
+ connect( mDlg->pushButtonStatisticsDir, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( buttonStatisticsDirSelected() ) );
+ connect( mDlg->lineEditAlias, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( aliasChanged( const TQString& ) ) );
+ connect( mDlg->comboBoxIconSet, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( iconSetChanged( int ) ) );
+ connect( mDlg->comboBoxBackends, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( backendChanged( int ) ) );
+ connect( mDlg->checkBoxNotConnected, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxNotConnectedToggled ( bool ) ) );
+ connect( mDlg->checkBoxNotExisting, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxNotExistingToggled ( bool ) ) );
+ connect( mDlg->checkBoxStatistics, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxStatisticsToggled ( bool ) ) );
+ connect( mDlg->checkBoxStartKNemo, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxStartKNemoToggled( bool ) ) );
+ connect( mDlg->spinBoxTrafficThreshold, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxTrafficValueChanged ( int ) ) );
+ connect( mDlg->checkBoxCustom, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxCustomToggled ( bool ) ) );
+ connect( mDlg->listBoxInterfaces, TQT_SIGNAL( highlighted( const TQString& ) ),
+ this, TQT_SLOT( interfaceSelected( const TQString& ) ) );
+ connect( mDlg->listViewCommands, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( listViewCommandsSelectionChanged() ) );
+ connect( mDlg->listViewCommands, TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString& ) ),
+ this, TQT_SLOT( listViewCommandsRenamed( TQListViewItem*, int, const TQString& ) ) );
// connect the plotter widgets
- connect( mDlg->checkBoxTopBar, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->checkBoxLabels, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->checkBoxVLines, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->checkBoxHLines, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->checkBoxIncoming, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->checkBoxOutgoing, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->checkBoxVLinesScroll, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->checkBoxAutoDetection, SIGNAL( toggled( bool ) ),
- this, SLOT( checkBoxToggled( bool ) ) );
- connect( mDlg->spinBoxCount, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->spinBoxPixel, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->spinBoxDistance, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->spinBoxFontSize, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->spinBoxMinValue, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->spinBoxMaxValue, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->numInputPollInterval, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->numInputSaveInterval, SIGNAL( valueChanged( int ) ),
- this, SLOT( spinBoxValueChanged( int ) ) );
- connect( mDlg->kColorButtonVLines, SIGNAL( changed( const QColor& ) ),
- this, SLOT( kColorButtonChanged( const QColor& ) ) );
- connect( mDlg->kColorButtonHLines, SIGNAL( changed( const QColor& ) ),
- this, SLOT( kColorButtonChanged( const QColor& ) ) );
- connect( mDlg->kColorButtonIncoming, SIGNAL( changed( const QColor& ) ),
- this, SLOT( kColorButtonChanged( const QColor& ) ) );
- connect( mDlg->kColorButtonOutgoing, SIGNAL( changed( const QColor& ) ),
- this, SLOT( kColorButtonChanged( const QColor& ) ) );
- connect( mDlg->kColorButtonBackground, SIGNAL( changed( const QColor& ) ),
- this, SLOT( kColorButtonChanged( const QColor& ) ) );
+ connect( mDlg->checkBoxTopBar, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->checkBoxLabels, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->checkBoxVLines, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->checkBoxHLines, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->checkBoxIncoming, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->checkBoxOutgoing, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->checkBoxVLinesScroll, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->checkBoxAutoDetection, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( checkBoxToggled( bool ) ) );
+ connect( mDlg->spinBoxCount, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->spinBoxPixel, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->spinBoxDistance, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->spinBoxFontSize, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->spinBoxMinValue, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->spinBoxMaxValue, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->numInputPollInterval, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->numInputSaveInterval, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( spinBoxValueChanged( int ) ) );
+ connect( mDlg->kColorButtonVLines, TQT_SIGNAL( changed( const TQColor& ) ),
+ this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) );
+ connect( mDlg->kColorButtonHLines, TQT_SIGNAL( changed( const TQColor& ) ),
+ this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) );
+ connect( mDlg->kColorButtonIncoming, TQT_SIGNAL( changed( const TQColor& ) ),
+ this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) );
+ connect( mDlg->kColorButtonOutgoing, TQT_SIGNAL( changed( const TQColor& ) ),
+ this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) );
+ connect( mDlg->kColorButtonBackground, TQT_SIGNAL( changed( const TQColor& ) ),
+ this, TQT_SLOT( kColorButtonChanged( const TQColor& ) ) );
// No dcop call if KNemo is not activated by the user. Otherwise
// load-on-demand will start KNemo.
@@ -207,22 +207,22 @@ ConfigDialog::ConfigDialog( QWidget *parent, const char *name, const QStringList
// In case the user opened the control center via the context menu
// this call to the daemon will deliver the interface the menu
// belongs to. This way we can preselect the appropriate entry in the list.
- QCString replyType;
- QByteArray replyData, arg;
- QString selectedInterface = QString::null;
+ TQCString replyType;
+ TQByteArray replyData, arg;
+ TQString selectedInterface = TQString();
if ( kapp->dcopClient()->call( "kded", "knemod", "getSelectedInterface()", arg, replyType, replyData ) )
{
- QDataStream reply( replyData, IO_ReadOnly );
+ TQDataStream reply( replyData, IO_ReadOnly );
reply >> selectedInterface;
}
- if ( selectedInterface != QString::null )
+ if ( selectedInterface != TQString() )
{
// Try to preselect the interface.
unsigned int i;
for ( i = 0; i < mDlg->listBoxInterfaces->count(); i++ )
{
- QListBoxItem* item = mDlg->listBoxInterfaces->item( i );
+ TQListBoxItem* item = mDlg->listBoxInterfaces->item( i );
if ( item->text() == selectedInterface )
{
// Found it.
@@ -269,9 +269,9 @@ void ConfigDialog::load()
// select the backend from the config file
bool foundBackend = false;
- QString backend = config->readEntry( "Backend", "Nettools" );
+ TQString backend = config->readEntry( "Backend", "Nettools" );
int i;
- for ( i = 0; KCMRegistry[i].name != QString::null; i++ )
+ for ( i = 0; KCMRegistry[i].name != TQString(); i++ )
{
if ( KCMRegistry[i].name == backend )
{
@@ -287,7 +287,7 @@ void ConfigDialog::load()
mDlg->comboBoxBackends->setCurrentItem( i );
mDlg->textLabelBackendDescription->setText( KCMRegistry[i].description );
- QStrList list;
+ TQStrList list;
int numEntries = config->readListEntry( "Interfaces", list );
if ( numEntries == 0 )
@@ -296,7 +296,7 @@ void ConfigDialog::load()
char* interface;
for ( interface = list.first(); interface; interface = list.next() )
{
- QString group( "Interface_" );
+ TQString group( "Interface_" );
group += interface;
InterfaceSettings* settings = new InterfaceSettings();
if ( config->hasGroup( group ) )
@@ -312,13 +312,13 @@ void ConfigDialog::load()
int numCommands = config->readNumEntry( "NumCommands" );
for ( int i = 0; i < numCommands; i++ )
{
- QString entry;
+ TQString entry;
InterfaceCommand cmd;
- entry = QString( "RunAsRoot%1" ).arg( i + 1 );
+ entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 );
cmd.runAsRoot = config->readBoolEntry( entry );
- entry = QString( "Command%1" ).arg( i + 1 );
+ entry = TQString( "Command%1" ).tqarg( i + 1 );
cmd.command = config->readEntry( entry );
- entry = QString( "MenuText%1" ).arg( i + 1 );
+ entry = TQString( "MenuText%1" ).tqarg( i + 1 );
cmd.menuText = config->readEntry( entry );
settings->commands.append( cmd );
}
@@ -363,8 +363,8 @@ void ConfigDialog::save()
{
KConfig* config = new KConfig( "knemorc", false );
- QStringList list;
- QDictIterator<InterfaceSettings> it( mSettingsDict );
+ TQStringList list;
+ TQDictIterator<InterfaceSettings> it( mSettingsDict );
for ( ; it.current(); ++it )
{
list.append( it.currentKey() );
@@ -383,12 +383,12 @@ void ConfigDialog::save()
config->writeEntry( "NumCommands", settings->commands.size() );
for ( uint i = 0; i < settings->commands.size(); i++ )
{
- QString entry;
- entry = QString( "RunAsRoot%1" ).arg( i + 1 );
+ TQString entry;
+ entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 );
config->writeEntry( entry, settings->commands[i].runAsRoot );
- entry = QString( "Command%1" ).arg( i + 1 );
+ entry = TQString( "Command%1" ).tqarg( i + 1 );
config->writeEntry( entry, settings->commands[i].command );
- entry = QString( "MenuText%1" ).arg( i + 1 );
+ entry = TQString( "MenuText%1" ).tqarg( i + 1 );
config->writeEntry( entry, settings->commands[i].menuText );
}
}
@@ -430,15 +430,15 @@ void ConfigDialog::save()
if ( mDlg->checkBoxStartKNemo->isChecked() )
{
// This call will implicitly start KNemo if it is not yet running.
- kapp->dcopClient()->send( "kded", "knemod", "reparseConfiguration()", "" );
+ kapp->dcopClient()->send( "kded", "knemod", "reparseConfiguration()", TQString("") );
desktop->writeEntry( "X-KDE-Kded-autoload", true );
}
else
{
- QByteArray data;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream arg(data, IO_WriteOnly);
arg << "knemod";
- kapp->dcopClient()->send("kded", "kded", "unloadModule(QCString)", data);
+ kapp->dcopClient()->send("kded", "kded", "unloadModule(TQCString)", data);
desktop->deleteEntry( "X-KDE-Kded-autoload" );
}
desktop->sync();
@@ -448,20 +448,20 @@ void ConfigDialog::save()
void ConfigDialog::defaults()
{
// Default interfaces
- QFile proc( "/proc/net/dev" );
+ TQFile proc( "/proc/net/dev" );
if ( proc.open( IO_ReadOnly ) )
{
mSettingsDict.clear();
mDlg->listBoxInterfaces->clear();
- QString file = proc.readAll();
- QStringList content = QStringList::split( "\n", file );
+ TQString file = proc.readAll();
+ TQStringList content = TQStringList::split( "\n", file );
if ( content.count() > 2 )
{
for ( unsigned int i = 2; i < content.count(); i++ )
{
- QString interface = content[i].simplifyWhiteSpace();
- interface = interface.left( interface.find( ':' ) );
+ TQString interface = content[i].simplifyWhiteSpace();
+ interface = interface.left( interface.tqfind( ':' ) );
if ( interface == "lo" )
continue;
@@ -479,7 +479,7 @@ void ConfigDialog::defaults()
}
else
{
- mDlg->lineEditAlias->setText( QString::null );
+ mDlg->lineEditAlias->setText( TQString() );
mDlg->comboBoxIconSet->setCurrentItem( 0 );
mDlg->checkBoxNotConnected->setChecked( false );
mDlg->checkBoxNotExisting->setChecked( false );
@@ -528,9 +528,9 @@ void ConfigDialog::defaults()
void ConfigDialog::buttonNewSelected()
{
bool ok = false;
- QString ifname = KInputDialog::getText( i18n( "Add new interface" ),
+ TQString ifname = KInputDialog::getText( i18n( "Add new interface" ),
i18n( "Please enter the name of the interface to be monitored.\nIt should be something like 'eth1', 'wlan2' or 'ppp0'." ),
- QString::null,
+ TQString(),
&ok );
if ( ok )
@@ -544,7 +544,7 @@ void ConfigDialog::buttonNewSelected()
void ConfigDialog::buttonDeleteSelected()
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -552,7 +552,7 @@ void ConfigDialog::buttonDeleteSelected()
// TODO: find a better way than blocking signals
mSettingsDict.remove( selected->text() );
mDlg->lineEditAlias->blockSignals( true );
- mDlg->lineEditAlias->setText( QString::null );
+ mDlg->lineEditAlias->setText( TQString() );
mDlg->lineEditAlias->blockSignals( false );
mDlg->comboBoxIconSet->blockSignals( true );
mDlg->comboBoxIconSet->setCurrentItem( 0 );
@@ -575,7 +575,7 @@ void ConfigDialog::buttonDeleteSelected()
void ConfigDialog::buttonAddCommandSelected()
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -583,12 +583,12 @@ void ConfigDialog::buttonAddCommandSelected()
KNemoCheckListItem* item = new KNemoCheckListItem( mDlg->listViewCommands );
item->setRenameEnabled( 1, true );
item->setRenameEnabled( 2, true );
- connect( item, SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ),
- this, SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) );
+ connect( item, TQT_SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ),
+ this, TQT_SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) );
InterfaceSettings* settings = mSettingsDict[selected->text()];
- QValueVector<InterfaceCommand> cmds;
- QListViewItem* i = mDlg->listViewCommands->firstChild();
+ TQValueVector<InterfaceCommand> cmds;
+ TQListViewItem* i = mDlg->listViewCommands->firstChild();
for ( ; i != 0; i = i->nextSibling() )
{
InterfaceCommand cmd;
@@ -604,7 +604,7 @@ void ConfigDialog::buttonAddCommandSelected()
void ConfigDialog::buttonRemoveCommandSelected()
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -612,8 +612,8 @@ void ConfigDialog::buttonRemoveCommandSelected()
delete mDlg->listViewCommands->selectedItem();
InterfaceSettings* settings = mSettingsDict[selected->text()];
- QValueVector<InterfaceCommand> cmds;
- QListViewItem* i = mDlg->listViewCommands->firstChild();
+ TQValueVector<InterfaceCommand> cmds;
+ TQListViewItem* i = mDlg->listViewCommands->firstChild();
for ( ; i != 0; i = i->nextSibling() )
{
InterfaceCommand cmd;
@@ -629,15 +629,15 @@ void ConfigDialog::buttonRemoveCommandSelected()
void ConfigDialog::buttonCommandUpSelected()
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
- QListViewItem* item = mDlg->listViewCommands->selectedItem();
+ TQListViewItem* item = mDlg->listViewCommands->selectedItem();
if ( item )
{
- QListViewItem* previous = item->itemAbove();
+ TQListViewItem* previous = item->itemAbove();
if ( previous )
{
// We can move one up.
@@ -655,8 +655,8 @@ void ConfigDialog::buttonCommandUpSelected()
InterfaceSettings* settings = mSettingsDict[selected->text()];
- QValueVector<InterfaceCommand> cmds;
- QListViewItem* i = mDlg->listViewCommands->firstChild();
+ TQValueVector<InterfaceCommand> cmds;
+ TQListViewItem* i = mDlg->listViewCommands->firstChild();
for ( ; i != 0; i = i->nextSibling() )
{
InterfaceCommand cmd;
@@ -672,15 +672,15 @@ void ConfigDialog::buttonCommandUpSelected()
void ConfigDialog::buttonCommandDownSelected()
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
- QListViewItem* item = mDlg->listViewCommands->selectedItem();
+ TQListViewItem* item = mDlg->listViewCommands->selectedItem();
if ( item )
{
- QListViewItem* next = item->itemBelow();
+ TQListViewItem* next = item->itemBelow();
if ( next )
{
// We can move one down.
@@ -690,8 +690,8 @@ void ConfigDialog::buttonCommandDownSelected()
InterfaceSettings* settings = mSettingsDict[selected->text()];
- QValueVector<InterfaceCommand> cmds;
- QListViewItem* i = mDlg->listViewCommands->firstChild();
+ TQValueVector<InterfaceCommand> cmds;
+ TQListViewItem* i = mDlg->listViewCommands->firstChild();
for ( ; i != 0; i = i->nextSibling() )
{
InterfaceCommand cmd;
@@ -713,14 +713,14 @@ void ConfigDialog::buttonAddToolTipSelected()
if ( !mDlg->listBoxAvailable->isSelected( k ) )
continue;
- QListBoxItem* selected = mDlg->listBoxAvailable->item( k );
+ TQListBoxItem* selected = mDlg->listBoxAvailable->item( k );
if ( selected == 0 )
continue;
// Find the index of the selected item in the tooltip array.
int itemIndex = 0;
- for ( int i = 0; mToolTips[i].first != QString::null; i++ )
+ for ( int i = 0; mToolTips[i].first != TQString(); i++ )
{
if ( mToolTips[i].first == selected->text() )
{
@@ -738,8 +738,8 @@ void ConfigDialog::buttonAddToolTipSelected()
// For every item in the display list find its index in
// the tooltip array.
int siblingIndex = 0;
- QListBoxItem* item = mDlg->listBoxDisplay->item( i );
- for ( int j = 0; mToolTips[j].first != QString::null; j++ )
+ TQListBoxItem* item = mDlg->listBoxDisplay->item( i );
+ for ( int j = 0; mToolTips[j].first != TQString(); j++ )
{
if ( mToolTips[j].first == item->text() )
{
@@ -780,14 +780,14 @@ void ConfigDialog::buttonRemoveToolTipSelected()
if ( !mDlg->listBoxDisplay->isSelected( k ) )
continue;
- QListBoxItem* selected = mDlg->listBoxDisplay->item( k );
+ TQListBoxItem* selected = mDlg->listBoxDisplay->item( k );
if ( selected == 0 )
continue;
// Find the index of the selected item in the tooltip array.
int itemIndex = 0;
- for ( int i = 0; mToolTips[i].first != QString::null; i++ )
+ for ( int i = 0; mToolTips[i].first != TQString(); i++ )
{
if ( mToolTips[i].first == selected->text() )
{
@@ -805,8 +805,8 @@ void ConfigDialog::buttonRemoveToolTipSelected()
// For every item in the available list find its index in
// the tooltip array.
int siblingIndex = 0;
- QListBoxItem* item = mDlg->listBoxAvailable->item( i );
- for ( int j = 0; mToolTips[j].first != QString::null; j++ )
+ TQListBoxItem* item = mDlg->listBoxAvailable->item( i );
+ for ( int j = 0; mToolTips[j].first != TQString(); j++ )
{
if ( mToolTips[j].first == item->text() )
{
@@ -849,14 +849,14 @@ void ConfigDialog::buttonNotificationsSelected()
void ConfigDialog:: buttonStatisticsDirSelected()
{
KURL url = KDirSelectDialog::selectDirectory();
- if ( url.path() != QString::null )
+ if ( url.path() != TQString() )
{
mDlg->lineEditStatisticsDir->setText( url.path() );
changed( true );
}
}
-void ConfigDialog::interfaceSelected( const QString& interface )
+void ConfigDialog::interfaceSelected( const TQString& interface )
{
InterfaceSettings* settings = mSettingsDict[interface];
mLock = true;
@@ -877,17 +877,17 @@ void ConfigDialog::interfaceSelected( const QString& interface )
item->setRenameEnabled( 1, true );
item->setText( 2, settings->commands[i].command );
item->setRenameEnabled( 2, true );
- connect( item, SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ),
- this, SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) );
+ connect( item, TQT_SIGNAL( stateChanged( KNemoCheckListItem*, bool ) ),
+ this, TQT_SLOT( listViewCommandsCheckListItemChanged( KNemoCheckListItem*, bool ) ) );
}
iconSetChanged( settings->iconSet ); // to update iconset preview
mLock = false;
}
-void ConfigDialog::aliasChanged( const QString& text )
+void ConfigDialog::aliasChanged( const TQString& text )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -899,7 +899,7 @@ void ConfigDialog::aliasChanged( const QString& text )
void ConfigDialog::iconSetChanged( int set )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -908,7 +908,7 @@ void ConfigDialog::iconSetChanged( int set )
settings->iconSet = set;
// Update the preview of the iconset.
- QString suffix;
+ TQString suffix;
switch ( set )
{
case NETWORK:
@@ -940,7 +940,7 @@ void ConfigDialog::backendChanged( int backend )
void ConfigDialog::checkBoxNotConnectedToggled( bool on )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -952,7 +952,7 @@ void ConfigDialog::checkBoxNotConnectedToggled( bool on )
void ConfigDialog::checkBoxNotExistingToggled( bool on )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -965,7 +965,7 @@ void ConfigDialog::checkBoxNotExistingToggled( bool on )
void ConfigDialog::checkBoxStatisticsToggled( bool on )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -1001,7 +1001,7 @@ void ConfigDialog::checkBoxStartKNemoToggled( bool on )
void ConfigDialog::spinBoxTrafficValueChanged( int value )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -1013,7 +1013,7 @@ void ConfigDialog::spinBoxTrafficValueChanged( int value )
void ConfigDialog::checkBoxCustomToggled( bool on )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -1034,7 +1034,7 @@ void ConfigDialog::setupToolTipTab()
mDlg->listBoxDisplay->clear();
mDlg->listBoxAvailable->clear();
- for ( int i = 0; mToolTips[i].first != QString::null; i++ )
+ for ( int i = 0; mToolTips[i].first != TQString(); i++ )
{
if ( mToolTipContent & mToolTips[i].second )
mDlg->listBoxDisplay->insertItem( mToolTips[i].first );
@@ -1063,37 +1063,37 @@ void ConfigDialog::setupToolTipArray()
{
// Cannot make this data static as the i18n macro doesn't seem
// to work when called to early i.e. before setting the catalogue.
- mToolTips[0] = QPair<QString, int>( i18n( "Interface" ), INTERFACE );
- mToolTips[1] = QPair<QString, int>( i18n( "Alias" ), ALIAS );
- mToolTips[2] = QPair<QString, int>( i18n( "Status" ), STATUS );
- mToolTips[3] = QPair<QString, int>( i18n( "Uptime" ), UPTIME );
- mToolTips[4] = QPair<QString, int>( i18n( "IP-Address" ), IP_ADDRESS );
- mToolTips[5] = QPair<QString, int>( i18n( "Subnet Mask" ), SUBNET_MASK );
- mToolTips[6] = QPair<QString, int>( i18n( "HW-Address" ), HW_ADDRESS );
- mToolTips[7] = QPair<QString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS );
- mToolTips[8] = QPair<QString, int>( i18n( "Default Gateway" ), GATEWAY );
- mToolTips[9] = QPair<QString, int>( i18n( "PtP-Address" ), PTP_ADDRESS );
- mToolTips[10] = QPair<QString, int>( i18n( "Packets Received" ), RX_PACKETS );
- mToolTips[11] = QPair<QString, int>( i18n( "Packets Sent" ), TX_PACKETS );
- mToolTips[12] = QPair<QString, int>( i18n( "Bytes Received" ), RX_BYTES );
- mToolTips[13] = QPair<QString, int>( i18n( "Bytes Sent" ), TX_BYTES );
- mToolTips[14] = QPair<QString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED );
- mToolTips[15] = QPair<QString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED );
- mToolTips[16] = QPair<QString, int>( i18n( "ESSID" ), ESSID );
- mToolTips[17] = QPair<QString, int>( i18n( "Mode" ), MODE );
- mToolTips[18] = QPair<QString, int>( i18n( "Frequency" ), FREQUENCY );
- mToolTips[19] = QPair<QString, int>( i18n( "Bit Rate" ), BIT_RATE );
- mToolTips[20] = QPair<QString, int>( i18n( "Access Point" ), ACCESS_POINT );
- mToolTips[21] = QPair<QString, int>( i18n( "Link Quality" ), LINK_QUALITY );
- mToolTips[22] = QPair<QString, int>( i18n( "Nickname" ), NICK_NAME );
- mToolTips[23] = QPair<QString, int>( i18n( "Encryption" ), ENCRYPTION );
- mToolTips[24] = QPair<QString, int>();
+ mToolTips[0] = TQPair<TQString, int>( i18n( "Interface" ), INTERFACE );
+ mToolTips[1] = TQPair<TQString, int>( i18n( "Alias" ), ALIAS );
+ mToolTips[2] = TQPair<TQString, int>( i18n( "tqStatus" ), STATUS );
+ mToolTips[3] = TQPair<TQString, int>( i18n( "Uptime" ), UPTIME );
+ mToolTips[4] = TQPair<TQString, int>( i18n( "IP-Address" ), IP_ADDRESS );
+ mToolTips[5] = TQPair<TQString, int>( i18n( "Subnet Mask" ), SUBNET_MASK );
+ mToolTips[6] = TQPair<TQString, int>( i18n( "HW-Address" ), HW_ADDRESS );
+ mToolTips[7] = TQPair<TQString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS );
+ mToolTips[8] = TQPair<TQString, int>( i18n( "Default Gateway" ), GATEWAY );
+ mToolTips[9] = TQPair<TQString, int>( i18n( "PtP-Address" ), PTP_ADDRESS );
+ mToolTips[10] = TQPair<TQString, int>( i18n( "Packets Received" ), RX_PACKETS );
+ mToolTips[11] = TQPair<TQString, int>( i18n( "Packets Sent" ), TX_PACKETS );
+ mToolTips[12] = TQPair<TQString, int>( i18n( "Bytes Received" ), RX_BYTES );
+ mToolTips[13] = TQPair<TQString, int>( i18n( "Bytes Sent" ), TX_BYTES );
+ mToolTips[14] = TQPair<TQString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED );
+ mToolTips[15] = TQPair<TQString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED );
+ mToolTips[16] = TQPair<TQString, int>( i18n( "ESSID" ), ESSID );
+ mToolTips[17] = TQPair<TQString, int>( i18n( "Mode" ), MODE );
+ mToolTips[18] = TQPair<TQString, int>( i18n( "Frequency" ), FREQUENCY );
+ mToolTips[19] = TQPair<TQString, int>( i18n( "Bit Rate" ), BIT_RATE );
+ mToolTips[20] = TQPair<TQString, int>( i18n( "Access Point" ), ACCESS_POINT );
+ mToolTips[21] = TQPair<TQString, int>( i18n( "Link Quality" ), LINK_TQUALITY );
+ mToolTips[22] = TQPair<TQString, int>( i18n( "Nickname" ), NICK_NAME );
+ mToolTips[23] = TQPair<TQString, int>( i18n( "Encryption" ), ENCRYPTION );
+ mToolTips[24] = TQPair<TQString, int>();
}
void ConfigDialog::updateStatisticsEntries( void )
{
bool statisticsActive = false;
- QDictIterator<InterfaceSettings> it( mSettingsDict );
+ TQDictIterator<InterfaceSettings> it( mSettingsDict );
for ( ; it.current(); ++it )
{
if ( it.current()->activateStatistics )
@@ -1117,14 +1117,14 @@ void ConfigDialog::spinBoxValueChanged( int )
changed( true );
}
-void ConfigDialog::kColorButtonChanged( const QColor& )
+void ConfigDialog::kColorButtonChanged( const TQColor& )
{
changed( true );
}
void ConfigDialog::listViewCommandsSelectionChanged()
{
- QListViewItem* item = mDlg->listViewCommands->selectedItem();
+ TQListViewItem* item = mDlg->listViewCommands->selectedItem();
if ( item )
mDlg->pushButtonRemoveCommand->setEnabled( true );
else
@@ -1133,7 +1133,7 @@ void ConfigDialog::listViewCommandsSelectionChanged()
void ConfigDialog::listViewCommandsCheckListItemChanged( KNemoCheckListItem* item, bool state )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -1141,7 +1141,7 @@ void ConfigDialog::listViewCommandsCheckListItemChanged( KNemoCheckListItem* ite
// Find the row of the item.
int row = 0;
bool foundItem = false;
- QListViewItem* i = mDlg->listViewCommands->firstChild();
+ TQListViewItem* i = mDlg->listViewCommands->firstChild();
for ( ; i != 0; i = i->nextSibling() )
{
if ( i == item )
@@ -1162,9 +1162,9 @@ void ConfigDialog::listViewCommandsCheckListItemChanged( KNemoCheckListItem* ite
}
}
-void ConfigDialog::listViewCommandsRenamed( QListViewItem* item, int col, const QString & text )
+void ConfigDialog::listViewCommandsRenamed( TQListViewItem* item, int col, const TQString & text )
{
- QListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
+ TQListBoxItem* selected = mDlg->listBoxInterfaces->selectedItem();
if ( selected == 0 )
return;
@@ -1172,7 +1172,7 @@ void ConfigDialog::listViewCommandsRenamed( QListViewItem* item, int col, const
// Find the row of the item.
int row = 0;
bool foundItem = false;
- QListViewItem* i = mDlg->listViewCommands->firstChild();
+ TQListViewItem* i = mDlg->listViewCommands->firstChild();
for ( ; i != 0; i = i->nextSibling() )
{
if ( i == item )
diff --git a/src/kcm/configdialog.h b/src/kcm/configdialog.h
index a4ff764..63c6a7d 100644
--- a/src/kcm/configdialog.h
+++ b/src/kcm/configdialog.h
@@ -20,16 +20,16 @@
#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H
-#include <qdict.h>
-#include <qpair.h>
-#include <qstring.h>
-#include <qlistview.h>
+#include <tqdict.h>
+#include <tqpair.h>
+#include <tqstring.h>
+#include <tqlistview.h>
#include <kcmodule.h>
#include "data.h"
-class QTimer;
+class TQTimer;
class ConfigDlg;
class KNemoCheckListItem;
@@ -46,11 +46,12 @@ class KNemoCheckListItem;
class ConfigDialog : public KCModule
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- ConfigDialog( QWidget *parent, const char *name, const QStringList& );
+ ConfigDialog( TQWidget *tqparent, const char *name, const TQStringList& );
/**
* Default Destructor
@@ -72,8 +73,8 @@ private slots:
void buttonRemoveToolTipSelected();
void buttonNotificationsSelected();
void buttonStatisticsDirSelected();
- void interfaceSelected( const QString& interface );
- void aliasChanged( const QString& text );
+ void interfaceSelected( const TQString& interface );
+ void aliasChanged( const TQString& text );
void iconSetChanged( int set );
void backendChanged( int set );
void checkBoxNotConnectedToggled( bool on );
@@ -84,7 +85,7 @@ private slots:
void checkBoxCustomToggled( bool on );
void listViewCommandsSelectionChanged();
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.
@@ -93,7 +94,7 @@ private slots:
*/
void checkBoxToggled( bool );
void spinBoxValueChanged( int );
- void kColorButtonChanged( const QColor& );
+ void kColorButtonChanged( const TQColor& );
private:
void setupToolTipTab();
@@ -111,30 +112,31 @@ private:
int mToolTipContent;
bool mLock;
ConfigDlg* mDlg;
- QColor mColorVLines;
- QColor mColorHLines;
- QColor mColorIncoming;
- QColor mColorOutgoing;
- QColor mColorBackground;
- QDict<InterfaceSettings> mSettingsDict;
- QPair<QString, int> mToolTips[25];
-
- static const QString ICON_DISCONNECTED;
- static const QString ICON_CONNECTED;
- static const QString ICON_INCOMING;
- static const QString ICON_OUTGOING;
- static const QString ICON_TRAFFIC;
- static const QString SUFFIX_PPP;
- static const QString SUFFIX_LAN;
- static const QString SUFFIX_WLAN;
+ TQColor mColorVLines;
+ TQColor mColorHLines;
+ TQColor mColorIncoming;
+ TQColor mColorOutgoing;
+ TQColor mColorBackground;
+ TQDict<InterfaceSettings> mSettingsDict;
+ TQPair<TQString, int> mToolTips[25];
+
+ static const TQString ICON_DISCONNECTED;
+ static const TQString ICON_CONNECTED;
+ static const TQString ICON_INCOMING;
+ static const TQString ICON_OUTGOING;
+ static const TQString ICON_TRAFFIC;
+ static const TQString SUFFIX_PPP;
+ static const TQString SUFFIX_LAN;
+ static const TQString SUFFIX_WLAN;
};
-class KNemoCheckListItem : public QObject, public QCheckListItem
+class KNemoCheckListItem : public TQObject, public TQCheckListItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- KNemoCheckListItem( QListView* view )
- : QCheckListItem( view, QString::null, QCheckListItem::CheckBox )
+ KNemoCheckListItem( TQListView* view )
+ : TQCheckListItem( view, TQString(), TQCheckListItem::CheckBox )
{}
signals:
diff --git a/src/kcm/configdlg.ui b/src/kcm/configdlg.ui
index 6c578ad..b5c4679 100644
--- a/src/kcm/configdlg.ui
+++ b/src/kcm/configdlg.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigDlg</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigDlg</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxStartKNemo</cstring>
</property>
@@ -24,11 +24,11 @@
<string>Use KNemo to monitor your interfaces</string>
</property>
</widget>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidgetConfiguration</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>interfaces</cstring>
</property>
@@ -39,15 +39,15 @@
<property name="name">
<cstring>unnamed</cstring>
</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">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>pushButtonNew</cstring>
</property>
@@ -58,7 +58,7 @@
<string>Add a new interface</string>
</property>
</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">
<cstring>listBoxInterfaces</cstring>
</property>
@@ -68,7 +68,7 @@ use the names understood by the command 'ifconfig',
for example 'eth0', 'wlan0' or 'ppp0'.</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>pushButtonDelete</cstring>
</property>
@@ -81,7 +81,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="1">
+ <widget class="TQGroupBox" row="1" column="1">
<property name="name">
<cstring>groupBox6</cstring>
</property>
@@ -92,7 +92,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<property name="name">
<cstring>unnamed</cstring>
</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">
<cstring>checkBoxCustom</cstring>
</property>
@@ -100,7 +100,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>&amp;Display custom entries in context menu</string>
</property>
</widget>
- <widget class="QListView" row="1" column="0">
+ <widget class="TQListView" row="1" column="0">
<column>
<property name="text">
<string>Root</string>
@@ -144,15 +144,15 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<enum>LastColumn</enum>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pushButtonAddCommand</cstring>
</property>
@@ -169,7 +169,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>Add a new entry</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pushButtonRemoveCommand</cstring>
</property>
@@ -196,14 +196,14 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>61</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pushButtonUp</cstring>
</property>
@@ -214,7 +214,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>Move the selected entry up</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pushButtonDown</cstring>
</property>
@@ -229,7 +229,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="0" column="1">
+ <widget class="TQGroupBox" row="0" column="1">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -240,15 +240,15 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -256,7 +256,7 @@ for example 'eth0', 'wlan0' or 'ppp0'.</string>
<string>Alias:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>lineEditAlias</cstring>
</property>
@@ -269,7 +269,7 @@ icons.</string>
</widget>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxNotConnected</cstring>
</property>
@@ -282,9 +282,9 @@ hidden when the interface is not connected.
When reconnected the icon will be shown again.</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
@@ -300,14 +300,14 @@ When reconnected the icon will be shown again.</string>
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxNotExisting</cstring>
</property>
@@ -324,7 +324,7 @@ of bluetooth adaptors.</string>
</widget>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxStatistics</cstring>
</property>
@@ -332,15 +332,15 @@ of bluetooth adaptors.</string>
<string>Activate statistics</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7_2</cstring>
+ <cstring>tqlayout7_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_2</cstring>
</property>
@@ -369,15 +369,15 @@ of bluetooth adaptors.</string>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -393,7 +393,7 @@ of bluetooth adaptors.</string>
<string>Iconset:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Monitor</string>
@@ -418,27 +418,27 @@ of bluetooth adaptors.</string>
<cstring>comboBoxIconSet</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapDisconnected</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapConnected</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapIncoming</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapOutgoing</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pixmapTraffic</cstring>
</property>
@@ -449,7 +449,7 @@ of bluetooth adaptors.</string>
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tooltip</cstring>
</property>
@@ -460,7 +460,7 @@ of bluetooth adaptors.</string>
<property name="name">
<cstring>unnamed</cstring>
</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">
<cstring>textLabel3</cstring>
</property>
@@ -479,14 +479,14 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>129</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>pushButtonRemoveToolTip</cstring>
</property>
@@ -507,14 +507,14 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>130</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="2" column="2">
+ <widget class="TQPushButton" row="2" column="2">
<property name="name">
<cstring>pushButtonAddToolTip</cstring>
</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>
</property>
</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">
<cstring>listBoxAvailable</cstring>
</property>
@@ -533,7 +533,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<enum>Extended</enum>
</property>
</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">
<cstring>listBoxDisplay</cstring>
</property>
@@ -541,7 +541,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<enum>Extended</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="3">
+ <widget class="TQLabel" row="0" column="3">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
@@ -557,7 +557,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Display:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -575,7 +575,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>misc</cstring>
</property>
@@ -586,7 +586,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox6_2</cstring>
</property>
@@ -597,7 +597,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pushButtonNotifications</cstring>
</property>
@@ -607,7 +607,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBoxUpdateInterval</cstring>
</property>
@@ -618,7 +618,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -636,7 +636,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>60</width>
<height>21</height>
@@ -659,7 +659,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</hbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBoxStatistics</cstring>
</property>
@@ -670,7 +670,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="2" column="3">
+ <widget class="TQPushButton" row="2" column="3">
<property name="name">
<cstring>pushButtonStatisticsDir</cstring>
</property>
@@ -678,7 +678,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>...</string>
</property>
</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">
<cstring>textLabel1_5</cstring>
</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>
</property>
</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">
<cstring>lineEditStatisticsDir</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_6</cstring>
</property>
@@ -709,7 +709,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>131</width>
<height>21</height>
@@ -729,7 +729,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox11_2</cstring>
</property>
@@ -740,7 +740,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</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">
<cstring>textLabel1_7</cstring>
</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>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -763,22 +763,22 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="text">
<string>Description:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</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">
<cstring>textLabelBackendDescription</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
- <widget class="QComboBox" row="0" column="3">
+ <widget class="TQComboBox" row="0" column="3">
<property name="name">
<cstring>comboBoxBackends</cstring>
</property>
@@ -793,7 +793,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>100</width>
<height>21</height>
@@ -812,7 +812,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>30</height>
@@ -821,7 +821,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>trafficplotter</cstring>
</property>
@@ -832,7 +832,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</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">
<cstring>groupBox7</cstring>
</property>
@@ -854,7 +854,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel8_2</cstring>
</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>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>textLabel9_2_2</cstring>
</property>
@@ -884,7 +884,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>1</number>
</property>
</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">
<cstring>checkBoxAutoDetection</cstring>
</property>
@@ -900,7 +900,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>49999</number>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel9_3</cstring>
</property>
@@ -913,7 +913,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="2" column="1">
+ <widget class="TQGroupBox" row="2" column="1">
<property name="name">
<cstring>groupBox9</cstring>
</property>
@@ -924,7 +924,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>checkBoxLabels</cstring>
</property>
@@ -932,7 +932,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>&amp;Labels</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>checkBoxTopBar</cstring>
</property>
@@ -940,7 +940,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Top &amp;bar</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -967,7 +967,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>groupBox8</cstring>
</property>
@@ -992,7 +992,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>30</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>textLabel1_2_2</cstring>
</property>
@@ -1003,7 +1003,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<cstring>spinBoxDistance</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>checkBoxVLines</cstring>
</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>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>checkBoxVLinesScroll</cstring>
</property>
@@ -1033,7 +1033,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<number>5</number>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>textLabel2_4</cstring>
</property>
@@ -1044,7 +1044,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<cstring>spinBoxCount</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>checkBoxHLines</cstring>
</property>
@@ -1054,7 +1054,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</grid>
</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">
<cstring>groupBox10</cstring>
</property>
@@ -1065,7 +1065,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4_2</cstring>
</property>
@@ -1097,7 +1097,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string></string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel6_2</cstring>
</property>
@@ -1113,7 +1113,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string></string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel5_2</cstring>
</property>
@@ -1121,7 +1121,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Horizontal lines:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>textLabel7_2_2</cstring>
</property>
@@ -1129,7 +1129,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<string>Outgoing traffic:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel7_3</cstring>
</property>
@@ -1147,7 +1147,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
</widget>
</grid>
</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">
<cstring>groupBox15</cstring>
</property>
@@ -1158,7 +1158,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxIncoming</cstring>
</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>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxOutgoing</cstring>
</property>
@@ -1282,7 +1282,7 @@ of wireless devices not in the tooltips of standard interfaces.&lt;/b&gt;</strin
<tabstop>pushButtonRemoveToolTip</tabstop>
<tabstop>pushButtonAddToolTip</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/src/knemod/backends/backendbase.cpp b/src/knemod/backends/backendbase.cpp
index 82da372..a097ff4 100644
--- a/src/knemod/backends/backendbase.cpp
+++ b/src/knemod/backends/backendbase.cpp
@@ -19,7 +19,7 @@
#include "backendbase.h"
-BackendBase::BackendBase( QDict<Interface>& interfaces )
+BackendBase::BackendBase( TQDict<Interface>& interfaces )
: mInterfaces( interfaces )
{
}
@@ -30,7 +30,7 @@ BackendBase::~BackendBase()
void BackendBase::updateComplete()
{
- QDictIterator<Interface> ifIt( mInterfaces );
+ TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt )
{
ifIt.current()->activateMonitor();
diff --git a/src/knemod/backends/backendbase.h b/src/knemod/backends/backendbase.h
index 183e40a..06fbb4d 100644
--- a/src/knemod/backends/backendbase.h
+++ b/src/knemod/backends/backendbase.h
@@ -20,8 +20,8 @@
#ifndef BACKENDBASE_H
#define BACKENDBASE_H
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -39,7 +39,7 @@
class BackendBase
{
public:
- BackendBase( QDict<Interface>& interfaces );
+ BackendBase( TQDict<Interface>& interfaces );
virtual ~BackendBase();
/**
@@ -50,7 +50,7 @@ public:
/**
* This function is called from KNemo whenever the
* backend shall update the information of the
- * interfaces in the QDict.
+ * interfaces in the TQDict.
*/
virtual void update() = 0;
@@ -62,7 +62,7 @@ protected:
*/
void updateComplete();
- const QDict<Interface>& mInterfaces;
+ const TQDict<Interface>& mInterfaces;
};
#endif // BACKENDBASE_H
diff --git a/src/knemod/backends/daemonregistry.h b/src/knemod/backends/daemonregistry.h
index ba4638d..7e811f5 100644
--- a/src/knemod/backends/daemonregistry.h
+++ b/src/knemod/backends/daemonregistry.h
@@ -20,7 +20,7 @@
#ifndef DAEMONREGISTRY_H
#define DAEMONREGISTRY_H
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -40,15 +40,15 @@
struct DaemonRegistryEntry
{
- QString name;
- BackendBase* (*function) ( QDict<Interface>& );
+ TQString name;
+ BackendBase* (*function) ( TQDict<Interface>& );
};
DaemonRegistryEntry DaemonRegistry[] =
{
{ "Nettools", NetToolsBackend::createInstance },
{ "Sys", SysBackend::createInstance },
- { QString::null, 0 }
+ { TQString(), 0 }
};
#endif // DAEMONREGISTRY_H
diff --git a/src/knemod/backends/kcmregistry.h b/src/knemod/backends/kcmregistry.h
index 23820ac..08efe4a 100644
--- a/src/knemod/backends/kcmregistry.h
+++ b/src/knemod/backends/kcmregistry.h
@@ -20,7 +20,7 @@
#ifndef KCMREGISTRY_H
#define KCMREGISTRY_H
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
struct KCMRegistryEntry
{
- QString name;
- QString description;
+ TQString name;
+ TQString description;
};
KCMRegistryEntry KCMRegistry[] =
@@ -55,7 +55,7 @@ KCMRegistryEntry KCMRegistry[] =
"As an advantage this backend should reduce the CPU load " \
"and should not access the harddisc while gathering " \
"information." ) },
- { QString::null, QString::null }
+ { TQString(), TQString() }
};
#endif // KCMREGISTRY_H
diff --git a/src/knemod/backends/nettoolsbackend.cpp b/src/knemod/backends/nettoolsbackend.cpp
index dca42e1..c89d47c 100644
--- a/src/knemod/backends/nettoolsbackend.cpp
+++ b/src/knemod/backends/nettoolsbackend.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qmap.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -29,8 +29,8 @@
#include "config.h"
-NetToolsBackend::NetToolsBackend( QDict<Interface>& interfaces )
- : QObject(),
+NetToolsBackend::NetToolsBackend( TQDict<Interface>& interfaces )
+ : TQObject(),
BackendBase( interfaces ),
mRouteProcess(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 );
}
@@ -66,15 +66,15 @@ void NetToolsBackend::update()
{
if ( !mIfconfigProcess )
{
- mIfconfigStdout = QString::null;
+ mIfconfigStdout = TQString();
mIfconfigProcess = new KProcess();
mIfconfigProcess->setEnvironment( "LANG", "C" );
mIfconfigProcess->setEnvironment( "LC_ALL", "C" );
*mIfconfigProcess << PATH_IFCONFIG << "-a";
- connect( mIfconfigProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT( ifconfigProcessStdout( KProcess*, char*, int ) ) );
- connect( mIfconfigProcess, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( ifconfigProcessExited( KProcess* ) ) );
+ connect( mIfconfigProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT( ifconfigProcessStdout( KProcess*, char*, int ) ) );
+ connect( mIfconfigProcess, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( ifconfigProcessExited( KProcess* ) ) );
if ( !mIfconfigProcess->start( KProcess::NotifyOnExit, KProcess::Stdout ) )
{
@@ -86,17 +86,17 @@ void NetToolsBackend::update()
#ifdef PATH_IWCONFIG
if ( !mIwconfigProcess )
{
- mIwconfigStdout = QString::null;
+ mIwconfigStdout = TQString();
mIwconfigProcess = new KProcess();
mIwconfigProcess->setEnvironment( "LANG", "C" );
mIwconfigProcess->setEnvironment( "LC_ALL", "C" );
*mIwconfigProcess << PATH_IWCONFIG;
- connect( mIwconfigProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) );
- connect( mIwconfigProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) );
- connect( mIwconfigProcess, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( iwconfigProcessExited( KProcess* ) ) );
+ connect( mIwconfigProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) );
+ connect( mIwconfigProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT( iwconfigProcessStdout( KProcess*, char*, int ) ) );
+ connect( mIwconfigProcess, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( iwconfigProcessExited( KProcess* ) ) );
if ( !mIwconfigProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -109,17 +109,17 @@ void NetToolsBackend::update()
#ifdef PATH_ROUTE
if ( !mRouteProcess )
{
- mRouteStdout = QString::null;
+ mRouteStdout = TQString();
mRouteProcess = new KProcess();
mRouteProcess->setEnvironment( "LANG", "C" );
mRouteProcess->setEnvironment( "LC_ALL", "C" );
*mRouteProcess << PATH_ROUTE << "-n";
- connect( mRouteProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- this, SLOT( routeProcessStdout( KProcess*, char*, int ) ) );
- connect( mRouteProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- this, SLOT( routeProcessStdout( KProcess*, char*, int ) ) );
- connect( mRouteProcess, SIGNAL( processExited( KProcess* ) ),
- this, SLOT( routeProcessExited( KProcess* ) ) );
+ connect( mRouteProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ this, TQT_SLOT( routeProcessStdout( KProcess*, char*, int ) ) );
+ connect( mRouteProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ this, TQT_SLOT( routeProcessStdout( KProcess*, char*, int ) ) );
+ connect( mRouteProcess, TQT_SIGNAL( processExited( KProcess* ) ),
+ this, TQT_SLOT( routeProcessExited( KProcess* ) ) );
if ( !mRouteProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
{
@@ -142,7 +142,7 @@ void NetToolsBackend::routeProcessExited( KProcess* process )
void NetToolsBackend::routeProcessStdout( KProcess*, char* buffer, int buflen )
{
- mRouteStdout += QString::fromLatin1( buffer, buflen );
+ mRouteStdout += TQString::tqfromLatin1( buffer, buflen );
}
void NetToolsBackend::ifconfigProcessExited( KProcess* process )
@@ -157,7 +157,7 @@ void NetToolsBackend::ifconfigProcessExited( KProcess* process )
void NetToolsBackend::ifconfigProcessStdout( KProcess*, char* buffer, int buflen )
{
- mIfconfigStdout += QString::fromLatin1( buffer, buflen );
+ mIfconfigStdout += TQString::tqfromLatin1( buffer, buflen );
}
void NetToolsBackend::iwconfigProcessExited( KProcess* process )
@@ -172,7 +172,7 @@ void NetToolsBackend::iwconfigProcessExited( KProcess* process )
void NetToolsBackend::iwconfigProcessStdout( KProcess*, char* buffer, int buflen )
{
- mIwconfigStdout += QString::fromLatin1( buffer, buflen );
+ mIwconfigStdout += TQString::tqfromLatin1( buffer, buflen );
}
void NetToolsBackend::parseIfconfigOutput()
@@ -180,15 +180,15 @@ void NetToolsBackend::parseIfconfigOutput()
/* mIfconfigStdout contains the complete output of 'ifconfig' which we
* are going to parse here.
*/
- QMap<QString, QString> configs;
- QStringList ifList = QStringList::split( "\n\n", mIfconfigStdout );
- QStringList::Iterator it;
+ TQMap<TQString, TQString> configs;
+ TQStringList ifList = TQStringList::split( "\n\n", mIfconfigStdout );
+ TQStringList::Iterator it;
for ( it = ifList.begin(); it != ifList.end(); ++it )
{
- int index = ( *it ).find( ' ' );
+ int index = ( *it ).tqfind( ' ' );
if ( index == -1 )
continue;
- QString key = ( *it ).left( index );
+ TQString key = ( *it ).left( index );
configs[key] = ( *it ).mid( index );
}
@@ -197,13 +197,13 @@ void NetToolsBackend::parseIfconfigOutput()
* we update its data, otherwise we mark it as
* 'not existing'.
*/
- QDictIterator<Interface> ifIt( mInterfaces );
+ TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt )
{
- QString key = ifIt.currentKey();
+ TQString key = ifIt.currentKey();
Interface* interface = ifIt.current();
- if ( configs.find( key ) == configs.end() )
+ if ( configs.tqfind( key ) == configs.end() )
{
// The interface does not exist. Meaning the driver
// isn't loaded and/or the interface has not been created.
@@ -211,8 +211,8 @@ void NetToolsBackend::parseIfconfigOutput()
interface->getData().available = false;
}
// JJ 2005-07-18: use RUNNING instead of UP to detect whether interface is connected
- else if ( !configs[key].contains( "inet " ) ||
- !configs[key].contains( "RUNNING" ) )
+ else if ( !configs[key].tqcontains( "inet " ) ||
+ !configs[key].tqcontains( "RUNNING" ) )
{
// The interface is up or has an IP assigned but not both
interface->getData().existing = true;
@@ -221,7 +221,7 @@ void NetToolsBackend::parseIfconfigOutput()
else
{
// ...determine the type of the interface
- if ( configs[key].contains( "Ethernet" ) )
+ if ( configs[key].tqcontains( "Ethernet" ) )
interface->setType( Interface::ETHERNET );
else
interface->setType( Interface::PPP );
@@ -235,9 +235,9 @@ void NetToolsBackend::parseIfconfigOutput()
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 )
data.rxPackets = regExp.cap( 1 ).toULong();
@@ -345,15 +345,15 @@ void NetToolsBackend::parseIwconfigOutput()
/* mIwconfigStdout contains the complete output of 'iwconfig' which we
* are going to parse here.
*/
- QMap<QString, QString> configs;
- QStringList ifList = QStringList::split( "\n\n", mIwconfigStdout );
- QStringList::Iterator it;
+ TQMap<TQString, TQString> configs;
+ TQStringList ifList = TQStringList::split( "\n\n", mIwconfigStdout );
+ TQStringList::Iterator it;
for ( it = ifList.begin(); it != ifList.end(); ++it )
{
- int index = ( *it ).find( ' ' );
+ int index = ( *it ).tqfind( ' ' );
if ( index == -1 )
continue;
- QString key = ( *it ).left( index );
+ TQString key = ( *it ).left( index );
configs[key] = ( *it ).mid( index );
}
@@ -361,18 +361,18 @@ void NetToolsBackend::parseIwconfigOutput()
* If we find the interface in the output of 'iwconfig'
* we update its data.
*/
- QDictIterator<Interface> ifIt( mInterfaces );
+ TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt )
{
- QString key = ifIt.currentKey();
+ TQString key = ifIt.currentKey();
Interface* interface = ifIt.current();
- if ( configs.find( key ) == configs.end() )
+ if ( configs.tqfind( key ) == configs.end() )
{
// The interface was not found.
continue;
}
- else if ( configs[key].contains( "no wireless extensions" ) )
+ else if ( configs[key].tqcontains( "no wireless extensions" ) )
{
// The interface isn't a wireless device.
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 )
data.essid = regExp.cap( 1 );
else
@@ -397,7 +397,7 @@ void NetToolsBackend::updateWirelessData( QString& config, WirelessData& data )
if ( regExp.search( config ) > -1 )
data.essid = regExp.cap( 1 );
else
- data.essid = QString::null;
+ data.essid = TQString();
}
regExp.setPattern( "Mode:(\\w*)" );
@@ -460,12 +460,12 @@ void NetToolsBackend::parseRouteOutput()
/* mRouteStdout contains the complete output of 'route' which we
* are going to parse here.
*/
- QMap<QString, QStringList> configs;
- QStringList routeList = QStringList::split( "\n", mRouteStdout );
- QStringList::Iterator it;
+ TQMap<TQString, TQStringList> configs;
+ TQStringList routeList = TQStringList::split( "\n", mRouteStdout );
+ TQStringList::Iterator 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
continue;
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
* the data of the interface.
*/
- QDictIterator<Interface> ifIt( mInterfaces );
+ TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt )
{
- QString key = ifIt.currentKey();
+ TQString key = ifIt.currentKey();
Interface* interface = ifIt.current();
- if ( configs.find( key ) != configs.end() )
+ if ( configs.tqfind( key ) != configs.end() )
{
// Update the default gateway.
- QStringList routeParameter = configs[key];
+ TQStringList routeParameter = configs[key];
interface->getData().defaultGateway = routeParameter[1];
}
else
{
// Reset the default gateway.
- interface->getData().defaultGateway = QString::null;
+ interface->getData().defaultGateway = TQString();
}
}
}
diff --git a/src/knemod/backends/nettoolsbackend.h b/src/knemod/backends/nettoolsbackend.h
index 788938c..f457208 100644
--- a/src/knemod/backends/nettoolsbackend.h
+++ b/src/knemod/backends/nettoolsbackend.h
@@ -20,7 +20,7 @@
#ifndef NETTOOLSBACKEND_H
#define NETTOOLSBACKEND_H
-#include <qobject.h>
+#include <tqobject.h>
#include "backendbase.h"
@@ -35,14 +35,15 @@ class KProcess;
* @author Percy Leonhardt <percy@eris23.de>
*/
-class NetToolsBackend : public QObject, BackendBase
+class NetToolsBackend : public TQObject, BackendBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NetToolsBackend(QDict<Interface>& interfaces );
+ NetToolsBackend(TQDict<Interface>& interfaces );
virtual ~NetToolsBackend();
- static BackendBase* createInstance( QDict<Interface>& interfaces );
+ static BackendBase* createInstance( TQDict<Interface>& interfaces );
void update();
@@ -57,13 +58,13 @@ private slots:
private:
void parseRouteOutput();
void parseIfconfigOutput();
- void updateInterfaceData( QString& config, InterfaceData& data, int type );
+ void updateInterfaceData( TQString& config, InterfaceData& data, int type );
void parseIwconfigOutput();
- void updateWirelessData( QString& config, WirelessData& data );
+ void updateWirelessData( TQString& config, WirelessData& data );
- QString mRouteStdout;
- QString mIfconfigStdout;
- QString mIwconfigStdout;
+ TQString mRouteStdout;
+ TQString mIfconfigStdout;
+ TQString mIwconfigStdout;
KProcess* mRouteProcess;
KProcess* mIfconfigProcess;
KProcess* mIwconfigProcess;
diff --git a/src/knemod/backends/sysbackend.cpp b/src/knemod/backends/sysbackend.cpp
index e0162ad..3ad48ea 100644
--- a/src/knemod/backends/sysbackend.cpp
+++ b/src/knemod/backends/sysbackend.cpp
@@ -24,10 +24,10 @@
#include <sys/socket.h>
#include <netinet/in.h>
-#include <qmap.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -51,7 +51,7 @@
#define SYSPATH "/sys/class/net/"
#define PROCROUTE "/proc/net/route"
-SysBackend::SysBackend( QDict<Interface>& interfaces )
+SysBackend::SysBackend( TQDict<Interface>& 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 );
}
void SysBackend::update()
{
- QDir dir( SYSPATH );
- QStringList ifList = dir.entryList( QDir::Dirs );
+ TQDir dir( SYSPATH );
+ TQStringList ifList = dir.entryList( TQDir::Dirs );
- QDictIterator<Interface> ifIt( mInterfaces );
+ TQDictIterator<Interface> ifIt( mInterfaces );
for ( ; ifIt.current(); ++ifIt )
{
- QString key = ifIt.currentKey();
+ TQString key = ifIt.currentKey();
Interface* interface = ifIt.current();
- if ( ifList.find( key ) == ifList.end() )
+ if ( ifList.tqfind( key ) == ifList.end() )
{
// The interface does not exist. Meaning the driver
// isn't loaded and/or the interface has not been created.
@@ -85,7 +85,7 @@ void SysBackend::update()
}
else
{
- if ( QFile::exists( SYSPATH + key + "/wireless" ) )
+ if ( TQFile::exists( SYSPATH + key + "/wireless" ) )
{
interface->getData().wirelessDevice = true;
}
@@ -127,7 +127,7 @@ void SysBackend::update()
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" );
if ( file != NULL )
@@ -143,7 +143,7 @@ bool SysBackend::readNumberFromFile( const QString& fileName, unsigned int& valu
return false;
}
-bool SysBackend::readStringFromFile( const QString& fileName, QString& string )
+bool SysBackend::readStringFromFile( const TQString& fileName, TQString& string )
{
char buffer[64];
FILE* file = fopen( fileName.latin1(), "r" );
@@ -161,9 +161,9 @@ bool SysBackend::readStringFromFile( const QString& fileName, QString& string )
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;
if ( readNumberFromFile( ifFolder + "statistics/rx_packets", rxPackets ) )
@@ -247,22 +247,22 @@ void SysBackend::updateInterfaceData( const QString& ifName, InterfaceData& data
if ( type == Interface::ETHERNET )
{
- QString hwAddress;
+ TQString hwAddress;
if ( readStringFromFile( ifFolder + "address", hwAddress ) )
{
data.hwAddress = hwAddress;
}
// for the default gateway we use the proc filesystem
- QFile routeFile( PROCROUTE );
+ TQFile routeFile( PROCROUTE );
if ( routeFile.open( IO_ReadOnly ) )
{
- QString routeData( routeFile.readAll().data() );
- QStringList routeEntries = QStringList::split( "\n", routeData );
- QStringList::Iterator it;
+ TQString routeData( routeFile.readAll().data() );
+ TQStringList routeEntries = TQStringList::split( "\n", routeData );
+ TQStringList::Iterator 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 )
&& ( 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;
if ( readNumberFromFile( wirelessFolder + "link", link ) )
{
- data.linkQuality = QString::number( link );
+ data.linkQuality = TQString::number( link );
}
#ifdef HAVE_LIBIW
@@ -341,7 +341,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data )
}
iw_print_freq_value( buffer, sizeof( buffer ), freq );
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
{
- data.nickName = QString::null;
+ data.nickName = TQString();
}
}
@@ -402,7 +402,7 @@ void SysBackend::updateWirelessData( const QString& ifName, WirelessData& data )
}
else
{
- data.mode = QString::null;
+ data.mode = TQString();
}
}
diff --git a/src/knemod/backends/sysbackend.h b/src/knemod/backends/sysbackend.h
index 10650b6..08f4de7 100644
--- a/src/knemod/backends/sysbackend.h
+++ b/src/knemod/backends/sysbackend.h
@@ -36,18 +36,18 @@
class SysBackend : public BackendBase
{
public:
- SysBackend(QDict<Interface>& interfaces );
+ SysBackend(TQDict<Interface>& interfaces );
virtual ~SysBackend();
- static BackendBase* createInstance( QDict<Interface>& interfaces );
+ static BackendBase* createInstance( TQDict<Interface>& interfaces );
void update();
private:
- bool readNumberFromFile( const QString& fileName, unsigned int& value );
- bool readStringFromFile( const QString& fileName, QString& string );
- void updateWirelessData( const QString& ifName, WirelessData& data );
- void updateInterfaceData( const QString& ifName, InterfaceData& data, int type );
+ bool readNumberFromFile( const TQString& fileName, unsigned int& value );
+ bool readStringFromFile( const TQString& fileName, TQString& string );
+ void updateWirelessData( const TQString& ifName, WirelessData& data );
+ void updateInterfaceData( const TQString& ifName, InterfaceData& data, int type );
};
diff --git a/src/knemod/global.h b/src/knemod/global.h
index d00a54e..e2af79d 100644
--- a/src/knemod/global.h
+++ b/src/knemod/global.h
@@ -20,9 +20,9 @@
#ifndef GLOBAL_H
#define GLOBAL_H
-#include <qpair.h>
-#include <qcolor.h>
-#include <qstring.h>
+#include <tqpair.h>
+#include <tqcolor.h>
+#include <tqstring.h>
/**
* This file contains data structures and enums used in the knemo daemon.
@@ -36,7 +36,7 @@ struct GeneralData
int toolTipContent;
int pollInterval;
int saveInterval;
- QString statisticsDir;
+ TQString statisticsDir;
};
struct InterfaceData
@@ -68,28 +68,28 @@ struct InterfaceData
unsigned long prevTxBytes;
unsigned long incomingBytes;
unsigned long outgoingBytes;
- QString ipAddress;
- QString subnetMask;
- QString hwAddress;
- QString ptpAddress;
- QString broadcastAddress;
- QString defaultGateway;
- QString rxString;
- QString txString;
- Q_UINT64 rxBytes;
- Q_UINT64 txBytes;
+ TQString ipAddress;
+ TQString subnetMask;
+ TQString hwAddress;
+ TQString ptpAddress;
+ TQString broadcastAddress;
+ TQString defaultGateway;
+ TQString rxString;
+ TQString txString;
+ TQ_UINT64 rxBytes;
+ TQ_UINT64 txBytes;
};
struct WirelessData
{
- QString essid;
- QString mode;
- QString frequency;
- QString channel;
- QString bitRate;
- QString linkQuality;
- QString accessPoint;
- QString nickName;
+ TQString essid;
+ TQString mode;
+ TQString frequency;
+ TQString channel;
+ TQString bitRate;
+ TQString linkQuality;
+ TQString accessPoint;
+ TQString nickName;
bool encryption;
};
@@ -109,11 +109,11 @@ struct PlotterSettings
bool horizontalLines;
bool automaticDetection;
bool verticalLinesScroll;
- QColor colorVLines;
- QColor colorHLines;
- QColor colorIncoming;
- QColor colorOutgoing;
- QColor colorBackground;
+ TQColor colorVLines;
+ TQColor colorHLines;
+ TQColor colorIncoming;
+ TQColor colorOutgoing;
+ TQColor colorBackground;
};
struct StatisticEntry
@@ -121,10 +121,10 @@ struct StatisticEntry
int day;
int month;
int year;
- Q_UINT64 rxBytes;
- Q_UINT64 txBytes;
+ TQ_UINT64 rxBytes;
+ TQ_UINT64 txBytes;
};
-extern QPair<QString, int> ToolTips[];
+extern TQPair<TQString, int> ToolTips[];
#endif // GLOBAL_H
diff --git a/src/knemod/interface.cpp b/src/knemod/interface.cpp
index 2378662..2242e40 100644
--- a/src/knemod/interface.cpp
+++ b/src/knemod/interface.cpp
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qpixmap.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
#include <kwin.h>
#include <kdebug.h>
@@ -32,10 +32,10 @@
#include "interfacestatusdialog.h"
#include "interfacestatisticsdialog.h"
-Interface::Interface( QString ifname,
+Interface::Interface( TQString ifname,
const GeneralData& generalData,
const PlotterSettings& plotterSettings )
- : QObject(),
+ : TQObject(),
mType( UNKNOWN_TYPE ),
mState( UNKNOWN_STATE ),
mOutgoingPos( 0 ),
@@ -51,20 +51,20 @@ Interface::Interface( QString ifname,
mGeneralData( generalData ),
mPlotterSettings( plotterSettings )
{
- connect( &mMonitor, SIGNAL( statusChanged( int ) ),
- &mIcon, SLOT( updateStatus( int ) ) );
- connect( &mMonitor, SIGNAL( available( int ) ),
- &mIcon, SLOT( updateTrayStatus( int ) ) );
- connect( &mMonitor, SIGNAL( notAvailable( int ) ),
- &mIcon, SLOT( updateTrayStatus( int ) ) );
- connect( &mMonitor, SIGNAL( notExisting( int ) ),
- &mIcon, SLOT( updateTrayStatus( int ) ) );
- connect( &mMonitor, SIGNAL( available( int ) ),
- this, SLOT( setStartTime( int ) ) );
- connect( &mMonitor, SIGNAL( statusChanged( int ) ),
- this, SLOT( resetData( int ) ) );
- connect( &mIcon, SIGNAL( statisticsSelected() ),
- this, SLOT( showStatisticsDialog() ) );
+ connect( &mMonitor, TQT_SIGNAL( statusChanged( int ) ),
+ &mIcon, TQT_SLOT( updatetqStatus( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( available( int ) ),
+ &mIcon, TQT_SLOT( updateTraytqStatus( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( notAvailable( int ) ),
+ &mIcon, TQT_SLOT( updateTraytqStatus( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( notExisting( int ) ),
+ &mIcon, TQT_SLOT( updateTraytqStatus( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( available( int ) ),
+ this, TQT_SLOT( setStartTime( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( statusChanged( int ) ),
+ this, TQT_SLOT( resetData( int ) ) );
+ connect( &mIcon, TQT_SIGNAL( statisticsSelected() ),
+ this, TQT_SLOT( showStatisticsDialog() ) );
}
Interface::~Interface()
@@ -92,9 +92,9 @@ Interface::~Interface()
void Interface::configChanged()
{
// UNKNOWN_STATE to avoid notification
- mIcon.updateTrayStatus( UNKNOWN_STATE );
+ mIcon.updateTraytqStatus( UNKNOWN_STATE );
// handle changed iconset by user
- mIcon.updateStatus( mState );
+ mIcon.updatetqStatus( mState );
mIcon.updateToolTip();
mIcon.updateMenu();
@@ -127,13 +127,13 @@ void Interface::configChanged()
void Interface::activateMonitor()
{
- mMonitor.checkStatus( this );
+ mMonitor.checktqStatus( this );
}
void Interface::setStartTime( int )
{
- mStartTime.setDate( QDate::currentDate() );
- mStartTime.setTime( QTime::currentTime() );
+ mStartTime.setDate( TQDate::tqcurrentDate() );
+ mStartTime.setTime( TQTime::currentTime() );
}
void Interface::showStatusDialog()
@@ -143,16 +143,16 @@ void Interface::showStatusDialog()
if ( mStatusDialog == 0L )
{
mStatusDialog = new InterfaceStatusDialog( this );
- connect( &mMonitor, SIGNAL( available( int ) ),
- mStatusDialog, SLOT( enableNetworkGroups( int ) ) );
- connect( &mMonitor, SIGNAL( notAvailable( int ) ),
- mStatusDialog, SLOT( disableNetworkGroups( int ) ) );
- connect( &mMonitor, SIGNAL( notExisting( int ) ),
- mStatusDialog, SLOT( disableNetworkGroups( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( available( int ) ),
+ mStatusDialog, TQT_SLOT( enableNetworkGroups( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( notAvailable( int ) ),
+ mStatusDialog, TQT_SLOT( disableNetworkGroups( int ) ) );
+ connect( &mMonitor, TQT_SIGNAL( notExisting( int ) ),
+ mStatusDialog, TQT_SLOT( disableNetworkGroups( int ) ) );
if ( mStatistics != 0 )
{
- connect( mStatistics, SIGNAL( currentEntryChanged() ),
- mStatusDialog, SLOT( statisticsChanged() ) );
+ connect( mStatistics, TQT_SIGNAL( currentEntryChanged() ),
+ mStatusDialog, TQT_SLOT( statisticsChanged() ) );
mStatusDialog->statisticsChanged();
}
activateOrHide( mStatusDialog, true );
@@ -176,9 +176,9 @@ void Interface::showSignalPlotter( bool wasMiddleButton )
configurePlotter();
activateOrHide( mPlotter, true );
- mPlotterTimer = new QTimer();
- connect( mPlotterTimer, SIGNAL( timeout() ),
- this, SLOT( updatePlotter() ) );
+ mPlotterTimer = new TQTimer();
+ connect( mPlotterTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( updatePlotter() ) );
mPlotterTimer->start( 1000 );
}
else
@@ -206,20 +206,20 @@ void Interface::showStatisticsDialog()
// should never happen but you never know...
startStatistics();
}
- connect( mStatistics, SIGNAL( dayStatisticsChanged() ),
- mStatisticsDialog, SLOT( updateDays() ) );
- connect( mStatistics, SIGNAL( monthStatisticsChanged() ),
- mStatisticsDialog, SLOT( updateMonths() ) );
- connect( mStatistics, SIGNAL( yearStatisticsChanged() ),
- mStatisticsDialog, SLOT( updateYears() ) );
- connect( mStatistics, SIGNAL( currentEntryChanged() ),
- mStatisticsDialog, SLOT( updateCurrentEntry() ) );
- connect( mStatisticsDialog, SIGNAL( clearDailyStatisticsClicked() ),
- mStatistics, SLOT( clearDayStatistics() ) );
- connect( mStatisticsDialog, SIGNAL( clearMonthlyStatisticsClicked() ),
- mStatistics, SLOT( clearMonthStatistics() ) );
- connect( mStatisticsDialog, SIGNAL( clearYearlyStatisticsClicked() ),
- mStatistics, SLOT( clearYearStatistics() ) );
+ connect( mStatistics, TQT_SIGNAL( dayStatisticsChanged() ),
+ mStatisticsDialog, TQT_SLOT( updateDays() ) );
+ connect( mStatistics, TQT_SIGNAL( monthStatisticsChanged() ),
+ mStatisticsDialog, TQT_SLOT( updateMonths() ) );
+ connect( mStatistics, TQT_SIGNAL( yearStatisticsChanged() ),
+ mStatisticsDialog, TQT_SLOT( updateYears() ) );
+ connect( mStatistics, TQT_SIGNAL( currentEntryChanged() ),
+ mStatisticsDialog, TQT_SLOT( updateCurrentEntry() ) );
+ connect( mStatisticsDialog, TQT_SIGNAL( clearDailyStatisticsClicked() ),
+ mStatistics, TQT_SLOT( clearDayStatistics() ) );
+ connect( mStatisticsDialog, TQT_SIGNAL( clearMonthlyStatisticsClicked() ),
+ mStatistics, TQT_SLOT( clearMonthStatistics() ) );
+ connect( mStatisticsDialog, TQT_SIGNAL( clearYearlyStatisticsClicked() ),
+ mStatistics, TQT_SLOT( clearYearStatistics() ) );
mStatisticsDialog->updateDays();
mStatisticsDialog->updateMonths();
@@ -252,7 +252,7 @@ void Interface::updatePlotter()
double outgoingBytes = mData.outgoingBytes / 1024.0 / (double) mGeneralData.pollInterval;
double incomingBytes = mData.incomingBytes / 1024.0 / (double) mGeneralData.pollInterval;
- QValueList<double> trafficList;
+ TQValueList<double> trafficList;
switch ( mVisibleBeams )
{
case BOTH:
@@ -310,7 +310,7 @@ void Interface::configurePlotter()
if ( mPlotterSettings.showIncoming )
nextVisibleBeams = (VisibleBeams) ( nextVisibleBeams | INCOMING_TRAFFIC );
- QValueList<QColor>& colors = mPlotter->beamColors();
+ TQValueList<TQColor>& colors = mPlotter->beamColors();
switch( mVisibleBeams )
{
case NONE:
@@ -398,20 +398,20 @@ void Interface::configurePlotter()
break;
}
mVisibleBeams = nextVisibleBeams;
- mPlotter->repaint();
+ mPlotter->tqrepaint();
}
void Interface::startStatistics()
{
mStatistics = new InterfaceStatistics( this );
- connect( &mMonitor, SIGNAL( incomingData( unsigned long ) ),
- mStatistics, SLOT( addIncomingData( unsigned long ) ) );
- connect( &mMonitor, SIGNAL( outgoingData( unsigned long ) ),
- mStatistics, SLOT( addOutgoingData( unsigned long ) ) );
+ connect( &mMonitor, TQT_SIGNAL( incomingData( unsigned long ) ),
+ mStatistics, TQT_SLOT( addIncomingData( unsigned long ) ) );
+ connect( &mMonitor, TQT_SIGNAL( outgoingData( unsigned long ) ),
+ mStatistics, TQT_SLOT( addOutgoingData( unsigned long ) ) );
if ( mStatusDialog != 0 )
{
- connect( mStatistics, SIGNAL( currentEntryChanged() ),
- mStatusDialog, SLOT( statisticsChanged() ) );
+ connect( mStatistics, TQT_SIGNAL( currentEntryChanged() ),
+ mStatusDialog, TQT_SLOT( statisticsChanged() ) );
mStatusDialog->statisticsChanged();
}
@@ -434,7 +434,7 @@ void Interface::stopStatistics()
}
// taken from ksystemtray.cpp
-void Interface::activateOrHide( QWidget* widget, bool onlyActivate )
+void Interface::activateOrHide( TQWidget* widget, bool onlyActivate )
{
if ( !widget )
return;
@@ -456,7 +456,7 @@ void Interface::activateOrHide( QWidget* widget, bool onlyActivate )
else
{
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 )
{
@@ -464,7 +464,7 @@ void Interface::activateOrHide( QWidget* widget, bool onlyActivate )
NET::WMGeometry | NET::XAWMState | NET::WMState | NET::WMWindowType );
if( info2.mappingState() != NET::Visible )
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
if( !info1.hasState( NET::KeepAbove ) && info2.hasState( NET::KeepAbove ))
continue; // obscured by window kept above -> ignore
diff --git a/src/knemod/interface.h b/src/knemod/interface.h
index 06bea0a..0457a97 100644
--- a/src/knemod/interface.h
+++ b/src/knemod/interface.h
@@ -20,16 +20,16 @@
#ifndef INTERFACE_H
#define INTERFACE_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include "data.h"
#include "global.h"
#include "interfaceicon.h"
#include "interfacemonitor.h"
-class QTimer;
+class TQTimer;
class SignalPlotter;
class InterfaceStatistics;
class InterfaceStatusDialog;
@@ -43,14 +43,15 @@ class InterfaceStatisticsDialog;
* @short Central class for every interface
* @author Percy Leonhardt <percy@eris23.de>
*/
-class Interface : public QObject
+class Interface : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- Interface(QString ifname,
+ Interface(TQString ifname,
const GeneralData& generalData,
const PlotterSettings& plotterSettings );
@@ -79,12 +80,12 @@ public:
return mState;
}
- const QDateTime& getStartTime() const
+ const TQDateTime& getStartTime() const
{
return mStartTime;
}
- const QString& getName() const
+ const TQString& getName() const
{
return mName;
}
@@ -209,7 +210,7 @@ private:
* correct show, raise, focus and hide of status dialog and
* signal plotter.
*/
- void activateOrHide( QWidget* widget, bool onlyActivate = false );
+ void activateOrHide( TQWidget* widget, bool onlyActivate = false );
enum VisibleBeams
{
@@ -223,9 +224,9 @@ private:
int mState;
int mOutgoingPos;
int mIncomingPos;
- QString mName;
- QTimer* mPlotterTimer;
- QDateTime mStartTime;
+ TQString mName;
+ TQTimer* mPlotterTimer;
+ TQDateTime mStartTime;
InterfaceIcon mIcon;
InterfaceData mData;
InterfaceMonitor mMonitor;
diff --git a/src/knemod/interfaceicon.cpp b/src/knemod/interfaceicon.cpp
index f57626a..b82f406 100644
--- a/src/knemod/interfaceicon.cpp
+++ b/src/knemod/interfaceicon.cpp
@@ -19,7 +19,7 @@
#include <unistd.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -37,17 +37,17 @@
#include "interfacemonitor.h"
#include "interfacetooltip.h"
-const QString InterfaceIcon::ICON_DISCONNECTED = "network_disconnected";
-const QString InterfaceIcon::ICON_CONNECTED = "network_connected";
-const QString InterfaceIcon::ICON_INCOMING = "network_incoming";
-const QString InterfaceIcon::ICON_OUTGOING = "network_outgoing";
-const QString InterfaceIcon::ICON_TRAFFIC = "network_traffic";
-const QString InterfaceIcon::SUFFIX_PPP = "_ppp";
-const QString InterfaceIcon::SUFFIX_LAN = "_lan";
-const QString InterfaceIcon::SUFFIX_WLAN = "_wlan";
+const TQString InterfaceIcon::ICON_DISCONNECTED = "network_disconnected";
+const TQString InterfaceIcon::ICON_CONNECTED = "network_connected";
+const TQString InterfaceIcon::ICON_INCOMING = "network_incoming";
+const TQString InterfaceIcon::ICON_OUTGOING = "network_outgoing";
+const TQString InterfaceIcon::ICON_TRAFFIC = "network_traffic";
+const TQString InterfaceIcon::SUFFIX_PPP = "_ppp";
+const TQString InterfaceIcon::SUFFIX_LAN = "_lan";
+const TQString InterfaceIcon::SUFFIX_WLAN = "_wlan";
InterfaceIcon::InterfaceIcon( Interface* interface )
- : QObject(),
+ : TQObject(),
mInterface( interface ),
mTray( 0L )
{
@@ -59,14 +59,14 @@ InterfaceIcon::~InterfaceIcon()
delete mTray;
}
-void InterfaceIcon::updateStatus( int status )
+void InterfaceIcon::updatetqStatus( int status )
{
if ( mTray == 0L )
return;
// If the user wants something different than the default icons
// append the correct suffix to the filename.
- QString suffix;
+ TQString suffix;
if ( mInterface->getSettings().iconSet == Interface::NETWORK )
{
suffix = SUFFIX_LAN;
@@ -114,8 +114,8 @@ void InterfaceIcon::updateToolTip()
if ( mTray == 0L )
return;
- QString toolTip = mInterface->getSettings().alias;
- if ( toolTip == QString::null )
+ TQString toolTip = mInterface->getSettings().alias;
+ if ( toolTip == TQString() )
toolTip = mInterface->getName();
new InterfaceToolTip( mInterface, mTray );
}
@@ -137,14 +137,14 @@ void InterfaceIcon::updateMenu()
if ( settings.activateStatistics )
{
menu->insertItem( i18n( "Open &Statistics" ), this,
- SIGNAL( statisticsSelected() ) );
+ TQT_SIGNAL( statisticsSelected() ) );
}
// If the user wants custom commands, add them.
if ( settings.customCommands )
{
menu->insertSeparator();
- QValueVector<InterfaceCommand>::iterator it;
+ TQValueVector<InterfaceCommand>::iterator it;
for ( it = settings.commands.begin(); it != settings.commands.end(); it++ )
(*it).id = menu->insertItem( (*it).menuText );
}
@@ -152,10 +152,10 @@ void InterfaceIcon::updateMenu()
void InterfaceIcon::resizeIcon()
{
- updateTrayStatus(0);
+ updateTraytqStatus(0);
}
-void InterfaceIcon::updateTrayStatus( int previousState )
+void InterfaceIcon::updateTraytqStatus( int previousState )
{
bool interfaceExists = mInterface->getData().existing;
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
* status as this would be annoying when KDE starts.
*/
- QString title;
- if ( mInterface->getSettings().alias != QString::null )
+ TQString title;
+ if ( mInterface->getSettings().alias != TQString() )
title = mInterface->getSettings().alias;
else
title = mInterface->getName();
@@ -191,8 +191,8 @@ void InterfaceIcon::updateTrayStatus( int previousState )
/* When KNemo is starting we don't show the change in connection
* status as this would be annoying when KDE starts.
*/
- QString title;
- if ( mInterface->getSettings().alias != QString::null )
+ TQString title;
+ if ( mInterface->getSettings().alias != TQString() )
title = mInterface->getSettings().alias;
else
title = mInterface->getName();
@@ -231,20 +231,20 @@ void InterfaceIcon::updateTrayStatus( int previousState )
( !interfaceExists && !hideWhenNotExisting && !hideWhenNotAvailable ) ) )
{
mTray = new InterfaceTray( mInterface->getName() );
- QToolTip::add( mTray, mInterface->getName() );
+ TQToolTip::add( mTray, mInterface->getName() );
KPopupMenu* menu = mTray->contextMenu();
- connect( menu, SIGNAL( activated( int ) ),
- this, SLOT( menuActivated( int ) ) );
- connect( mTray, SIGNAL( leftClicked() ),
- mInterface, SLOT( showStatusDialog() ) );
- connect( mTray, SIGNAL( graphSelected( bool ) ),
- mInterface, SLOT( showSignalPlotter( bool ) ) );
- connect( mTray, SIGNAL( configSelected() ),
- this, SLOT( showConfigDialog() ) );
- connect( mTray, SIGNAL( iconResized() ),
- this, SLOT( resizeIcon() ) );
-
- updateStatus( mInterface->getState() );
+ connect( menu, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( menuActivated( int ) ) );
+ connect( mTray, TQT_SIGNAL( leftClicked() ),
+ mInterface, TQT_SLOT( showStatusDialog() ) );
+ connect( mTray, TQT_SIGNAL( graphSelected( bool ) ),
+ mInterface, TQT_SLOT( showSignalPlotter( bool ) ) );
+ connect( mTray, TQT_SIGNAL( configSelected() ),
+ this, TQT_SLOT( showConfigDialog() ) );
+ connect( mTray, TQT_SIGNAL( iconResized() ),
+ this, TQT_SLOT( resizeIcon() ) );
+
+ updatetqStatus( mInterface->getState() );
updateToolTip();
updateMenu();
mTray->show();
@@ -257,8 +257,8 @@ void InterfaceIcon::updateTrayStatus( int previousState )
/* When KNemo is starting we don't show the change in connection
* status as this would be annoying when KDE starts.
*/
- QString title;
- if ( mInterface->getSettings().alias != QString::null )
+ TQString title;
+ if ( mInterface->getSettings().alias != TQString() )
title = mInterface->getSettings().alias;
else
title = mInterface->getName();
@@ -293,7 +293,7 @@ void InterfaceIcon::showConfigDialog()
void InterfaceIcon::menuActivated( int id )
{
InterfaceSettings& settings = mInterface->getSettings();
- QValueVector<InterfaceCommand>::iterator it;
+ TQValueVector<InterfaceCommand>::iterator it;
for ( it = settings.commands.begin(); it != settings.commands.end(); it++ )
{
if ( (*it).id == id )
@@ -305,7 +305,7 @@ void InterfaceIcon::menuActivated( int id )
process << (*it).command;
}
else
- process << QStringList::split( ' ', (*it).command );
+ process << TQStringList::split( ' ', (*it).command );
process.start( KProcess::DontCare );
break;
diff --git a/src/knemod/interfaceicon.h b/src/knemod/interfaceicon.h
index 6c962ec..6e4c098 100644
--- a/src/knemod/interfaceicon.h
+++ b/src/knemod/interfaceicon.h
@@ -20,8 +20,8 @@
#ifndef INTERFACEICON_H
#define INTERFACEICON_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class Interface;
class InterfaceTray;
@@ -35,9 +35,10 @@ class InterfaceTray;
* @author Percy Leonhardt <percy@eris23.de>
*/
-class InterfaceIcon : public QObject
+class InterfaceIcon : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
@@ -67,12 +68,12 @@ public slots:
/*
* Changes the icon image displayed in the tray
*/
- void updateStatus( int status );
+ void updatetqStatus( int status );
/*
* Creates or deletes the tray icon
*/
- void updateTrayStatus( int previousState );
+ void updateTraytqStatus( int previousState );
/*
* Resizes the tray icon
@@ -97,14 +98,14 @@ private:
// the real tray icon
InterfaceTray* mTray;
- static const QString ICON_DISCONNECTED;
- static const QString ICON_CONNECTED;
- static const QString ICON_INCOMING;
- static const QString ICON_OUTGOING;
- static const QString ICON_TRAFFIC;
- static const QString SUFFIX_PPP;
- static const QString SUFFIX_LAN;
- static const QString SUFFIX_WLAN;
+ static const TQString ICON_DISCONNECTED;
+ static const TQString ICON_CONNECTED;
+ static const TQString ICON_INCOMING;
+ static const TQString ICON_OUTGOING;
+ static const TQString ICON_TRAFFIC;
+ static const TQString SUFFIX_PPP;
+ static const TQString SUFFIX_LAN;
+ static const TQString SUFFIX_WLAN;
};
#endif // INTERFACEICON_H
diff --git a/src/knemod/interfacemonitor.cpp b/src/knemod/interfacemonitor.cpp
index b75d35e..af9fd2a 100644
--- a/src/knemod/interfacemonitor.cpp
+++ b/src/knemod/interfacemonitor.cpp
@@ -22,8 +22,8 @@
#include "interface.h"
#include "interfacemonitor.h"
-InterfaceMonitor::InterfaceMonitor( QObject* parent, const char* name )
- : QObject( parent, name )
+InterfaceMonitor::InterfaceMonitor( TQObject* tqparent, const char* name )
+ : TQObject( tqparent, name )
{
}
@@ -31,7 +31,7 @@ InterfaceMonitor::~InterfaceMonitor()
{
}
-void InterfaceMonitor::checkStatus( Interface* interface )
+void InterfaceMonitor::checktqStatus( Interface* interface )
{
int currentState;
int previousState = interface->getState();
diff --git a/src/knemod/interfacemonitor.h b/src/knemod/interfacemonitor.h
index eacc1ea..7f5a50b 100644
--- a/src/knemod/interfacemonitor.h
+++ b/src/knemod/interfacemonitor.h
@@ -20,7 +20,7 @@
#ifndef INTERFACEMONITOR_H
#define INTERFACEMONITOR_H
-#include <qobject.h>
+#include <tqobject.h>
#include "data.h"
@@ -35,14 +35,15 @@ class Interface;
* @author Percy Leonhardt <percy@eris23.de>
*/
-class InterfaceMonitor : public QObject
+class InterfaceMonitor : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- InterfaceMonitor(QObject* parent = 0L, const char* name = 0L);
+ InterfaceMonitor(TQObject* tqparent = 0L, const char* name = 0L);
/**
* Default Destructor
@@ -52,7 +53,7 @@ public:
/**
* Tell the monitor to check the status of the interface
*/
- void checkStatus( Interface* interface );
+ void checktqStatus( Interface* interface );
signals:
// the interface is now connected
diff --git a/src/knemod/interfacestatistics.cpp b/src/knemod/interfacestatistics.cpp
index a73d04b..c013603 100644
--- a/src/knemod/interfacestatistics.cpp
+++ b/src/knemod/interfacestatistics.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qstring.h>
-#include <qdatetime.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
#include <kdebug.h>
@@ -29,7 +29,7 @@
#include "interfacestatistics.h"
InterfaceStatistics::InterfaceStatistics( Interface* interface )
- : QObject(),
+ : TQObject(),
mInterface( interface )
{
mDayStatistics.setAutoDelete( true );
@@ -37,8 +37,8 @@ InterfaceStatistics::InterfaceStatistics( Interface* interface )
mYearStatistics.setAutoDelete( true );
initStatistics();
- mSaveTimer = new QTimer();
- connect( mSaveTimer, SIGNAL( timeout() ), this, SLOT( saveStatistics() ) );
+ mSaveTimer = new TQTimer();
+ connect( mSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( saveStatistics() ) );
mSaveTimer->start( mInterface->getGeneralData().saveInterval * 1000 );
}
@@ -54,9 +54,9 @@ InterfaceStatistics::~InterfaceStatistics()
void InterfaceStatistics::loadStatistics()
{
- QDomDocument doc( "statistics" );
- QString dir = mInterface->getGeneralData().statisticsDir;
- QFile file( dir + "/statistics_" + mInterface->getName() );
+ TQDomDocument doc( "statistics" );
+ TQString dir = mInterface->getGeneralData().statisticsDir;
+ TQFile file( dir + "/statistics_" + mInterface->getName() );
if ( !file.open( IO_ReadOnly ) )
return;
@@ -71,22 +71,22 @@ void InterfaceStatistics::loadStatistics()
mMonthStatistics.clear();
mYearStatistics.clear();
- QDomElement root = doc.documentElement();
- QDomNode n = root.namedItem( "days" );
+ TQDomElement root = doc.documentElement();
+ TQDomNode n = root.namedItem( "days" );
if ( !n.isNull() )
{
- QDomNode dayNode = n.firstChild();
+ TQDomNode dayNode = n.firstChild();
while ( !dayNode.isNull() )
{
- QDomElement day = dayNode.toElement();
+ TQDomElement day = dayNode.toElement();
if ( !day.isNull() )
{
StatisticEntry* entry = new StatisticEntry();
entry->day = day.attribute( "day" ).toInt();
entry->month = day.attribute( "month" ).toInt();
entry->year = day.attribute( "year" ).toInt();
- entry->rxBytes = (Q_UINT64) day.attribute( "rxBytes" ).toDouble();
- entry->txBytes = (Q_UINT64) day.attribute( "txBytes" ).toDouble();
+ entry->rxBytes = (TQ_UINT64) day.attribute( "rxBytes" ).toDouble();
+ entry->txBytes = (TQ_UINT64) day.attribute( "txBytes" ).toDouble();
mDayStatistics.append( entry );
}
dayNode = dayNode.nextSibling();
@@ -97,18 +97,18 @@ void InterfaceStatistics::loadStatistics()
n = root.namedItem( "months" );
if ( !n.isNull() )
{
- QDomNode monthNode = n.firstChild();
+ TQDomNode monthNode = n.firstChild();
while ( !monthNode.isNull() )
{
- QDomElement month = monthNode.toElement();
+ TQDomElement month = monthNode.toElement();
if ( !month.isNull() )
{
StatisticEntry* entry = new StatisticEntry();
entry->day = 0;
entry->month = month.attribute( "month" ).toInt();
entry->year = month.attribute( "year" ).toInt();
- entry->rxBytes = (Q_UINT64) month.attribute( "rxBytes" ).toDouble();
- entry->txBytes = (Q_UINT64) month.attribute( "txBytes" ).toDouble();
+ entry->rxBytes = (TQ_UINT64) month.attribute( "rxBytes" ).toDouble();
+ entry->txBytes = (TQ_UINT64) month.attribute( "txBytes" ).toDouble();
mMonthStatistics.append( entry );
}
monthNode = monthNode.nextSibling();
@@ -119,18 +119,18 @@ void InterfaceStatistics::loadStatistics()
n = root.namedItem( "years" );
if ( !n.isNull() )
{
- QDomNode yearNode = n.firstChild();
+ TQDomNode yearNode = n.firstChild();
while ( !yearNode.isNull() )
{
- QDomElement year = yearNode.toElement();
+ TQDomElement year = yearNode.toElement();
if ( !year.isNull() )
{
StatisticEntry* entry = new StatisticEntry();
entry->day = 0;
entry->month = 0;
entry->year = year.attribute( "year" ).toInt();
- entry->rxBytes = (Q_UINT64) year.attribute( "rxBytes" ).toDouble();
- entry->txBytes = (Q_UINT64) year.attribute( "txBytes" ).toDouble();
+ entry->rxBytes = (TQ_UINT64) year.attribute( "rxBytes" ).toDouble();
+ entry->txBytes = (TQ_UINT64) year.attribute( "txBytes" ).toDouble();
mYearStatistics.append( entry );
}
yearNode = yearNode.nextSibling();
@@ -142,15 +142,15 @@ void InterfaceStatistics::loadStatistics()
void InterfaceStatistics::saveStatistics()
{
- QDomDocument doc( "statistics" );
- QDomElement root = doc.createElement( "statistics" );
+ TQDomDocument doc( "statistics" );
+ TQDomElement root = doc.createElement( "statistics" );
doc.appendChild( root );
- QDomElement days = doc.createElement( "days" );
+ TQDomElement days = doc.createElement( "days" );
StatisticEntry* iterator = mDayStatistics.first();
while ( iterator )
{
- QDomElement day = doc.createElement( "day" );
+ TQDomElement day = doc.createElement( "day" );
day.setAttribute( "day", iterator->day );
day.setAttribute( "month", iterator->month );
day.setAttribute( "year", iterator->year );
@@ -161,11 +161,11 @@ void InterfaceStatistics::saveStatistics()
}
root.appendChild( days );
- QDomElement months = doc.createElement( "months" );
+ TQDomElement months = doc.createElement( "months" );
iterator = mMonthStatistics.first();
while ( iterator )
{
- QDomElement month = doc.createElement( "month" );
+ TQDomElement month = doc.createElement( "month" );
month.setAttribute( "month", iterator->month );
month.setAttribute( "year", iterator->year );
month.setAttribute( "rxBytes", (double) iterator->rxBytes );
@@ -175,11 +175,11 @@ void InterfaceStatistics::saveStatistics()
}
root.appendChild( months );
- QDomElement years = doc.createElement( "years" );
+ TQDomElement years = doc.createElement( "years" );
iterator = mYearStatistics.first();
while ( iterator )
{
- QDomElement year = doc.createElement( "year" );
+ TQDomElement year = doc.createElement( "year" );
year.setAttribute( "year", iterator->year );
year.setAttribute( "rxBytes", (double) iterator->rxBytes );
year.setAttribute( "txBytes", (double) iterator->txBytes );
@@ -188,12 +188,12 @@ void InterfaceStatistics::saveStatistics()
}
root.appendChild( years );
- QString dir = mInterface->getGeneralData().statisticsDir;
- QFile file( dir + "/statistics_" + mInterface->getName() );
+ TQString dir = mInterface->getGeneralData().statisticsDir;
+ TQFile file( dir + "/statistics_" + mInterface->getName() );
if ( !file.open( IO_WriteOnly ) )
return;
- QTextStream stream( &file );
+ TQTextStream stream( &file );
stream << doc.toString();
file.close();
}
@@ -276,21 +276,21 @@ void InterfaceStatistics::clearYearStatistics()
void InterfaceStatistics::checkCurrentEntry()
{
- if ( mCurrentDay->day != QDate::currentDate().day() ||
- mCurrentDay->month != QDate::currentDate().month() ||
- mCurrentDay->year != QDate::currentDate().year() )
+ if ( mCurrentDay->day != TQDate::tqcurrentDate().day() ||
+ mCurrentDay->month != TQDate::tqcurrentDate().month() ||
+ mCurrentDay->year != TQDate::tqcurrentDate().year() )
{
// current day has changed
updateCurrentDay();
- if ( mCurrentMonth->month != QDate::currentDate().month() ||
- mCurrentMonth->year != QDate::currentDate().year() )
+ if ( mCurrentMonth->month != TQDate::tqcurrentDate().month() ||
+ mCurrentMonth->year != TQDate::tqcurrentDate().year() )
{
// current month has also changed
updateCurrentMonth();
}
- if ( mCurrentYear->year != QDate::currentDate().year() )
+ if ( mCurrentYear->year != TQDate::tqcurrentDate().year() )
{
// current year has also changed
updateCurrentYear();
@@ -312,9 +312,9 @@ void InterfaceStatistics::updateCurrentDay()
mCurrentDay = mDayStatistics.first();
while ( mCurrentDay )
{
- if ( mCurrentDay->day == QDate::currentDate().day() &&
- mCurrentDay->month == QDate::currentDate().month() &&
- mCurrentDay->year == QDate::currentDate().year() )
+ if ( mCurrentDay->day == TQDate::tqcurrentDate().day() &&
+ mCurrentDay->month == TQDate::tqcurrentDate().month() &&
+ mCurrentDay->year == TQDate::tqcurrentDate().year() )
{
// found current day in list
return;
@@ -324,9 +324,9 @@ void InterfaceStatistics::updateCurrentDay()
// the current day is not in the list
mCurrentDay = new StatisticEntry();
- mCurrentDay->day = QDate::currentDate().day();
- mCurrentDay->month = QDate::currentDate().month();
- mCurrentDay->year = QDate::currentDate().year();
+ mCurrentDay->day = TQDate::tqcurrentDate().day();
+ mCurrentDay->month = TQDate::tqcurrentDate().month();
+ mCurrentDay->year = TQDate::tqcurrentDate().year();
mCurrentDay->rxBytes = 0;
mCurrentDay->txBytes = 0;
mDayStatistics.append( mCurrentDay ); // TODO: insert at correct position
@@ -338,8 +338,8 @@ void InterfaceStatistics::updateCurrentMonth()
mCurrentMonth = mMonthStatistics.first();
while ( mCurrentMonth )
{
- if ( mCurrentMonth->month == QDate::currentDate().month() &&
- mCurrentMonth->year == QDate::currentDate().year() )
+ if ( mCurrentMonth->month == TQDate::tqcurrentDate().month() &&
+ mCurrentMonth->year == TQDate::tqcurrentDate().year() )
{
// found current month in list
return;
@@ -350,8 +350,8 @@ void InterfaceStatistics::updateCurrentMonth()
// the current month is not in the list
mCurrentMonth = new StatisticEntry();
mCurrentMonth->day = 0;
- mCurrentMonth->month = QDate::currentDate().month();
- mCurrentMonth->year = QDate::currentDate().year();
+ mCurrentMonth->month = TQDate::tqcurrentDate().month();
+ mCurrentMonth->year = TQDate::tqcurrentDate().year();
mCurrentMonth->rxBytes = 0;
mCurrentMonth->txBytes = 0;
mMonthStatistics.append( mCurrentMonth ); // TODO: insert at correct position
@@ -363,7 +363,7 @@ void InterfaceStatistics::updateCurrentYear()
mCurrentYear = mYearStatistics.first();
while ( mCurrentYear )
{
- if ( mCurrentYear->year == QDate::currentDate().year() )
+ if ( mCurrentYear->year == TQDate::tqcurrentDate().year() )
{
// found current year in list
return;
@@ -375,7 +375,7 @@ void InterfaceStatistics::updateCurrentYear()
mCurrentYear = new StatisticEntry();
mCurrentYear->day = 0;
mCurrentYear->month = 0;
- mCurrentYear->year = QDate::currentDate().year();
+ mCurrentYear->year = TQDate::tqcurrentDate().year();
mCurrentYear->rxBytes = 0;
mCurrentYear->txBytes = 0;
mYearStatistics.append( mCurrentYear ); // TODO: insert at correct position
diff --git a/src/knemod/interfacestatistics.h b/src/knemod/interfacestatistics.h
index a4e3246..a7da433 100644
--- a/src/knemod/interfacestatistics.h
+++ b/src/knemod/interfacestatistics.h
@@ -20,19 +20,19 @@
#ifndef INTERFACESTATISTICS_H
#define INTERFACESTATISTICS_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "global.h"
-class QTimer;
+class TQTimer;
class Interface;
template<class type>
-class StatisticsPtrList : public QPtrList<type>
+class StatisticsPtrList : public TQPtrList<type>
{
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* entry2 = static_cast<StatisticEntry*>( item2 );
@@ -74,9 +74,10 @@ protected:
* @author Percy Leonhardt <percy@eris23.de>
*/
-class InterfaceStatistics : public QObject
+class InterfaceStatistics : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
@@ -178,7 +179,7 @@ private:
*/
void updateCurrentYear();
- QTimer* mSaveTimer;
+ TQTimer* mSaveTimer;
Interface* mInterface;
StatisticEntry* mCurrentDay;
StatisticEntry* mCurrentMonth;
diff --git a/src/knemod/interfacestatisticsdialog.cpp b/src/knemod/interfacestatisticsdialog.cpp
index 55ee49a..0b07e76 100644
--- a/src/knemod/interfacestatisticsdialog.cpp
+++ b/src/knemod/interfacestatisticsdialog.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtable.h>
-#include <qdatetime.h>
-#include <qpushbutton.h>
+#include <tqtable.h>
+#include <tqdatetime.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kio/global.h>
@@ -36,16 +36,16 @@
* if we walk back in time, so better not play with the system date...
*/
-InterfaceStatisticsDialog::InterfaceStatisticsDialog( Interface* interface, QWidget* parent, const char* name )
- : InterfaceStatisticsDlg( parent, name ),
+InterfaceStatisticsDialog::InterfaceStatisticsDialog( Interface* interface, TQWidget* tqparent, const char* name )
+ : InterfaceStatisticsDlg( tqparent, name ),
mInterface( interface )
{
setIcon( SmallIcon( "knemo" ) );
setCaption( interface->getName() + " " + i18n( "Statistics" ) );
- connect( buttonClearDaily, SIGNAL( clicked() ), SIGNAL( clearDailyStatisticsClicked() ) );
- connect( buttonClearMonthly, SIGNAL( clicked() ), SIGNAL( clearMonthlyStatisticsClicked() ) );
- connect( buttonClearYearly, SIGNAL( clicked() ), SIGNAL( clearYearlyStatisticsClicked() ) );
+ connect( buttonClearDaily, TQT_SIGNAL( clicked() ), TQT_SIGNAL( clearDailyStatisticsClicked() ) );
+ connect( buttonClearMonthly, TQT_SIGNAL( clicked() ), TQT_SIGNAL( clearMonthlyStatisticsClicked() ) );
+ connect( buttonClearYearly, TQT_SIGNAL( clicked() ), TQT_SIGNAL( clearYearlyStatisticsClicked() ) );
}
InterfaceStatisticsDialog::~InterfaceStatisticsDialog()
@@ -54,13 +54,13 @@ InterfaceStatisticsDialog::~InterfaceStatisticsDialog()
void InterfaceStatisticsDialog::updateDays()
{
- QPtrList<StatisticEntry> dayStatistics = mInterface->getStatistics()->getDayStatistics();
+ TQPtrList<StatisticEntry> dayStatistics = mInterface->getStatistics()->getDayStatistics();
StatisticEntry* iterator = dayStatistics.first();
tableDaily->setNumRows( dayStatistics.count() );
int row = 0;
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->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
tableDaily->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
@@ -75,14 +75,14 @@ void InterfaceStatisticsDialog::updateDays()
void InterfaceStatisticsDialog::updateMonths()
{
- QPtrList<StatisticEntry> monthStatistics = mInterface->getStatistics()->getMonthStatistics();
+ TQPtrList<StatisticEntry> monthStatistics = mInterface->getStatistics()->getMonthStatistics();
StatisticEntry* iterator = monthStatistics.first();
tableMonthly->setNumRows( monthStatistics.count() );
int row = 0;
while ( iterator )
{
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->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
tableMonthly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
@@ -97,13 +97,13 @@ void InterfaceStatisticsDialog::updateMonths()
void InterfaceStatisticsDialog::updateYears()
{
- QPtrList<StatisticEntry> yearStatistics = mInterface->getStatistics()->getYearStatistics();
+ TQPtrList<StatisticEntry> yearStatistics = mInterface->getStatistics()->getYearStatistics();
StatisticEntry* iterator = yearStatistics.first();
tableYearly->setNumRows( yearStatistics.count() );
int row = 0;
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, 1, KIO::convertSize( iterator->rxBytes ) );
tableYearly->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
diff --git a/src/knemod/interfacestatisticsdialog.h b/src/knemod/interfacestatisticsdialog.h
index ce5e0e3..519c9db 100644
--- a/src/knemod/interfacestatisticsdialog.h
+++ b/src/knemod/interfacestatisticsdialog.h
@@ -20,11 +20,11 @@
#ifndef INTERFACESTATISTICSDIALOG_H
#define INTERFACESTATISTICSDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "interfacestatisticsdlg.h"
-class QTimer;
+class TQTimer;
class Interface;
/**
@@ -38,12 +38,13 @@ class Interface;
class InterfaceStatisticsDialog : public InterfaceStatisticsDlg
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
InterfaceStatisticsDialog( Interface* interface,
- QWidget* parent = 0L, const char* name = 0L );
+ TQWidget* tqparent = 0L, const char* name = 0L );
/**
* Default Destructor
diff --git a/src/knemod/interfacestatisticsdlg.ui b/src/knemod/interfacestatisticsdlg.ui
index b028832..433ea8b 100644
--- a/src/knemod/interfacestatisticsdlg.ui
+++ b/src/knemod/interfacestatisticsdlg.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>InterfaceStatisticsDlg</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>InterfaceStatisticsDlg</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>buttonClose</cstring>
</property>
@@ -30,11 +30,11 @@
<bool>true</bool>
</property>
</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">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>daily</cstring>
</property>
@@ -45,7 +45,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTable">
+ <widget class="TQTable">
<column>
<property name="text">
<string>Sent</string>
@@ -74,7 +74,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonClearDaily</cstring>
</property>
@@ -84,7 +84,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>monthy</cstring>
</property>
@@ -95,7 +95,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTable">
+ <widget class="TQTable">
<column>
<property name="text">
<string>Sent</string>
@@ -121,7 +121,7 @@
<number>3</number>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonClearMonthly</cstring>
</property>
@@ -131,7 +131,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>yearly</cstring>
</property>
@@ -142,7 +142,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTable">
+ <widget class="TQTable">
<column>
<property name="text">
<string>Sent</string>
@@ -171,7 +171,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonClearYearly</cstring>
</property>
@@ -192,7 +192,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>211</width>
<height>31</height>
@@ -209,7 +209,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>201</width>
<height>31</height>
@@ -226,5 +226,5 @@
<slot>close()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/knemod/interfacestatusdialog.cpp b/src/knemod/interfacestatusdialog.cpp
index 87260af..72f5e16 100644
--- a/src/knemod/interfacestatusdialog.cpp
+++ b/src/knemod/interfacestatusdialog.cpp
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qgroupbox.h>
-#include <qdatetime.h>
-#include <qtabwidget.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqgroupbox.h>
+#include <tqdatetime.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -37,13 +37,13 @@
#include "interfacestatistics.h"
#include "interfacestatusdialog.h"
-InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, QWidget* parent, const char* name )
- : InterfaceStatusDlg( parent, name ),
+InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, TQWidget* tqparent, const char* name )
+ : InterfaceStatusDlg( tqparent, name ),
mPosInitialized( false ),
mInterface( interface )
{
setIcon( SmallIcon( "knemo" ) );
- setCaption( interface->getName() + " " + i18n( "Interface Status" ) );
+ setCaption( interface->getName() + " " + i18n( "Interface tqStatus" ) );
updateDialog();
if ( interface->getData().available )
{
@@ -55,7 +55,7 @@ InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, QWidget* par
}
if ( !interface->getData().wirelessDevice )
{
- QWidget* wirelessTab = tabWidget->page( 2 );
+ TQWidget* wirelessTab = tabWidget->page( 2 );
tabWidget->removePage( wirelessTab );
delete wirelessTab;
}
@@ -84,8 +84,8 @@ InterfaceStatusDialog::InterfaceStatusDialog( Interface* interface, QWidget* par
statisticsChanged();
- mTimer = new QTimer();
- connect( mTimer, SIGNAL( timeout() ), this, SLOT( updateDialog() ) );
+ mTimer = new TQTimer();
+ connect( mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateDialog() ) );
mTimer->start( 1000 );
}
@@ -112,12 +112,12 @@ void InterfaceStatusDialog::hide()
{
mPos = pos();
mPosInitialized = true;
- QDialog::hide();
+ TQDialog::hide();
}
void InterfaceStatusDialog::show()
{
- QDialog::show();
+ TQDialog::show();
/**
* mPosInitialized should always be true, except when
* starting KNemo for the very first time.
@@ -141,34 +141,34 @@ void InterfaceStatusDialog::updateDialog()
textLabelAlias->setText( settings.alias );
if ( data.available )
{
- textLabelStatus->setText( i18n( "Connection established." ) );
- int upsecs = mInterface->getStartTime().secsTo( QDateTime::currentDateTime() );
- int updays = upsecs / 86400; // don't use QDateTime::daysTo() because
+ textLabeltqStatus->setText( i18n( "Connection established." ) );
+ int upsecs = mInterface->getStartTime().secsTo( TQDateTime::tqcurrentDateTime() );
+ int updays = upsecs / 86400; // don't use TQDateTime::daysTo() because
// we only want complete days
- QString uptime;
+ TQString uptime;
if ( updays == 1 )
uptime = "1 day, ";
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
int hrs = upsecs / 3600;
int mins = ( upsecs - hrs * 3600 ) / 60;
int secs = upsecs - hrs * 3600 - mins * 60;
- QString time;
+ TQString time;
time.sprintf( "%02d:%02d:%02d", hrs, mins, secs );
uptime += time;
textLabelUptime->setText( uptime );
}
else if ( data.existing )
{
- textLabelStatus->setText( i18n( "Not connected." ) );
+ textLabeltqStatus->setText( i18n( "Not connected." ) );
textLabelUptime->setText( "00:00:00" );
}
else
{
- textLabelStatus->setText( i18n( "Not existing." ) );
+ textLabeltqStatus->setText( i18n( "Not existing." ) );
textLabelUptime->setText( "00:00:00" );
}
@@ -190,25 +190,25 @@ void InterfaceStatusDialog::updateDialog()
{
variableLabel1->setText( i18n( "PtP-Address:" ) );
variableText1->setText( data.ptpAddress );
- variableLabel2->setText( QString::null );
- variableText2->setText( QString::null );
- variableLabel3->setText( QString::null );
- variableText3->setText( QString::null );
+ variableLabel2->setText( TQString() );
+ variableText2->setText( TQString() );
+ variableLabel3->setText( TQString() );
+ variableText3->setText( TQString() );
}
else
{
// shouldn't happen
- variableLabel1->setText( QString::null );
- variableText1->setText( QString::null );
- variableLabel2->setText( QString::null );
- variableText2->setText( QString::null );
- variableLabel3->setText( QString::null );
- variableText3->setText( QString::null );
+ variableLabel1->setText( TQString() );
+ variableText1->setText( TQString() );
+ variableLabel2->setText( TQString() );
+ variableText2->setText( TQString() );
+ variableLabel3->setText( TQString() );
+ variableText3->setText( TQString() );
}
// traffic tab
- textLabelPacketsSend->setText( QString::number( data.txPackets ) );
- textLabelPacketsReceived->setText( QString::number( data.rxPackets ) );
+ textLabelPacketsSend->setText( TQString::number( data.txPackets ) );
+ textLabelPacketsReceived->setText( TQString::number( data.rxPackets ) );
textLabelBytesSend->setText( data.txString );
textLabelBytesReceived->setText( data.rxString );
unsigned long bytesPerSecond = data.outgoingBytes / mInterface->getGeneralData().pollInterval;
@@ -252,31 +252,31 @@ void InterfaceStatusDialog::disableNetworkGroups( int )
groupBoxCurrentConnection->setEnabled( false );
// clear IP group
- textLabelIP->setText( QString::null );
- textLabelSubnet->setText( QString::null );
- variableText1->setText( QString::null );
- variableText2->setText( QString::null );
- variableText3->setText( QString::null );
+ textLabelIP->setText( TQString() );
+ textLabelSubnet->setText( TQString() );
+ variableText1->setText( TQString() );
+ variableText2->setText( TQString() );
+ variableText3->setText( TQString() );
// clear current connection group
- textLabelPacketsSend->setText( QString::null );
- textLabelPacketsReceived->setText( QString::null );
- textLabelBytesSend->setText( QString::null );
- textLabelBytesReceived->setText( QString::null );
- textLabelSpeedSend->setText( QString::null );
- textLabelSpeedReceived->setText( QString::null );
+ textLabelPacketsSend->setText( TQString() );
+ textLabelPacketsReceived->setText( TQString() );
+ textLabelBytesSend->setText( TQString() );
+ textLabelBytesReceived->setText( TQString() );
+ textLabelSpeedSend->setText( TQString() );
+ textLabelSpeedReceived->setText( TQString() );
// clear wireless tab
if ( mInterface->getData().wirelessDevice )
{
- textLabelESSID->setText( QString::null );
- textLabelAccessPoint->setText( QString::null );
- textLabelNickName->setText( QString::null );
- textLabelMode->setText( QString::null );
- textLabelFreqChannel->setText( QString::null );
- textLabelBitRate->setText( QString::null );
- textLabelLinkQuality->setText( QString::null );
- textLabelEncryption->setText( QString::null );
+ textLabelESSID->setText( TQString() );
+ textLabelAccessPoint->setText( TQString() );
+ textLabelNickName->setText( TQString() );
+ textLabelMode->setText( TQString() );
+ textLabelFreqChannel->setText( TQString() );
+ textLabelBitRate->setText( TQString() );
+ textLabelLinkQuality->setText( TQString() );
+ textLabelEncryption->setText( TQString() );
}
}
diff --git a/src/knemod/interfacestatusdialog.h b/src/knemod/interfacestatusdialog.h
index 3b15362..74f2b54 100644
--- a/src/knemod/interfacestatusdialog.h
+++ b/src/knemod/interfacestatusdialog.h
@@ -20,11 +20,11 @@
#ifndef INTERFACESTATUSDIALOG_H
#define INTERFACESTATUSDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "interfacestatusdlg.h"
-class QTimer;
+class TQTimer;
class Interface;
/**
@@ -38,12 +38,13 @@ class Interface;
class InterfaceStatusDialog : public InterfaceStatusDlg
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
InterfaceStatusDialog( Interface* interface,
- QWidget* parent = 0L, const char* name = 0L );
+ TQWidget* tqparent = 0L, const char* name = 0L );
/**
* Default Destructor
@@ -79,10 +80,10 @@ private slots:
void updateDialog();
private:
- QPoint mPos;
+ TQPoint mPos;
bool mPosInitialized;
- QTimer* mTimer;
+ TQTimer* mTimer;
Interface* mInterface;
};
diff --git a/src/knemod/interfacestatusdlg.ui b/src/knemod/interfacestatusdlg.ui
index f707ef3..a53f137 100644
--- a/src/knemod/interfacestatusdlg.ui
+++ b/src/knemod/interfacestatusdlg.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>InterfaceStatusDlg</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>InterfaceStatusDlg</cstring>
</property>
@@ -13,7 +13,7 @@
</rect>
</property>
<property name="caption">
- <string>Interface Status</string>
+ <string>Interface tqStatus</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
@@ -22,11 +22,11 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>connection</cstring>
</property>
@@ -47,14 +47,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>81</width>
<height>30</height>
</size>
</property>
</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">
<cstring>groupBoxIP</cstring>
</property>
@@ -65,47 +65,47 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>textLabelIP</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabelSubnet</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>variableText1</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="1">
+ <widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>variableText2</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="4" column="1">
+ <widget class="TQLabel" row="4" column="1">
<property name="name">
<cstring>variableText3</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel4_2</cstring>
</property>
@@ -113,7 +113,7 @@
<string>IP-Address:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel5_2</cstring>
</property>
@@ -121,7 +121,7 @@
<string>Subnet Mask:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>variableLabel1</cstring>
</property>
@@ -129,7 +129,7 @@
<string>Broadcast Address:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>variableLabel2</cstring>
</property>
@@ -137,7 +137,7 @@
<string>Default Gateway:</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>variableLabel3</cstring>
</property>
@@ -147,51 +147,51 @@
</widget>
</grid>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabelAlias</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>textLabelInterface</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
- <cstring>textLabelStatus</cstring>
+ <cstring>textLabeltqStatus</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="1">
+ <widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>textLabelUptime</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel24</cstring>
</property>
@@ -199,7 +199,7 @@
<string>Interface:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel14</cstring>
</property>
@@ -207,15 +207,15 @@
<string>Alias:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
<property name="text">
- <string>Status:</string>
+ <string>tqStatus:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -225,7 +225,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>traffic</cstring>
</property>
@@ -236,7 +236,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBoxCurrentConnection</cstring>
</property>
@@ -247,45 +247,45 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel8</cstring>
</property>
<property name="text">
<string>Received</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>textLabel7</cstring>
</property>
<property name="text">
<string>Sent</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabelPacketsSend</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>textLabelPacketsReceived</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel9</cstring>
</property>
@@ -293,63 +293,63 @@
<string>Packets:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel10</cstring>
</property>
<property name="text">
<string>Bytes:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel10_2</cstring>
</property>
<property name="text">
<string>Speed:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>textLabelBytesSend</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>textLabelBytesReceived</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="1">
+ <widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>textLabelSpeedSend</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="2">
+ <widget class="TQLabel" row="3" column="2">
<property name="name">
<cstring>textLabelSpeedReceived</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBoxStatistics</cstring>
</property>
@@ -360,7 +360,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel9_2_2</cstring>
</property>
@@ -368,130 +368,130 @@
<string>Today:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel10_2_2_2</cstring>
</property>
<property name="text">
<string>This year:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel8_2_3</cstring>
</property>
<property name="text">
<string>Received</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="3">
+ <widget class="TQLabel" row="0" column="3">
<property name="name">
<cstring>textLabel8_2_2_2</cstring>
</property>
<property name="text">
<string>Total</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel10_3_2</cstring>
</property>
<property name="text">
<string>This month:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>textLabelTodayReceived</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>textLabelMonthReceived</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="2">
+ <widget class="TQLabel" row="3" column="2">
<property name="name">
<cstring>textLabelYearReceived</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="3">
+ <widget class="TQLabel" row="1" column="3">
<property name="name">
<cstring>textLabelTodayTotal</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="3">
+ <widget class="TQLabel" row="2" column="3">
<property name="name">
<cstring>textLabelMonthTotal</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="3">
+ <widget class="TQLabel" row="3" column="3">
<property name="name">
<cstring>textLabelYearTotal</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>textLabel7_2_2</cstring>
</property>
<property name="text">
<string>Sent</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>textLabelMonthSent</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="1">
+ <widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>textLabelYearSent</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabelTodaySent</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -507,7 +507,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>81</width>
<height>16</height>
@@ -516,7 +516,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>wireless</cstring>
</property>
@@ -527,7 +527,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -535,18 +535,18 @@
<string>Connected to:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>textLabelESSID</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3_2_2_2</cstring>
</property>
@@ -554,18 +554,18 @@
<string>Access point:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabelAccessPoint</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel3_2_4</cstring>
</property>
@@ -573,7 +573,7 @@
<string>Bit Rate:</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabelFC</cstring>
</property>
@@ -581,7 +581,7 @@
<string>Frequency [Channel]:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel3_2_2</cstring>
</property>
@@ -589,42 +589,42 @@
<string>Mode:</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="1">
+ <widget class="TQLabel" row="5" column="1">
<property name="name">
<cstring>textLabelBitRate</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="4" column="1">
+ <widget class="TQLabel" row="4" column="1">
<property name="name">
<cstring>textLabelFreqChannel</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="3" column="1">
+ <widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>textLabelMode</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>textLabelNickName</cstring>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3_2_5</cstring>
</property>
@@ -642,14 +642,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>81</width>
<height>50</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="6" column="0">
+ <widget class="TQLabel" row="6" column="0">
<property name="name">
<cstring>textLabel3_2_6</cstring>
</property>
@@ -657,7 +657,7 @@
<string>Link Quality:</string>
</property>
</widget>
- <widget class="QLabel" row="7" column="0">
+ <widget class="TQLabel" row="7" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -665,34 +665,34 @@
<string>Encryption:</string>
</property>
</widget>
- <widget class="QLabel" row="6" column="1">
+ <widget class="TQLabel" row="6" column="1">
<property name="name">
<cstring>textLabelLinkQuality</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="7" column="1">
+ <widget class="TQLabel" row="7" column="1">
<property name="name">
<cstring>textLabelEncryption</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</grid>
</widget>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -708,14 +708,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonClose</cstring>
</property>
@@ -736,7 +736,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>21</height>
@@ -755,5 +755,5 @@
<slot>accept()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/knemod/interfacetooltip.cpp b/src/knemod/interfacetooltip.cpp
index 77d6505..29e098d 100644
--- a/src/knemod/interfacetooltip.cpp
+++ b/src/knemod/interfacetooltip.cpp
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qrect.h>
-#include <qstring.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <klocale.h>
@@ -29,8 +29,8 @@
#include "interfacetooltip.h"
InterfaceToolTip::InterfaceToolTip( Interface* interface,
- QWidget* parent )
- : QToolTip( parent ),
+ TQWidget* tqparent )
+ : TQToolTip( tqparent ),
mInterface( interface )
{
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() )
return;
- QString tooltip;
+ TQString tooltip;
setupText( tooltip );
tip( rect, tooltip );
}
-void InterfaceToolTip::setupText( QString& text )
+void InterfaceToolTip::setupText( TQString& text )
{
int toolTipContent = mInterface->getGeneralData().toolTipContent;
InterfaceData& data = mInterface->getData();
text += "<table cellspacing=0 cellpadding=0 border=0>";
if ( ( toolTipContent & ALIAS ) &&
- mInterface->getSettings().alias != QString::null )
+ mInterface->getSettings().alias != TQString() )
text += "<tr><th colspan=2 align=center>" + mInterface->getSettings().alias + "</th></tr>";
if ( toolTipContent & INTERFACE )
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>";
if ( toolTipContent & UPTIME )
{
- int upsecs = mInterface->getStartTime().secsTo( QDateTime::currentDateTime() );
- int updays = upsecs / 86400; // don't use QDateTime::daysTo() because
+ int upsecs = mInterface->getStartTime().secsTo( TQDateTime::tqcurrentDateTime() );
+ int updays = upsecs / 86400; // don't use TQDateTime::daysTo() because
// we only want complete days
- QString uptime;
+ TQString uptime;
if ( updays == 1 )
uptime = "1 day, ";
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
int hrs = upsecs / 3600;
int mins = ( upsecs - hrs * 3600 ) / 60;
int secs = upsecs - hrs * 3600 - mins * 60;
- QString time;
+ TQString time;
time.sprintf( "%02d:%02d:%02d", hrs, mins, secs );
uptime += time;
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>";
}
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 )
- 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 )
text += "<tr><td>" + mToolTips[10].first + "</td><td>" + data.rxString + "</td></tr>";
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>";
if ( toolTipContent & ACCESS_POINT )
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>";
if ( toolTipContent & NICK_NAME )
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
// to work when called to early i.e. before setting the catalogue.
- mToolTips[0] = QPair<QString, int>( i18n( "Interface" ), INTERFACE );
- mToolTips[1] = QPair<QString, int>( i18n( "Alias" ), ALIAS );
- mToolTips[2] = QPair<QString, int>( i18n( "Status" ), STATUS );
- mToolTips[3] = QPair<QString, int>( i18n( "Uptime" ), UPTIME );
- mToolTips[4] = QPair<QString, int>( i18n( "IP-Address" ), IP_ADDRESS );
- mToolTips[5] = QPair<QString, int>( i18n( "Subnet Mask" ), SUBNET_MASK );
- mToolTips[6] = QPair<QString, int>( i18n( "HW-Address" ), HW_ADDRESS );
- mToolTips[7] = QPair<QString, int>( i18n( "PtP-Address" ), PTP_ADDRESS );
- mToolTips[8] = QPair<QString, int>( i18n( "Packets Received" ), RX_PACKETS );
- mToolTips[9] = QPair<QString, int>( i18n( "Packets Sent" ), TX_PACKETS );
- mToolTips[10] = QPair<QString, int>( i18n( "Bytes Received" ), RX_BYTES );
- mToolTips[11] = QPair<QString, int>( i18n( "Bytes Sent" ), TX_BYTES );
- mToolTips[12] = QPair<QString, int>( i18n( "ESSID" ), ESSID );
- mToolTips[13] = QPair<QString, int>( i18n( "Mode" ), MODE );
- mToolTips[14] = QPair<QString, int>( i18n( "Frequency" ), FREQUENCY );
- mToolTips[15] = QPair<QString, int>( i18n( "Bit Rate" ), BIT_RATE );
- mToolTips[16] = QPair<QString, int>( i18n( "Access Point" ), ACCESS_POINT );
- mToolTips[17] = QPair<QString, int>( i18n( "Link Quality" ), LINK_QUALITY );
- mToolTips[18] = QPair<QString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS );
- mToolTips[19] = QPair<QString, int>( i18n( "Default Gateway" ), LINK_QUALITY );
- mToolTips[20] = QPair<QString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED );
- mToolTips[21] = QPair<QString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED );
- mToolTips[22] = QPair<QString, int>( i18n( "Nickname" ), NICK_NAME );
- mToolTips[23] = QPair<QString, int>( i18n( "Encryption" ), ENCRYPTION );
- mToolTips[24] = QPair<QString, int>();
+ mToolTips[0] = TQPair<TQString, int>( i18n( "Interface" ), INTERFACE );
+ mToolTips[1] = TQPair<TQString, int>( i18n( "Alias" ), ALIAS );
+ mToolTips[2] = TQPair<TQString, int>( i18n( "tqStatus" ), STATUS );
+ mToolTips[3] = TQPair<TQString, int>( i18n( "Uptime" ), UPTIME );
+ mToolTips[4] = TQPair<TQString, int>( i18n( "IP-Address" ), IP_ADDRESS );
+ mToolTips[5] = TQPair<TQString, int>( i18n( "Subnet Mask" ), SUBNET_MASK );
+ mToolTips[6] = TQPair<TQString, int>( i18n( "HW-Address" ), HW_ADDRESS );
+ mToolTips[7] = TQPair<TQString, int>( i18n( "PtP-Address" ), PTP_ADDRESS );
+ mToolTips[8] = TQPair<TQString, int>( i18n( "Packets Received" ), RX_PACKETS );
+ mToolTips[9] = TQPair<TQString, int>( i18n( "Packets Sent" ), TX_PACKETS );
+ mToolTips[10] = TQPair<TQString, int>( i18n( "Bytes Received" ), RX_BYTES );
+ mToolTips[11] = TQPair<TQString, int>( i18n( "Bytes Sent" ), TX_BYTES );
+ mToolTips[12] = TQPair<TQString, int>( i18n( "ESSID" ), ESSID );
+ mToolTips[13] = TQPair<TQString, int>( i18n( "Mode" ), MODE );
+ mToolTips[14] = TQPair<TQString, int>( i18n( "Frequency" ), FREQUENCY );
+ mToolTips[15] = TQPair<TQString, int>( i18n( "Bit Rate" ), BIT_RATE );
+ mToolTips[16] = TQPair<TQString, int>( i18n( "Access Point" ), ACCESS_POINT );
+ mToolTips[17] = TQPair<TQString, int>( i18n( "Link Quality" ), LINK_TQUALITY );
+ mToolTips[18] = TQPair<TQString, int>( i18n( "Broadcast Address" ), BCAST_ADDRESS );
+ mToolTips[19] = TQPair<TQString, int>( i18n( "Default Gateway" ), LINK_TQUALITY );
+ mToolTips[20] = TQPair<TQString, int>( i18n( "Download Speed" ), DOWNLOAD_SPEED );
+ mToolTips[21] = TQPair<TQString, int>( i18n( "Upload Speed" ), UPLOAD_SPEED );
+ mToolTips[22] = TQPair<TQString, int>( i18n( "Nickname" ), NICK_NAME );
+ mToolTips[23] = TQPair<TQString, int>( i18n( "Encryption" ), ENCRYPTION );
+ mToolTips[24] = TQPair<TQString, int>();
}
diff --git a/src/knemod/interfacetooltip.h b/src/knemod/interfacetooltip.h
index 7c4dbd9..c1dfada 100644
--- a/src/knemod/interfacetooltip.h
+++ b/src/knemod/interfacetooltip.h
@@ -20,28 +20,28 @@
#ifndef INTERFACETOOLTIP_H
#define INTERFACETOOLTIP_H
-#include <qpair.h>
-#include <qtooltip.h>
+#include <tqpair.h>
+#include <tqtooltip.h>
class Interface;
/**
* This call is responsible for displaying the tooltip of an
- * interface icon. It is derived from QToolTip and overwrites
- * the function maybeTip(const QPoint & p) to update the tooltip
+ * interface icon. It is derived from TQToolTip and overwrites
+ * the function maybeTip(const TQPoint & p) to update the tooltip
* text just before it is going to be displayed.
*
* @short Display tooltip according to user settings
* @author Percy Leonhardt <percy@eris23.de>
*/
-class InterfaceToolTip : public QToolTip
+class InterfaceToolTip : public TQToolTip
{
public:
/**
* Default Constructor
*/
- InterfaceToolTip( Interface* interface, QWidget* parent = 0L );
+ InterfaceToolTip( Interface* interface, TQWidget* tqparent = 0L );
/**
* Default Destructor
@@ -49,24 +49,24 @@ public:
virtual ~InterfaceToolTip();
/**
- * From the Qt documentation:
+ * From the TQt documentation:
* 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
- * 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
- * and optionally the QToolTipGroup details and the geometry in screen
+ * and optionally the TQToolTipGroup details and the tqgeometry in screen
* coordinates.
*/
- void maybeTip( const QPoint& );
+ void maybeTip( const TQPoint& );
private:
- void setupText( QString& text );
+ void setupText( TQString& text );
void setupToolTipArray();
// the interface this tooltip belongs to
Interface* mInterface;
// the tooltip text for each information
- QPair<QString, int> mToolTips[25];
+ TQPair<TQString, int> mToolTips[25];
};
#endif // INTERFACETOOLTIP_H
diff --git a/src/knemod/interfacetray.cpp b/src/knemod/interfacetray.cpp
index c8ab03a..6b8812f 100644
--- a/src/knemod/interfacetray.cpp
+++ b/src/knemod/interfacetray.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -37,9 +37,9 @@ static const char description[] =
static const char version[] = "0.4.8";
-InterfaceTray::InterfaceTray( const QString& ifname,
- QWidget* parent, const char* name )
- : KSystemTray( parent, name )
+InterfaceTray::InterfaceTray( const TQString& ifname,
+ TQWidget* tqparent, const char* name )
+ : KSystemTray( tqparent, name )
{
actionCollection()->clear(); // remove the quit entry
@@ -49,42 +49,42 @@ InterfaceTray::InterfaceTray( const QString& ifname,
"KNemo - " + ifname );
popup->insertItem( SmallIcon( "knemo" ),
i18n( "&About KNemo" ), this,
- SLOT( showAboutDialog() ) );
+ TQT_SLOT( showAboutDialog() ) );
popup->insertItem( i18n( "&Report Bug..." ), this,
- SLOT( showReportBugDialog() ) );
+ TQT_SLOT( showReportBugDialog() ) );
popup->insertSeparator();
popup->insertItem( SmallIcon( "configure" ),
i18n( "&Configure KNemo..." ), this,
- SIGNAL( configSelected() ) );
+ TQT_SIGNAL( configSelected() ) );
popup->insertItem( SmallIcon( "ksysguard" ),
i18n( "&Open Traffic Plotter" ), this,
- SLOT( showGraph() ) );
+ TQT_SLOT( showGraph() ) );
}
InterfaceTray::~InterfaceTray()
{
}
-void InterfaceTray::resizeEvent ( QResizeEvent * )
+void InterfaceTray::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
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;
switch( e->button() )
{
- case LeftButton:
+ case Qt::LeftButton:
emit leftClicked();
break;
- case MidButton:
+ case Qt::MidButton:
emit graphSelected( true );
break;
- case RightButton:
+ case Qt::RightButton:
KSystemTray::mousePressEvent( e );
break;
default:
diff --git a/src/knemod/interfacetray.h b/src/knemod/interfacetray.h
index 61b442b..04ca402 100644
--- a/src/knemod/interfacetray.h
+++ b/src/knemod/interfacetray.h
@@ -22,7 +22,7 @@
#include <ksystemtray.h>
-class QWidget;
+class TQWidget;
/**
* This class is the graphical representation of and interface
@@ -36,12 +36,13 @@ class QWidget;
class InterfaceTray : public KSystemTray
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
*/
- InterfaceTray( const QString& ifname,
- QWidget* parent = 0L, const char* name = 0L );
+ InterfaceTray( const TQString& ifname,
+ TQWidget* tqparent = 0L, const char* name = 0L );
/**
* Default Destructor
@@ -57,8 +58,8 @@ signals:
void iconResized();
protected:
- void mousePressEvent( QMouseEvent* e );
- void resizeEvent ( QResizeEvent * );
+ void mousePressEvent( TQMouseEvent* e );
+ void resizeEvent ( TQResizeEvent * );
protected slots:
/**
diff --git a/src/knemod/knemodaemon.cpp b/src/knemod/knemodaemon.cpp
index e5a7f88..5accc6d 100644
--- a/src/knemod/knemodaemon.cpp
+++ b/src/knemod/knemodaemon.cpp
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qstrlist.h>
+#include <tqtimer.h>
+#include <tqstrlist.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -34,15 +34,15 @@
#include "backendbase.h"
#include "daemonregistry.h"
-QString KNemoDaemon::sSelectedInterface = QString::null;
+TQString KNemoDaemon::sSelectedInterface = TQString();
extern "C" {
- KDE_EXPORT KDEDModule *create_knemod(const QCString &name) {
+ KDE_EXPORT KDEDModule *create_knemod(const TQCString &name) {
return new KNemoDaemon(name);
}
}
-KNemoDaemon::KNemoDaemon( const QCString& name )
+KNemoDaemon::KNemoDaemon( const TQCString& name )
: KDEDModule( name ),
mColorVLines( 0x04FB1D ),
mColorHLines( 0x04FB1D ),
@@ -63,7 +63,7 @@ KNemoDaemon::KNemoDaemon( const QCString& name )
bool foundBackend = false;
int i;
- for ( i = 0; DaemonRegistry[i].name != QString::null; i++ )
+ for ( i = 0; DaemonRegistry[i].name != TQString(); i++ )
{
if ( DaemonRegistry[i].name == mBackendName )
{
@@ -80,8 +80,8 @@ KNemoDaemon::KNemoDaemon( const QCString& name )
mInterfaceDict.setAutoDelete( true );
- mPollTimer = new QTimer();
- connect( mPollTimer, SIGNAL( timeout() ), this, SLOT( updateInterfaces() ) );
+ mPollTimer = new TQTimer();
+ connect( mPollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateInterfaces() ) );
mPollTimer->start( mGeneralData.pollInterval * 1000 );
}
@@ -93,7 +93,7 @@ KNemoDaemon::~KNemoDaemon()
delete mNotifyInstance;
delete mInstance;
- QDictIterator<Interface> it( mInterfaceDict );
+ TQDictIterator<Interface> it( mInterfaceDict );
for ( ; it.current(); )
{
mInterfaceDict.remove( it.currentKey() );
@@ -110,7 +110,7 @@ void KNemoDaemon::readConfig()
mGeneralData.saveInterval = config->readNumEntry( "SaveInterval", 60 );
mGeneralData.statisticsDir = config->readEntry( "StatisticsDir", KGlobal::dirs()->saveLocation( "data", "knemo/" ) );
mGeneralData.toolTipContent = config->readNumEntry( "ToolTipContent", 2 );
- QStrList list;
+ TQStrList list;
int numEntries = config->readListEntry( "Interfaces", list );
if ( numEntries == 0 )
@@ -120,7 +120,7 @@ void KNemoDaemon::readConfig()
for ( interface = list.first(); interface; interface = list.next() )
{
Interface* iface = new Interface( interface, mGeneralData, mPlotterSettings );
- QString group( "Interface_" );
+ TQString group( "Interface_" );
group += interface;
if ( config->hasGroup( group ) )
{
@@ -138,13 +138,13 @@ void KNemoDaemon::readConfig()
int numCommands = config->readNumEntry( "NumCommands" );
for ( int i = 0; i < numCommands; i++ )
{
- QString entry;
+ TQString entry;
InterfaceCommand cmd;
- entry = QString( "RunAsRoot%1" ).arg( i + 1 );
+ entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 );
cmd.runAsRoot = config->readBoolEntry( entry );
- entry = QString( "Command%1" ).arg( i + 1 );
+ entry = TQString( "Command%1" ).tqarg( i + 1 );
cmd.command = config->readEntry( entry );
- entry = QString( "MenuText%1" ).arg( i + 1 );
+ entry = TQString( "MenuText%1" ).tqarg( i + 1 );
cmd.menuText = config->readEntry( entry );
settings.commands.append( cmd );
}
@@ -182,7 +182,7 @@ void KNemoDaemon::readConfig()
void KNemoDaemon::reparseConfiguration()
{
// Read the settings from the config file.
- QDict<InterfaceSettings> settingsDict;
+ TQDict<InterfaceSettings> settingsDict;
KConfig* config = new KConfig( "knemorc", false );
config->setGroup( "General" );
@@ -195,14 +195,14 @@ void KNemoDaemon::reparseConfiguration()
mPollTimer->changeInterval( mGeneralData.pollInterval * 1000 );
// select the backend from the config file
- QString backend = config->readEntry( "Backend", "Nettools" );
+ TQString backend = config->readEntry( "Backend", "Nettools" );
if ( mBackendName != backend )
{
bool foundBackend = false;
mBackendName = backend;
int i;
- for ( i = 0; DaemonRegistry[i].name != QString::null; i++ )
+ for ( i = 0; DaemonRegistry[i].name != TQString(); i++ )
{
if ( DaemonRegistry[i].name == backend )
{
@@ -218,7 +218,7 @@ void KNemoDaemon::reparseConfiguration()
}
}
- QStrList list;
+ TQStrList list;
int numEntries = config->readListEntry( "Interfaces", list );
if ( numEntries == 0 )
@@ -227,7 +227,7 @@ void KNemoDaemon::reparseConfiguration()
char* interface;
for ( interface = list.first(); interface; interface = list.next() )
{
- QString group( "Interface_" );
+ TQString group( "Interface_" );
group += interface;
InterfaceSettings* settings = new InterfaceSettings();
if ( config->hasGroup( group ) )
@@ -245,13 +245,13 @@ void KNemoDaemon::reparseConfiguration()
int numCommands = config->readNumEntry( "NumCommands" );
for ( int i = 0; i < numCommands; i++ )
{
- QString entry;
+ TQString entry;
InterfaceCommand cmd;
- entry = QString( "RunAsRoot%1" ).arg( i + 1 );
+ entry = TQString( "RunAsRoot%1" ).tqarg( i + 1 );
cmd.runAsRoot = config->readBoolEntry( entry );
- entry = QString( "Command%1" ).arg( i + 1 );
+ entry = TQString( "Command%1" ).tqarg( i + 1 );
cmd.command = config->readEntry( entry );
- entry = QString( "MenuText%1" ).arg( i + 1 );
+ entry = TQString( "MenuText%1" ).tqarg( i + 1 );
cmd.menuText = config->readEntry( entry );
settings->commands.append( cmd );
}
@@ -284,10 +284,10 @@ void KNemoDaemon::reparseConfiguration()
// Remove all interfaces that the user deleted from
// the internal list.
- QDictIterator<Interface> it( mInterfaceDict );
+ TQDictIterator<Interface> it( mInterfaceDict );
for ( ; it.current(); )
{
- if ( settingsDict.find( it.currentKey() ) == 0 )
+ if ( settingsDict.tqfind( it.currentKey() ) == 0 )
{
config->deleteGroup( "Interface_" + it.currentKey() );
mInterfaceDict.remove( it.currentKey() );
@@ -300,11 +300,11 @@ void KNemoDaemon::reparseConfiguration()
delete config;
// Update all other interfaces and add new ones.
- QDictIterator<InterfaceSettings> setIt( settingsDict );
+ TQDictIterator<InterfaceSettings> setIt( settingsDict );
for ( ; setIt.current(); ++setIt )
{
Interface* iface;
- if ( mInterfaceDict.find( setIt.currentKey() ) == 0 )
+ if ( mInterfaceDict.tqfind( setIt.currentKey() ) == 0 )
{
iface = new Interface( setIt.currentKey(), mGeneralData, mPlotterSettings );
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
// the user opens the control center module from the control
// center afterwards.
- QString tmp = sSelectedInterface;
- sSelectedInterface = QString::null;
+ TQString tmp = sSelectedInterface;
+ sSelectedInterface = TQString();
return tmp;
}
diff --git a/src/knemod/knemodaemon.h b/src/knemod/knemodaemon.h
index d62c288..e0ac3d9 100644
--- a/src/knemod/knemodaemon.h
+++ b/src/knemod/knemodaemon.h
@@ -20,10 +20,10 @@
#ifndef KNEMODAEMON_H
#define KNEMODAEMON_H
-#include <qdict.h>
-#include <qcolor.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqdict.h>
+#include <tqcolor.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
#include <kdedmodule.h>
#include <knotifyclient.h>
@@ -31,7 +31,7 @@
#include "data.h"
#include "global.h"
-class QTimer;
+class TQTimer;
class KInstance;
class Interface;
class BackendBase;
@@ -49,11 +49,12 @@ class KNemoDaemon : public KDEDModule
{
K_DCOP
Q_OBJECT
+// TQ_OBJECT
public:
/**
* Default Constructor
*/
- KNemoDaemon( const QCString& name );
+ KNemoDaemon( const TQCString& name );
/**
* Default Destructor
@@ -61,7 +62,7 @@ public:
virtual ~KNemoDaemon();
// tell the control center module which interface the user selected
- static QString sSelectedInterface;
+ static TQString sSelectedInterface;
k_dcop:
/*
@@ -77,7 +78,7 @@ k_dcop:
* user opened the dialog and can preselect the appropriate
* interface in the list.
*/
- virtual QString getSelectedInterface();
+ virtual TQString getSelectedInterface();
private:
/*
@@ -92,15 +93,15 @@ private slots:
void updateInterfaces();
private:
- QColor mColorVLines;
- QColor mColorHLines;
- QColor mColorIncoming;
- QColor mColorOutgoing;
- QColor mColorBackground;
+ TQColor mColorVLines;
+ TQColor mColorHLines;
+ TQColor mColorIncoming;
+ TQColor mColorOutgoing;
+ TQColor mColorBackground;
// every time this timer expires we will
// gather new informations from the backend
- QTimer* mPollTimer;
+ TQTimer* mPollTimer;
// our own instance
KInstance* mInstance;
// needed so that KNotifyClient::event will work
@@ -110,11 +111,11 @@ private:
// settings for the traffic plotter are stored here
PlotterSettings mPlotterSettings;
// the name of backend we currently use
- QString mBackendName;
+ TQString mBackendName;
// the backend used to update the interface informations
BackendBase* mBackend;
// a list of all interfaces the user wants to monitor
- QDict<Interface> mInterfaceDict;
+ TQDict<Interface> mInterfaceDict;
};
#endif // KNEMODAEMON_H
diff --git a/src/knemod/signalplotter.cpp b/src/knemod/signalplotter.cpp
index 4945a2d..d28b72c 100644
--- a/src/knemod/signalplotter.cpp
+++ b/src/knemod/signalplotter.cpp
@@ -25,8 +25,8 @@
#include <math.h>
#include <string.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -38,8 +38,8 @@ static inline int min( int a, int b )
return ( a < b ? a : b );
}
-SignalPlotter::SignalPlotter( QWidget *parent, const char *name )
- : QDialog( parent, name ),
+SignalPlotter::SignalPlotter( TQWidget *tqparent, const char *name )
+ : TQDialog( tqparent, name ),
mPosInitialized( false ),
mName( name )
{
@@ -56,25 +56,25 @@ SignalPlotter::SignalPlotter( QWidget *parent, const char *name )
// Anything smaller than this does not make sense.
setMinimumSize( 16, 16 );
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
- QSizePolicy::Expanding, false ) );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding, false ) );
mShowVerticalLines = true;
- mVerticalLinesColor = QColor( 0x04FB1D );
+ mVerticalLinesColor = TQColor( 0x04FB1D );
mVerticalLinesDistance = 30;
mVerticalLinesScroll = true;
mVerticalLinesOffset = 0;
mHorizontalScale = 1;
mShowHorizontalLines = true;
- mHorizontalLinesColor = QColor( 0x04FB1D );
+ mHorizontalLinesColor = TQColor( 0x04FB1D );
mHorizontalLinesCount = 5;
mShowLabels = true;
mShowTopBar = false;
mFontSize = 8;
- mBackgroundColor = QColor( 0x313031 );
+ mBackgroundColor = TQColor( 0x313031 );
// Restore window size and position.
KConfig* config = new KConfig( "knemorc", false );
@@ -117,12 +117,12 @@ void SignalPlotter::hide()
{
mPos = pos();
mPosInitialized = true;
- QDialog::hide();
+ TQDialog::hide();
}
void SignalPlotter::show()
{
- QDialog::show();
+ TQDialog::show();
/**
* mPosInitialized should always be true, except when
* starting KNemo for the very first time.
@@ -131,7 +131,7 @@ void SignalPlotter::show()
move( mPos );
}
-bool SignalPlotter::addBeam( const QColor &color )
+bool SignalPlotter::addBeam( const TQColor &color )
{
double* d = new double[ mSamples ];
memset( d, 0, sizeof(double) * mSamples );
@@ -141,7 +141,7 @@ bool SignalPlotter::addBeam( const QColor &color )
return true;
}
-void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
+void SignalPlotter::addSample( const TQValueList<double>& sampleBuf )
{
if ( mBeamData.count() != sampleBuf.count() )
return;
@@ -160,7 +160,7 @@ void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
/* If the vertical lines are scrolling, increment the offset
* 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. */
if ( mVerticalLinesScroll ) {
mVerticalLinesOffset = ( mVerticalLinesOffset + mHorizontalScale)
@@ -168,7 +168,7 @@ void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
}
// 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 ) {
memmove( d, d + 1, ( mSamples - 1 ) * sizeof( double ) );
d[ mSamples - 1 ] = *s;
@@ -187,7 +187,7 @@ void SignalPlotter::changeRange( int beam, double min, double max )
mMaxValue = max;
}
-QValueList<QColor> &SignalPlotter::beamColors()
+TQValueList<TQColor> &SignalPlotter::beamColors()
{
return mBeamColor;
}
@@ -198,12 +198,12 @@ void SignalPlotter::removeBeam( uint pos )
mBeamData.remove( pos );
}
-void SignalPlotter::setTitle( const QString &title )
+void SignalPlotter::setTitle( const TQString &title )
{
mTitle = title;
}
-QString SignalPlotter::title() const
+TQString SignalPlotter::title() const
{
return mTitle;
}
@@ -273,12 +273,12 @@ bool SignalPlotter::showVerticalLines() const
return mShowVerticalLines;
}
-void SignalPlotter::setVerticalLinesColor( const QColor &color )
+void SignalPlotter::setVerticalLinesColor( const TQColor &color )
{
mVerticalLinesColor = color;
}
-QColor SignalPlotter::verticalLinesColor() const
+TQColor SignalPlotter::verticalLinesColor() const
{
return mVerticalLinesColor;
}
@@ -313,12 +313,12 @@ bool SignalPlotter::showHorizontalLines() const
return mShowHorizontalLines;
}
-void SignalPlotter::setHorizontalLinesColor( const QColor &color )
+void SignalPlotter::setHorizontalLinesColor( const TQColor &color )
{
mHorizontalLinesColor = color;
}
-QColor SignalPlotter::horizontalLinesColor() const
+TQColor SignalPlotter::horizontalLinesColor() const
{
return mHorizontalLinesColor;
}
@@ -363,17 +363,17 @@ int SignalPlotter::fontSize() const
return mFontSize;
}
-void SignalPlotter::setBackgroundColor( const QColor &color )
+void SignalPlotter::setBackgroundColor( const TQColor &color )
{
mBackgroundColor = color;
}
-QColor SignalPlotter::backgroundColor() const
+TQColor SignalPlotter::backgroundColor() const
{
return mBackgroundColor;
}
-void SignalPlotter::resizeEvent( QResizeEvent* )
+void SignalPlotter::resizeEvent( TQResizeEvent* )
{
Q_ASSERT( width() > 2 );
@@ -418,23 +418,23 @@ void SignalPlotter::updateDataBuffers()
mSamples = newSampleNum;
}
-void SignalPlotter::paintEvent( QPaintEvent* )
+void SignalPlotter::paintEvent( TQPaintEvent* )
{
uint w = width();
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 )
return;
- QPixmap pm( w, h );
- QPainter p;
- p.begin( &pm, this );
+ TQPixmap pm( w, h );
+ TQPainter p;
+ p.tqbegin( TQT_TQPAINTDEVICE(&pm), this );
pm.fill( mBackgroundColor );
/* Draw white line along the bottom and the right side of the
* 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( 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. */
p.setPen( mHorizontalLinesColor );
int x0 = w / 2;
- p.setFont( QFont( p.font().family(), mFontSize ) );
+ p.setFont( TQFont( p.font().family(), mFontSize ) );
top = p.fontMetrics().height();
h -= top;
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)
// 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();
- QColor UploadColor = *(col_speeds++);
- QColor DownloadColor = *(col_speeds);
+ TQColor UploadColor = *(col_speeds++);
+ TQColor DownloadColor = *(col_speeds);
// download speed
- QString DownloadSpeedText;
+ TQString DownloadSpeedText;
DownloadSpeedText.sprintf("in: %0.2f KB/s", DownloadSpeed);
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
- QString UploadSpeedText;
+ TQString UploadSpeedText;
UploadSpeedText.sprintf("out: %0.2f KB/s", UploadSpeed);
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
p.setPen( mHorizontalLinesColor );
@@ -520,7 +520,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
double bias = -minValue;
double scaleFac = ( w - x0 - 2 ) / range;
- QValueList<QColor>::Iterator col;
+ TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin();
for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) {
int start = x0 + (int)( bias * scaleFac );
@@ -570,7 +570,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
int xPos = 0;
for ( int i = 0; i < mSamples; i++, xPos += mHorizontalScale ) {
double bias = -minValue;
- QValueList<QColor>::Iterator col;
+ TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin();
double sum = 0.0;
for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) {
@@ -604,7 +604,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
int x1 = w - ( ( mSamples + 1 ) * mHorizontalScale );
for ( int i = 0; i < mSamples; i++ ) {
- QValueList<QColor>::Iterator col;
+ TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin();
double sum = 0.0;
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
* 2 pixels with the bright color. The rest is painted with
* a 50% darker color. */
- QPen lastPen = QPen( p.pen() );
+ TQPen lastPen = TQPen( p.pen() );
p.setPen( (*col).dark( 150 ) );
p.setBrush( (*col).dark( 150 ) );
- QPointArray pa( 4 );
+ TQPointArray pa( 4 );
int prevY = ( i == 0 ) ? y : prevVals[ j ];
pa.putPoints( 0, 1, x1, prevY );
pa.putPoints( 1, 1, x2, y );
@@ -680,21 +680,21 @@ void SignalPlotter::paintEvent( QPaintEvent* )
* when width is greater than 60 */
if ( mShowHorizontalLines && h > ( 10 * ( mHorizontalLinesCount + 1 ) ) ) {
p.setPen( mHorizontalLinesColor );
- p.setFont( QFont( p.font().family(), mFontSize ) );
- QString val;
+ p.setFont( TQFont( p.font().family(), mFontSize ) );
+ TQString val;
for ( uint y = 1; y < mHorizontalLinesCount; y++ ) {
p.drawLine( 0, top + y * ( h / mHorizontalLinesCount ), w - 2,
top + y * ( h / mHorizontalLinesCount ) );
if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 )
&& 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 );
}
}
if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 )
&& w > 60 ) {
- val = QString( "%1" ).arg( minValue );
+ val = TQString( "%1" ).tqarg( minValue );
p.drawText( 6, top + h - 2, val );
}
}
diff --git a/src/knemod/signalplotter.h b/src/knemod/signalplotter.h
index f0dabfb..22c5039 100644
--- a/src/knemod/signalplotter.h
+++ b/src/knemod/signalplotter.h
@@ -25,23 +25,24 @@
#ifndef KSG_SIGNALPLOTTER_H
#define KSG_SIGNALPLOTTER_H
-#include <qpoint.h>
-#include <qdialog.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqpoint.h>
+#include <tqdialog.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#define GRAPH_POLYGON 0
#define GRAPH_ORIGINAL 1
-class QColor;
+class TQColor;
-class SignalPlotter : public QDialog
+class SignalPlotter : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- SignalPlotter( QWidget *parent = 0, const char *name = 0 );
+ SignalPlotter( TQWidget *tqparent = 0, const char *name = 0 );
~SignalPlotter();
/**
@@ -50,17 +51,17 @@ class SignalPlotter : public QDialog
void hide();
void show();
- bool addBeam( const QColor &color );
- void addSample( const QValueList<double> &samples );
+ bool addBeam( const TQColor &color );
+ void addSample( const TQValueList<double> &samples );
void removeBeam( uint pos );
void changeRange( int beam, double min, double max );
- QValueList<QColor> &beamColors();
+ TQValueList<TQColor> &beamColors();
- void setTitle( const QString &title );
- QString title() const;
+ void setTitle( const TQString &title );
+ TQString title() const;
void setUseAutoRange( bool value );
bool useAutoRange() const;
@@ -80,8 +81,8 @@ class SignalPlotter : public QDialog
void setShowVerticalLines( bool value );
bool showVerticalLines() const;
- void setVerticalLinesColor( const QColor &color );
- QColor verticalLinesColor() const;
+ void setVerticalLinesColor( const TQColor &color );
+ TQColor verticalLinesColor() const;
void setVerticalLinesDistance( int distance );
int verticalLinesDistance() const;
@@ -92,8 +93,8 @@ class SignalPlotter : public QDialog
void setShowHorizontalLines( bool value );
bool showHorizontalLines() const;
- void setHorizontalLinesColor( const QColor &color );
- QColor horizontalLinesColor() const;
+ void setHorizontalLinesColor( const TQColor &color );
+ TQColor horizontalLinesColor() const;
void setHorizontalLinesCount( int count );
int horizontalLinesCount() const;
@@ -107,17 +108,17 @@ class SignalPlotter : public QDialog
void setFontSize( int size );
int fontSize() const;
- void setBackgroundColor( const QColor &color );
- QColor backgroundColor() const;
+ void setBackgroundColor( const TQColor &color );
+ TQColor backgroundColor() const;
protected:
void updateDataBuffers();
- virtual void resizeEvent( QResizeEvent* );
- virtual void paintEvent( QPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void paintEvent( TQPaintEvent* );
private:
- QPoint mPos;
+ TQPoint mPos;
bool mPosInitialized;
double mMinValue;
@@ -127,34 +128,34 @@ class SignalPlotter : public QDialog
uint mGraphStyle;
bool mShowVerticalLines;
- QColor mVerticalLinesColor;
+ TQColor mVerticalLinesColor;
uint mVerticalLinesDistance;
bool mVerticalLinesScroll;
uint mVerticalLinesOffset;
uint mHorizontalScale;
bool mShowHorizontalLines;
- QColor mHorizontalLinesColor;
+ TQColor mHorizontalLinesColor;
uint mHorizontalLinesCount;
bool mShowLabels;
bool mShowTopBar;
uint mFontSize;
- QColor mBackgroundColor;
+ TQColor mBackgroundColor;
- QPtrList<double> mBeamData;
- QValueList<QColor> mBeamColor;
+ TQPtrList<double> mBeamData;
+ TQValueList<TQColor> mBeamColor;
int mSamples;
/**
* 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.
*/
- QString mName;
- QString mTitle;
+ TQString mName;
+ TQString mTitle;
};
#endif