diff options
Diffstat (limited to 'kpf/src/BandwidthGraph.cpp')
-rw-r--r-- | kpf/src/BandwidthGraph.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kpf/src/BandwidthGraph.cpp b/kpf/src/BandwidthGraph.cpp index a7f6c311..9acc85e5 100644 --- a/kpf/src/BandwidthGraph.cpp +++ b/kpf/src/BandwidthGraph.cpp @@ -21,9 +21,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include <qdrawutil.h> -#include <qpainter.h> -#include <qtooltip.h> +#include <tqdrawutil.h> +#include <tqpainter.h> +#include <tqtooltip.h> #include <klocale.h> #include <kiconloader.h> @@ -40,10 +40,10 @@ namespace KPF ( WebServer * server, OverlaySelect overlaySelect, - QWidget * parent, + TQWidget * parent, const char * name ) - : QWidget (parent, name, WRepaintNoErase), + : TQWidget (parent, name, WRepaintNoErase), server_ (server), max_ (0L), overlaySelect_ (overlaySelect) @@ -55,8 +55,8 @@ namespace KPF connect ( server_, - SIGNAL(wholeServerOutput(ulong)), - SLOT(slotOutput(ulong)) + TQT_SIGNAL(wholeServerOutput(ulong)), + TQT_SLOT(slotOutput(ulong)) ); if (UseOverlays == overlaySelect_) @@ -64,15 +64,15 @@ namespace KPF connect ( server_, - SIGNAL(contentionChange(bool)), this, - SLOT(slotServerContentionChange(bool)) + TQT_SIGNAL(contentionChange(bool)), this, + TQT_SLOT(slotServerContentionChange(bool)) ); connect ( server_, - SIGNAL(pauseChange(bool)), this, - SLOT(slotServerPauseChange(bool)) + TQT_SIGNAL(pauseChange(bool)), this, + TQT_SLOT(slotServerPauseChange(bool)) ); } @@ -87,27 +87,27 @@ namespace KPF void BandwidthGraph::setTooltip() { - QToolTip::add(this, i18n( "%1 on port %2" ) + TQToolTip::add(this, i18n( "%1 on port %2" ) .arg( server_->root() ).arg( server_->listenPort() ) ); } QRect BandwidthGraph::contentsRect() const { - return QRect(1, 1, width() - 2, height() - 2); + return TQRect(1, 1, width() - 2, height() - 2); } void BandwidthGraph::updateContents() { - QRect r(contentsRect()); + TQRect r(contentsRect()); uint w = r.width(); uint h = r.height(); buffer_.fill(this, 0, 0); - QPainter p(&buffer_); + TQPainter p(&buffer_); p.drawPixmap( ( width()-bgPix_.width() )/2, ( height()-bgPix_.height() )/2, bgPix_ ); @@ -133,13 +133,13 @@ namespace KPF } void - BandwidthGraph::paintEvent(QPaintEvent * e) + BandwidthGraph::paintEvent(TQPaintEvent * e) { bitBlt(this, e->rect().topLeft(), &buffer_, e->rect()); } void - BandwidthGraph::resizeEvent(QResizeEvent *) + BandwidthGraph::resizeEvent(TQResizeEvent *) { buffer_.resize(size()); @@ -150,14 +150,14 @@ namespace KPF else if ( width() > 16 ) bgPix_ = KGlobal::iconLoader()->loadIcon( "kpf", KIcon::Panel, 16 ); else - bgPix_.fill( this, QPoint( 0, 0 ) ); + bgPix_.fill( this, TQPoint( 0, 0 ) ); KIconEffect::semiTransparent( bgPix_ ); if (width() < 2) { // We have 0 space. Make history 0 size. - history_ = QMemArray<ulong>(); + history_ = TQMemArray<ulong>(); return; } @@ -165,7 +165,7 @@ namespace KPF if (w < history_.size()) { - QMemArray<ulong> newHistory(w); + TQMemArray<ulong> newHistory(w); uint sizeDiff = history_.size() - w; @@ -176,7 +176,7 @@ namespace KPF } else if (w > history_.size()) { - QMemArray<ulong> newHistory(w); + TQMemArray<ulong> newHistory(w); uint sizeDiff = w - history_.size(); @@ -197,7 +197,7 @@ namespace KPF void BandwidthGraph::slotOutput(ulong l) { - QRect r(contentsRect()); + TQRect r(contentsRect()); uint w = r.width(); uint h = r.height(); @@ -228,7 +228,7 @@ namespace KPF } void - BandwidthGraph::drawOverlays(QPainter & p) + BandwidthGraph::drawOverlays(TQPainter & p) { if (NoOverlays == overlaySelect_) return; @@ -243,11 +243,11 @@ namespace KPF if (overlayPixmap_.isNull()) { - QString maxString; + TQString maxString; - QString bs(i18n("%1 b/s")); - QString kbs(i18n("%1 kb/s")); - QString mbs(i18n("%1 Mb/s")); + TQString bs(i18n("%1 b/s")); + TQString kbs(i18n("%1 kb/s")); + TQString mbs(i18n("%1 Mb/s")); if (max_ > 1024) if (max_ > 1024 * 1024) @@ -282,13 +282,13 @@ namespace KPF QSize BandwidthGraph::sizeHint() const { - return QSize(32, 32); + return TQSize(32, 32); } QSize BandwidthGraph::minimumSizeHint() const { - return QSize(12, 12); + return TQSize(12, 12); } WebServer * @@ -324,7 +324,7 @@ namespace KPF } else { - overlayPixmap_ = QPixmap(); + overlayPixmap_ = TQPixmap(); } } } |