diff options
Diffstat (limited to 'src/gui/orientationwidget.cpp')
-rw-r--r-- | src/gui/orientationwidget.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/gui/orientationwidget.cpp b/src/gui/orientationwidget.cpp index 28e10c7..49137c2 100644 --- a/src/gui/orientationwidget.cpp +++ b/src/gui/orientationwidget.cpp @@ -18,42 +18,42 @@ #include "node.h" #include <kstandarddirs.h> -#include <qbitmap.h> -#include <qlayout.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qpushbutton.h> +#include <tqbitmap.h> +#include <tqlayout.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqpushbutton.h> const int _size = 44; -OrientationWidget::OrientationWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +OrientationWidget::OrientationWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { - QGridLayout *layout = new QGridLayout( this, 2, 4, 0, 4 ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 4, 0, 4 ); p_activeFlowPart = 0l; for ( int row=0; row<2; ++row ) { for ( int col=0; col<4; ++col ) { - QPushButton *btn = new QPushButton(this); + TQPushButton *btn = new TQPushButton(this); m_toolBtn[row][col] = btn; - layout->addWidget( btn, row, col ); + tqlayout->addWidget( btn, row, col ); btn->setFixedSize( _size+6, _size+6 ); // btn->setFlat(true); btn->setEnabled(false); } } - connect( m_toolBtn[0][0], SIGNAL(clicked()), this, SLOT(set_cio_noflip_0()) ); - connect( m_toolBtn[0][1], SIGNAL(clicked()), this, SLOT(set_cio_noflip_90()) ); - connect( m_toolBtn[0][2], SIGNAL(clicked()), this, SLOT(set_cio_noflip_180()) ); - connect( m_toolBtn[0][3], SIGNAL(clicked()), this, SLOT(set_cio_noflip_270()) ); - connect( m_toolBtn[1][0], SIGNAL(clicked()), this, SLOT(set_cio_flip_0()) ); - connect( m_toolBtn[1][1], SIGNAL(clicked()), this, SLOT(set_cio_flip_90()) ); - connect( m_toolBtn[1][2], SIGNAL(clicked()), this, SLOT(set_cio_flip_180()) ); - connect( m_toolBtn[1][3], SIGNAL(clicked()), this, SLOT(set_cio_flip_270()) ); + connect( m_toolBtn[0][0], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_0()) ); + connect( m_toolBtn[0][1], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_90()) ); + connect( m_toolBtn[0][2], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_180()) ); + connect( m_toolBtn[0][3], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_270()) ); + connect( m_toolBtn[1][0], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_0()) ); + connect( m_toolBtn[1][1], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_90()) ); + connect( m_toolBtn[1][2], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_180()) ); + connect( m_toolBtn[1][3], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_270()) ); } @@ -98,7 +98,7 @@ void OrientationWidget::initFromFlowPart( FlowPart *flowPart ) if ( valid & (1<<o) ) { m_toolBtn[i][j]->setEnabled(true); - QPixmap pm( 50, 50 ); + TQPixmap pm( 50, 50 ); flowPart->orientationPixmap( o, pm ); m_toolBtn[i][j]->setPixmap(pm); } @@ -109,9 +109,9 @@ void OrientationWidget::initFromFlowPart( FlowPart *flowPart ) void OrientationWidget::initFromComponent( Component *component ) { - const QImage im = itemLibrary()->itemImage(component); + const TQImage im = itemLibrary()->itemImage(component); - QRect bound = component->boundingRect(); + TQRect bound = component->boundingRect(); // We want a nice square bounding rect const int dy = bound.width() - bound.height(); @@ -127,24 +127,24 @@ void OrientationWidget::initFromComponent( Component *component ) } - QPixmap tbPm; + TQPixmap tbPm; tbPm.convertFromImage(im); m_toolBtn[0][0]->setPixmap(tbPm); m_toolBtn[0][0]->setEnabled(true); if ( component->canRotate() ) { -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 90, false, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[0][1]->setPixmap(tbPm); m_toolBtn[0][1]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 180, false, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[0][2]->setPixmap(tbPm); m_toolBtn[0][2]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 270, false, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[0][3]->setPixmap(tbPm); m_toolBtn[0][3]->setEnabled(true); @@ -152,24 +152,24 @@ void OrientationWidget::initFromComponent( Component *component ) if ( component->canFlip() ) { -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 0, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][0]->setPixmap(tbPm); m_toolBtn[1][0]->setEnabled(true); if ( component->canRotate() ) { -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 90, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][1]->setPixmap(tbPm); m_toolBtn[1][1]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 180, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][2]->setPixmap(tbPm); m_toolBtn[1][2]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 270, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][3]->setPixmap(tbPm); m_toolBtn[1][3]->setEnabled(true); @@ -185,7 +185,7 @@ void OrientationWidget::slotClear() for ( int col=0; col<4; ++col ) { // Hmm...this line has crashed before - m_toolBtn[row][col]->setPixmap( QPixmap::QPixmap() ); + m_toolBtn[row][col]->setPixmap( TQPixmap::TQPixmap() ); m_toolBtn[row][col]->setEnabled(false); } } |