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/klabel_impl.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'arts/gui/kde/klabel_impl.cpp') diff --git a/arts/gui/kde/klabel_impl.cpp b/arts/gui/kde/klabel_impl.cpp index 774a7de0..dd0a9557 100644 --- a/arts/gui/kde/klabel_impl.cpp +++ b/arts/gui/kde/klabel_impl.cpp @@ -22,12 +22,12 @@ #include "klabel_impl.moc" #include -#include +#include using namespace Arts; using namespace std; -KLabel_impl::KLabel_impl( QFrame *widget ) : KFrame_impl( widget ? widget : new RotateLabel( 0 ) ) { +KLabel_impl::KLabel_impl( TQFrame *widget ) : KFrame_impl( widget ? widget : new RotateLabel( 0 ) ) { _label = static_cast( _qwidget ); } @@ -36,7 +36,7 @@ string KLabel_impl::text() { } void KLabel_impl::text( const string& newtext ) { - _label->title( QString::fromUtf8( newtext.c_str() ) ); + _label->title( TQString::fromUtf8( newtext.c_str() ) ); } long KLabel_impl::align() { return _label->align(); } @@ -50,40 +50,40 @@ void KLabel_impl::bottom( Arts::TextBottom n ) { _label->bottom( n ); } REGISTER_IMPLEMENTATION( KLabel_impl ); -RotateLabel::RotateLabel( QWidget* p, const char* n ) : QFrame( p,n ) { +RotateLabel::RotateLabel( TQWidget* p, const char* n ) : TQFrame( p,n ) { _bottom = Arts::South; _align = Arts::AlignCenter; } -void RotateLabel::paintEvent( QPaintEvent* ) { - QPainter p( this ); +void RotateLabel::paintEvent( TQPaintEvent* ) { + TQPainter p( this ); if ( _bottom == Arts::East ) { p.rotate( 270 ); - p.drawText( QRect( 0,0, -height(), width() ), _align, _title ); + p.drawText( TQRect( 0,0, -height(), width() ), _align, _title ); } else if ( _bottom == Arts::West ) { p.rotate( 90 ); - p.drawText( QRect( 0,0, height(), -width() ), _align, _title ); + p.drawText( TQRect( 0,0, height(), -width() ), _align, _title ); } else if ( _bottom == Arts::North ) { p.rotate( 180 ); - p.drawText( QRect( 0,0, -width(), -height() ), _align, _title ); + p.drawText( TQRect( 0,0, -width(), -height() ), _align, _title ); } else { - p.drawText( QRect( 0,0, width(), height() ), _align, _title ); + p.drawText( TQRect( 0,0, width(), height() ), _align, _title ); } } -void RotateLabel::fontfamily( QString n ) { - QFont font = this->font(); +void RotateLabel::fontfamily( TQString n ) { + TQFont font = this->font(); font.setFamily( n ); this->setFont( font ); } void RotateLabel::fontsize( int n ) { - QFont font = this->font(); + TQFont font = this->font(); font.setPixelSize( n ); this->setFont( font ); } -void RotateLabel::title( QString n ) { +void RotateLabel::title( TQString n ) { _title = n; - QSize size = this->fontMetrics().size( SingleLine, _title ); + TQSize size = this->fontMetrics().size( SingleLine, _title ); if ( _bottom == Arts::East || _bottom == Arts::West ) this->setMinimumSize( size.height(), size.width() ); else -- cgit v1.2.1