diff options
Diffstat (limited to 'wifi/kwireless/kwirelesswidget.cpp')
-rw-r--r-- | wifi/kwireless/kwirelesswidget.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/wifi/kwireless/kwirelesswidget.cpp b/wifi/kwireless/kwirelesswidget.cpp index 08f4336b..b43e0a02 100644 --- a/wifi/kwireless/kwirelesswidget.cpp +++ b/wifi/kwireless/kwirelesswidget.cpp @@ -50,7 +50,7 @@ float DeviceInfo::quality() TQString DeviceInfo::qualityString() { - return i18n("%1%").arg(TQString::number(m_quality*100, 'f', 0)); + return i18n("%1%").tqarg(TQString::number(m_quality*100, 'f', 0)); } float DeviceInfo::signal() @@ -60,7 +60,7 @@ float DeviceInfo::signal() TQString DeviceInfo::signalString() { - return i18n("%1%").arg(TQString::number(m_signal*100, 'f', 0)); + return i18n("%1%").tqarg(TQString::number(m_signal*100, 'f', 0)); } float DeviceInfo::noise() @@ -70,7 +70,7 @@ float DeviceInfo::noise() TQString DeviceInfo::noiseString() { - return i18n("%1%").arg(TQString::number(m_noise*100, 'f', 0)); + return i18n("%1%").tqarg(TQString::number(m_noise*100, 'f', 0)); } const TQString& DeviceInfo::device() @@ -135,8 +135,8 @@ TQString DeviceInfo::encrString() } } -KWireLessWidget::KWireLessWidget(TQWidget *parent, const char* name) - : TQWidget(parent, name), +KWireLessWidget::KWireLessWidget(TQWidget *tqparent, const char* name) + : TQWidget(tqparent, name), mode(Horizontal), frameWidth(1), qualityBarWidth(6), @@ -183,7 +183,7 @@ void KWireLessWidget::setMode(KWireLessWidget::Mode _mode) void KWireLessWidget::mousePressEvent(TQMouseEvent *e) { - if( e->button() == TQMouseEvent::LeftButton) + if( e->button() == Qt::LeftButton) { PropertiesDialog dialog(this); connect(this, TQT_SIGNAL(updateDeviceInfo(TQPtrList<DeviceInfo> *)), @@ -195,7 +195,7 @@ void KWireLessWidget::mousePressEvent(TQMouseEvent *e) void KWireLessWidget::paintEvent(TQPaintEvent*) { // WORK_TO_DO: paint other devices, too: - // for quick repaints, we need a buffered painter! + // for quick tqrepaints, we need a buffered painter! int w, h, space; const int bevel = qualityBarWidth/2; TQPainter painter(this); @@ -206,26 +206,26 @@ void KWireLessWidget::paintEvent(TQPaintEvent*) // non-nil): space = 3 * frameWidth + qualityBarWidth + signalBarWidth + noiseBarWidth+1; - if(mode == Horizontal) + if(mode ==Qt::Horizontal) { h = space; w = width(); } else { - // Vertical + //Qt::Vertical h = height(); w = space; } - painter.setPen(TQPen(Qt::black, frameWidth)); + painter.setPen(TQPen(TQt::black, frameWidth)); painter.setBrush(KGlobalSettings::baseColor()); painter.drawRect(0, 0, w, h); int x = qualityBarWidth + frameWidth; - mode == Vertical + mode ==Qt::Vertical ? painter.drawLine(x, frameWidth, x, h-frameWidth) : painter.drawLine(frameWidth, x, w-frameWidth, x); x += signalBarWidth + frameWidth; - mode == Vertical + mode ==Qt::Vertical ? painter.drawLine(x, frameWidth, x, h-frameWidth) : painter.drawLine(frameWidth, x, w-frameWidth, x); @@ -236,18 +236,18 @@ void KWireLessWidget::paintEvent(TQPaintEvent*) switch((int)(device->quality()*3)) { case 0: - color = Qt::darkRed; - brush = Qt::red; + color = TQt::darkRed; + brush = TQt::red; break; case 1: - color = Qt::darkYellow; - brush = Qt::yellow; + color = TQt::darkYellow; + brush = TQt::yellow; break; default: - color = Qt::darkGreen; - brush = Qt::green; + color = TQt::darkGreen; + brush = TQt::green; }; - if(mode == Vertical) + if(mode ==Qt::Vertical) { int position = (int)(((float)(h-2*frameWidth))*(1-device->quality())+0.5); @@ -255,7 +255,7 @@ void KWireLessWidget::paintEvent(TQPaintEvent*) (0, 4, frameWidth, h - 2*frameWidth, frameWidth, position + bevel/2, - qualityBarWidth, QMAX(position - bevel/2, frameWidth), + qualityBarWidth, TQMAX(position - bevel/2, frameWidth), qualityBarWidth, h - 2*frameWidth); } else { int position = (int)(((float)(w-2*frameWidth))*device->quality()+0.5); @@ -263,8 +263,8 @@ void KWireLessWidget::paintEvent(TQPaintEvent*) points.putPoints (0, 4, frameWidth, frameWidth, - QMIN(position - bevel/2, w-frameWidth), frameWidth, - QMIN(position + bevel/2, w-frameWidth), frameWidth+qualityBarWidth-1, + TQMIN(position - bevel/2, w-frameWidth), frameWidth, + TQMIN(position + bevel/2, w-frameWidth), frameWidth+qualityBarWidth-1, frameWidth, frameWidth+qualityBarWidth-1); } painter.setPen(TQPen(color)); @@ -272,10 +272,10 @@ void KWireLessWidget::paintEvent(TQPaintEvent*) painter.drawPolygon(points); // draw the signal bar: - painter.setPen(TQPen(Qt::darkRed)); - painter.setBrush(Qt::red); + painter.setPen(TQPen(TQt::darkRed)); + painter.setBrush(TQt::red); - if(mode == Vertical) + if(mode ==Qt::Vertical) { int x = 2 * frameWidth + qualityBarWidth; int h1 = (int)(((float)(h-2*frameWidth))*(1-device->signal())+0.5); @@ -289,10 +289,10 @@ void KWireLessWidget::paintEvent(TQPaintEvent*) painter.drawRect(x, y, w1, signalBarWidth); } // draw the noise bar: - painter.setPen(TQPen(Qt::gray)); - painter.setBrush(Qt::lightGray); + painter.setPen(TQPen(TQt::gray)); + painter.setBrush(TQt::lightGray); - if(mode == Vertical) + if(mode ==Qt::Vertical) { int x = 3 * frameWidth + qualityBarWidth + signalBarWidth; int h1 = (int)(((float)(h-2*frameWidth))*(1-device->noise())+0.5); @@ -308,17 +308,17 @@ void KWireLessWidget::paintEvent(TQPaintEvent*) } } -KWireLessWidget* KWireLessWidget::makeWireLessWidget(TQWidget *parent, +KWireLessWidget* KWireLessWidget::makeWireLessWidget(TQWidget *tqparent, const char *name) { #if 1 // defined linuxwirelesswidget - return new LinuxWireLessWidget(parent, name); + return new LinuxWireLessWidget(tqparent, name); #else #error KWireLess is not available for your OS #endif // just to shut the compiler up: - parent = parent; name = name; return 0; + tqparent = tqparent; name = name; return 0; } #include "kwirelesswidget.moc" |