From e654398e46e37abf457b2b1122ab898d2c51c49f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:43:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- arts/gui/kde/ktickmarks_impl.cpp | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'arts/gui/kde/ktickmarks_impl.cpp') diff --git a/arts/gui/kde/ktickmarks_impl.cpp b/arts/gui/kde/ktickmarks_impl.cpp index 4db81ee0..1a95c2a6 100644 --- a/arts/gui/kde/ktickmarks_impl.cpp +++ b/arts/gui/kde/ktickmarks_impl.cpp @@ -21,13 +21,13 @@ #include "ktickmarks_impl.h" #include -#include -#include -#include +#include +#include +#include -KTickmarks_impl::KTickmarks_impl( QFrame* w ) : Arts::KFrame_impl( w ? w : new KTickmarks_Widget( 0 ) ) +KTickmarks_impl::KTickmarks_impl( TQFrame* w ) : Arts::KFrame_impl( w ? w : new KTickmarks_Widget( 0 ) ) { - //kdDebug()<<"KTickmarks_impl::KTickmarks_impl( QFrame* w="<( _qwidget ); } @@ -50,22 +50,22 @@ void KTickmarks_impl::constructor( float min, float max, Arts::Direction dir, lo this->min( min ); this->max( max ); direction( dir ); position( pos ); } -KTickmarks_Widget::KTickmarks_Widget( KTickmarks_impl* impl, QWidget* p, const char* n ) : QFrame( p,n ), dB2VolCalc( -24, 0 ), _impl( impl ), _pos( Arts::posLeft ), _dir( Arts::BottomToTop ), minstep( 1 ), substep( 0.5 ) { +KTickmarks_Widget::KTickmarks_Widget( KTickmarks_impl* impl, TQWidget* p, const char* n ) : TQFrame( p,n ), dB2VolCalc( -24, 0 ), _impl( impl ), _pos( Arts::posLeft ), _dir( Arts::BottomToTop ), minstep( 1 ), substep( 0.5 ) { setMinimumSize( 20,20 ); } -void KTickmarks_Widget::drawContents( QPainter* p ) { - //kdDebug()<<"KTickmarks::drawContents( QPainter* "<setFont( font ); // Determining the size of the largest text (currently the text at the minimum-scale) - QFontMetrics fontmetric( font ); - QRect fontrect = fontmetric.boundingRect( QString::number( dbmin ) ); + TQFontMetrics fontmetric( font ); + TQRect fontrect = fontmetric.boundingRect( TQString::number( dbmin ) ); // Calculating stepsizes float _minstepcount = ( dbmax-dbmin )/minstep; float _minstep = minstep; // this value gets changed @@ -75,8 +75,8 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { int _minsize; // Shorcuts int w,h; - QColor colornormal = colorGroup().foreground(); - QColor colordiff = colorGroup().buttonText(); + TQColor colornormal = colorGroup().foreground(); + TQColor colordiff = colorGroup().buttonText(); if ( _dir == Arts::BottomToTop || _dir == Arts::TopToBottom ) { p->translate( contentsRect().left(), contentsRect().bottom() ); @@ -95,7 +95,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { w = contentsRect().width(); // Just a shortcut h=0; // Painting substep marks - p->setPen( QPen( colordiff, 1 ) ); + p->setPen( TQPen( colordiff, 1 ) ); for ( float i=dbmax; i>=dbmin; i-=_substep ) { h = int( -contentsRect().height() * dbtondb( i ) ); if ( _dir==Arts::TopToBottom ) h = 1 - h; @@ -103,7 +103,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { if ( right ) p->drawLine( w-3, h, w, h ); } // Painting step marks and texts - p->setPen( QPen( colornormal, 1 ) ); + p->setPen( TQPen( colornormal, 1 ) ); for ( float i=0; i>=dbmin; i-=_minstep ) { h = int( -contentsRect().height() * dbtondb( i ) ); if ( _dir==Arts::TopToBottom ) h = 1 - h; @@ -111,7 +111,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( ( w - (left)*6 - (right)*6 - fontrect.width() )/2 + (left)*6 , h-fontrect.height()/2, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w-6, h, w, h ); } for ( float i=_minstep; i<=dbmax; i+=_minstep ) { @@ -121,7 +121,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( ( w - (left)*6 - (right)*6 - fontrect.width() )/2 + (left)*6 , h-fontrect.height()/2, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w-6, h, w, h ); } } else { @@ -141,7 +141,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { w = 0; // Just a shortcut h = frameWidth() + contentsRect().height(); // Painting substep marks - p->setPen( QPen( colordiff, 1 ) ); + p->setPen( TQPen( colordiff, 1 ) ); for ( float i=dbmax; i>=dbmin; i-=_substep ) { w = this->frameWidth()+ int( contentsRect().width() * dbtondb( i ) ); if ( _dir==Arts::RightToLeft ) w = 1 - w; @@ -149,7 +149,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { if ( right ) p->drawLine( w, h-3, w, h ); } // Painting step marks and texts - p->setPen( QPen( colornormal, 1 ) ); + p->setPen( TQPen( colornormal, 1 ) ); for ( float i=0; i>=dbmin; i-=_minstep ) { w = int( contentsRect().width() * dbtondb( i ) ); if ( _dir==Arts::RightToLeft ) w = 1 - w; @@ -157,7 +157,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( w - fontrect.width()/2 , ( h - (left)*6 - (right)*6 - fontrect.height() )/2 + (left)*6, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w, h-6, w, h ); } for ( float i=_minstep; i<=dbmax; i+=_minstep ) { @@ -167,7 +167,7 @@ void KTickmarks_Widget::drawContents( QPainter* p ) { p->drawText( w - fontrect.width()/2 , ( h - (left)*6 - (right)*6 - fontrect.height() )/2 + (left)*6, fontrect.width(), fontrect.height()+2, - Qt::AlignRight|Qt::AlignTop, QString::number( i ) ); + Qt::AlignRight|Qt::AlignTop, TQString::number( i ) ); if ( right ) p->drawLine( w, h-6, w, h ); } } -- cgit v1.2.1