diff options
Diffstat (limited to 'karbon/dockers')
-rw-r--r-- | karbon/dockers/vcolordocker.cc | 80 | ||||
-rw-r--r-- | karbon/dockers/vcolordocker.h | 25 | ||||
-rw-r--r-- | karbon/dockers/vdocumentdocker.cc | 444 | ||||
-rw-r--r-- | karbon/dockers/vdocumentdocker.h | 118 | ||||
-rw-r--r-- | karbon/dockers/vstrokedocker.cc | 90 | ||||
-rw-r--r-- | karbon/dockers/vstrokedocker.h | 13 | ||||
-rw-r--r-- | karbon/dockers/vstyledocker.cc | 78 | ||||
-rw-r--r-- | karbon/dockers/vstyledocker.h | 30 | ||||
-rw-r--r-- | karbon/dockers/vtransformdocker.cc | 94 | ||||
-rw-r--r-- | karbon/dockers/vtransformdocker.h | 5 |
10 files changed, 493 insertions, 484 deletions
diff --git a/karbon/dockers/vcolordocker.cc b/karbon/dockers/vcolordocker.cc index c5037967..b574bec0 100644 --- a/karbon/dockers/vcolordocker.cc +++ b/karbon/dockers/vcolordocker.cc @@ -18,14 +18,14 @@ * Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qwidget.h> -#include <qcolor.h> -#include <qtooltip.h> -#include <qevent.h> -#include <qptrlist.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqwidget.h> +#include <tqcolor.h> +#include <tqtooltip.h> +#include <tqevent.h> +#include <tqptrlist.h> #include <klocale.h> #include <KoMainWindow.h> @@ -51,8 +51,8 @@ #include <kdebug.h> -VColorDocker::VColorDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ ) - : QWidget(), m_part ( part ), m_view( parent ) +VColorDocker::VColorDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ ) + : TQWidget(), m_part ( part ), m_view( tqparent ) { m_isStrokeDocker = false; setCaption( i18n( "Color Chooser" ) ); @@ -62,39 +62,39 @@ VColorDocker::VColorDocker( KarbonPart* part, KarbonView* parent, const char* /* m_fillCmd = 0; m_strokeCmd = 0; - mTabWidget = new QTabWidget( this ); + mTabWidget = new TQTabWidget( this ); /* ##### HSV WIDGET ##### */ mHSVWidget = new KoHSVWidget( mTabWidget ); - connect( mHSVWidget, SIGNAL( sigFgColorChanged( const QColor &) ), this, SLOT( updateFgColor( const QColor &) ) ); - connect( mHSVWidget, SIGNAL( sigBgColorChanged( const QColor &) ), this, SLOT( updateBgColor( const QColor &) ) ); - connect(this, SIGNAL(fgColorChanged(const QColor &)), mHSVWidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(bgColorChanged(const QColor &)), mHSVWidget, SLOT(setBgColor(const QColor &))); - connect( mHSVWidget, SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, SLOT( updateMode( KDualColorButton::DualColor ) ) ); + connect( mHSVWidget, TQT_SIGNAL( sigFgColorChanged( const TQColor &) ), this, TQT_SLOT( updateFgColor( const TQColor &) ) ); + connect( mHSVWidget, TQT_SIGNAL( sigBgColorChanged( const TQColor &) ), this, TQT_SLOT( updateBgColor( const TQColor &) ) ); + connect(this, TQT_SIGNAL(fgColorChanged(const TQColor &)), mHSVWidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(bgColorChanged(const TQColor &)), mHSVWidget, TQT_SLOT(setBgColor(const TQColor &))); + connect( mHSVWidget, TQT_SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, TQT_SLOT( updateMode( KDualColorButton::DualColor ) ) ); mTabWidget->addTab( mHSVWidget, i18n( "HSV" ) ); /* ##### RGB WIDGET ##### */ mRGBWidget = new KoRGBWidget( mTabWidget ); - connect( mRGBWidget, SIGNAL( sigFgColorChanged( const QColor &) ), this, SLOT( updateFgColor( const QColor &) ) ); - connect( mRGBWidget, SIGNAL( sigBgColorChanged( const QColor &) ), this, SLOT( updateBgColor( const QColor &) ) ); - connect(this, SIGNAL(fgColorChanged(const QColor &)), mRGBWidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(bgColorChanged(const QColor &)), mRGBWidget, SLOT(setBgColor(const QColor &))); - connect( mRGBWidget, SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, SLOT( updateMode( KDualColorButton::DualColor ) ) ); + connect( mRGBWidget, TQT_SIGNAL( sigFgColorChanged( const TQColor &) ), this, TQT_SLOT( updateFgColor( const TQColor &) ) ); + connect( mRGBWidget, TQT_SIGNAL( sigBgColorChanged( const TQColor &) ), this, TQT_SLOT( updateBgColor( const TQColor &) ) ); + connect(this, TQT_SIGNAL(fgColorChanged(const TQColor &)), mRGBWidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(bgColorChanged(const TQColor &)), mRGBWidget, TQT_SLOT(setBgColor(const TQColor &))); + connect( mRGBWidget, TQT_SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, TQT_SLOT( updateMode( KDualColorButton::DualColor ) ) ); mTabWidget->addTab( mRGBWidget, i18n( "RGB" ) ); /* ##### CMYK WIDGET ##### */ /*mCMYKWidget = new KoCMYKWidget( mTabWidget ); - connect( mCMYKWidget, SIGNAL( sigFgColorChanged( const QColor &) ), this, SLOT( updateFgColor( const QColor &) ) ); - connect( mCMYKWidget, SIGNAL( sigBgColorChanged( const QColor &) ), this, SLOT( updateBgColor( const QColor &) ) ); + connect( mCMYKWidget, TQT_SIGNAL( sigFgColorChanged( const TQColor &) ), this, TQT_SLOT( updateFgColor( const TQColor &) ) ); + connect( mCMYKWidget, TQT_SIGNAL( sigBgColorChanged( const TQColor &) ), this, TQT_SLOT( updateBgColor( const TQColor &) ) ); mTabWidget->addTab( mCMYKWidget, i18n( "CMYK" ) );*/ //Opacity - mOpacity = new VColorSlider( i18n( "Opacity:" ), QColor( "white" ), QColor( "black" ), 0, 100, 100, this ); + mOpacity = new VColorSlider( i18n( "Opacity:" ), TQColor( "white" ), TQColor( "black" ), 0, 100, 100, this ); //TODO: Make "white" a transparent color - connect( mOpacity, SIGNAL( valueChanged ( int ) ), this, SLOT( updateOpacity() ) ); - QToolTip::add( mOpacity, i18n( "Alpha (opacity)" ) ); + connect( mOpacity, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateOpacity() ) ); + TQToolTip::add( mOpacity, i18n( "Alpha (opacity)" ) ); - QVBoxLayout *mainWidgetLayout = new QVBoxLayout( this, 3 ); + TQVBoxLayout *mainWidgetLayout = new TQVBoxLayout( this, 3 ); mainWidgetLayout->addWidget( mTabWidget ); mainWidgetLayout->addWidget( mOpacity ); mainWidgetLayout->activate(); @@ -107,7 +107,7 @@ VColorDocker::~VColorDocker() { } -void VColorDocker::updateFgColor(const QColor &c) +void VColorDocker::updateFgColor(const TQColor &c) { m_color = c; @@ -115,7 +115,7 @@ void VColorDocker::updateFgColor(const QColor &c) v.setOpacity( m_opacity ); // check if we have objects selected - QPtrList<VObject> VNewObjectList = m_part->document().selection()->objects(); + TQPtrList<VObject> VNewObjectList = m_part->document().selection()->objects(); if( ! VNewObjectList.count() ) return; @@ -124,7 +124,7 @@ void VColorDocker::updateFgColor(const QColor &c) //mCMYKWidget->blockSignals(true); VCommandHistory* history = m_part->commandHistory(); - const QPtrList<VCommand>* commandList = history->commands(); + const TQPtrList<VCommand>* commandList = history->commands(); VStrokeCmd* command = dynamic_cast<VStrokeCmd*>(commandList->getLast()); if(command == 0 || m_strokeCmd == 0) @@ -134,12 +134,12 @@ void VColorDocker::updateFgColor(const QColor &c) } else { - QPtrList<VObject> VOldObjectList = command->getSelection()->objects(); + TQPtrList<VObject> VOldObjectList = command->getSelection()->objects(); if( VOldObjectList == VNewObjectList ) { m_strokeCmd->changeStroke(v); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } else { @@ -155,7 +155,7 @@ void VColorDocker::updateFgColor(const QColor &c) //mCMYKWidget->blockSignals(false); } -void VColorDocker::updateBgColor(const QColor &c) +void VColorDocker::updateBgColor(const TQColor &c) { m_color = c; @@ -163,7 +163,7 @@ void VColorDocker::updateBgColor(const QColor &c) v.setOpacity( m_opacity ); // check if we have objects selected - QPtrList<VObject> VNewObjectList = m_part->document().selection()->objects(); + TQPtrList<VObject> VNewObjectList = m_part->document().selection()->objects(); if( ! VNewObjectList.count() ) return; @@ -172,7 +172,7 @@ void VColorDocker::updateBgColor(const QColor &c) //mCMYKWidget->blockSignals(true); VCommandHistory* history = m_part->commandHistory(); - const QPtrList<VCommand>* commandList = history->commands(); + const TQPtrList<VCommand>* commandList = history->commands(); VFillCmd* command = dynamic_cast<VFillCmd*>(commandList->getLast()); if(command == 0 || m_fillCmd == 0) @@ -182,12 +182,12 @@ void VColorDocker::updateBgColor(const QColor &c) } else { - QPtrList<VObject> VOldObjectList = command->getSelection()->objects(); + TQPtrList<VObject> VOldObjectList = command->getSelection()->objects(); if( VOldObjectList == VNewObjectList ) { m_fillCmd->changeFill(VFill(v)); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } else { @@ -217,7 +217,7 @@ void VColorDocker::updateOpacity() } void -VColorDocker::mouseReleaseEvent( QMouseEvent * ) +VColorDocker::mouseReleaseEvent( TQMouseEvent * ) { //changeColor(); } @@ -250,8 +250,8 @@ void VColorDocker::update() { VObject *obj = m_part->document().selection()->objects().getFirst(); - QColor fgColor = QColor(obj->stroke() ? obj->stroke()->color() : VColor() ); - QColor bgColor = QColor(obj->fill() ? obj->fill()->color() : VColor() ); + TQColor fgColor = TQColor(obj->stroke() ? obj->stroke()->color() : VColor() ); + TQColor bgColor = TQColor(obj->fill() ? obj->fill()->color() : VColor() ); mHSVWidget->setFgColor(fgColor); mRGBWidget->setFgColor(fgColor); diff --git a/karbon/dockers/vcolordocker.h b/karbon/dockers/vcolordocker.h index e5e791d7..ea8e4c9d 100644 --- a/karbon/dockers/vcolordocker.h +++ b/karbon/dockers/vcolordocker.h @@ -21,9 +21,9 @@ #ifndef __VCOLORDOCKER_H__ #define __VCOLORDOCKER_H__ -class QTabWidget; -class QWidget; -class QColor; +class TQTabWidget; +class TQWidget; +class TQColor; class KarbonView; class VColor; class VColorSlider; @@ -31,12 +31,13 @@ class KoHSVWidget; class KoCMYKWidget; class KoRGBWidget; -class VColorDocker : public QWidget +class VColorDocker : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VColorDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L ); + VColorDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L ); virtual ~VColorDocker(); virtual bool isStrokeDocker() { return m_isStrokeDocker; }; @@ -48,26 +49,26 @@ public slots: virtual void update(); private: - virtual void mouseReleaseEvent( QMouseEvent *e ); + virtual void mouseReleaseEvent( TQMouseEvent *e ); - QTabWidget *mTabWidget; + TQTabWidget *mTabWidget; KoHSVWidget *mHSVWidget; //KoCMYKWidget *mCMYKWidget; KoRGBWidget *mRGBWidget; VColorSlider *mOpacity; signals: - void fgColorChanged( const QColor &c ); - void bgColorChanged( const QColor &c ); + void fgColorChanged( const TQColor &c ); + void bgColorChanged( const TQColor &c ); void modeChanged( KDualColorButton::DualColor s); private slots: - void updateFgColor(const QColor &c); - void updateBgColor(const QColor &c); + void updateFgColor(const TQColor &c); + void updateBgColor(const TQColor &c); void updateOpacity(); void updateMode( KDualColorButton::DualColor s ); protected: bool m_isStrokeDocker; //Are we setting stroke color ( true ) or fill color ( false ) - QColor m_color; + TQColor m_color; float m_opacity; private: KarbonPart *m_part; diff --git a/karbon/dockers/vdocumentdocker.cc b/karbon/dockers/vdocumentdocker.cc index ccbbf711..b63ae9ae 100644 --- a/karbon/dockers/vdocumentdocker.cc +++ b/karbon/dockers/vdocumentdocker.cc @@ -17,17 +17,17 @@ * Boston, MA 02110-1301, USA. */ -#include <qhbuttongroup.h> -#include <qinputdialog.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlistview.h> -#include <qptrvector.h> -#include <qtoolbutton.h> -#include <qpainter.h> -#include <qtabwidget.h> -#include <qlabel.h> -#include <qcursor.h> +#include <tqhbuttongroup.h> +#include <tqinputdialog.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlistview.h> +#include <tqptrvector.h> +#include <tqtoolbutton.h> +#include <tqpainter.h> +#include <tqtabwidget.h> +#include <tqlabel.h> +#include <tqcursor.h> #include <klocale.h> #include <kglobal.h> @@ -61,12 +61,12 @@ static long g_lastKey = 0; * Document tab * *************************************************************************/ -VDocumentPreview::VDocumentPreview( KarbonView* view, QWidget* parent ) - : QWidget( parent, "DocumentPreview" ), m_document( &view->part()->document() ), m_view( view ) +VDocumentPreview::VDocumentPreview( KarbonView* view, TQWidget* tqparent ) + : TQWidget( tqparent, "DocumentPreview" ), m_document( &view->part()->document() ), m_view( view ) { update(); installEventFilter( this ); - setBackgroundMode( Qt::NoBackground ); + setBackgroundMode( TQt::NoBackground ); setMouseTracking( true ); m_dragging = false; m_docpixmap = 0L; @@ -85,7 +85,7 @@ VDocumentPreview::reset() } bool -VDocumentPreview::eventFilter( QObject* object, QEvent* event ) +VDocumentPreview::eventFilter( TQObject* object, TQEvent* event ) { double scaleFactor; double xoffset = 0.; @@ -102,17 +102,17 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event ) } KoRect rect = m_view->canvasWidget()->boundingBox(); - QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( event ); - if( event->type() == QEvent::MouseButtonPress ) + TQMouseEvent* mouseEvent = TQT_TQMOUSEEVENT( event ); + if( event->type() == TQEvent::MouseButtonPress ) { m_firstPoint.setX( mouseEvent->pos().x() ); m_firstPoint.setY( mouseEvent->pos().y() ); m_lastPoint = m_firstPoint; KoPoint p3( m_firstPoint.x() / scaleFactor - xoffset, ( height() - m_firstPoint.y() ) / scaleFactor - yoffset ); - m_dragging = rect.contains( p3 ); + m_dragging = rect.tqcontains( p3 ); } - else if( event->type() == QEvent::MouseButtonRelease ) + else if( event->type() == TQEvent::MouseButtonRelease ) { if( m_dragging ) { @@ -127,7 +127,7 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event ) update(); } } - else if( event->type() == QEvent::MouseMove ) + else if( event->type() == TQEvent::MouseMove ) { if( m_dragging ) { @@ -144,18 +144,18 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event ) { KoPoint p3( mouseEvent->pos().x() / scaleFactor - xoffset, ( height() - mouseEvent->pos().y() ) / scaleFactor - yoffset ); - setCursor( rect.contains( p3 ) ? QCursor::SizeAllCursor : QCursor( Qt::arrowCursor ) ); + setCursor( rect.tqcontains( p3 ) ? TQCursor::SizeAllCursor : TQCursor( TQt::arrowCursor ) ); } } - return QWidget::eventFilter( object, event ); + return TQWidget::eventFilter( object, event ); } void -VDocumentPreview::paintEvent( QPaintEvent* ) +VDocumentPreview::paintEvent( TQPaintEvent* ) { // TODO : use NotROP, otherwise too slow - QPixmap pixmap( width(), height() ); + TQPixmap pixmap( width(), height() ); double xoffset = 0.; double yoffset = 0.; double scaleFactor; @@ -174,17 +174,17 @@ VDocumentPreview::paintEvent( QPaintEvent* ) if( !m_docpixmap || m_docpixmap->width() != width() || m_docpixmap->height() != height() ) { delete m_docpixmap; - m_docpixmap = new QPixmap( width(), height() ); - VKoPainter p( m_docpixmap, width(), height() ); - p.clear( QColor( 195, 194, 193 ) ); - p.setWorldMatrix( QWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) ); + m_docpixmap = new TQPixmap( width(), height() ); + VKoPainter p( TQT_TQPAINTDEVICE(m_docpixmap), width(), height() ); + p.clear( TQColor( 195, 194, 193 ) ); + p.setWorldMatrix( TQWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) ); p.setZoomFactor( scaleFactor ); KoRect rect( -xoffset, -yoffset, m_document->width() + xoffset, m_document->height() + yoffset ); // draw doc outline - VColor c( Qt::black ); + VColor c( TQt::black ); VStroke stroke( c, 0L, 1.0 / scaleFactor ); p.setPen( stroke ); - p.setBrush( Qt::white ); + p.setBrush( TQt::white ); p.drawRect( KoRect( 2, 2, m_document->width() - 2, m_document->height() - 2 ) ); m_document->draw( &p, &rect ); p.end(); @@ -193,9 +193,9 @@ VDocumentPreview::paintEvent( QPaintEvent* ) // draw viewport rect { - QPainter p( &pixmap ); - p.setWorldMatrix( QWMatrix( scaleFactor, 0, 0, -scaleFactor, xoffset * scaleFactor, height() - yoffset * scaleFactor ) ); - p.setPen( Qt::red ); + TQPainter p( &pixmap ); + p.setWorldMatrix( TQWMatrix( scaleFactor, 0, 0, -scaleFactor, xoffset * scaleFactor, height() - yoffset * scaleFactor ) ); + p.setPen( TQt::red ); double dx = ( m_lastPoint.x() - m_firstPoint.x() ) * m_view->zoom(); double dy = ( m_lastPoint.y() - m_firstPoint.y() ) * m_view->zoom(); KoPoint p1( dx / scaleFactor, dy / scaleFactor ); @@ -205,13 +205,13 @@ VDocumentPreview::paintEvent( QPaintEvent* ) p.drawRect( int( p1.x() ), int( p1.y() ), int( p2.x() - p1.x() ), int( p2.y() - p1.y() ) ); } - QPainter pw( &pixmap ); - pw.setPen( colorGroup().light() ); + TQPainter pw( &pixmap ); + pw.setPen( tqcolorGroup().light() ); pw.drawLine( 1, 1, 1, height() - 2 ); pw.drawLine( 1, 1, width() - 2, 1 ); pw.drawLine( width() - 1, height() - 1, 0, height() - 1 ); pw.drawLine( width() - 1, height() - 1, width() - 1, 0 ); - pw.setPen( colorGroup().dark() ); + pw.setPen( tqcolorGroup().dark() ); pw.drawLine( 0, 0, width() - 1, 0 ); pw.drawLine( 0, 0, 0, height() - 1 ); pw.drawLine( width() - 2, height() - 2, width() - 2, 1 ); @@ -220,42 +220,42 @@ VDocumentPreview::paintEvent( QPaintEvent* ) bitBlt( this, 0, 0, &pixmap, 0, 0, width(), height() ); } // VDocumentPreview::paintEvent -VDocumentTab::VDocumentTab( KarbonView* view, QWidget* parent ) - : QWidget( parent, "DocumentTab" ), m_view( view ) -{ - QFrame* frame; - QGridLayout* layout = new QGridLayout( this ); - layout->setMargin( 3 ); - layout->setSpacing( 2 ); - layout->addMultiCellWidget( m_documentPreview = new VDocumentPreview( m_view, this ), 0, 7, 2, 2 ); - layout->addWidget( new QLabel( i18n( "document width", "Width:" ), this ), 0, 0 ); - layout->addWidget( new QLabel( i18n( "Height:" ), this ), 1, 0 ); - layout->addMultiCellWidget( frame = new QFrame( this ), 2, 2, 0, 1 ); - frame->setFrameShape( QFrame::HLine ); - layout->addWidget( new QLabel( i18n( "Layers:" ), this ), 3, 0 ); - layout->addWidget( new QLabel( i18n( "Format:" ), this ), 4, 0 ); - layout->addMultiCellWidget( frame = new QFrame( this ), 5, 5, 0, 1 ); - frame->setFrameShape( QFrame::HLine ); - //layout->addMultiCellWidget( new QLabel( i18n( "Zoom factor:" ), this ), 6, 6, 0, 1 ); - layout->addWidget( m_width = new QLabel( this ), 0, 1 ); - layout->addWidget( m_height = new QLabel( this ), 1, 1 ); - layout->addWidget( m_layers = new QLabel( this ), 3, 1 ); - layout->addWidget( m_format = new QLabel( this ), 4, 1 ); - layout->setRowStretch( 7, 1 ); - layout->setColStretch( 0, 0 ); - layout->setColStretch( 1, 0 ); - layout->setColStretch( 2, 2 ); - //layout->addWidget( - - m_width->setAlignment( AlignRight ); - m_height->setAlignment( AlignRight ); - m_layers->setAlignment( AlignRight ); - m_format->setAlignment( AlignRight ); - - connect( view->part()->commandHistory(), SIGNAL( commandAdded( VCommand* ) ), this, SLOT( slotCommandAdded( VCommand* ) ) ); - connect( view->part()->commandHistory(), SIGNAL( commandExecuted() ), this, SLOT( slotCommandExecuted() ) ); - connect( view, SIGNAL( pageLayoutChanged() ), this, SLOT( slotCommandExecuted() ) ); - connect( view->canvasWidget(), SIGNAL( viewportChanged() ), this, SLOT( slotViewportChanged() ) ); +VDocumentTab::VDocumentTab( KarbonView* view, TQWidget* tqparent ) + : TQWidget( tqparent, "DocumentTab" ), m_view( view ) +{ + TQFrame* frame; + TQGridLayout* tqlayout = new TQGridLayout( this ); + tqlayout->setMargin( 3 ); + tqlayout->setSpacing( 2 ); + tqlayout->addMultiCellWidget( m_documentPreview = new VDocumentPreview( m_view, this ), 0, 7, 2, 2 ); + tqlayout->addWidget( new TQLabel( i18n( "document width", "Width:" ), this ), 0, 0 ); + tqlayout->addWidget( new TQLabel( i18n( "Height:" ), this ), 1, 0 ); + tqlayout->addMultiCellWidget( frame = new TQFrame( this ), 2, 2, 0, 1 ); + frame->setFrameShape( TQFrame::HLine ); + tqlayout->addWidget( new TQLabel( i18n( "Layers:" ), this ), 3, 0 ); + tqlayout->addWidget( new TQLabel( i18n( "Format:" ), this ), 4, 0 ); + tqlayout->addMultiCellWidget( frame = new TQFrame( this ), 5, 5, 0, 1 ); + frame->setFrameShape( TQFrame::HLine ); + //tqlayout->addMultiCellWidget( new TQLabel( i18n( "Zoom factor:" ), this ), 6, 6, 0, 1 ); + tqlayout->addWidget( m_width = new TQLabel( this ), 0, 1 ); + tqlayout->addWidget( m_height = new TQLabel( this ), 1, 1 ); + tqlayout->addWidget( m_layers = new TQLabel( this ), 3, 1 ); + tqlayout->addWidget( m_format = new TQLabel( this ), 4, 1 ); + tqlayout->setRowStretch( 7, 1 ); + tqlayout->setColStretch( 0, 0 ); + tqlayout->setColStretch( 1, 0 ); + tqlayout->setColStretch( 2, 2 ); + //tqlayout->addWidget( + + m_width->tqsetAlignment( AlignRight ); + m_height->tqsetAlignment( AlignRight ); + m_layers->tqsetAlignment( AlignRight ); + m_format->tqsetAlignment( AlignRight ); + + connect( view->part()->commandHistory(), TQT_SIGNAL( commandAdded( VCommand* ) ), this, TQT_SLOT( slotCommandAdded( VCommand* ) ) ); + connect( view->part()->commandHistory(), TQT_SIGNAL( commandExecuted() ), this, TQT_SLOT( slotCommandExecuted() ) ); + connect( view, TQT_SIGNAL( pageLayoutChanged() ), this, TQT_SLOT( slotCommandExecuted() ) ); + connect( view->canvasWidget(), TQT_SIGNAL( viewportChanged() ), this, TQT_SLOT( slotViewportChanged() ) ); updateDocumentInfo(); } // VDocumentTab::VDocumentTab @@ -269,7 +269,7 @@ VDocumentTab::updateDocumentInfo() { m_width->setText( KoUnit::toUserStringValue( m_view->part()->document().width(), m_view->part()->unit() ) + m_view->part()->unitName() ); m_height->setText( KoUnit::toUserStringValue( m_view->part()->document().height(), m_view->part()->unit() ) + m_view->part()->unitName() ); - m_layers->setText( QString::number( m_view->part()->document().layers().count() ) ); + m_layers->setText( TQString::number( m_view->part()->document().layers().count() ) ); } // VDocumentTab::updateDocumentInfo void @@ -303,8 +303,8 @@ VDocumentTab::slotCommandExecuted() * Layers tab * *************************************************************************/ -VObjectListViewItem::VObjectListViewItem( QListViewItem* parent, VObject* object, VDocument *doc, uint key, QPtrDict<VObjectListViewItem> *map ) - : QListViewItem( parent, 0L ), m_object( object ), m_document( doc ), m_key( key ), m_map( map ) +VObjectListViewItem::VObjectListViewItem( TQListViewItem* tqparent, VObject* object, VDocument *doc, uint key, TQPtrDict<VObjectListViewItem> *map ) + : TQListViewItem( tqparent, 0L ), m_object( object ), m_document( doc ), m_key( key ), m_map( map ) { update(); // add itself to object list item map @@ -317,10 +317,10 @@ VObjectListViewItem::~VObjectListViewItem() m_map->take( m_object ); } -QString +TQString VObjectListViewItem::key( int, bool ) const { - return QString( "%1" ).arg( m_key ); + return TQString( "%1" ).tqarg( m_key ); } void @@ -329,14 +329,14 @@ VObjectListViewItem::update() // text description VSelectionDescription selectionDesc; selectionDesc.visit( *m_object ); - setText( 0, QString( "%1" ).arg( selectionDesc.shortDescription() ) ); + setText( 0, TQString( "%1" ).tqarg( selectionDesc.shortDescription() ) ); // draw thumb preview (16x16) - QPixmap preview; + TQPixmap preview; preview.resize( 16, 16 ); - VKoPainter p( &preview, 16, 16, false ); + VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false ); // Y mirroring - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); KoRect bbox = m_object->boundingBox(); mat.translate( 0, -16 ); @@ -348,30 +348,30 @@ VObjectListViewItem::update() p.setZoomFactor( factor ); m_object->draw( &p ); p.setZoomFactor( 1 ); - p.setWorldMatrix( QWMatrix() ); - p.setPen( Qt::black ); - p.setBrush( Qt::NoBrush ); + p.setWorldMatrix( TQWMatrix() ); + p.setPen( TQt::black ); + p.setBrush( TQt::NoBrush ); p.drawRect( KoRect( 0, 0, 16, 16 ) ); p.end(); // set thumb preview, lock and visible pixmaps setPixmap( 0, preview ); - QString s = ( m_object->state() == VObject::normal_locked || m_object->state() == VObject::hidden_locked ) ? "locked" : "unlocked"; + TQString s = ( m_object->state() == VObject::normal_locked || m_object->state() == VObject::hidden_locked ) ? "locked" : "unlocked"; setPixmap( 1, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) ); s = ( m_object->state() == VObject::hidden || m_object->state() == VObject::hidden_locked ) ? "14_layer_novisible" : "14_layer_visible"; setPixmap( 2, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) ); } int -VObjectListViewItem::compare( QListViewItem *i, int /*col*/, bool /*ascending*/ ) const +VObjectListViewItem::compare( TQListViewItem *i, int /*col*/, bool /*ascending*/ ) const { VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>(i); if( ! objectItem ) return 0; return m_key < objectItem->m_key ? -1 : 1; } -VLayerListViewItem::VLayerListViewItem( QListView* parent, VLayer* layer, VDocument *doc, QPtrDict<VLayerListViewItem> *map ) - : QCheckListItem( parent, 0L, CheckBox ), m_layer( layer ), m_document( doc), m_map( map ) +VLayerListViewItem::VLayerListViewItem( TQListView* tqparent, VLayer* layer, VDocument *doc, TQPtrDict<VLayerListViewItem> *map ) + : TQCheckListItem( tqparent, 0L, CheckBox ), m_layer( layer ), m_document( doc), m_map( map ) { update(); // add itself to layer list item map @@ -388,11 +388,11 @@ void VLayerListViewItem::update() { // draw thumb preview (16x16) - QPixmap preview; + TQPixmap preview; preview.resize( 16, 16 ); - VKoPainter p( &preview, 16, 16, false ); + VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false ); // Y mirroring - QWMatrix mat; + TQWMatrix mat; mat.scale( 1, -1 ); mat.translate( 0, -16 ); p.setWorldMatrix( mat ); @@ -401,9 +401,9 @@ VLayerListViewItem::update() p.setZoomFactor( 16. / 800. ); m_layer->draw( &p ); p.setZoomFactor( 1 ); - p.setWorldMatrix( QWMatrix() ); - p.setPen( Qt::black ); - p.setBrush( Qt::NoBrush ); + p.setWorldMatrix( TQWMatrix() ); + p.setPen( TQt::black ); + p.setBrush( TQt::NoBrush ); p.drawRect( KoRect( 0, 0, 16, 16 ) ); p.end(); @@ -413,7 +413,7 @@ VLayerListViewItem::update() // set thumb preview, lock and visible pixmaps setPixmap( 0, preview ); - QString s = ( m_layer->state() == VObject::normal_locked || m_layer->state() == VObject::hidden_locked ) ? "locked" : "unlocked"; + TQString s = ( m_layer->state() == VObject::normal_locked || m_layer->state() == VObject::hidden_locked ) ? "locked" : "unlocked"; setPixmap( 1, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) ); s = ( m_layer->state() == VObject::normal || m_layer->state() == VObject::normal_locked ) ? "14_layer_visible" : "14_layer_novisible"; setPixmap( 2, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) ); @@ -435,69 +435,69 @@ VLayerListViewItem::pos() return 1 + item->pos(); } // VLayerListViewItem::pos -QString +TQString VLayerListViewItem::key( int, bool ) const { - return QString( "%1" ).arg( m_key ); + return TQString( "%1" ).tqarg( m_key ); } int -VLayerListViewItem::compare( QListViewItem *i, int /*col*/, bool /*ascending*/ ) const +VLayerListViewItem::compare( TQListViewItem *i, int /*col*/, bool /*ascending*/ ) const { VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>(i); if( ! layerItem ) return 0; return m_key < layerItem->m_key ? -1 : 1; } -VLayersTab::VLayersTab( KarbonView* view, QWidget* parent ) - : QWidget( parent, "LayersTab" ), m_view( view ), m_document( &view->part()->document() ) +VLayersTab::VLayersTab( KarbonView* view, TQWidget* tqparent ) + : TQWidget( tqparent, "LayersTab" ), m_view( view ), m_document( &view->part()->document() ) { - QToolButton* button; - QVBoxLayout* layout = new QVBoxLayout( this, 1 ); - layout->addWidget( m_layersListView = new QListView( this ), 1 ); - m_buttonGroup = new QHButtonGroup( this ); + TQToolButton* button; + TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 1 ); + tqlayout->addWidget( m_layersListView = new TQListView( this ), 1 ); + m_buttonGroup = new TQHButtonGroup( this ); m_buttonGroup->setInsideMargin( 3 ); - button = new QToolButton( m_buttonGroup ); + button = new TQToolButton( m_buttonGroup ); button->setIconSet( SmallIcon( "14_layer_newlayer" ) ); button->setTextLabel( i18n( "New" ) ); m_buttonGroup->insert( button ); - button = new QToolButton( m_buttonGroup ); + button = new TQToolButton( m_buttonGroup ); button->setIconSet( SmallIcon( "14_layer_raiselayer" ) ); button->setTextLabel( i18n( "Raise" ) ); m_buttonGroup->insert( button ); - button = new QToolButton( m_buttonGroup ); + button = new TQToolButton( m_buttonGroup ); button->setIconSet( SmallIcon( "14_layer_lowerlayer" ) ); button->setTextLabel( i18n( "Lower" ) ); m_buttonGroup->insert( button ); - button = new QToolButton( m_buttonGroup ); + button = new TQToolButton( m_buttonGroup ); button->setIconSet( SmallIcon( "14_layer_deletelayer" ) ); button->setTextLabel( i18n( "Delete" ) ); m_buttonGroup->insert( button ); - layout->addWidget( m_buttonGroup, 0); - layout->setSpacing( 0 ); - layout->setMargin( 3 ); + tqlayout->addWidget( m_buttonGroup, 0); + tqlayout->setSpacing( 0 ); + tqlayout->setMargin( 3 ); m_layersListView->setAllColumnsShowFocus( true ); m_layersListView->addColumn( i18n( "Item" ), 120 ); m_layersListView->addColumn( i18n( "L" ), 20 ); m_layersListView->addColumn( i18n( "V" ), 20 ); - m_layersListView->setColumnWidthMode( 0, QListView::Maximum ); - m_layersListView->setColumnAlignment( 1, Qt::AlignCenter ); - m_layersListView->setColumnAlignment( 2, Qt::AlignCenter ); - m_layersListView->setResizeMode( QListView::NoColumn ); + m_layersListView->setColumnWidthMode( 0, TQListView::Maximum ); + m_layersListView->setColumnAlignment( 1, TQt::AlignCenter ); + m_layersListView->setColumnAlignment( 2, TQt::AlignCenter ); + m_layersListView->setResizeMode( TQListView::NoColumn ); m_layersListView->setSorting( 0, false ); m_layersListView->setRootIsDecorated( true ); - m_layersListView->setSelectionMode( QListView::Extended ); + m_layersListView->setSelectionMode( TQListView::Extended ); - connect( m_layersListView, SIGNAL( clicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( itemClicked( QListViewItem*, const QPoint&, int ) ) ); - connect( m_layersListView, SIGNAL( rightButtonClicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( renameItem( QListViewItem*, const QPoint&, int ) ) ); - connect( m_layersListView, SIGNAL( selectionChanged() ), this, SLOT( selectionChangedFromList() ) ); - connect( m_view, SIGNAL( selectionChange() ), this, SLOT( selectionChangedFromTool() ) ); - connect( m_buttonGroup, SIGNAL( clicked( int ) ), this, SLOT( slotButtonClicked( int ) ) ); - connect( view->part()->commandHistory(), SIGNAL( commandExecuted( VCommand*) ), this, SLOT( slotCommandExecuted( VCommand* ) ) ); + connect( m_layersListView, TQT_SIGNAL( clicked( TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( itemClicked( TQListViewItem*, const TQPoint&, int ) ) ); + connect( m_layersListView, TQT_SIGNAL( rightButtonClicked( TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( renameItem( TQListViewItem*, const TQPoint&, int ) ) ); + connect( m_layersListView, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( selectionChangedFromList() ) ); + connect( m_view, TQT_SIGNAL( selectionChange() ), this, TQT_SLOT( selectionChangedFromTool() ) ); + connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotButtonClicked( int ) ) ); + connect( view->part()->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand*) ), this, TQT_SLOT( slotCommandExecuted( VCommand* ) ) ); - layout->activate(); + tqlayout->activate(); updateLayers(); } // VLayersTab::VLayersTab @@ -524,14 +524,14 @@ VLayersTab::slotButtonClicked( int ID ) void VLayersTab::resetSelection() { - QListViewItemIterator it( m_layersListView ); + TQListViewItemIterator it( m_layersListView ); // iterates over all list items and deselects them manually // to avoid the list views selectionChanged signal for(; it.current(); ++it ) { it.current()->setSelected( false ); - it.current()->repaint(); + it.current()->tqrepaint(); } } @@ -540,7 +540,7 @@ VLayersTab::selectActiveLayer() { if( ! m_layers[ m_document->activeLayer() ] ) { - QPtrVector<VLayer> vector; + TQPtrVector<VLayer> vector; m_document->layers().toVector( &vector ); // find another layer to set active for( int i = vector.count() - 1; i >= 0; i-- ) @@ -552,18 +552,18 @@ VLayersTab::selectActiveLayer() } // deselect all other layers - QPtrDictIterator<VLayerListViewItem> it( m_layers ); + TQPtrDictIterator<VLayerListViewItem> it( m_layers ); for(; it.current(); ++it ) { it.current()->setSelected( false ); - it.current()->repaint(); + it.current()->tqrepaint(); } VLayerListViewItem *layerItem = m_layers[ m_document->activeLayer() ]; if( layerItem ) { layerItem->setSelected( true ); - layerItem->repaint(); + layerItem->tqrepaint(); kdDebug(38000) << "selecting active layer: " << layerItem->text() << endl; } } @@ -584,12 +584,12 @@ VLayersTab::selectionChangedFromTool() VObjectListViewItem *item = m_objects[ obj ]; if( ! item ) { - VLayerListViewItem *layerItem = m_layers[ obj->parent() ]; + VLayerListViewItem *layerItem = m_layers[ obj->tqparent() ]; if( layerItem ) updateObjects( layerItem->layer(), layerItem ); else { - VObjectListViewItem *objectItem = m_objects[ obj->parent() ]; + VObjectListViewItem *objectItem = m_objects[ obj->tqparent() ]; if( objectItem ) updateObjects( objectItem->object(), objectItem ); else @@ -606,9 +606,9 @@ VLayersTab::selectionChangedFromTool() } void -VLayersTab::updateChildItems( QListViewItem *item ) +VLayersTab::updateChildItems( TQListViewItem *item ) { - QListViewItemIterator it( item ); + TQListViewItemIterator it( item ); // iterator points to item, so make the next item current first for( ++it; it.current(); ++it ) @@ -620,7 +620,7 @@ VLayersTab::updateChildItems( QListViewItem *item ) updateChildItems( objectItem ); objectItem->update(); - objectItem->repaint(); + objectItem->tqrepaint(); } } @@ -659,7 +659,7 @@ VLayersTab::toggleState( VObject *obj, int col ) } void -VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col ) +VLayersTab::itemClicked( TQListViewItem* item, const TQPoint &, int col ) { if( item ) { @@ -676,11 +676,11 @@ VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col ) toggleState( layerItem->layer(), col ); layerItem->update(); - layerItem->repaint(); + layerItem->tqrepaint(); updateChildItems( layerItem ); - m_view->part()->repaintAllViews(); + m_view->part()->tqrepaintAllViews(); } } else @@ -703,12 +703,12 @@ VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col ) objectItem->setSelected( false ); objectItem->update(); - objectItem->repaint(); + objectItem->tqrepaint(); if( dynamic_cast<VGroup*>( objectItem->object() ) ) updateChildItems( objectItem ); - m_view->part()->repaintAllViews(); + m_view->part()->tqrepaintAllViews(); } } } @@ -719,7 +719,7 @@ VLayersTab::selectionChangedFromList() { m_document->selection()->clear(); - QListViewItemIterator it( m_layersListView ); + TQListViewItemIterator it( m_layersListView ); // iterate over all list items and add their corresponding object // to the documents selection if the list item is selected and not hidden or locked or both @@ -740,16 +740,16 @@ VLayersTab::selectionChangedFromList() && (state != VObject::hidden_locked) ) { m_document->selection()->append( objectItem->object() ); - objectItem->repaint(); + objectItem->tqrepaint(); } } m_view->selectionChanged(); - m_view->part()->repaintAllViews(); + m_view->part()->tqrepaintAllViews(); } void -VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col ) +VLayersTab::renameItem( TQListViewItem* item, const TQPoint&, int col ) { if ( ( item ) && col == 0 ) { @@ -759,7 +759,7 @@ VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col ) { VObjectListViewItem *objectItem = dynamic_cast< VObjectListViewItem *>( item ); VObject *obj = objectItem->object(); - QString name = KInputDialog::getText( i18n( "Current Object" ), i18n( "Change the name of the object:" ), + TQString name = KInputDialog::getText( i18n( "Current Object" ), i18n( "Change the name of the object:" ), obj->name(), &ok, this ); if( ok ) { @@ -769,7 +769,7 @@ VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col ) } else { - QString name = KInputDialog::getText( i18n( "Rename Layer" ), i18n( "Change the name of the current layer:" ), + TQString name = KInputDialog::getText( i18n( "Rename Layer" ), i18n( "Change the name of the current layer:" ), layerItem->layer()->name(), &ok, this ); if( ok ) { @@ -784,7 +784,7 @@ void VLayersTab::addLayer() { bool ok = true; - QString name = KInputDialog::getText( i18n( "New Layer" ), i18n( "Enter the name of the new layer:" ), + TQString name = KInputDialog::getText( i18n( "New Layer" ), i18n( "Enter the name of the new layer:" ), i18n( "New layer" ), &ok, this ); if( ok ) { @@ -801,8 +801,8 @@ void VLayersTab::raiseItem() { VCommand *cmd = 0L; - //QListViewItem *newselection = 0L; - QListViewItemIterator it( m_layersListView ); + //TQListViewItem *newselection = 0L; + TQListViewItemIterator it( m_layersListView ); if( m_document->selection()->objects().count() ) { @@ -836,7 +836,7 @@ void VLayersTab::lowerItem() { VCommand *cmd = 0L; - QListViewItemIterator it( m_layersListView ); + TQListViewItemIterator it( m_layersListView ); if( m_document->selection()->objects().count() ) { @@ -869,9 +869,9 @@ void VLayersTab::deleteItem() { VCommand *cmd = 0L; - QListViewItemIterator it( m_layersListView ); + TQListViewItemIterator it( m_layersListView ); - QPtrList<QListViewItem> deleteItems; + TQPtrList<TQListViewItem> deleteItems; deleteItems.setAutoDelete( false ); // collect all selected items because they get deselected @@ -926,7 +926,7 @@ VLayersTab::deleteItem() if( cmd ) { updatePreviews(); - m_view->part()->repaintAllViews(); + m_view->part()->tqrepaintAllViews(); } } // VLayersTab::deleteItem @@ -942,7 +942,7 @@ VLayersTab::updateLayers() { removeDeletedObjectsFromList(); - QPtrVector<VLayer> vector; + TQPtrVector<VLayer> vector; m_document->layers().toVector( &vector ); VLayerListViewItem* item = 0L; for( int i = vector.count() - 1; i >= 0; i-- ) @@ -968,7 +968,7 @@ VLayersTab::updateLayers() } // VLayersTab::updateLayers void -VLayersTab::updateObjects( VObject *object, QListViewItem *item ) +VLayersTab::updateObjects( VObject *object, TQListViewItem *item ) { VObjectListIterator itr = dynamic_cast<VGroup *>( object )->objects(); @@ -982,10 +982,10 @@ VLayersTab::updateObjects( VObject *object, QListViewItem *item ) objectItem = new VObjectListViewItem( item, itr.current(), m_document, objcount, &m_objects ); objectItem->update(); } - else if( objectItem->parent() != item ) + else if( objectItem->tqparent() != item ) { - // object found, but has false parent -> reparent - objectItem->parent()->takeItem( objectItem ); + // object found, but has false tqparent -> reparent + objectItem->tqparent()->takeItem( objectItem ); item->insertItem( objectItem ); } @@ -1001,20 +1001,20 @@ VLayersTab::updateObjects( VObject *object, QListViewItem *item ) void VLayersTab::removeDeletedObjectsFromList() { - QPtrDictIterator<VObjectListViewItem> it( m_objects ); + TQPtrDictIterator<VObjectListViewItem> it( m_objects ); // iterate over all object items and delete the following items: // - items representing deleted objects - // - items with objects objects that changed parents + // - items with objects objects that changed tqparents // BEWARE: when deleting an item, the iterator is automatically incremented for(; it.current(); ) { - VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>( it.current()->parent() ); + VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>( it.current()->tqparent() ); if( layerItem ) { VGroup *group = dynamic_cast<VGroup*>( layerItem->layer() ); - // check if object of item is still child of object of parent item - if( group && ! group->objects().contains( it.current()->object() ) ) + // check if object of item is still child of object of tqparent item + if( group && ! group->objects().tqcontains( it.current()->object() ) ) { layerItem->takeItem( it.current() ); delete it.current(); @@ -1023,12 +1023,12 @@ VLayersTab::removeDeletedObjectsFromList() } else { - VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>( it.current()->parent() ); + VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>( it.current()->tqparent() ); if( objectItem ) { VGroup *group = dynamic_cast<VGroup*>( objectItem->object() ); - // check if object of item is still child of object of parent item - if( group && ! group->objects().contains( it.current()->object() ) ) + // check if object of item is still child of object of tqparent item + if( group && ! group->objects().tqcontains( it.current()->object() ) ) { objectItem->takeItem( it.current() ); delete it.current(); @@ -1051,7 +1051,7 @@ VLayersTab::removeDeletedObjectsFromList() ++it; } - QPtrDictIterator<VLayerListViewItem> itr( m_layers ); + TQPtrDictIterator<VLayerListViewItem> itr( m_layers ); // iterate over all layer items and delete the following items: // - items representing deleted layers @@ -1085,12 +1085,12 @@ VLayersTab::slotCommandExecuted( VCommand* command ) * History tab * *************************************************************************/ -VHistoryGroupItem::VHistoryGroupItem( VHistoryItem* item, QListView* parent, QListViewItem* after ) - : QListViewItem( parent, after ) +VHistoryGroupItem::VHistoryGroupItem( VHistoryItem* item, TQListView* tqparent, TQListViewItem* after ) + : TQListViewItem( tqparent, after ) { setPixmap( 0, *item->pixmap( 0 ) ); setText( 0, item->text( 0 ) ); - parent->takeItem( item ); + tqparent->takeItem( item ); insertItem( item ); m_key = item->key( 0, true ); } // VHistoryItem::VHistoryItem @@ -1100,7 +1100,7 @@ VHistoryGroupItem::~VHistoryGroupItem() } // VHistoryGroupItem::~VHistoryGroupItem void -VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ) +VHistoryGroupItem::paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ) { int e = 0; int n = 0; @@ -1117,12 +1117,12 @@ VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, in { p->fillRect( 0, 0, width, height(), cg.base() ); if ( n > 0 ) - p->fillRect( 0, 0, width, height(), QBrush( cg.base().dark( 140 ), QBrush::BDiagPattern ) ); + p->fillRect( 0, 0, width, height(), TQBrush( cg.base().dark( 140 ), TQBrush::BDiagPattern ) ); } else p->fillRect( 0, 0, width, height(), cg.base().dark( 140 ) ); - const QPixmap* pixmap = this->pixmap( column ); + const TQPixmap* pixmap = this->pixmap( column ); int xstart; if ( pixmap ) { @@ -1134,25 +1134,25 @@ VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, in else xstart = 4; p->setPen( cg.text() ); - p->drawText( xstart, 0, width - xstart, height(), align | Qt::AlignVCenter, text( column ) ); + p->drawText( xstart, 0, width - xstart, height(), align | TQt::AlignVCenter, text( column ) ); } // VHistoryGroupItem::paintCell void -VHistoryGroupItem::paintFocus( QPainter*, const QColorGroup&, const QRect& ) +VHistoryGroupItem::paintFocus( TQPainter*, const TQColorGroup&, const TQRect& ) { // Do not paint any focus rectangle // It makes the list and the selected item look messy } // VHistoryGroupItem::paintFocus -VHistoryItem::VHistoryItem( VCommand* command, QListView* parent, QListViewItem* after ) - : QListViewItem( parent, after ), m_command( command ) +VHistoryItem::VHistoryItem( VCommand* command, TQListView* tqparent, TQListViewItem* after ) + : TQListViewItem( tqparent, after ), m_command( command ) { init(); } // VHistoryItem::VHistoryItem -VHistoryItem::VHistoryItem( VCommand* command, VHistoryGroupItem* parent, QListViewItem* after ) - : QListViewItem( parent, after ), m_command( command ) +VHistoryItem::VHistoryItem( VCommand* command, VHistoryGroupItem* tqparent, TQListViewItem* after ) + : TQListViewItem( tqparent, after ), m_command( command ) { init(); } // VHistoryItem::VHistoryItem @@ -1164,7 +1164,7 @@ VHistoryItem::init() char buffer[70]; sprintf( buffer, "%064ld", ++g_lastKey ); m_key = buffer; - setPixmap( 0, QPixmap( KGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) ); + setPixmap( 0, TQPixmap( KGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) ); setText( 0, m_command->name() ); } // VHistoryITem::init @@ -1173,11 +1173,11 @@ VHistoryItem::~VHistoryItem() } // VHistoryItem::~VHistoryItem void -VHistoryItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ) +VHistoryItem::paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ) { - p->fillRect( 0, 0, width, height(), ( m_command->success() ? cg.base() : cg.base().dark( 140 ) ) ); + p->fillRect( 0, 0, width, height(), ( m_command->success() ? cg.base() : TQColor(cg.base().dark( 140 )) ) ); - const QPixmap* pixmap = this->pixmap( column ); + const TQPixmap* pixmap = this->pixmap( column ); int xstart; if ( pixmap ) { @@ -1189,35 +1189,35 @@ VHistoryItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int wid else xstart = 4; p->setPen( cg.text() ); - p->drawText( xstart, 0, width - xstart, height(), align | Qt::AlignVCenter, text( column ) ); + p->drawText( xstart, 0, width - xstart, height(), align | TQt::AlignVCenter, text( column ) ); } // VHistoryItem::paintCell void -VHistoryItem::paintFocus( QPainter*, const QColorGroup&, const QRect& ) +VHistoryItem::paintFocus( TQPainter*, const TQColorGroup&, const TQRect& ) { // Do not paint any focus rectangle // It makes the list and the selected item look messy } // VHistoryItem::paintFocus -VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent ) - : QWidget( parent ), m_part( part ) +VHistoryTab::VHistoryTab( KarbonPart* part, TQWidget* tqparent ) + : TQWidget( tqparent ), m_part( part ) { - QVBoxLayout* layout = new QVBoxLayout( this ); - layout->setMargin( 3 ); - layout->setSpacing( 2 ); - layout->add( m_history = new QListView( this ) ); - m_history->setVScrollBarMode( QListView::AlwaysOn ); - m_history->setSelectionMode( QListView::NoSelection ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); + tqlayout->setMargin( 3 ); + tqlayout->setSpacing( 2 ); + tqlayout->add( m_history = new TQListView( this ) ); + m_history->setVScrollBarMode( TQListView::AlwaysOn ); + m_history->setSelectionMode( TQListView::NoSelection ); m_history->addColumn( i18n( "Commands" ) ); - m_history->setResizeMode( QListView::AllColumns ); + m_history->setResizeMode( TQListView::AllColumns ); m_history->setRootIsDecorated( true ); - layout->add( m_groupCommands = new QCheckBox( i18n( "Group commands" ), this ) ); + tqlayout->add( m_groupCommands = new TQCheckBox( i18n( "Group commands" ), this ) ); m_history->setSorting( 0, true ); VHistoryGroupItem* group = 0; VHistoryItem* last = 0; - QPtrVector<VCommand> cmds; + TQPtrVector<VCommand> cmds; part->commandHistory()->commands()->toVector( &cmds ); int c = cmds.count(); for ( int i = 0; i < c; i++ ) @@ -1225,7 +1225,7 @@ VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent ) if ( ( i > 0 ) && ( cmds[ i ]->name() == cmds[ i - 1 ]->name() ) ) if ( group ) { - QListViewItem* prev = group->firstChild(); + TQListViewItem* prev = group->firstChild(); while ( prev && prev->nextSibling() ) prev = prev->nextSibling(); new VHistoryItem( cmds[ i ], group, prev ); @@ -1243,17 +1243,17 @@ VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent ) } m_history->sort(); - connect( m_history, SIGNAL( mouseButtonClicked( int, QListViewItem*, const QPoint&, int ) ), this, SLOT( commandClicked( int, QListViewItem*, const QPoint&, int ) ) ); - connect( m_groupCommands, SIGNAL( stateChanged( int ) ), this, SLOT( groupingChanged( int ) ) ); - connect( part->commandHistory(), SIGNAL( historyCleared() ), this, SLOT( historyCleared() ) ); - connect( part->commandHistory(), SIGNAL( commandAdded( VCommand* ) ), this, SLOT( slotCommandAdded( VCommand* ) ) ); - connect( part->commandHistory(), SIGNAL( commandExecuted( VCommand* ) ), this, SLOT( commandExecuted( VCommand* ) ) ); - connect( part->commandHistory(), SIGNAL( firstCommandRemoved() ), this, SLOT( removeFirstCommand() ) ); - connect( part->commandHistory(), SIGNAL( lastCommandRemoved() ), this, SLOT( removeLastCommand() ) ); - connect( this, SIGNAL( undoCommand( VCommand* ) ), part->commandHistory(), SLOT( undo( VCommand* ) ) ); - connect( this, SIGNAL( redoCommand( VCommand* ) ), part->commandHistory(), SLOT( redo( VCommand* ) ) ); - connect( this, SIGNAL( undoCommandsTo( VCommand* ) ), part->commandHistory(), SLOT( undoAllTo( VCommand* ) ) ); - connect( this, SIGNAL( redoCommandsTo( VCommand* ) ), part->commandHistory(), SLOT( redoAllTo( VCommand* ) ) ); + connect( m_history, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( commandClicked( int, TQListViewItem*, const TQPoint&, int ) ) ); + connect( m_groupCommands, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( groupingChanged( int ) ) ); + connect( part->commandHistory(), TQT_SIGNAL( historyCleared() ), this, TQT_SLOT( historyCleared() ) ); + connect( part->commandHistory(), TQT_SIGNAL( commandAdded( VCommand* ) ), this, TQT_SLOT( slotCommandAdded( VCommand* ) ) ); + connect( part->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand* ) ), this, TQT_SLOT( commandExecuted( VCommand* ) ) ); + connect( part->commandHistory(), TQT_SIGNAL( firstCommandRemoved() ), this, TQT_SLOT( removeFirstCommand() ) ); + connect( part->commandHistory(), TQT_SIGNAL( lastCommandRemoved() ), this, TQT_SLOT( removeLastCommand() ) ); + connect( this, TQT_SIGNAL( undoCommand( VCommand* ) ), part->commandHistory(), TQT_SLOT( undo( VCommand* ) ) ); + connect( this, TQT_SIGNAL( redoCommand( VCommand* ) ), part->commandHistory(), TQT_SLOT( redo( VCommand* ) ) ); + connect( this, TQT_SIGNAL( undoCommandsTo( VCommand* ) ), part->commandHistory(), TQT_SLOT( undoAllTo( VCommand* ) ) ); + connect( this, TQT_SIGNAL( redoCommandsTo( VCommand* ) ), part->commandHistory(), TQT_SLOT( redoAllTo( VCommand* ) ) ); } // VHistoryTab::VHistoryTab VHistoryTab::~VHistoryTab() @@ -1275,13 +1275,13 @@ VHistoryTab::historyCleared() void VHistoryTab::commandExecuted( VCommand* command ) { - QListViewItem* item = m_history->firstChild(); + TQListViewItem* item = m_history->firstChild(); bool found = false; while ( !found && item ) { if ( item->rtti() == 1001 ) { - QListViewItem* child = item->firstChild(); + TQListViewItem* child = item->firstChild(); while ( !found && child ) { found = ( ( (VHistoryItem*)child )->command() == command ); @@ -1297,9 +1297,9 @@ VHistoryTab::commandExecuted( VCommand* command ) } if ( found ) { - m_history->repaintItem( item ); - if ( item->parent() ) - m_history->repaintItem( item->parent() ); + m_history->tqrepaintItem( item ); + if ( item->tqparent() ) + m_history->tqrepaintItem( item->tqparent() ); m_history->ensureItemVisible( item ); } } // VHistoryTab::commandExecuted @@ -1310,7 +1310,7 @@ VHistoryTab::slotCommandAdded( VCommand* command ) if ( !command ) return; - QListViewItem* last = m_history->firstChild(); + TQListViewItem* last = m_history->firstChild(); while ( last && last->nextSibling() ) last = last->nextSibling(); @@ -1320,7 +1320,7 @@ VHistoryTab::slotCommandAdded( VCommand* command ) { if( last->rtti() == 1002 ) { - QListViewItem* prevSibling; + TQListViewItem* prevSibling; if( m_history->childCount() > 1 ) { prevSibling = m_history->firstChild(); @@ -1331,7 +1331,7 @@ VHistoryTab::slotCommandAdded( VCommand* command ) prevSibling = m_history->firstChild(); last = new VHistoryGroupItem( (VHistoryItem*)last, m_history, prevSibling ); } - QListViewItem* prev = last->firstChild(); + TQListViewItem* prev = last->firstChild(); while ( prev && prev->nextSibling() ) prev = prev->nextSibling(); m_history->setCurrentItem( new VHistoryItem( command, (VHistoryGroupItem*)last, prev ) ); @@ -1370,7 +1370,7 @@ VHistoryTab::removeLastCommand() { if ( m_history->childCount() > 0 ) { - QListViewItem* last = m_history->firstChild(); + TQListViewItem* last = m_history->firstChild(); while ( last && last->nextSibling() ) last = last->nextSibling(); if ( last->rtti() == 1002 ) @@ -1392,7 +1392,7 @@ VHistoryTab::removeLastCommand() } // VHistoryTab::removeLastCommand void -VHistoryTab::commandClicked( int button, QListViewItem* item, const QPoint&, int ) +VHistoryTab::commandClicked( int button, TQListViewItem* item, const TQPoint&, int ) { if ( !item || item->rtti() == 1001 ) return; @@ -1415,9 +1415,9 @@ VHistoryTab::groupingChanged( int ) { if ( m_groupCommands->isChecked() && m_history->childCount() > 1 ) { - QListViewItem* s2last = 0; - QListViewItem* last = m_history->firstChild(); - QListViewItem* item = last->nextSibling(); + TQListViewItem* s2last = 0; + TQListViewItem* last = m_history->firstChild(); + TQListViewItem* item = last->nextSibling(); while ( item ) if ( last->text( 0 ) == item->text( 0 ) ) { @@ -1436,11 +1436,11 @@ VHistoryTab::groupingChanged( int ) } else { - QListViewItem* item = m_history->firstChild(); + TQListViewItem* item = m_history->firstChild(); while ( item ) if ( item->rtti() == 1001 ) { - QListViewItem* child; + TQListViewItem* child; while ( ( child = item->firstChild() ) ) { item->takeItem( child ); diff --git a/karbon/dockers/vdocumentdocker.h b/karbon/dockers/vdocumentdocker.h index 278f56ba..4f60949a 100644 --- a/karbon/dockers/vdocumentdocker.h +++ b/karbon/dockers/vdocumentdocker.h @@ -20,14 +20,14 @@ #ifndef __VDOCUMENTDOCKER_H__ #define __VDOCUMENTDOCKER_H__ -#include <qlistview.h> -#include <qptrdict.h> +#include <tqlistview.h> +#include <tqptrdict.h> -class QHButtonGroup; -class QPoint; -class QLabel; -class QPixmap; -class QCheckBox; +class TQHButtonGroup; +class TQPoint; +class TQLabel; +class TQPixmap; +class TQCheckBox; class VDocument; class VLayer; @@ -37,19 +37,20 @@ class KarbonView; * Document Tab * *************************************************************************/ -class VDocumentPreview : public QWidget +class VDocumentPreview : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VDocumentPreview( KarbonView* view, QWidget* parent = 0 ); + VDocumentPreview( KarbonView* view, TQWidget* tqparent = 0 ); ~VDocumentPreview(); void reset(); protected: - void paintEvent( QPaintEvent* e ); - virtual bool eventFilter( QObject* object, QEvent* event ); + void paintEvent( TQPaintEvent* e ); + virtual bool eventFilter( TQObject* object, TQEvent* event ); private: VDocument *m_document; @@ -57,15 +58,16 @@ class VDocumentPreview : public QWidget KoPoint m_firstPoint; KoPoint m_lastPoint; bool m_dragging; - QPixmap *m_docpixmap; + TQPixmap *m_docpixmap; }; // VDocumentPreview -class VDocumentTab : public QWidget +class VDocumentTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VDocumentTab( KarbonView* view, QWidget* parent ); + VDocumentTab( KarbonView* view, TQWidget* tqparent ); ~VDocumentTab(); public slots: @@ -77,10 +79,10 @@ class VDocumentTab : public QWidget private: VDocumentPreview* m_documentPreview; - QLabel* m_height; - QLabel* m_width; - QLabel* m_layers; - QLabel* m_format; + TQLabel* m_height; + TQLabel* m_width; + TQLabel* m_layers; + TQLabel* m_format; KarbonView* m_view; }; // VDocumentTab @@ -89,17 +91,17 @@ class VDocumentTab : public QWidget * Layers Tab * *************************************************************************/ -class VLayerListViewItem : public QCheckListItem +class VLayerListViewItem : public TQCheckListItem { public: - VLayerListViewItem( QListView* parent, VLayer* layer, VDocument *doc, QPtrDict<VLayerListViewItem> *map ); + VLayerListViewItem( TQListView* tqparent, VLayer* layer, VDocument *doc, TQPtrDict<VLayerListViewItem> *map ); virtual ~VLayerListViewItem(); VLayer* layer() { return m_layer; } int pos(); void update(); - virtual QString key( int column, bool ascending ) const; - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; void setKey( uint key ) { m_key = key; } protected: @@ -109,43 +111,44 @@ private: VLayer *m_layer; VDocument *m_document; uint m_key; - QPtrDict<VLayerListViewItem> *m_map; + TQPtrDict<VLayerListViewItem> *m_map; }; // VLayerListViewItem -class VObjectListViewItem : public QListViewItem +class VObjectListViewItem : public TQListViewItem { public: - VObjectListViewItem( QListViewItem* parent, VObject* object, VDocument *doc, uint key, QPtrDict<VObjectListViewItem> *map ); + VObjectListViewItem( TQListViewItem* tqparent, VObject* object, VDocument *doc, uint key, TQPtrDict<VObjectListViewItem> *map ); virtual ~VObjectListViewItem(); VObject* object() { return m_object; } void update(); - virtual QString key( int column, bool ascending ) const; - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; void setKey( uint key ) { m_key = key; } private: VObject *m_object; VDocument *m_document; uint m_key; - QPtrDict<VObjectListViewItem> *m_map; + TQPtrDict<VObjectListViewItem> *m_map; }; -class VLayersTab : public QWidget +class VLayersTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VLayersTab( KarbonView* view, QWidget* parent = 0 ); + VLayersTab( KarbonView* view, TQWidget* tqparent = 0 ); ~VLayersTab(); public slots: void updatePreviews(); void updateLayers(); - void itemClicked( QListViewItem* item, const QPoint&, int col ); + void itemClicked( TQListViewItem* item, const TQPoint&, int col ); void selectionChangedFromList(); void selectionChangedFromTool(); - void renameItem( QListViewItem* item, const QPoint&, int col ); + void renameItem( TQListViewItem* item, const TQPoint&, int col ); void addLayer(); void raiseItem(); void lowerItem(); @@ -155,22 +158,22 @@ public slots: private slots: void slotButtonClicked( int ID ); void removeDeletedObjectsFromList(); - void updateChildItems( QListViewItem *item ); + void updateChildItems( TQListViewItem *item ); void toggleState( VObject *obj, int col ); protected: VLayerListViewItem* listItem( int pos ); - void updateObjects( VObject *object, QListViewItem *item ); + void updateObjects( VObject *object, TQListViewItem *item ); void resetSelection(); void selectActiveLayer(); private: - QListView *m_layersListView; - QHButtonGroup *m_buttonGroup; + TQListView *m_layersListView; + TQHButtonGroup *m_buttonGroup; KarbonView *m_view; VDocument *m_document; - QPtrDict<VLayerListViewItem> m_layers; - QPtrDict<VObjectListViewItem> m_objects; + TQPtrDict<VLayerListViewItem> m_layers; + TQPtrDict<VObjectListViewItem> m_objects; }; // VLayersTab /************************************************************************* @@ -179,50 +182,51 @@ private: class VHistoryItem; -class VHistoryGroupItem : public QListViewItem +class VHistoryGroupItem : public TQListViewItem { public: - VHistoryGroupItem( VHistoryItem* item, QListView* parent, QListViewItem* after ); + VHistoryGroupItem( VHistoryItem* item, TQListView* tqparent, TQListViewItem* after ); ~VHistoryGroupItem(); - void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ); - void paintFocus( QPainter*, const QColorGroup&, const QRect& ); + void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); + void paintFocus( TQPainter*, const TQColorGroup&, const TQRect& ); - virtual QString key( int, bool ) const { return m_key; } + virtual TQString key( int, bool ) const { return m_key; } virtual int rtti() const { return 1001; } private: - QString m_key; + TQString m_key; }; // VHistoryGroupItem -class VHistoryItem : public QListViewItem +class VHistoryItem : public TQListViewItem { public: - VHistoryItem( VCommand* command, QListView* parent, QListViewItem* after ); - VHistoryItem( VCommand* command, VHistoryGroupItem* parent, QListViewItem* after ); + VHistoryItem( VCommand* command, TQListView* tqparent, TQListViewItem* after ); + VHistoryItem( VCommand* command, VHistoryGroupItem* tqparent, TQListViewItem* after ); ~VHistoryItem(); VCommand* command() { return m_command; } - void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align ); - void paintFocus( QPainter*, const QColorGroup&, const QRect& ); + void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align ); + void paintFocus( TQPainter*, const TQColorGroup&, const TQRect& ); - virtual QString key( int, bool ) const { return m_key; } + virtual TQString key( int, bool ) const { return m_key; } virtual int rtti() const { return 1002; } private: void init(); - QString m_key; + TQString m_key; VCommand* m_command; }; // VHistoryItem -class VHistoryTab : public QWidget +class VHistoryTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VHistoryTab( KarbonPart* part, QWidget* parent ); + VHistoryTab( KarbonPart* part, TQWidget* tqparent ); ~VHistoryTab(); bool groupingEnabled(); @@ -234,7 +238,7 @@ class VHistoryTab : public QWidget void removeFirstCommand(); void removeLastCommand(); - void commandClicked( int button, QListViewItem* item, const QPoint& point, int col ); + void commandClicked( int button, TQListViewItem* item, const TQPoint& point, int col ); void groupingChanged( int ); signals: @@ -244,9 +248,9 @@ class VHistoryTab : public QWidget void redoCommandsTo( VCommand* command ); private: - QListView* m_history; - QListViewItem* m_lastCommand; - QCheckBox* m_groupCommands; + TQListView* m_history; + TQListViewItem* m_lastCommand; + TQCheckBox* m_groupCommands; long m_lastCommandIndex; KarbonPart* m_part; diff --git a/karbon/dockers/vstrokedocker.cc b/karbon/dockers/vstrokedocker.cc index 200c9dc9..fb3dce28 100644 --- a/karbon/dockers/vstrokedocker.cc +++ b/karbon/dockers/vstrokedocker.cc @@ -18,12 +18,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qhbuttongroup.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qwidget.h> -#include <qtooltip.h> +#include <tqhbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqwidget.h> +#include <tqtooltip.h> #include <kiconloader.h> #include <klocale.h> @@ -39,72 +39,72 @@ #include "vstrokedocker.h" -VStrokeDocker::VStrokeDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ ) - : QWidget(), m_part ( part ), m_view( parent ) +VStrokeDocker::VStrokeDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ ) + : TQWidget(), m_part ( part ), m_view( tqparent ) { setCaption( i18n( "Stroke Properties" ) ); - QPushButton *button; + TQPushButton *button; - QGridLayout *mainLayout = new QGridLayout( this, 4, 2 ); + TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 ); - QLabel* widthLabel = new QLabel( i18n ( "stroke width", "Width:" ), this ); + TQLabel* widthLabel = new TQLabel( i18n ( "stroke width", "Width:" ), this ); mainLayout->addWidget( widthLabel, 0, 0 ); // set min/max/step and value in points, then set actual unit m_setLineWidth = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5, 1.0, KoUnit::U_PT, 2 ); m_setLineWidth->setUnit( part->unit() ); - QToolTip::add( m_setLineWidth, i18n( "Set line width of actual selection" ) ); + TQToolTip::add( m_setLineWidth, i18n( "Set line width of actual selection" ) ); mainLayout->addWidget ( m_setLineWidth, 0, 1 ); - connect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) ); + connect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) ); - QLabel* capLabel = new QLabel( i18n ( "Cap:" ), this ); + TQLabel* capLabel = new TQLabel( i18n ( "Cap:" ), this ); mainLayout->addWidget( capLabel, 1, 0 ); - m_capGroup = new QHButtonGroup( this ); - m_capGroup->setFrameShape( QFrame::NoFrame ); + m_capGroup = new TQHButtonGroup( this ); + m_capGroup->setFrameShape( TQFrame::NoFrame ); m_capGroup->setInsideMargin( 1 ); m_capGroup->setExclusive( true ); - button = new QPushButton( "", m_capGroup ); + button = new TQPushButton( "", m_capGroup ); button->setPixmap( SmallIcon( "cap_butt" ) ); button->setToggleButton( true ); - QToolTip::add( button, i18n( "Butt cap" ) ); + TQToolTip::add( button, i18n( "Butt cap" ) ); m_capGroup->insert( button ); - button = new QPushButton( "", m_capGroup ); + button = new TQPushButton( "", m_capGroup ); button->setPixmap( SmallIcon( "cap_round" ) ); button->setToggleButton( true ); - QToolTip::add( button, i18n( "Round cap" ) ); + TQToolTip::add( button, i18n( "Round cap" ) ); m_capGroup->insert( button ); - button = new QPushButton( "", m_capGroup ); + button = new TQPushButton( "", m_capGroup ); button->setPixmap( SmallIcon( "cap_square" ) ); button->setToggleButton( true ); - QToolTip::add( button, i18n( "Square cap" ) ); + TQToolTip::add( button, i18n( "Square cap" ) ); m_capGroup->insert( button ); mainLayout->addWidget( m_capGroup, 1, 1 ); - connect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) ); + connect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) ); - QLabel* joinLabel = new QLabel( i18n ( "Join:" ), this ); + TQLabel* joinLabel = new TQLabel( i18n ( "Join:" ), this ); mainLayout->addWidget( joinLabel, 2, 0 ); - m_joinGroup = new QHButtonGroup( this ); - m_joinGroup->setFrameShape( QFrame::NoFrame ); + m_joinGroup = new TQHButtonGroup( this ); + m_joinGroup->setFrameShape( TQFrame::NoFrame ); m_joinGroup->setInsideMargin( 1 ); m_joinGroup->setExclusive( true ); - button = new QPushButton( "", m_joinGroup ); + button = new TQPushButton( "", m_joinGroup ); button->setPixmap( SmallIcon( "join_miter" ) ); button->setToggleButton( true ); - QToolTip::add( button, i18n( "Miter join" ) ); + TQToolTip::add( button, i18n( "Miter join" ) ); m_joinGroup->insert( button ); - button = new QPushButton( "", m_joinGroup ); + button = new TQPushButton( "", m_joinGroup ); button->setPixmap( SmallIcon( "join_round" ) ); button->setToggleButton( true ); - QToolTip::add( button, i18n( "Round join" ) ); + TQToolTip::add( button, i18n( "Round join" ) ); m_joinGroup->insert( button ); - button = new QPushButton( "", m_joinGroup ); + button = new TQPushButton( "", m_joinGroup ); button->setPixmap( SmallIcon( "join_bevel" ) ); button->setToggleButton( true ); - QToolTip::add( button, i18n( "Bevel join" ) ); + TQToolTip::add( button, i18n( "Bevel join" ) ); m_joinGroup->insert( button ); mainLayout->addWidget( m_joinGroup, 2, 1 ); - connect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) ); + connect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) ); mainLayout->setRowStretch( 3, 1 ); mainLayout->setColStretch( 1, 1 ); @@ -149,9 +149,9 @@ void VStrokeDocker::slotJoinChanged( int ID ) void VStrokeDocker::updateDocker() { - disconnect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) ); - disconnect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) ); - disconnect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) ); + disconnect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) ); + disconnect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) ); + disconnect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) ); switch( m_stroke.lineCap() ) { @@ -175,9 +175,9 @@ void VStrokeDocker::updateDocker() m_setLineWidth->changeValue( m_stroke.lineWidth() ); - connect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) ); - connect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) ); - connect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) ); + connect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) ); + connect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) ); + connect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) ); } void VStrokeDocker::widthChanged() @@ -197,15 +197,15 @@ void VStrokeDocker::setStroke( const VStroke &stroke ) void VStrokeDocker::setUnit( KoUnit::Unit unit ) { - disconnect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) ); - disconnect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) ); - disconnect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) ); + disconnect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) ); + disconnect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) ); + disconnect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) ); m_setLineWidth->setUnit( unit ); - connect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) ); - connect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) ); - connect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) ); + connect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) ); + connect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) ); + connect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) ); } #include "vstrokedocker.moc" diff --git a/karbon/dockers/vstrokedocker.h b/karbon/dockers/vstrokedocker.h index 77d536b9..742387a7 100644 --- a/karbon/dockers/vstrokedocker.h +++ b/karbon/dockers/vstrokedocker.h @@ -21,8 +21,8 @@ #ifndef __VSTROKEDOCKER_H__ #define __VSTROKEDOCKER_H__ -class QHButtonGroup; -class QWidget; +class TQHButtonGroup; +class TQWidget; class KoUnitDoubleSpinBox; @@ -30,20 +30,21 @@ class KoMainWindow; class KarbonView; class KarbonPart; -class VStrokeDocker : public QWidget +class VStrokeDocker : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VStrokeDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L ); + VStrokeDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L ); public slots: virtual void setStroke( const VStroke & ); virtual void setUnit( KoUnit::Unit unit ); private: - QHButtonGroup *m_capGroup; - QHButtonGroup *m_joinGroup; + TQHButtonGroup *m_capGroup; + TQHButtonGroup *m_joinGroup; KarbonPart *m_part; KarbonView *m_view; KoUnitDoubleSpinBox *m_setLineWidth; diff --git a/karbon/dockers/vstyledocker.cc b/karbon/dockers/vstyledocker.cc index 9a7ce083..fcf317f6 100644 --- a/karbon/dockers/vstyledocker.cc +++ b/karbon/dockers/vstyledocker.cc @@ -18,12 +18,12 @@ * Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qsize.h> -#include <qhbuttongroup.h> -#include <qtoolbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqsize.h> +#include <tqhbuttongroup.h> +#include <tqtoolbutton.h> #include <klocale.h> #include <kiconloader.h> @@ -46,8 +46,8 @@ #include <unistd.h> -ClipartChooser::ClipartChooser( QSize iconSize, QWidget *parent, const char *name ) - : KoIconChooser( iconSize, parent, name ) +ClipartChooser::ClipartChooser( TQSize iconSize, TQWidget *tqparent, const char *name ) + : KoIconChooser( iconSize, tqparent, name ) { setDragEnabled( true ); } @@ -62,7 +62,7 @@ ClipartChooser::startDrag() double s = kMax( selectedClipart->originalWidth(), selectedClipart->originalHeight() ); VObject *clipart = selectedClipart->clipart()->clone(); - QWMatrix mat( s, 0, 0, -s, -( s / 2 ), ( s / 2 ) ); + TQWMatrix mat( s, 0, 0, -s, -( s / 2 ), ( s / 2 ) ); VTransformCmd trafo( 0L, mat ); trafo.visit( *clipart ); @@ -72,27 +72,27 @@ ClipartChooser::startDrag() kd->dragCopy(); } -VStyleDocker::VStyleDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ ) - : QWidget(), m_part ( part ), m_view( parent ) +VStyleDocker::VStyleDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ ) + : TQWidget(), m_part ( part ), m_view( tqparent ) { setCaption( i18n( "Resources" ) ); - mTabWidget = new QTabWidget( this ); + mTabWidget = new TQTabWidget( this ); //Pattern KoPatternChooser *pPatternChooser = new KoPatternChooser( KarbonFactory::rServer()->patterns(), mTabWidget ); pPatternChooser->setCaption( i18n( "Patterns" ) ); - connect( pPatternChooser, SIGNAL(selected( KoIconItem * ) ), this, SLOT( slotItemSelected( KoIconItem * ))); - connect( KarbonFactory::rServer(), SIGNAL( patternAdded( KoIconItem * )), pPatternChooser, SLOT( addPattern( KoIconItem * ))); - connect( KarbonFactory::rServer(), SIGNAL( patternRemoved( KoIconItem * )), pPatternChooser, SLOT( removePattern( KoIconItem * ))); + connect( pPatternChooser, TQT_SIGNAL(selected( KoIconItem * ) ), this, TQT_SLOT( slotItemSelected( KoIconItem * ))); + connect( KarbonFactory::rServer(), TQT_SIGNAL( patternAdded( KoIconItem * )), pPatternChooser, TQT_SLOT( addPattern( KoIconItem * ))); + connect( KarbonFactory::rServer(), TQT_SIGNAL( patternRemoved( KoIconItem * )), pPatternChooser, TQT_SLOT( removePattern( KoIconItem * ))); mTabWidget->addTab( pPatternChooser, i18n( "Patterns" ) ); //Clipart ClipartWidget *pClipartWidget = new ClipartWidget( KarbonFactory::rServer()->cliparts(), part, mTabWidget ); mTabWidget->addTab( pClipartWidget, i18n( "Clipart" ) ); - QVBoxLayout *mainWidgetLayout = new QVBoxLayout( this, 2 ); + TQVBoxLayout *mainWidgetLayout = new TQVBoxLayout( this, 2 ); mainWidgetLayout->addWidget( mTabWidget ); mainWidgetLayout->activate(); setMinimumHeight( 174 ); @@ -119,22 +119,22 @@ void VStyleDocker::slotItemSelected( KoIconItem *item ) } void -VStyleDocker::mouseReleaseEvent( QMouseEvent * ) +VStyleDocker::mouseReleaseEvent( TQMouseEvent * ) { } -ClipartWidget::ClipartWidget( QPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, QWidget* parent ) - : QWidget( parent ), m_part( part ) +ClipartWidget::ClipartWidget( TQPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, TQWidget* tqparent ) + : TQWidget( tqparent ), m_part( part ) { KIconLoader il; - QVBoxLayout* layout = new QVBoxLayout( this ); - layout->addWidget( m_clipartChooser = new ClipartChooser( QSize( 32, 32 ), this ) ); - layout->addWidget( m_buttonGroup = new QHButtonGroup( this ) ); - QToolButton* m_addClipartButton; - m_buttonGroup->insert( m_addClipartButton = new QToolButton( m_buttonGroup ) ); - m_buttonGroup->insert( m_importClipartButton = new QToolButton( m_buttonGroup ) ); - m_buttonGroup->insert( m_deleteClipartButton = new QToolButton( m_buttonGroup ) ); + TQVBoxLayout* tqlayout = new TQVBoxLayout( this ); + tqlayout->addWidget( m_clipartChooser = new ClipartChooser( TQSize( 32, 32 ), this ) ); + tqlayout->addWidget( m_buttonGroup = new TQHButtonGroup( this ) ); + TQToolButton* m_addClipartButton; + m_buttonGroup->insert( m_addClipartButton = new TQToolButton( m_buttonGroup ) ); + m_buttonGroup->insert( m_importClipartButton = new TQToolButton( m_buttonGroup ) ); + m_buttonGroup->insert( m_deleteClipartButton = new TQToolButton( m_buttonGroup ) ); m_addClipartButton->setIconSet( SmallIcon( "14_layer_newlayer" ) ); m_addClipartButton->setTextLabel( i18n( "Add" ) ); m_importClipartButton->setIconSet( SmallIcon( "fileimport" ) ); @@ -145,11 +145,11 @@ ClipartWidget::ClipartWidget( QPtrList<VClipartIconItem>* clipartItems, KarbonPa m_buttonGroup->setInsideMargin( 3 ); //setFrameStyle( Box | Sunken ); - layout->setMargin( 3 ); + tqlayout->setMargin( 3 ); - connect( m_buttonGroup, SIGNAL( clicked( int ) ), this, SLOT( slotButtonClicked( int ) ) ); - //connect( m_deleteClipartButton, SIGNAL( clicked() ), this, SLOT( deleteClipart() ) ); - connect( m_clipartChooser, SIGNAL( selected( KoIconItem* ) ), this, SLOT( clipartSelected( KoIconItem* ) ) ); + connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotButtonClicked( int ) ) ); + //connect( m_deleteClipartButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteClipart() ) ); + connect( m_clipartChooser, TQT_SIGNAL( selected( KoIconItem* ) ), this, TQT_SLOT( clipartSelected( KoIconItem* ) ) ); m_clipartChooser->setAutoDelete( false ); VClipartIconItem* item = 0L; @@ -199,7 +199,7 @@ ClipartWidget::addClipart() if( selection->objects().count() > 1 ) { - QPtrVector<VObject> objects; + TQPtrVector<VObject> objects; selection->objects().toVector( &objects ); VGroup* group = new VGroup( 0L ); @@ -217,7 +217,7 @@ ClipartWidget::addClipart() { KoRect clipartBox = clipart->boundingBox(); double scaleFactor = 1. / kMax( clipartBox.width(), clipartBox.height() ); - QWMatrix trMatrix( scaleFactor, 0, 0, scaleFactor, -clipartBox.x() * scaleFactor, -clipartBox.y() * scaleFactor ); + TQWMatrix trMatrix( scaleFactor, 0, 0, scaleFactor, -clipartBox.x() * scaleFactor, -clipartBox.y() * scaleFactor ); VTransformCmd trafo( 0L, trMatrix ); trafo.visit( *clipart ); @@ -247,28 +247,28 @@ ClipartWidget::addClipart() void ClipartWidget::importClipart() { - QStringList filter; + TQStringList filter; filter << "application/x-karbon" << "image/svg+xml" << "image/x-wmf" << "image/x-eps" << "application/postscript"; - KFileDialog *dialog = new KFileDialog( "foo", QString::null, 0L, "Choose Graphic to Add", true); + KFileDialog *dialog = new KFileDialog( "foo", TQString(), 0L, "Choose Graphic to Add", true); dialog->setMimeFilter( filter, "application/x-karbon" ); - if( dialog->exec()!=QDialog::Accepted ) + if( dialog->exec()!=TQDialog::Accepted ) { delete dialog; return; } - QString fname = dialog->selectedFile(); + TQString fname = dialog->selectedFile(); delete dialog; if( m_part->nativeFormatMimeType() == dialog->currentMimeFilter().latin1() ) m_part->mergeNativeFormat( fname ); else { KoFilterManager man( m_part ); - KoFilter::ConversionStatus status; - QString importedFile = man.import( fname, status ); + KoFilter::ConversiontqStatus status; + TQString importedFile = man.import( fname, status ); if( status == KoFilter::OK ) m_part->mergeNativeFormat( importedFile ); if( !importedFile.isEmpty() ) - unlink( QFile::encodeName( importedFile ) ); + unlink( TQFile::encodeName( importedFile ) ); if( status != KoFilter::OK ) return; } diff --git a/karbon/dockers/vstyledocker.h b/karbon/dockers/vstyledocker.h index b1187735..026a7d97 100644 --- a/karbon/dockers/vstyledocker.h +++ b/karbon/dockers/vstyledocker.h @@ -22,29 +22,30 @@ #define __VSTYLEDOCKER_H__ #include <koIconChooser.h> -#include <qwidget.h> +#include <tqwidget.h> -class QTabWidget; +class TQTabWidget; class KarbonView; class KarbonPart; -class QHButtonGroup; -class QToolButton; +class TQHButtonGroup; +class TQToolButton; class VClipartIconItem; class ClipartChooser : public KoIconChooser { public: - ClipartChooser( QSize iconSize, QWidget *parent = 0L, const char *name = 0L ); + ClipartChooser( TQSize iconSize, TQWidget *tqparent = 0L, const char *name = 0L ); virtual void startDrag(); }; -class ClipartWidget : public QWidget +class ClipartWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ClipartWidget( QPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, QWidget* parent = 0L ); + ClipartWidget( TQPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, TQWidget* tqparent = 0L ); ~ClipartWidget(); VClipartIconItem* selectedClipart(); @@ -59,28 +60,29 @@ public slots: private: ClipartChooser* m_clipartChooser; - QHButtonGroup* m_buttonGroup; - QToolButton* m_importClipartButton; - QToolButton* m_deleteClipartButton; + TQHButtonGroup* m_buttonGroup; + TQToolButton* m_importClipartButton; + TQToolButton* m_deleteClipartButton; KarbonPart* m_part; VClipartIconItem* m_clipartItem; VClipartIconItem* m_selectedItem; }; -class VStyleDocker : public QWidget +class VStyleDocker : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VStyleDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L ); + VStyleDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L ); virtual ~VStyleDocker(); public slots: void slotItemSelected( KoIconItem * ); private: - virtual void mouseReleaseEvent( QMouseEvent *e ); - QTabWidget *mTabWidget; + virtual void mouseReleaseEvent( TQMouseEvent *e ); + TQTabWidget *mTabWidget; KarbonPart *m_part; KarbonView *m_view; }; diff --git a/karbon/dockers/vtransformdocker.cc b/karbon/dockers/vtransformdocker.cc index 56b07161..1616b47e 100644 --- a/karbon/dockers/vtransformdocker.cc +++ b/karbon/dockers/vtransformdocker.cc @@ -18,11 +18,11 @@ * Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qwmatrix.h> -#include <qtooltip.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqwmatrix.h> +#include <tqtooltip.h> #include <klocale.h> #include <KoMainWindow.h> @@ -37,62 +37,62 @@ #include "vtransformdocker.h" -VTransformDocker::VTransformDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ ) - : QWidget(), m_part ( part ), m_view( parent ) +VTransformDocker::VTransformDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ ) + : TQWidget(), m_part ( part ), m_view( tqparent ) { setCaption( i18n( "Transform" ) ); - QGridLayout *mainLayout = new QGridLayout( this, 5, 5 ); + TQGridLayout *mainLayout = new TQGridLayout( this, 5, 5 ); //X: (TODO: Set 5000 limit to real Karbon14 limit) - QLabel* xLabel = new QLabel( i18n ( "X:" ), this ); + TQLabel* xLabel = new TQLabel( i18n ( "X:" ), this ); mainLayout->addWidget( xLabel, 0, 0 ); m_x = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 ); mainLayout->addWidget( m_x, 0, 1 ); - QToolTip::add( m_x, i18n("Set x-position of actual selection") ); + TQToolTip::add( m_x, i18n("Set x-position of actual selection") ); //Y: (TODO: Set 5000 limit to real Karbon14 limit) - QLabel* yLabel = new QLabel( i18n ( "Y:" ), this ); + TQLabel* yLabel = new TQLabel( i18n ( "Y:" ), this ); mainLayout->addWidget( yLabel, 0, 2 ); m_y = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 ); mainLayout->addWidget( m_y, 0, 3 ); - QToolTip::add( m_y, i18n("Set y-position of actual selection") ); + TQToolTip::add( m_y, i18n("Set y-position of actual selection") ); //Width: (TODO: Set 5000 limit to real Karbon14 limit) - QLabel* wLabel = new QLabel( i18n ( "W:" ), this ); + TQLabel* wLabel = new TQLabel( i18n ( "W:" ), this ); mainLayout->addWidget( wLabel, 1, 0 ); m_width = new KoUnitDoubleSpinBox( this, 0.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 ); mainLayout->addWidget( m_width, 1, 1 ); - QToolTip::add( m_width, i18n("Set width of actual selection") ); + TQToolTip::add( m_width, i18n("Set width of actual selection") ); //Height: (TODO: Set 5000 limit to real Karbon14 limit) - QLabel* hLabel = new QLabel( i18n ( "H:" ), this ); + TQLabel* hLabel = new TQLabel( i18n ( "H:" ), this ); mainLayout->addWidget( hLabel, 1, 2 ); m_height = new KoUnitDoubleSpinBox( this, 0.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 ); mainLayout->addWidget( m_height, 1, 3 ); - QToolTip::add( m_height, i18n("Set height of actual selection") ); + TQToolTip::add( m_height, i18n("Set height of actual selection") ); //TODO: Add Rotation, Shear //ROTATE: (TODO: Set 5000 limit to real Karbon14 limit) - QLabel* rLabel = new QLabel( i18n ( "R:" ), this ); + TQLabel* rLabel = new TQLabel( i18n ( "R:" ), this ); mainLayout->addWidget( rLabel, 3, 0 ); m_rotate = new KDoubleSpinBox( -360.0, 360.0, 1.0, 10.0, 1, this ); mainLayout->addWidget( m_rotate, 3, 1 ); - QToolTip::add( m_rotate, i18n("Rotate actual selection") ); + TQToolTip::add( m_rotate, i18n("Rotate actual selection") ); //X-Shear: (TODO: Set 5000 limit to real Karbon14 limit) - QLabel* sxLabel = new QLabel( i18n ( "SX:" ), this ); + TQLabel* sxLabel = new TQLabel( i18n ( "SX:" ), this ); mainLayout->addWidget( sxLabel, 2, 0 ); m_shearX = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 ); mainLayout->addWidget( m_shearX, 2, 1 ); - QToolTip::add( m_shearX, i18n("Shear actual selection in x-direction") ); + TQToolTip::add( m_shearX, i18n("Shear actual selection in x-direction") ); //Y-Shear: (TODO: Set 5000 limit to real Karbon14 limit) - QLabel* syLabel = new QLabel( i18n ( "SY:" ), this ); + TQLabel* syLabel = new TQLabel( i18n ( "SY:" ), this ); mainLayout->addWidget( syLabel, 2, 2 ); m_shearY = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 ); mainLayout->addWidget( m_shearY, 2, 3 ); - QToolTip::add( m_shearY, i18n("Shear actual selection in y-direction") ); + TQToolTip::add( m_shearY, i18n("Shear actual selection in y-direction") ); mainLayout->setRowStretch( 4, 1 ); mainLayout->setColStretch( 1, 1 ); @@ -106,23 +106,23 @@ VTransformDocker::enableSignals( bool enable ) { if( enable ) { - connect( m_x, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) ); - connect( m_y, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) ); - connect( m_width, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) ); - connect( m_height, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) ); - connect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) ); - connect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) ); - connect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) ); + connect( m_x, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) ); + connect( m_y, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) ); + connect( m_width, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) ); + connect( m_height, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) ); + connect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) ); + connect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) ); + connect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) ); } else { - disconnect( m_x, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) ); - disconnect( m_y, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) ); - disconnect( m_width, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) ); - disconnect( m_height, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) ); - disconnect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) ); - disconnect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) ); - disconnect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) ); + disconnect( m_x, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) ); + disconnect( m_y, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) ); + disconnect( m_width, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) ); + disconnect( m_height, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) ); + disconnect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) ); + disconnect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) ); + disconnect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) ); } } @@ -172,7 +172,7 @@ VTransformDocker::translate() VTranslateCmd *cmd = new VTranslateCmd( &m_view->part()->document(), newX-rect.x(), newY-rect.y(), false ); m_view->part()->addCommand( cmd ); } - m_part->repaintAllViews( true ); + m_part->tqrepaintAllViews( true ); } void @@ -190,7 +190,7 @@ VTransformDocker::scale() VScaleCmd *cmd = new VScaleCmd( &m_view->part()->document(), rect.topLeft(), newW/rect.width(), newH/rect.height(), false ); m_view->part()->addCommand( cmd ); } - m_part->repaintAllViews( true ); + m_part->tqrepaintAllViews( true ); } void @@ -219,10 +219,10 @@ VTransformDocker::shearX() shear /= double(rect.width()*0.5); VShearCmd *cmd = new VShearCmd( &m_view->part()->document(), rect.center(), shear, 0 ); m_view->part()->addCommand( cmd ); - m_part->repaintAllViews( true ); - disconnect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) ); + m_part->tqrepaintAllViews( true ); + disconnect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) ); m_shearX->changeValue(0.0); - connect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) ); + connect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) ); } } @@ -237,10 +237,10 @@ VTransformDocker::shearY() shear /= double(rect.height()*0.5); VShearCmd *cmd = new VShearCmd( &m_view->part()->document(), rect.center(), 0, shear ); m_view->part()->addCommand( cmd ); - m_part->repaintAllViews( true ); - disconnect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) ); + m_part->tqrepaintAllViews( true ); + disconnect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) ); m_shearY->changeValue(0.0); - connect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) ); + connect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) ); } } @@ -254,10 +254,10 @@ VTransformDocker::rotate() KoPoint center = m_view->part()->document().selection()->boundingBox().center(); VRotateCmd *cmd = new VRotateCmd( &m_view->part()->document(), center, angle ); m_view->part()->addCommand( cmd ); - m_part->repaintAllViews( true ); - disconnect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) ); + m_part->tqrepaintAllViews( true ); + disconnect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) ); m_rotate->setValue(0.0); - connect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) ); + connect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) ); } } diff --git a/karbon/dockers/vtransformdocker.h b/karbon/dockers/vtransformdocker.h index 3ba161d4..8e2f21e8 100644 --- a/karbon/dockers/vtransformdocker.h +++ b/karbon/dockers/vtransformdocker.h @@ -25,12 +25,13 @@ class KarbonPart; class KarbonView; class KoUnitDoubleSpinBox; -class VTransformDocker : public QWidget +class VTransformDocker : public TQWidget { Q_OBJECT + TQ_OBJECT public: - VTransformDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L ); + VTransformDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L ); public slots: void update(); |