diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /kmid/klcdnumber.cpp | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmid/klcdnumber.cpp')
-rw-r--r-- | kmid/klcdnumber.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/kmid/klcdnumber.cpp b/kmid/klcdnumber.cpp index f06b9dd0..014188cc 100644 --- a/kmid/klcdnumber.cpp +++ b/kmid/klcdnumber.cpp @@ -22,14 +22,14 @@ ***************************************************************************/ #include "klcdnumber.h" -#include <qpainter.h> +#include <tqpainter.h> #include <stdio.h> #include "ktrianglebutton.h" #define BUTTONWIDTH 9 -KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) - : QWidget(parent,name) +KLCDNumber::KLCDNumber(int _numDigits,TQWidget *parent,const char *name) + : TQWidget(parent,name) { initDigits(); setUserChangeValue=false; @@ -38,7 +38,7 @@ KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) minValue=0; maxValue=1000; oldvalue=-1; - // setPalette( QPalette (QColor(0,0,0))); + // setPalette( TQPalette (TQColor(0,0,0))); upBtn=NULL; downBtn=NULL; setUserDefaultValue=false; @@ -47,8 +47,8 @@ KLCDNumber::KLCDNumber(int _numDigits,QWidget *parent,const char *name) setLCDColor(100,255,100); } -KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,const char *name) - : QWidget(parent,name) +KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,TQWidget *parent,const char *name) + : TQWidget(parent,name) { initDigits(); setUserChangeValue=_setUserChangeValue; @@ -57,8 +57,8 @@ KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,c minValue=0; maxValue=1000; oldvalue=-1; -// setBackgroundColor(QColor(0,0,0)); -// setPalette( QPalette (QColor(0,0,0))); +// setBackgroundColor(TQColor(0,0,0)); +// setPalette( TQPalette (TQColor(0,0,0))); upBtn=NULL; downBtn=NULL; setUserDefaultValue=false; @@ -71,10 +71,10 @@ KLCDNumber::KLCDNumber(bool _setUserChangeValue,int _numDigits,QWidget *parent,c downBtn=new KTriangleButton(KTriangleButton::Left,this,"Down"); upBtn->setGeometry(width()-BUTTONWIDTH,0,BUTTONWIDTH,height()); downBtn->setGeometry(0,0,BUTTONWIDTH,height()); - connect(upBtn,SIGNAL(clicked()),this,SLOT(increaseValue())); - connect(downBtn,SIGNAL(clicked()),this,SLOT(decreaseValue())); - connect(upBtn,SIGNAL(clickedQuickly()),this,SLOT(increaseValueFast())); - connect(downBtn,SIGNAL(clickedQuickly()),this,SLOT(decreaseValueFast())); + connect(upBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(increaseValue())); + connect(downBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(decreaseValue())); + connect(upBtn,TQT_SIGNAL(clickedQuickly()),this,TQT_SLOT(increaseValueFast())); + connect(downBtn,TQT_SIGNAL(clickedQuickly()),this,TQT_SLOT(decreaseValueFast())); }; } @@ -93,7 +93,7 @@ Digit[9] = digit(true,true,true,true,false,true,true); Digit[10] = digit(false,false,false,false,false,false,false); } -void KLCDNumber::resizeEvent ( QResizeEvent *) +void KLCDNumber::resizeEvent ( TQResizeEvent *) { if (setUserChangeValue) { @@ -102,7 +102,7 @@ void KLCDNumber::resizeEvent ( QResizeEvent *) } } -void KLCDNumber::drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d) +void KLCDNumber::drawVerticalBar(TQPainter *qpaint,int x,int y,int w,int h,int d) { /* If d is 0 it means that it is a bar on the left and if 1 it is on the right */ /* @@ -133,7 +133,7 @@ void KLCDNumber::drawVerticalBar(QPainter *qpaint,int x,int y,int w,int h,int d) } } -void KLCDNumber::drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d) +void KLCDNumber::drawHorizBar(TQPainter *qpaint,int x,int y,int w,int h,int d) { // 0 is upper, 1 is bottom and 2 is the middle bar. x++; @@ -170,7 +170,7 @@ void KLCDNumber::drawHorizBar(QPainter *qpaint,int x,int y,int w,int h,int d) } -void KLCDNumber::drawDigit(QPainter *qpaint,int x,int y,int w,int h,digit d) +void KLCDNumber::drawDigit(TQPainter *qpaint,int x,int y,int w,int h,digit d) { if (d.nw) drawVerticalBar(qpaint,x,y,w/5,h/2,0); if (d.ne) drawVerticalBar(qpaint,x+w*4/5,y,w/5,h/2,1); @@ -206,13 +206,13 @@ void KLCDNumber::display (int v) } -void KLCDNumber::paintEvent ( QPaintEvent * ) +void KLCDNumber::paintEvent ( TQPaintEvent * ) { - QPainter qpaint(this); + TQPainter qpaint(this); qpaint.fillRect(0,0,width(),height(),backgcolor); qpaint.setPen(LCDcolor); - QString numStr; + TQString numStr; numStr.setNum((int) value); numStr = numStr.rightJustify( numDigits, ' ', true); @@ -285,19 +285,19 @@ void KLCDNumber::increaseValueFast() display( value+1 ); } -void KLCDNumber::mouseDoubleClickEvent (QMouseEvent *) +void KLCDNumber::mouseDoubleClickEvent (TQMouseEvent *) { doubleclicked=true; defaultValueClicked(); } -void KLCDNumber::mousePressEvent (QMouseEvent *e) +void KLCDNumber::mousePressEvent (TQMouseEvent *e) { startTimer(200); - QWidget::mousePressEvent(e); + TQWidget::mousePressEvent(e); } -void KLCDNumber::timerEvent(QTimerEvent *) +void KLCDNumber::timerEvent(TQTimerEvent *) { killTimers(); doubleclicked=false; @@ -316,13 +316,13 @@ void KLCDNumber::defaultValueClicked() void KLCDNumber::setLCDBackgroundColor(int r,int g,int b) { - backgcolor=QColor(r,g,b); + backgcolor=TQColor(r,g,b); repaint(FALSE); } void KLCDNumber::setLCDColor(int r,int g,int b) { - LCDcolor=QColor(r,g,b); + LCDcolor=TQColor(r,g,b); repaint(FALSE); } @@ -332,8 +332,8 @@ void KLCDNumber::setRange(double min, double max) maxValue=max; } -QSize KLCDNumber::sizeHint() +TQSize KLCDNumber::sizeHint() { - return QSize(83,28); + return TQSize(83,28); } #include "klcdnumber.moc" |