summaryrefslogtreecommitdiffstats
path: root/wifi/strength.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wifi/strength.cpp')
-rw-r--r--wifi/strength.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/wifi/strength.cpp b/wifi/strength.cpp
index 0bb43f6c..ad4314c0 100644
--- a/wifi/strength.cpp
+++ b/wifi/strength.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
#include <kstandarddirs.h>
#include <klocale.h>
#include <kdebug.h>
@@ -27,25 +27,25 @@
extern bool useAlternateStrengthCalc;
-Strength::Strength (QWidget * parent, Interface_wireless * device):QWidget (parent,
+Strength::Strength (TQWidget * parent, Interface_wireless * device):TQWidget (parent,
"strength")
{
this->device = device;
KStandardDirs finder;
kdedir = finder.findResourceDir ("data", "kwifimanager/pics/no_card.png");
kdedir += "kwifimanager/pics/";
- NOT_CON_OFFLINE_ADHOC = new QPixmap (kdedir + "offline.png");
- EXCELLENT = new QPixmap (kdedir + "excellent.png");
- GOOD = new QPixmap (kdedir + "good.png");
- MARGINAL = new QPixmap (kdedir + "marginal.png");
- OOR_MINIMUM = new QPixmap (kdedir + "oor_minimum.png");
- OOR_DOWN = new QPixmap (kdedir + "oor_down.png");
+ NOT_CON_OFFLINE_ADHOC = new TQPixmap (kdedir + "offline.png");
+ EXCELLENT = new TQPixmap (kdedir + "excellent.png");
+ GOOD = new TQPixmap (kdedir + "good.png");
+ MARGINAL = new TQPixmap (kdedir + "marginal.png");
+ OOR_MINIMUM = new TQPixmap (kdedir + "oor_minimum.png");
+ OOR_DOWN = new TQPixmap (kdedir + "oor_down.png");
}
-QSize Strength::mySizeHint ()
+TQSize Strength::mySizeHint ()
{
/* make this quite general, just in case someone uses different icons */
- QSize* temp = new QSize(NOT_CON_OFFLINE_ADHOC->size());
+ TQSize* temp = new TQSize(NOT_CON_OFFLINE_ADHOC->size());
if (EXCELLENT->size().width() > temp->width ()) { temp->setWidth (EXCELLENT->size().width ()); }
if (EXCELLENT->size().height() > temp->height()) { temp->setHeight(EXCELLENT->size().height()); }
if (GOOD->size().width() > temp->width ()) { temp->setWidth (GOOD->size().width ()); }
@@ -62,7 +62,7 @@ QSize Strength::mySizeHint ()
temp->setHeight(temp->height() + 30);
// up to now: this is the height required to get a decent logo display
// now determine height of QLabels to calculate the extra needed height
- QLabel heightTest( "ABC", 0 );
+ TQLabel heightTest( "ABC", 0 );
temp->setHeight( temp->height() + 2 * heightTest.sizeHint().height() + 10 );
return *temp;
}
@@ -77,16 +77,16 @@ Strength::~Strength ()
}
void
-Strength::paintEvent (QPaintEvent * event)
+Strength::paintEvent (TQPaintEvent * event)
{
updateInfo (event);
}
void
-Strength::updateInfo (QPaintEvent *)
+Strength::updateInfo (TQPaintEvent *)
{
- QPainter *strengthpainter = new QPainter (this);
- QString sstrength1, sstrength2( i18n("N/A") );
+ TQPainter *strengthpainter = new TQPainter (this);
+ TQString sstrength1, sstrength2( i18n("N/A") );
int mode;
double freq;
@@ -113,43 +113,43 @@ Strength::updateInfo (QPaintEvent *)
else if (validdata && (strength > 45))
{
sstrength1 = i18n("ULTIMATE");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *EXCELLENT);
}
else if (validdata && (strength > 35))
{
sstrength1 = i18n("TOP");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *EXCELLENT);
}
else if (validdata && (strength > 25))
{
sstrength1 = i18n("EXCELLENT");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *EXCELLENT);
}
else if (validdata && (strength > 15))
{
sstrength1 = i18n("GOOD");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *GOOD);
}
else if (validdata && (strength > 5))
{
sstrength1 = i18n("WEAK");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *MARGINAL);
}
else if (validdata && (strength > 0))
{
sstrength1 = i18n("MINIMUM");
- sstrength2 = QString::number(strength);
+ sstrength2 = TQString::number(strength);
strengthpainter->drawPixmap (50, 10, *OOR_MINIMUM);
}
else if (((strength == 0) && (mode == 2)) || (!validdata))
{
sstrength1 = i18n("OUT OF RANGE");
- sstrength2 = QString::fromLatin1("0");
+ sstrength2 = TQString::fromLatin1("0");
strengthpainter->drawPixmap (50, 10, *OOR_DOWN);
}
else