summaryrefslogtreecommitdiffstats
path: root/wifi/kwireless/kwirelesswidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /wifi/kwireless/kwirelesswidget.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'wifi/kwireless/kwirelesswidget.cpp')
-rw-r--r--wifi/kwireless/kwirelesswidget.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/wifi/kwireless/kwirelesswidget.cpp b/wifi/kwireless/kwirelesswidget.cpp
index 3ae2ff8c..08f4336b 100644
--- a/wifi/kwireless/kwirelesswidget.cpp
+++ b/wifi/kwireless/kwirelesswidget.cpp
@@ -7,11 +7,11 @@
http://www.hackerbuero.org $
*/
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qcolor.h>
-#include <qpointarray.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqcolor.h>
+#include <tqpointarray.h>
#include <kglobalsettings.h>
#include <kdebug.h>
#include <kpassivepopup.h>
@@ -25,12 +25,12 @@ extern "C" {
#include <math.h>
}
-QPtrList<DeviceInfo> KWireLessWidget::deviceInfo;
-QMutex KWireLessWidget::mutex;
-QTimer *KWireLessWidget::timer;
+TQPtrList<DeviceInfo> KWireLessWidget::deviceInfo;
+TQMutex KWireLessWidget::mutex;
+TQTimer *KWireLessWidget::timer;
int KWireLessWidget::m_instances;
-DeviceInfo::DeviceInfo(QString _device, QString _essid, QString _encr,
+DeviceInfo::DeviceInfo(TQString _device, TQString _essid, TQString _encr,
float _quality, float _signal, float _noise,
int _bitrate)
: m_device(_device),
@@ -48,9 +48,9 @@ float DeviceInfo::quality()
return m_quality;
}
-QString DeviceInfo::qualityString()
+TQString DeviceInfo::qualityString()
{
- return i18n("%1%").arg(QString::number(m_quality*100, 'f', 0));
+ return i18n("%1%").arg(TQString::number(m_quality*100, 'f', 0));
}
float DeviceInfo::signal()
@@ -58,9 +58,9 @@ float DeviceInfo::signal()
return m_signal;
}
-QString DeviceInfo::signalString()
+TQString DeviceInfo::signalString()
{
- return i18n("%1%").arg(QString::number(m_signal*100, 'f', 0));
+ return i18n("%1%").arg(TQString::number(m_signal*100, 'f', 0));
}
float DeviceInfo::noise()
@@ -68,26 +68,26 @@ float DeviceInfo::noise()
return m_noise ;
}
-QString DeviceInfo::noiseString()
+TQString DeviceInfo::noiseString()
{
- return i18n("%1%").arg(QString::number(m_noise*100, 'f', 0));
+ return i18n("%1%").arg(TQString::number(m_noise*100, 'f', 0));
}
-const QString& DeviceInfo::device()
+const TQString& DeviceInfo::device()
{
return m_device;
}
-const QString& DeviceInfo::essid()
+const TQString& DeviceInfo::essid()
{
return m_essid;
}
-QString DeviceInfo::bitrateString()
+TQString DeviceInfo::bitrateString()
{
- QString bitrate;
- QTextOStream b(&bitrate);
+ TQString bitrate;
+ TQTextOStream b(&bitrate);
b.precision(2);
switch((int)log10(m_bitrate))
@@ -123,7 +123,7 @@ bool DeviceInfo::usesEncryption()
return !m_encr.isEmpty();
}
-QString DeviceInfo::encrString()
+TQString DeviceInfo::encrString()
{
if(m_encr.isEmpty())
{
@@ -135,8 +135,8 @@ QString DeviceInfo::encrString()
}
}
-KWireLessWidget::KWireLessWidget(QWidget *parent, const char* name)
- : QWidget(parent, name),
+KWireLessWidget::KWireLessWidget(TQWidget *parent, const char* name)
+ : TQWidget(parent, name),
mode(Horizontal),
frameWidth(1),
qualityBarWidth(6),
@@ -149,8 +149,8 @@ KWireLessWidget::KWireLessWidget(QWidget *parent, const char* name)
if(timer == 0)
{ // this way, only the poll() method of the first instance will
// ever be called (intended behaviour):
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(poll()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(poll()));
// single shot, will be restartet at the end of poll ()
timer->start(100, true);
}
@@ -181,26 +181,26 @@ void KWireLessWidget::setMode(KWireLessWidget::Mode _mode)
mode = _mode;
}
-void KWireLessWidget::mousePressEvent(QMouseEvent *e)
+void KWireLessWidget::mousePressEvent(TQMouseEvent *e)
{
- if( e->button() == QMouseEvent::LeftButton)
+ if( e->button() == TQMouseEvent::LeftButton)
{
PropertiesDialog dialog(this);
- connect(this, SIGNAL(updateDeviceInfo(QPtrList<DeviceInfo> *)),
- &dialog, SLOT(update(QPtrList<DeviceInfo> *)));
+ connect(this, TQT_SIGNAL(updateDeviceInfo(TQPtrList<DeviceInfo> *)),
+ &dialog, TQT_SLOT(update(TQPtrList<DeviceInfo> *)));
dialog.exec();
}
}
-void KWireLessWidget::paintEvent(QPaintEvent*)
+void KWireLessWidget::paintEvent(TQPaintEvent*)
{
// WORK_TO_DO: paint other devices, too:
// for quick repaints, we need a buffered painter!
int w, h, space;
const int bevel = qualityBarWidth/2;
- QPainter painter(this);
- QPointArray points;
- QColor color, brush;
+ TQPainter painter(this);
+ TQPointArray points;
+ TQColor color, brush;
// do stuff that does not rely on device being valid (e.g.,
// non-nil):
@@ -216,7 +216,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
w = space;
}
- painter.setPen(QPen(Qt::black, frameWidth));
+ painter.setPen(TQPen(Qt::black, frameWidth));
painter.setBrush(KGlobalSettings::baseColor());
painter.drawRect(0, 0, w, h);
@@ -267,12 +267,12 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
QMIN(position + bevel/2, w-frameWidth), frameWidth+qualityBarWidth-1,
frameWidth, frameWidth+qualityBarWidth-1);
}
- painter.setPen(QPen(color));
+ painter.setPen(TQPen(color));
painter.setBrush(brush);
painter.drawPolygon(points);
// draw the signal bar:
- painter.setPen(QPen(Qt::darkRed));
+ painter.setPen(TQPen(Qt::darkRed));
painter.setBrush(Qt::red);
if(mode == Vertical)
@@ -289,7 +289,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
painter.drawRect(x, y, w1, signalBarWidth);
}
// draw the noise bar:
- painter.setPen(QPen(Qt::gray));
+ painter.setPen(TQPen(Qt::gray));
painter.setBrush(Qt::lightGray);
if(mode == Vertical)
@@ -308,7 +308,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*)
}
}
-KWireLessWidget* KWireLessWidget::makeWireLessWidget(QWidget *parent,
+KWireLessWidget* KWireLessWidget::makeWireLessWidget(TQWidget *parent,
const char *name)
{
#if 1