TQt4 convert knetstats

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knetstats@1238873 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent f420d77148
commit 068115608d

@ -19,19 +19,19 @@
***************************************************************************/ ***************************************************************************/
#include "chart.h" #include "chart.h"
#include <qpainter.h> #include <tqpainter.h>
#include <qbrush.h> #include <tqbrush.h>
Chart::Chart(QWidget* parent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed) : QWidget(parent), mUplBuffer(uploadBuffer), mDldBuffer(downloadBuffer), mBufferSize(bufferSize), mPtr(ptr), mMaxSpeed(maxspeed) { Chart::Chart(TQWidget* tqparent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed) : TQWidget(tqparent), mUplBuffer(uploadBuffer), mDldBuffer(downloadBuffer), mBufferSize(bufferSize), mPtr(ptr), mMaxSpeed(maxspeed) {
setWFlags(Qt::WNoAutoErase); setWFlags(TQt::WNoAutoErase);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
} }
void Chart::paintEvent(QPaintEvent*) { void Chart::paintEvent(TQPaintEvent*) {
QPainter paint(this); TQPainter paint(this);
paint.setBackgroundColor(Qt::black); paint.setBackgroundColor(TQt::black);
paint.setBackgroundMode(Qt::OpaqueMode); paint.setBackgroundMode(Qt::OpaqueMode);
QBrush brush(QColor(0x33, 0x33, 0x33), CrossPattern); TQBrush brush(TQColor(0x33, 0x33, 0x33), CrossPattern);
paint.fillRect(0, 0, width(), height(), brush); paint.fillRect(0, 0, width(), height(), brush);
const double step = width()/double(mBufferSize); const double step = width()/double(mBufferSize);
@ -48,9 +48,9 @@ void Chart::paintEvent(QPaintEvent*) {
i = mBufferSize-1; i = mBufferSize-1;
int rxY = HEIGHT - int(HEIGHT * (mDldBuffer[i]/(*mMaxSpeed))); int rxY = HEIGHT - int(HEIGHT * (mDldBuffer[i]/(*mMaxSpeed)));
int txY = HEIGHT - int(HEIGHT * (mUplBuffer[i]/(*mMaxSpeed))); int txY = HEIGHT - int(HEIGHT * (mUplBuffer[i]/(*mMaxSpeed)));
paint.setPen(Qt::green); paint.setPen(TQt::green);
paint.drawLine(lastX, lastRxY, x, rxY); paint.drawLine(lastX, lastRxY, x, rxY);
paint.setPen(Qt::red); paint.setPen(TQt::red);
paint.drawLine(lastX, lastTxY, x, txY); paint.drawLine(lastX, lastTxY, x, txY);
//qDebug("%d => %d", i, int(mSpeedHistoryRx[i])); //qDebug("%d => %d", i, int(mSpeedHistoryRx[i]));
lastX = x; lastX = x;

@ -21,16 +21,16 @@
#ifndef CHART_H #ifndef CHART_H
#define CHART_H #define CHART_H
#include <qwidget.h> #include <tqwidget.h>
class QPaintEvent; class TQPaintEvent;
class Chart : public QWidget { class Chart : public TQWidget {
public: public:
Chart(QWidget* parent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed); Chart(TQWidget* tqparent, const double* uploadBuffer, const double* downloadBuffer, int bufferSize, const int* ptr, const double* maxspeed);
QSize sizeHint() { return QSize(200, 100); } TQSize tqsizeHint() { return TQSize(200, 100); }
protected: protected:
void paintEvent( QPaintEvent* ev ); void paintEvent( TQPaintEvent* ev );
private: private:
const double* mUplBuffer; const double* mUplBuffer;

@ -21,13 +21,13 @@
#include "configure.h" #include "configure.h"
#include "knetstats.h" #include "knetstats.h"
// Qt includes // TQt includes
#include <qstringlist.h> #include <tqstringlist.h>
#include <qlistbox.h> #include <tqlistbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qwidgetstack.h> #include <tqwidgetstack.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
// Kde includes // Kde includes
#include <kapplication.h> #include <kapplication.h>
#include <klocale.h> #include <klocale.h>
@ -41,30 +41,30 @@
#include <kpushbutton.h> #include <kpushbutton.h>
Configure::Configure(KNetStats* parent, const InterfaceMap& ifs) : ConfigureBase(parent) { Configure::Configure(KNetStats* tqparent, const InterfaceMap& ifs) : ConfigureBase(tqparent) {
// Load configuration // Load configuration
KIconLoader* loader = kapp->iconLoader(); KIconLoader* loader = kapp->iconLoader();
QPixmap iconPCI = loader->loadIcon("icon_pci.png", KIcon::Small, 16); TQPixmap iconPCI = loader->loadIcon("icon_pci.png", KIcon::Small, 16);
// Clone the configuration. // Clone the configuration.
for (InterfaceMap::ConstIterator it = ifs.begin(); it != ifs.end(); ++it) { for (InterfaceMap::ConstIterator it = ifs.begin(); it != ifs.end(); ++it) {
mInterfaces->insertItem(iconPCI, it.key()); mInterfaces->insertItem(iconPCI, it.key());
mConfig[it.key()] = it.data()->options(); mConfig[it.key()] = it.data()->options();
// parent->readInterfaceOptions(*it, &mConfig[*it]); // tqparent->readInterfaceOptions(*it, &mConfig[*it]);
} }
mInterfaces->setCurrentItem(0); mInterfaces->setCurrentItem(0);
changeInterface(mInterfaces->selectedItem()); changeInterface(mInterfaces->selectedItem());
connect(mInterfaces, SIGNAL(selectionChanged(QListBoxItem*)), this, SLOT(changeInterface(QListBoxItem*))); connect(mInterfaces, TQT_SIGNAL(selectionChanged(TQListBoxItem*)), this, TQT_SLOT(changeInterface(TQListBoxItem*)));
connect(mTheme, SIGNAL(activated(int)), this, SLOT(changeTheme(int))); connect(mTheme, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changeTheme(int)));
//connect(mInterfaces, SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)), this, SLOT(showInterfaceContextMenu(QListBoxItem*, const QPoint&))); //connect(mInterfaces, TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)), this, TQT_SLOT(showInterfaceContextMenu(TQListBoxItem*, const TQPoint&)));
} }
void Configure::changeInterface(QListBoxItem* item) { void Configure::changeInterface(TQListBoxItem* item) {
QString interface = item->text(); TQString interface = item->text();
if (!mCurrentItem.isEmpty()) if (!mCurrentItem.isEmpty())
{ {
@ -132,24 +132,24 @@ bool Configure::canSaveConfig()
void Configure::changeTheme(int theme) void Configure::changeTheme(int theme)
{ {
KIconLoader* loader = kapp->iconLoader(); KIconLoader* loader = kapp->iconLoader();
mIconError->setPixmap(loader->loadIcon("theme"+QString::number(theme)+"_error.png", mIconError->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_error.png",
KIcon::Panel, ICONSIZE)); KIcon::Panel, ICONSIZE));
mIconNone->setPixmap(loader->loadIcon("theme"+QString::number(theme)+"_none.png", mIconNone->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_none.png",
KIcon::Panel, ICONSIZE)); KIcon::Panel, ICONSIZE));
mIconTx->setPixmap(loader->loadIcon("theme"+QString::number(theme)+"_tx.png", mIconTx->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_tx.png",
KIcon::Panel, ICONSIZE)); KIcon::Panel, ICONSIZE));
mIconRx->setPixmap(loader->loadIcon("theme"+QString::number(theme)+"_rx.png", mIconRx->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_rx.png",
KIcon::Panel, ICONSIZE)); KIcon::Panel, ICONSIZE));
mIconBoth->setPixmap(loader->loadIcon("theme"+QString::number(theme)+"_both.png", mIconBoth->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_both.png",
KIcon::Panel, ICONSIZE)); KIcon::Panel, ICONSIZE));
} }
/* /*
void Configure::showInterfaceContextMenu(QListBoxItem* item, const QPoint& point) { void Configure::showInterfaceContextMenu(TQListBoxItem* item, const TQPoint& point) {
if (!item && mConfig.size() == 1) if (!item && mConfig.size() == 1)
return; return;
QPixmap icon = kapp->iconLoader()->loadIcon("editdelete", KIcon::Small, 16); TQPixmap icon = kapp->iconLoader()->loadIcon("editdelete", KIcon::Small, 16);
QPopupMenu* menu = new QPopupMenu(this); TQPopupMenu* menu = new TQPopupMenu(this);
menu->insertItem(icon, i18n("Renomve Interface"), this, SLOT(removeInterface())); menu->insertItem(icon, i18n("Renomve Interface"), this, TQT_SLOT(removeInterface()));
menu->exec(point); menu->exec(point);
} }

@ -23,20 +23,20 @@
#include "configurebase.h" #include "configurebase.h"
#include "interface.h" #include "interface.h"
#include <qstring.h> #include <tqstring.h>
#include <qmap.h> #include <tqmap.h>
#include <qfont.h> #include <tqfont.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
static const int ICONSIZE = 22; static const int ICONSIZE = 22;
class KNetStats; class KNetStats;
class QListBoxItem; class TQListBoxItem;
typedef QMap<QString, KNetStatsView::Options> OptionsMap; typedef TQMap<TQString, KNetStatsView::Options> OptionsMap;
/** /**
@ -45,20 +45,21 @@ typedef QMap<QString, KNetStatsView::Options> OptionsMap;
class Configure : public ConfigureBase class Configure : public ConfigureBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
Configure(KNetStats* parent, const InterfaceMap& ifs); Configure(KNetStats* tqparent, const InterfaceMap& ifs);
const OptionsMap& currentConfig() const { return mConfig; } const OptionsMap& currentConfig() const { return mConfig; }
bool canSaveConfig(); bool canSaveConfig();
const OptionsMap& options() const { return mConfig; } const OptionsMap& options() const { return mConfig; }
private: private:
QString mCurrentItem; TQString mCurrentItem;
OptionsMap mConfig; OptionsMap mConfig;
protected slots: protected slots:
void changeInterface(QListBoxItem* item); void changeInterface(TQListBoxItem* item);
void changeTheme(int theme); void changeTheme(int theme);
//void showInterfaceContextMenu(QListBoxItem* item, const QPoint& point); //void showInterfaceContextMenu(TQListBoxItem* item, const TQPoint& point);
//void removeInterface(); //void removeInterface();
}; };

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ConfigureBase</class> <class>ConfigureBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>ConfigureBase</cstring> <cstring>ConfigureBase</cstring>
</property> </property>
@ -30,9 +30,9 @@
<property name="resizeMode"> <property name="resizeMode">
<enum>Minimum</enum> <enum>Minimum</enum>
</property> </property>
<widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>tqlayout7</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -48,7 +48,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>120</width> <width>120</width>
<height>20</height> <height>20</height>
@ -84,7 +84,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QListBox" row="0" column="0" rowspan="2" colspan="1"> <widget class="TQListBox" row="0" column="0" rowspan="2" colspan="1">
<property name="name"> <property name="name">
<cstring>mInterfaces</cstring> <cstring>mInterfaces</cstring>
</property> </property>
@ -97,7 +97,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
</widget> </widget>
<widget class="QGroupBox" row="1" column="1"> <widget class="TQGroupBox" row="1" column="1">
<property name="name"> <property name="name">
<cstring>mAppearanceGroup</cstring> <cstring>mAppearanceGroup</cstring>
</property> </property>
@ -116,11 +116,11 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QWidgetStack" row="0" column="0"> <widget class="TQWidgetStack" row="0" column="0">
<property name="name"> <property name="name">
<cstring>mWdgStack</cstring> <cstring>mWdgStack</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>mIconPage</cstring> <cstring>mIconPage</cstring>
</property> </property>
@ -134,15 +134,15 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>tqlayout5</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>mLabel4</cstring> <cstring>mLabel4</cstring>
</property> </property>
@ -150,7 +150,7 @@
<string>Theme:</string> <string>Theme:</string>
</property> </property>
</widget> </widget>
<widget class="QComboBox"> <widget class="TQComboBox">
<item> <item>
<property name="text"> <property name="text">
<string>Classic</string> <string>Classic</string>
@ -190,7 +190,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>21</width> <width>21</width>
<height>20</height> <height>20</height>
@ -199,15 +199,15 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7_2</cstring> <cstring>tqlayout7_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>mIconError</cstring> <cstring>mIconError</cstring>
</property> </property>
@ -219,7 +219,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>22</width> <width>22</width>
<height>22</height> <height>22</height>
@ -239,14 +239,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>mIconNone</cstring> <cstring>mIconNone</cstring>
</property> </property>
@ -258,7 +258,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>22</width> <width>22</width>
<height>22</height> <height>22</height>
@ -278,14 +278,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>mIconTx</cstring> <cstring>mIconTx</cstring>
</property> </property>
@ -297,7 +297,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>22</width> <width>22</width>
<height>22</height> <height>22</height>
@ -317,14 +317,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>mIconRx</cstring> <cstring>mIconRx</cstring>
</property> </property>
@ -336,7 +336,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>22</width> <width>22</width>
<height>22</height> <height>22</height>
@ -356,14 +356,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>mIconBoth</cstring> <cstring>mIconBoth</cstring>
</property> </property>
@ -375,7 +375,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="tqminimumSize">
<size> <size>
<width>22</width> <width>22</width>
<height>22</height> <height>22</height>
@ -397,7 +397,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -406,7 +406,7 @@
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>mTextPage</cstring> <cstring>mTextPage</cstring>
</property> </property>
@ -428,7 +428,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>mLabel5</cstring> <cstring>mLabel5</cstring>
</property> </property>
@ -457,7 +457,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>mLabel6</cstring> <cstring>mLabel6</cstring>
</property> </property>
@ -467,7 +467,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>mBarsPage</cstring> <cstring>mBarsPage</cstring>
</property> </property>
@ -481,7 +481,7 @@
<property name="margin"> <property name="margin">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>mChartBgLabel</cstring> <cstring>mChartBgLabel</cstring>
</property> </property>
@ -497,7 +497,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>mLabel7</cstring> <cstring>mLabel7</cstring>
</property> </property>
@ -505,7 +505,7 @@
<string>Upload color:</string> <string>Upload color:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>mLabel8</cstring> <cstring>mLabel8</cstring>
</property> </property>
@ -529,7 +529,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>mChartTransparentBackground</cstring> <cstring>mChartTransparentBackground</cstring>
</property> </property>
@ -542,7 +542,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox" row="0" column="1"> <widget class="TQGroupBox" row="0" column="1">
<property name="name"> <property name="name">
<cstring>mConfigurationGroup</cstring> <cstring>mConfigurationGroup</cstring>
</property> </property>
@ -581,7 +581,7 @@
<cstring>mViewMode</cstring> <cstring>mViewMode</cstring>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>mLabel3</cstring> <cstring>mLabel3</cstring>
</property> </property>
@ -589,14 +589,14 @@
<string>View mode:</string> <string>View mode:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>mLabel2</cstring> <cstring>mLabel2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Update interval:</string> <string>Update interval:</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>
@ -617,7 +617,7 @@
<string>ms</string> <string>ms</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>mMonitoring</cstring> <cstring>mMonitoring</cstring>
</property> </property>
@ -666,7 +666,7 @@
<tabstop>mChartBgColor</tabstop> <tabstop>mChartBgColor</tabstop>
<tabstop>mChartTransparentBackground</tabstop> <tabstop>mChartTransparentBackground</tabstop>
</tabstops> </tabstops>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>

@ -14,7 +14,7 @@
#include <kapp.h> #include <kapp.h>
#include <kconfig.h> #include <kconfig.h>
Interface::Interface(KNetStats* parent, const QString& name) : mName(name), mView(0), mParent(parent) { Interface::Interface(KNetStats* tqparent, const TQString& name) : mName(name), mView(0), mParent(tqparent) {
update(); update();
} }
@ -50,7 +50,7 @@ KNetStatsView::Options Interface::options() {
} }
} }
void Interface::say(const QString& message) { void Interface::say(const TQString& message) {
if (mView) if (mView)
mView->say(message); mView->say(message);
} }

@ -13,12 +13,12 @@
#ifndef INTERFACE_H #ifndef INTERFACE_H
#define INTERFACE_H #define INTERFACE_H
#include <qstring.h> #include <tqstring.h>
#include "knetstatsview.h" #include "knetstatsview.h"
class KNetStats; class KNetStats;
class Interface { class Interface {
QString mName; TQString mName;
KNetStatsView* mView; KNetStatsView* mView;
KNetStats* mParent; KNetStats* mParent;
@ -26,10 +26,10 @@ class Interface {
public: public:
/** /**
* Constructs a new interface. * Constructs a new interface.
* \param parent parent of the view of this interface. * \param tqparent tqparent of the view of this interface.
* \param name name of this interface (not the QObject name!!) * \param name name of this interface (not the TQObject name!!)
*/ */
Interface(KNetStats* parent, const QString& name); Interface(KNetStats* tqparent, const TQString& name);
/** /**
* Set this interface visible to the user via a KNetStatsView. * Set this interface visible to the user via a KNetStatsView.
@ -39,13 +39,13 @@ public:
void update(); void update();
void say(const QString& message); void say(const TQString& message);
KNetStatsView::Options options(); KNetStatsView::Options options();
}; };
#include <qmap.h> #include <tqmap.h>
typedef QMap<QString, Interface*> InterfaceMap; typedef TQMap<TQString, Interface*> InterfaceMap;
#endif #endif

@ -23,10 +23,10 @@
#include "configure.h" #include "configure.h"
#include "interface.h" #include "interface.h"
// Qt includes // TQt includes
#include <qstringlist.h> #include <tqstringlist.h>
#include <qdir.h> #include <tqdir.h>
#include <qtimer.h> #include <tqtimer.h>
// KDE includes // KDE includes
#include <kconfig.h> #include <kconfig.h>
#include <kglobal.h> #include <kglobal.h>
@ -43,7 +43,7 @@
#include <kiconloader.h> #include <kiconloader.h>
#include <kpushbutton.h> #include <kpushbutton.h>
KNetStats::KNetStats() : QWidget(0, "knetstats"), mConfigure(0), mBoot(true) { KNetStats::KNetStats() : TQWidget(0, "knetstats"), mConfigure(0), mBoot(true) {
setupUi(); setupUi();
int count; int count;
detectNewInterfaces(&count); detectNewInterfaces(&count);
@ -53,8 +53,8 @@ KNetStats::KNetStats() : QWidget(0, "knetstats"), mConfigure(0), mBoot(true) {
mBoot = false; mBoot = false;
QTimer* timer = new QTimer(this); TQTimer* timer = new TQTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(detectNewInterfaces())); connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(detectNewInterfaces()));
timer->start(IF_DETECTION_INTERVAL); timer->start(IF_DETECTION_INTERVAL);
} }
@ -70,26 +70,26 @@ void KNetStats::setupUi() {
mActionCollection = new KActionCollection(this); mActionCollection = new KActionCollection(this);
mContextMenu = new KPopupMenu(this); mContextMenu = new KPopupMenu(this);
mContextMenu->insertTitle( kapp->miniIcon(), kapp->caption() ); mContextMenu->insertTitle( kapp->miniIcon(), kapp->caption() );
KAction* configure = KStdAction::preferences(this, SLOT(configure()), mActionCollection, "configure"); KAction* configure = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configure()), mActionCollection, "configure");
configure->plug(mContextMenu); configure->plug(mContextMenu);
mContextMenu->insertSeparator(); mContextMenu->insertSeparator();
KHelpMenu* helpmenu = new KHelpMenu(this, QString::null, false); KHelpMenu* helpmenu = new KHelpMenu(this, TQString(), false);
mContextMenu->insertItem( i18n("&Help"), helpmenu->menu() ); mContextMenu->insertItem( i18n("&Help"), helpmenu->menu() );
mContextMenu->insertSeparator(); mContextMenu->insertSeparator();
KAction* quitAction = KStdAction::quit(kapp, SLOT(quit()), mActionCollection); KAction* quitAction = KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), mActionCollection);
quitAction->plug(mContextMenu); quitAction->plug(mContextMenu);
connect(helpmenu, SIGNAL(showAboutApplication()), this, SLOT(about())); connect(helpmenu, TQT_SIGNAL(showAboutApplication()), this, TQT_SLOT(about()));
} }
QStringList KNetStats::scanInterfaces() { TQStringList KNetStats::scanInterfaces() {
QDir dir("/sys/class/net"); TQDir dir("/sys/class/net");
if (!dir.exists()) { if (!dir.exists()) {
KMessageBox::error(0, i18n("You need kernel 2.6.x with support to the /sys filesystem.")); KMessageBox::error(0, i18n("You need kernel 2.6.x with support to the /sys filesystem."));
return QStringList(); return TQStringList();
} else { } else {
QStringList list = dir.entryList(QDir::Dirs); TQStringList list = dir.entryList(TQDir::Dirs);
list.pop_front(); // removes "." and ".." entries list.pop_front(); // removes "." and ".." entries
list.pop_front(); list.pop_front();
return list; return list;
@ -106,9 +106,9 @@ bool KNetStats::configure() {
}*/ }*/
mConfigure = new Configure(this, mInterfaces); mConfigure = new Configure(this, mInterfaces);
connect(mConfigure->mOk, SIGNAL(clicked()), this, SLOT(configOk())); connect(mConfigure->mOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(configOk()));
connect(mConfigure->mApply, SIGNAL(clicked()), this, SLOT(configApply())); connect(mConfigure->mApply, TQT_SIGNAL(clicked()), this, TQT_SLOT(configApply()));
connect(mConfigure->mCancel, SIGNAL(clicked()), this, SLOT(configCancel())); connect(mConfigure->mCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(configCancel()));
mConfigure->show(); mConfigure->show();
} }
return true; return true;
@ -167,10 +167,10 @@ void KNetStats::about() {
void KNetStats::detectNewInterfaces(int* count_ptr) { void KNetStats::detectNewInterfaces(int* count_ptr) {
int count = 0; int count = 0;
const QStringList& interfaces = KNetStats::scanInterfaces(); const TQStringList& interfaces = KNetStats::scanInterfaces();
QStringList::ConstIterator i = interfaces.begin(); TQStringList::ConstIterator i = interfaces.begin();
for(; i != interfaces.end(); ++i) { for(; i != interfaces.end(); ++i) {
InterfaceMap::Iterator elem = mInterfaces.find(*i); InterfaceMap::Iterator elem = mInterfaces.tqfind(*i);
if (elem == mInterfaces.end()) if (elem == mInterfaces.end())
if (createInterface(*i)) if (createInterface(*i))
count++; count++;
@ -179,12 +179,12 @@ void KNetStats::detectNewInterfaces(int* count_ptr) {
*count_ptr = count; *count_ptr = count;
} }
bool KNetStats::createInterface(const QString& name) { bool KNetStats::createInterface(const TQString& name) {
// Cria a interface e adiciona em mInterfaces. // Cria a interface e adiciona em mInterfaces.
Interface* interface = new Interface(this, name); Interface* interface = new Interface(this, name);
mInterfaces.insert(name, interface); mInterfaces.insert(name, interface);
if (!mBoot) if (!mBoot)
interface->say(i18n("New interface detected: %1").arg(name)); interface->say(i18n("New interface detected: %1").tqarg(name));
return interface->isVisible(); return interface->isVisible();
} }

@ -21,9 +21,9 @@
#ifndef KNETSTATS_H #ifndef KNETSTATS_H
#define KNETSTATS_H #define KNETSTATS_H
#include <qwidget.h> #include <tqwidget.h>
#include <set> #include <set>
#include <qstring.h> #include <tqstring.h>
#include "configure.h" #include "configure.h"
class KNetStatsView; class KNetStatsView;
@ -34,9 +34,10 @@ class KActionCollection;
class Interface; class Interface;
class KNetStats : public QWidget class KNetStats : public TQWidget
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
enum { enum {
IF_DETECTION_INTERVAL = 5000 IF_DETECTION_INTERVAL = 5000
@ -52,7 +53,7 @@ public:
* \brief Search for network interfaces parsing /proc/net/dev * \brief Search for network interfaces parsing /proc/net/dev
* \return A StringList with the network interface names * \return A StringList with the network interface names
*/ */
static QStringList scanInterfaces(); static TQStringList scanInterfaces();
int numInterfaces() const { return mInterfaces.size(); } int numInterfaces() const { return mInterfaces.size(); }
@ -86,7 +87,7 @@ private:
void clearOptions(OptionsMap* options); void clearOptions(OptionsMap* options);
void setupUi(); void setupUi();
// Creates a new interface, returns true or false if the new interface is visible or not. // Creates a new interface, returns true or false if the new interface is visible or not.
bool createInterface(const QString& interface); bool createInterface(const TQString& interface);
}; };

@ -36,15 +36,15 @@
#include <khelpmenu.h> #include <khelpmenu.h>
#include <kpassivepopup.h> #include <kpassivepopup.h>
// Qt headers // TQt headers
#include <qtimer.h> #include <tqtimer.h>
#include <qfile.h> #include <tqfile.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qevent.h> #include <tqevent.h>
#include <qfont.h> #include <tqfont.h>
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <qpainter.h> #include <tqpainter.h>
// C headers // C headers
#include <cstring> #include <cstring>
@ -63,8 +63,8 @@ extern "C" {
extern const char* programName; extern const char* programName;
KNetStatsView::KNetStatsView(KNetStats* parent, const QString& interface) KNetStatsView::KNetStatsView(KNetStats* tqparent, const TQString& interface)
: KSystemTray(parent, 0), mSysDevPath("/sys/class/net/"+interface+"/"), mInterface(interface) { : KSystemTray(tqparent, 0), mSysDevPath("/sys/class/net/"+interface+"/"), mInterface(interface) {
mFdSock = 0; mFdSock = 0;
mFirstUpdate = true; mFirstUpdate = true;
mMaxSpeedAge = 0; mMaxSpeedAge = 0;
@ -81,15 +81,15 @@ KNetStatsView::KNetStatsView(KNetStats* parent, const QString& interface)
memset(&mDevInfo, 0, sizeof(mDevInfo)); memset(&mDevInfo, 0, sizeof(mDevInfo));
strcpy(mDevInfo.ifr_name, mInterface.latin1()); strcpy(mDevInfo.ifr_name, mInterface.latin1());
setTextFormat(Qt::PlainText); setTextFormat(TQt::PlainText);
mContextMenu = parent->contextMenu(); mContextMenu = tqparent->contextMenu();
show(); show();
// Timer // Timer
mTimer = new QTimer(this, "timer"); mTimer = new TQTimer(this, "timer");
connect(mTimer, SIGNAL(timeout()), this, SLOT(updateStats(void))); connect(mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateStats(void)));
QToolTip::add(this, i18n("Monitoring %1").arg(mInterface)); TQToolTip::add(this, i18n("Monitoring %1").tqarg(mInterface));
setup(); setup();
mStatistics = new Statistics(this); mStatistics = new Statistics(this);
} }
@ -106,25 +106,25 @@ void KNetStatsView::setup() {
else if (mOptions.mViewMode == Icon) { else if (mOptions.mViewMode == Icon) {
// Load Icons // Load Icons
KIconLoader* loader = kapp->iconLoader(); KIconLoader* loader = kapp->iconLoader();
mIconError = loader->loadIcon("theme"+QString::number(mOptions.mTheme)+"_error.png", mIconError = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_error.png",
KIcon::Panel, ICONSIZE); KIcon::Panel, ICONSIZE);
mIconNone = loader->loadIcon("theme"+QString::number(mOptions.mTheme)+"_none.png", mIconNone = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_none.png",
KIcon::Panel, ICONSIZE); KIcon::Panel, ICONSIZE);
mIconTx = loader->loadIcon("theme"+QString::number(mOptions.mTheme)+"_tx.png", mIconTx = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_tx.png",
KIcon::Panel, ICONSIZE); KIcon::Panel, ICONSIZE);
mIconRx =loader->loadIcon("theme"+QString::number(mOptions.mTheme)+"_rx.png", mIconRx =loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_rx.png",
KIcon::Panel, ICONSIZE); KIcon::Panel, ICONSIZE);
mIconBoth = loader->loadIcon("theme"+QString::number(mOptions.mTheme)+"_both.png", mIconBoth = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_both.png",
KIcon::Panel, ICONSIZE); KIcon::Panel, ICONSIZE);
mCurrentIcon = &mIconNone; mCurrentIcon = &mIconNone;
} }
mTimer->start(mOptions.mUpdateInterval); mTimer->start(mOptions.mUpdateInterval);
updateStats(); updateStats();
QWidget::update(); TQWidget::update();
mFirstUpdate = false; mFirstUpdate = false;
} }
void KNetStatsView::say(const QString& message) { void KNetStatsView::say(const TQString& message) {
KPassivePopup::message(programName, message, kapp->miniIcon(), this); KPassivePopup::message(programName, message, kapp->miniIcon(), this);
} }
@ -135,24 +135,24 @@ void KNetStatsView::updateViewOptions() {
void KNetStatsView::updateStats() { void KNetStatsView::updateStats() {
FILE* flags_fp = fopen((mSysDevPath+"flags").latin1(), "r"); FILE* flags_fp = fopen((mSysDevPath+"flags").latin1(), "r");
bool currentStatus; bool currenttqStatus;
if (!flags_fp) if (!flags_fp)
currentStatus = false; currenttqStatus = false;
else { else {
int flags; int flags;
fscanf(flags_fp, "%Xu", &flags); fscanf(flags_fp, "%Xu", &flags);
fclose(flags_fp); fclose(flags_fp);
currentStatus = IFF_UP & flags; currenttqStatus = IFF_UP & flags;
} }
if (!currentStatus && mConnected) { // interface down... if (!currenttqStatus && mConnected) { // interface down...
mConnected = false; mConnected = false;
resetBuffers(); resetBuffers();
QWidget::update(); TQWidget::update();
say(i18n("%1 is inactive").arg(mInterface)); say(i18n("%1 is inactive").tqarg(mInterface));
} else if (currentStatus && !mConnected) { } else if (currenttqStatus && !mConnected) {
mConnected = true; mConnected = true;
say(i18n("%1 is active").arg(mInterface)); say(i18n("%1 is active").tqarg(mInterface));
} }
// kernel < 2.6.9 (I think) does not have carrier info, considering carrier ever on. // kernel < 2.6.9 (I think) does not have carrier info, considering carrier ever on.
@ -168,13 +168,13 @@ void KNetStatsView::updateStats() {
if (carrierFlag == '0') { // carrier down if (carrierFlag == '0') { // carrier down
if (mCarrier) { if (mCarrier) {
mCarrier = false; mCarrier = false;
QWidget::update(); TQWidget::update();
say(i18n("%1 is disconnected").arg(mInterface)); say(i18n("%1 is disconnected").tqarg(mInterface));
} }
return; return;
} else if (!mCarrier) { // carrier up } else if (!mCarrier) { // carrier up
mCarrier = true; mCarrier = true;
say(i18n("%1 is connected").arg(mInterface)); say(i18n("%1 is connected").tqarg(mInterface));
} }
unsigned int brx = readInterfaceNumValue("rx_bytes"); unsigned int brx = readInterfaceNumValue("rx_bytes");
@ -213,7 +213,7 @@ void KNetStatsView::updateStats() {
} }
if (mOptions.mViewMode == Icon) { if (mOptions.mViewMode == Icon) {
QPixmap* newIcon; TQPixmap* newIcon;
if (brx == mBRx) { if (brx == mBRx) {
if (btx == mBTx ) if (btx == mBTx )
newIcon = &mIconNone; newIcon = &mIconNone;
@ -228,10 +228,10 @@ void KNetStatsView::updateStats() {
if (newIcon != mCurrentIcon) { if (newIcon != mCurrentIcon) {
mCurrentIcon = newIcon; mCurrentIcon = newIcon;
QWidget::update(); TQWidget::update();
} }
} else if (mOptions.mViewMode == Graphic || (btx != mBTx && brx != mBRx)) } else if (mOptions.mViewMode == Graphic || (btx != mBTx && brx != mBRx))
QWidget::update(); TQWidget::update();
// Update stats // Update stats
mTotalBytesRx += brx - mBRx; mTotalBytesRx += brx - mBRx;
@ -246,7 +246,7 @@ void KNetStatsView::updateStats() {
} }
unsigned long KNetStatsView::readInterfaceNumValue(const char* name) { unsigned long KNetStatsView::readInterfaceNumValue(const char* name) {
// stdio functions appear to be more fast than QFile? // stdio functions appear to be more fast than TQFile?
FILE* fp = fopen((mSysDevPath+"statistics/"+name).latin1(), "r"); FILE* fp = fopen((mSysDevPath+"statistics/"+name).latin1(), "r");
long retval; long retval;
fscanf(fp, "%lu", &retval); fscanf(fp, "%lu", &retval);
@ -254,10 +254,10 @@ unsigned long KNetStatsView::readInterfaceNumValue(const char* name) {
return retval; return retval;
} }
QString KNetStatsView::readInterfaceStringValue(const char* name, int maxlength) { TQString KNetStatsView::readInterfaceStringValue(const char* name, int maxlength) {
QFile macFile(mSysDevPath+name); TQFile macFile(mSysDevPath+name);
macFile.open(IO_ReadOnly); macFile.open(IO_ReadOnly);
QString value; TQString value;
macFile.readLine(value, maxlength); macFile.readLine(value, maxlength);
return value; return value;
} }
@ -271,8 +271,8 @@ void KNetStatsView::resetBuffers() {
memset(mSpeedBufferPTx, 0, sizeof(double)*SPEED_BUFFER_SIZE); memset(mSpeedBufferPTx, 0, sizeof(double)*SPEED_BUFFER_SIZE);
} }
void KNetStatsView::paintEvent( QPaintEvent* ) { void KNetStatsView::paintEvent( TQPaintEvent* ) {
QPainter paint(this); TQPainter paint(this);
switch(mOptions.mViewMode) { switch(mOptions.mViewMode) {
case Icon: case Icon:
if (!mCarrier || !mConnected) if (!mCarrier || !mConnected)
@ -288,25 +288,25 @@ void KNetStatsView::paintEvent( QPaintEvent* ) {
} }
} }
void KNetStatsView::drawText(QPainter& paint) { void KNetStatsView::drawText(TQPainter& paint) {
if (!mCarrier || !mConnected) { if (!mCarrier || !mConnected) {
paint.drawText(rect(), Qt::AlignCenter, "?"); paint.drawText(rect(), TQt::AlignCenter, "?");
} else { } else {
paint.setFont( mOptions.mTxtFont ); paint.setFont( mOptions.mTxtFont );
paint.setPen( mOptions.mTxtUplColor ); paint.setPen( mOptions.mTxtUplColor );
paint.drawText( rect(), Qt::AlignTop, Statistics::byteFormat(byteSpeedTx(), "KB", "MB")); paint.drawText( rect(), TQt::AlignTop, Statistics::byteFormat(byteSpeedTx(), "KB", "MB"));
paint.setPen( mOptions.mTxtDldColor ); paint.setPen( mOptions.mTxtDldColor );
paint.drawText( rect(), Qt::AlignBottom, Statistics::byteFormat(byteSpeedRx(), "KB", "MB")); paint.drawText( rect(), TQt::AlignBottom, Statistics::byteFormat(byteSpeedRx(), "KB", "MB"));
} }
} }
void KNetStatsView::drawGraphic(QPainter& paint) { void KNetStatsView::drawGraphic(TQPainter& paint) {
if (!mCarrier || !mConnected) { if (!mCarrier || !mConnected) {
paint.drawText(rect(), Qt::AlignCenter, "X"); paint.drawText(rect(), TQt::AlignCenter, "X");
return; return;
} }
QSize size = this->size(); TQSize size = this->size();
if (!mOptions.mChartTransparentBackground) if (!mOptions.mChartTransparentBackground)
paint.fillRect(0, 0, size.width(), size.height(), mOptions.mChartBgColor); paint.fillRect(0, 0, size.width(), size.height(), mOptions.mChartBgColor);
@ -339,9 +339,9 @@ void KNetStatsView::drawGraphic(QPainter& paint) {
} }
} }
void KNetStatsView::mousePressEvent(QMouseEvent* ev) { void KNetStatsView::mousePressEvent(TQMouseEvent* ev) {
if (ev->button() == Qt::RightButton ) if (ev->button() == Qt::RightButton )
mContextMenu->exec(QCursor::pos()); mContextMenu->exec(TQCursor::pos());
else if (ev->button() == Qt::LeftButton) else if (ev->button() == Qt::LeftButton)
if (mStatistics->isShown()) if (mStatistics->isShown())
mStatistics->accept(); mStatistics->accept();
@ -357,7 +357,7 @@ bool KNetStatsView::openFdSocket() {
return false; return false;
} }
QString KNetStatsView::getIp() { TQString KNetStatsView::getIp() {
if (mFdSock == -1 && !openFdSocket()) if (mFdSock == -1 && !openFdSocket())
return ""; return "";
@ -366,15 +366,15 @@ QString KNetStatsView::getIp() {
return inet_ntoa(sin.sin_addr); return inet_ntoa(sin.sin_addr);
} }
QString KNetStatsView::getNetmask() { TQString KNetStatsView::getNettqmask() {
if (mFdSock == -1 && !openFdSocket()) if (mFdSock == -1 && !openFdSocket())
return ""; return "";
ioctl(mFdSock, SIOCGIFNETMASK, &mDevInfo); ioctl(mFdSock, SIOCGIFNETMASK, &mDevInfo);
sockaddr_in mask = ((sockaddr_in&)mDevInfo.ifr_netmask); sockaddr_in tqmask = ((sockaddr_in&)mDevInfo.ifr_netmask);
return inet_ntoa(mask.sin_addr); return inet_ntoa(tqmask.sin_addr);
} }
void KNetStatsView::readOptions( const QString& name, KNetStatsView::Options* opts, bool defaultVisibility ) { void KNetStatsView::readOptions( const TQString& name, KNetStatsView::Options* opts, bool defaultVisibility ) {
KConfig* cfg = kapp->config(); KConfig* cfg = kapp->config();
KConfigGroupSaver groupSaver(cfg, name); KConfigGroupSaver groupSaver(cfg, name);
@ -384,17 +384,17 @@ void KNetStatsView::readOptions( const QString& name, KNetStatsView::Options* op
opts->mMonitoring = cfg->readBoolEntry("Monitoring", defaultVisibility); opts->mMonitoring = cfg->readBoolEntry("Monitoring", defaultVisibility);
// txt view // txt view
opts->mTxtFont = cfg->readFontEntry("TxtFont"); opts->mTxtFont = cfg->readFontEntry("TxtFont");
opts->mTxtUplColor = cfg->readColorEntry("TxtUplColor", &Qt::red); opts->mTxtUplColor = cfg->readColorEntry("TxtUplColor", &TQt::red);
opts->mTxtDldColor = cfg->readColorEntry("TxtDldColor", &Qt::green); opts->mTxtDldColor = cfg->readColorEntry("TxtDldColor", &TQt::green);
// IconView // IconView
int defaultTheme = 0; int defaultTheme = 0;
if (name.startsWith("wlan")) if (name.startsWith("wlan"))
defaultTheme = 3; // three... is a magic number... a magic number.... defaultTheme = 3; // three... is a magic number... a magic number....
opts->mTheme = cfg->readNumEntry("Theme", defaultTheme); opts->mTheme = cfg->readNumEntry("Theme", defaultTheme);
// Graphic // Graphic
opts->mChartUplColor = cfg->readColorEntry("ChartUplColor", &Qt::red); opts->mChartUplColor = cfg->readColorEntry("ChartUplColor", &TQt::red);
opts->mChartDldColor = cfg->readColorEntry("ChartDldColor", &Qt::blue); opts->mChartDldColor = cfg->readColorEntry("ChartDldColor", &TQt::blue);
opts->mChartBgColor = cfg->readColorEntry("ChartBgColor", &Qt::white); opts->mChartBgColor = cfg->readColorEntry("ChartBgColor", &TQt::white);
opts->mChartTransparentBackground = cfg->readBoolEntry("ChartUseTransparentBackground", true); opts->mChartTransparentBackground = cfg->readBoolEntry("ChartUseTransparentBackground", true);
} }

@ -22,17 +22,17 @@
#define KNETSTATSVIEW_H #define KNETSTATSVIEW_H
#include <ksystemtray.h> #include <ksystemtray.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qcolor.h> #include <tqcolor.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
class QTimer; class TQTimer;
class QMouseEvent; class TQMouseEvent;
class QPainter; class TQPainter;
class QPaintEvent; class TQPaintEvent;
class Statistics; class Statistics;
class KNetStats; class KNetStats;
@ -42,6 +42,7 @@ class KNetStats;
class KNetStatsView : public KSystemTray class KNetStatsView : public KSystemTray
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
enum { enum {
HISTORY_SIZE = 50, // Speed history buffer size HISTORY_SIZE = 50, // Speed history buffer size
@ -65,29 +66,29 @@ public:
Mode mViewMode; Mode mViewMode;
bool mMonitoring; bool mMonitoring;
// txt view // txt view
QFont mTxtFont; TQFont mTxtFont;
QColor mTxtUplColor; TQColor mTxtUplColor;
QColor mTxtDldColor; TQColor mTxtDldColor;
// icon view // icon view
int mTheme; int mTheme;
// chart view // chart view
QColor mChartUplColor; TQColor mChartUplColor;
QColor mChartDldColor; TQColor mChartDldColor;
QColor mChartBgColor; TQColor mChartBgColor;
bool mChartTransparentBackground; bool mChartTransparentBackground;
}; };
KNetStatsView(KNetStats* parent, const QString& interface); KNetStatsView(KNetStats* tqparent, const TQString& interface);
~KNetStatsView(); ~KNetStatsView();
void say(const QString& message); void say(const TQString& message);
void updateViewOptions(); void updateViewOptions();
// read a value from /sys/class/net/interface/name // read a value from /sys/class/net/interface/name
unsigned long readInterfaceNumValue(const char* name); unsigned long readInterfaceNumValue(const char* name);
// read a value from /sys/class/net/interface/name // read a value from /sys/class/net/interface/name
QString readInterfaceStringValue(const char* name, int maxlength); TQString readInterfaceStringValue(const char* name, int maxlength);
QString getIp(); TQString getIp();
QString getNetmask(); TQString getNettqmask();
const double* speedHistoryRx() const { return mSpeedHistoryRx; } const double* speedHistoryRx() const { return mSpeedHistoryRx; }
const double* speedHistoryTx() const { return mSpeedHistoryTx; } const double* speedHistoryTx() const { return mSpeedHistoryTx; }
@ -98,10 +99,10 @@ public:
/// Return a copy of the current view options. /// Return a copy of the current view options.
Options options() const { return mOptions; } Options options() const { return mOptions; }
/// read the interface view options /// read the interface view options
static void readOptions( const QString& name, Options* opts, bool defaultVisibility = false ); static void readOptions( const TQString& name, Options* opts, bool defaultVisibility = false );
/// The current monitored network interface /// The current monitored network interface
inline const QString& interface() const; inline const TQString& interface() const;
/// The current Update Interval in miliseconds /// The current Update Interval in miliseconds
inline int updateInterval() const; inline int updateInterval() const;
/// We are in textmode? /// We are in textmode?
@ -125,8 +126,8 @@ public:
inline double pktSpeedTx() const; inline double pktSpeedTx() const;
protected: protected:
void mousePressEvent( QMouseEvent* ev ); void mousePressEvent( TQMouseEvent* ev );
void paintEvent( QPaintEvent* ev ); void paintEvent( TQPaintEvent* ev );
private: private:
@ -134,19 +135,19 @@ private:
struct ifreq mDevInfo; // info struct about our interface struct ifreq mDevInfo; // info struct about our interface
QString mSysDevPath; // Path to the device. TQString mSysDevPath; // Path to the device.
bool mCarrier; // Interface carrier is on? bool mCarrier; // Interface carrier is on?
bool mConnected; // Interface exists? bool mConnected; // Interface exists?
KPopupMenu* mContextMenu; // Global ContextMenu KPopupMenu* mContextMenu; // Global ContextMenu
Statistics* mStatistics; // Statistics window Statistics* mStatistics; // Statistics window
QString mInterface; // Current interface TQString mInterface; // Current interface
Options mOptions; // View options Options mOptions; // View options
// Icons // Icons
QPixmap mIconError, mIconNone, mIconTx, mIconRx, mIconBoth; TQPixmap mIconError, mIconNone, mIconTx, mIconRx, mIconBoth;
QPixmap* mCurrentIcon; // Current state TQPixmap* mCurrentIcon; // Current state
QTimer* mTimer; // Timer TQTimer* mTimer; // Timer
// Rx e Tx to bytes and packets // Rx e Tx to bytes and packets
unsigned long mBRx, mBTx, mPRx, mPTx; unsigned long mBRx, mBTx, mPRx, mPTx;
@ -170,8 +171,8 @@ private:
// setup the view. // setup the view.
void setup(); void setup();
void drawText(QPainter& paint); void drawText(TQPainter& paint);
void drawGraphic(QPainter& paint); void drawGraphic(TQPainter& paint);
// Reset speed and history buffers // Reset speed and history buffers
void resetBuffers(); void resetBuffers();
// calc tha max. speed stored in the history buffer // calc tha max. speed stored in the history buffer
@ -211,7 +212,7 @@ double KNetStatsView::calcSpeed(const double* buffer) const {
return total/SPEED_BUFFER_SIZE; return total/SPEED_BUFFER_SIZE;
} }
const QString& KNetStatsView::interface() const { const TQString& KNetStatsView::interface() const {
return mInterface; return mInterface;
} }

@ -24,27 +24,27 @@
#include <klocale.h> #include <klocale.h>
#include <kapplication.h> #include <kapplication.h>
#include <kactivelabel.h> #include <kactivelabel.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qlayout.h> #include <tqlayout.h>
Statistics::Statistics( KNetStatsView* parent, const char *name ) Statistics::Statistics( KNetStatsView* tqparent, const char *name )
: StatisticsBase( parent, name ), mInterface(parent->interface()), mParent(parent) { : StatisticsBase( tqparent, name ), mInterface(tqparent->interface()), mParent(tqparent) {
setCaption( i18n( "Details of %1" ).arg( mInterface ) ); setCaption( i18n( "Details of %1" ).tqarg( mInterface ) );
QBoxLayout* l = new QHBoxLayout( mChart ); TQBoxLayout* l = new TQHBoxLayout( mChart );
l->setAutoAdd( true ); l->setAutoAdd( true );
Chart* chart = new Chart(mChart, parent->speedHistoryTx(), parent->speedHistoryRx(), parent->historyBufferSize(), parent->historyPointer(), parent->maxSpeed()); Chart* chart = new Chart(mChart, tqparent->speedHistoryTx(), tqparent->speedHistoryRx(), tqparent->historyBufferSize(), tqparent->historyPointer(), tqparent->maxSpeed());
mMAC->setText(mParent->readInterfaceStringValue("address", 18)); mMAC->setText(mParent->readInterfaceStringValue("address", 18));
mIP->setAlignment(Qt::AlignRight); mIP->tqsetAlignment(TQt::AlignRight);
mMAC->setAlignment(Qt::AlignRight); mMAC->tqsetAlignment(TQt::AlignRight);
mNetmask->setAlignment(Qt::AlignRight); mNettqmask->tqsetAlignment(TQt::AlignRight);
update(); update();
mTimer = new QTimer( this ); mTimer = new TQTimer( this );
connect( mTimer, SIGNAL( timeout() ), this, SLOT( update() ) ); connect( mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( update() ) );
connect( mTimer, SIGNAL( timeout() ), chart, SLOT( update() ) ); connect( mTimer, TQT_SIGNAL( timeout() ), chart, TQT_SLOT( update() ) );
} }
void Statistics::update() { void Statistics::update() {
@ -54,17 +54,17 @@ void Statistics::update() {
mByteSpeedRx->setText( byteFormat( mParent->byteSpeedRx() )+"/s" ); mByteSpeedRx->setText( byteFormat( mParent->byteSpeedRx() )+"/s" );
mByteSpeedTx->setText( byteFormat( mParent->byteSpeedTx() )+"/s" ); mByteSpeedTx->setText( byteFormat( mParent->byteSpeedTx() )+"/s" );
mPRx->setText( QString::number( mParent->totalPktRx() ) ); mPRx->setText( TQString::number( mParent->totalPktRx() ) );
mPTx->setText( QString::number( mParent->totalPktTx() ) ); mPTx->setText( TQString::number( mParent->totalPktTx() ) );
mPktSpeedRx->setText( QString::number( mParent->pktSpeedRx(), 'f', 1 )+"pkts/s" ); mPktSpeedRx->setText( TQString::number( mParent->pktSpeedRx(), 'f', 1 )+"pkts/s" );
mPktSpeedTx->setText( QString::number( mParent->pktSpeedTx(), 'f', 1 )+"pkts/s" ); mPktSpeedTx->setText( TQString::number( mParent->pktSpeedTx(), 'f', 1 )+"pkts/s" );
} }
void Statistics::show() { void Statistics::show() {
// Update details... // Update details...
mMTU->setText(mParent->readInterfaceStringValue("mtu", 6)); mMTU->setText(mParent->readInterfaceStringValue("mtu", 6));
mIP->setText( mParent->getIp() ); mIP->setText( mParent->getIp() );
mNetmask->setText( mParent->getNetmask() ); mNettqmask->setText( mParent->getNettqmask() );
mTimer->start( mParent->updateInterval() ); mTimer->start( mParent->updateInterval() );
StatisticsBase::show(); StatisticsBase::show();

@ -21,16 +21,17 @@
#define STATISTICS_H #define STATISTICS_H
#include "statisticsbase.h" #include "statisticsbase.h"
#include <qstring.h> #include <tqstring.h>
class KNetStatsView; class KNetStatsView;
class Statistics : public StatisticsBase class Statistics : public StatisticsBase
{ {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
Statistics( KNetStatsView* parent = 0, const char *name = 0 ); Statistics( KNetStatsView* tqparent = 0, const char *name = 0 );
/** /**
* Formats a numberic byte representation * Formats a numberic byte representation
@ -40,12 +41,12 @@ public:
* \param ksufix Sufix for kilobytes * \param ksufix Sufix for kilobytes
* \param msufix Sufix for megabytes * \param msufix Sufix for megabytes
*/ */
static inline QString byteFormat( double num, const char* ksufix = " KB", const char* msufix = " MB"); static inline TQString byteFormat( double num, const char* ksufix = " KB", const char* msufix = " MB");
void show(); void show();
private: private:
QTimer* mTimer; TQTimer* mTimer;
const QString& mInterface; const TQString& mInterface;
KNetStatsView* mParent; KNetStatsView* mParent;
public slots: public slots:
void accept(); void accept();
@ -54,13 +55,13 @@ private slots:
void update(); void update();
}; };
QString Statistics::byteFormat( double num, const char* ksufix, const char* msufix ) { TQString Statistics::byteFormat( double num, const char* ksufix, const char* msufix ) {
const double ONE_KB = 1024.0; const double ONE_KB = 1024.0;
const double ONE_MB = ONE_KB*ONE_KB; const double ONE_MB = ONE_KB*ONE_KB;
if ( num >= ONE_MB ) // MB if ( num >= ONE_MB ) // MB
return QString::number( num/(ONE_MB), 'f', 1 ) + msufix; return TQString::number( num/(ONE_MB), 'f', 1 ) + msufix;
else // Kb else // Kb
return QString::number( num/ONE_KB, 'f', 1 ) + ksufix; return TQString::number( num/ONE_KB, 'f', 1 ) + ksufix;
} }
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>StatisticsBase</class> <class>StatisticsBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>StatisticsBase</cstring> <cstring>StatisticsBase</cstring>
</property> </property>
@ -30,15 +30,15 @@
<property name="resizeMode"> <property name="resizeMode">
<enum>Minimum</enum> <enum>Minimum</enum>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>tqlayout3</cstring>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QFrame" row="0" column="1" rowspan="3" colspan="1"> <widget class="TQFrame" row="0" column="1" rowspan="3" colspan="1">
<property name="name"> <property name="name">
<cstring>mChart</cstring> <cstring>mChart</cstring>
</property> </property>
@ -67,14 +67,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>41</height> <height>41</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>mMaxSpeed</cstring> <cstring>mMaxSpeed</cstring>
</property> </property>
@ -86,11 +86,11 @@
<property name="text"> <property name="text">
<string>? KB/s</string> <string>? KB/s</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2_3</cstring> <cstring>textLabel2_3</cstring>
</property> </property>
@ -102,13 +102,13 @@
<property name="text"> <property name="text">
<string>0 KB/s</string> <string>0 KB/s</string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QTabWidget"> <widget class="TQTabWidget">
<property name="name"> <property name="name">
<cstring>tabWidget2</cstring> <cstring>tabWidget2</cstring>
</property> </property>
@ -120,7 +120,7 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -131,7 +131,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>mLabel5</cstring> <cstring>mLabel5</cstring>
</property> </property>
@ -139,7 +139,7 @@
<string>Upload speed:</string> <string>Upload speed:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>mLabel1</cstring> <cstring>mLabel1</cstring>
</property> </property>
@ -147,7 +147,7 @@
<string>Received:</string> <string>Received:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="0"> <widget class="TQLabel" row="4" column="0">
<property name="name"> <property name="name">
<cstring>mLabel6</cstring> <cstring>mLabel6</cstring>
</property> </property>
@ -155,7 +155,7 @@
<string>Download speed:</string> <string>Download speed:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>mLabel2</cstring> <cstring>mLabel2</cstring>
</property> </property>
@ -173,22 +173,22 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>71</width> <width>71</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="4" column="2"> <widget class="TQLabel" row="4" column="2">
<property name="name"> <property name="name">
<cstring>mPktSpeedRx</cstring> <cstring>mPktSpeedRx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -196,63 +196,63 @@
<string>Bytes</string> <string>Bytes</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="2"> <widget class="TQLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>mPRx</cstring> <cstring>mPRx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="1"> <widget class="TQLabel" row="3" column="1">
<property name="name"> <property name="name">
<cstring>mByteSpeedTx</cstring> <cstring>mByteSpeedTx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="1"> <widget class="TQLabel" row="2" column="1">
<property name="name"> <property name="name">
<cstring>mBTx</cstring> <cstring>mBTx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="2"> <widget class="TQLabel" row="2" column="2">
<property name="name"> <property name="name">
<cstring>mPTx</cstring> <cstring>mPTx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="2"> <widget class="TQLabel" row="3" column="2">
<property name="name"> <property name="name">
<cstring>mPktSpeedTx</cstring> <cstring>mPktSpeedTx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="1"> <widget class="TQLabel" row="1" column="1">
<property name="name"> <property name="name">
<cstring>mBRx</cstring> <cstring>mBRx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="4" column="1"> <widget class="TQLabel" row="4" column="1">
<property name="name"> <property name="name">
<cstring>mByteSpeedRx</cstring> <cstring>mByteSpeedRx</cstring>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="2"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -262,7 +262,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>tab</cstring> <cstring>tab</cstring>
</property> </property>
@ -273,7 +273,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -281,15 +281,15 @@
<string>IP:</string> <string>IP:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
<property name="text"> <property name="text">
<string>Netmask:</string> <string>Nettqmask:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
</property> </property>
@ -297,7 +297,7 @@
<string>MAC:</string> <string>MAC:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>textLabel7</cstring> <cstring>textLabel7</cstring>
</property> </property>
@ -315,7 +315,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>200</width> <width>200</width>
<height>21</height> <height>21</height>
@ -332,7 +332,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>51</width> <width>51</width>
<height>80</height> <height>80</height>
@ -357,7 +357,7 @@
</widget> </widget>
<widget class="KActiveLabel" row="1" column="2"> <widget class="KActiveLabel" row="1" column="2">
<property name="name"> <property name="name">
<cstring>mNetmask</cstring> <cstring>mNettqmask</cstring>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy> <sizepolicy>
@ -393,7 +393,7 @@
<enum>NoWrap</enum> <enum>NoWrap</enum>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="2"> <widget class="TQLabel" row="3" column="2">
<property name="name"> <property name="name">
<cstring>mMTU</cstring> <cstring>mMTU</cstring>
</property> </property>
@ -403,16 +403,16 @@
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="alignment"> <property name="tqalignment">
<set>AlignVCenter</set> <set>AlignVCenter</set>
</property> </property>
</widget> </widget>
</grid> </grid>
</widget> </widget>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>tqlayout2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -428,7 +428,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>91</width> <width>91</width>
<height>20</height> <height>20</height>
@ -470,7 +470,7 @@
<tabstop>tabWidget2</tabstop> <tabstop>tabWidget2</tabstop>
<tabstop>mOk</tabstop> <tabstop>mOk</tabstop>
</tabstops> </tabstops>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>kactivelabel.h</includehint> <includehint>kactivelabel.h</includehint>
<includehint>kactivelabel.h</includehint> <includehint>kactivelabel.h</includehint>

Loading…
Cancel
Save