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/klayoutbox_impl.cpp | 56 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'arts/gui/kde/klayoutbox_impl.cpp') diff --git a/arts/gui/kde/klayoutbox_impl.cpp b/arts/gui/kde/klayoutbox_impl.cpp index 7f9efa9b..847e803a 100644 --- a/arts/gui/kde/klayoutbox_impl.cpp +++ b/arts/gui/kde/klayoutbox_impl.cpp @@ -20,21 +20,21 @@ #include "klayoutbox_impl.h" -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include #include "kwidgetrepo.h" using namespace Arts; using namespace std; -KLayoutBox_impl::KLayoutBox_impl( QFrame *widget ) : KFrame_impl( widget ? widget :new QFrame( 0 ) ) +KLayoutBox_impl::KLayoutBox_impl( TQFrame *widget ) : KFrame_impl( widget ? widget :new TQFrame( 0 ) ) { - _qframe = static_cast( _qwidget ); - _layout = new QBoxLayout( _qframe, QBoxLayout::LeftToRight ); + _qframe = static_cast( _qwidget ); + _layout = new TQBoxLayout( _qframe, TQBoxLayout::LeftToRight ); } KLayoutBox_impl::~KLayoutBox_impl() { } @@ -42,14 +42,14 @@ KLayoutBox_impl::~KLayoutBox_impl() { void KLayoutBox_impl::addWidget( Arts::Widget widget, long stretch, long align ) { widget.parent( self() ); this->_addChild( widget, "layoutbox_item" ); - QWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); + TQWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); _layout->addWidget( tmp, stretch, align ); } void KLayoutBox_impl::insertWidget( long index, Arts::Widget widget, long stretch, long align ) { widget.parent( self() ); this->_addChild( widget, "layoutbox_item" ); - QWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); + TQWidget * tmp = KWidgetRepo::the()->lookupQWidget( widget.widgetID() ); _layout->insertWidget( index, tmp, stretch, align ); } @@ -70,31 +70,31 @@ long KLayoutBox_impl::layoutmargin() { return _layout->margin(); } void KLayoutBox_impl::layoutmargin( long n ) { _layout->setMargin( n ); this->margin( n ); } Direction KLayoutBox_impl::direction() { return Arts::Direction( _layout->direction() ); } -void KLayoutBox_impl::direction( Direction d ) { _layout->setDirection( QBoxLayout::Direction( d ) ); } +void KLayoutBox_impl::direction( Direction d ) { _layout->setDirection( TQBoxLayout::Direction( d ) ); } REGISTER_IMPLEMENTATION( KLayoutBox_impl ); -KLayoutBox_Separator::KLayoutBox_Separator( QWidget* p, const char* n ) : QWidget( p,n ) { +KLayoutBox_Separator::KLayoutBox_Separator( TQWidget* p, const char* n ) : TQWidget( p,n ) { //kdDebug() << k_funcinfo << endl; } -void KLayoutBox_Separator::resizeEvent( QResizeEvent* ) { kdDebug() << k_funcinfo << size() << endl; } +void KLayoutBox_Separator::resizeEvent( TQResizeEvent* ) { kdDebug() << k_funcinfo << size() << endl; } -void KLayoutBox_Separator::paintEvent( QPaintEvent* ) { +void KLayoutBox_Separator::paintEvent( TQPaintEvent* ) { //kdDebug() << k_funcinfo << size() << endl; - QPainter p( this ); - QStyle::SFlags flags = QStyle::Style_Default; - if ( width() < height() ) flags |= QStyle::Style_Horizontal; - style().drawPrimitive( QStyle::PE_Splitter, &p, rect(), colorGroup(), flags ); + TQPainter p( this ); + TQStyle::SFlags flags = TQStyle::Style_Default; + if ( width() < height() ) flags |= TQStyle::Style_Horizontal; + style().drawPrimitive( TQStyle::PE_Splitter, &p, rect(), colorGroup(), flags ); } -QSize KLayoutBox_Separator::minimumSizeHint() const { - int wh = style().pixelMetric( QStyle::PM_SplitterWidth, this ); - return QSize( wh, wh ); +TQSize KLayoutBox_Separator::minimumSizeHint() const { + int wh = style().pixelMetric( TQStyle::PM_SplitterWidth, this ); + return TQSize( wh, wh ); } -KLayoutBox_Line::KLayoutBox_Line( int width, int space, QWidget* p, const char* n ) - : QWidget( p,n ) +KLayoutBox_Line::KLayoutBox_Line( int width, int space, TQWidget* p, const char* n ) + : TQWidget( p,n ) , _width( width ) , _space( space ) { @@ -102,18 +102,18 @@ KLayoutBox_Line::KLayoutBox_Line( int width, int space, QWidget* p, const char* } -void KLayoutBox_Line::paintEvent( QPaintEvent* ) { +void KLayoutBox_Line::paintEvent( TQPaintEvent* ) { //kdDebug() << k_funcinfo << size() << endl; - QPainter p( this ); - p.setPen( QPen( colorGroup().foreground(), _width ) ); + TQPainter p( this ); + p.setPen( TQPen( colorGroup().foreground(), _width ) ); if ( width() > height() ) p.drawLine( 0, height()/2, width(), height()/2 ); else p.drawLine( width()/2, 0, width()/2, height() ); } -QSize KLayoutBox_Line::minimumSizeHint() const { +TQSize KLayoutBox_Line::minimumSizeHint() const { //kdDebug() << k_funcinfo << size() << endl; int wh = _width + 2* _space; - return QSize( wh, wh ); + return TQSize( wh, wh ); } #include -- cgit v1.2.1