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