summaryrefslogtreecommitdiffstats
path: root/karbon/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'karbon/widgets')
-rw-r--r--karbon/widgets/vcanvas.cc92
-rw-r--r--karbon/widgets/vcanvas.h33
-rw-r--r--karbon/widgets/vcolorslider.cc52
-rw-r--r--karbon/widgets/vcolorslider.h25
-rw-r--r--karbon/widgets/vgradienttabwidget.cc104
-rw-r--r--karbon/widgets/vgradienttabwidget.h51
-rw-r--r--karbon/widgets/vgradientwidget.cc76
-rw-r--r--karbon/widgets/vgradientwidget.h25
-rw-r--r--karbon/widgets/vreference.cc38
-rw-r--r--karbon/widgets/vreference.h11
-rw-r--r--karbon/widgets/vruler.cc78
-rw-r--r--karbon/widgets/vruler.h35
-rw-r--r--karbon/widgets/vselecttoolbar.cc20
-rw-r--r--karbon/widgets/vselecttoolbar.h1
-rw-r--r--karbon/widgets/vsmallpreview.cc66
-rw-r--r--karbon/widgets/vsmallpreview.h21
-rw-r--r--karbon/widgets/vstatebutton.cc8
-rw-r--r--karbon/widgets/vstatebutton.h16
-rw-r--r--karbon/widgets/vstrokefillpreview.cc60
-rw-r--r--karbon/widgets/vstrokefillpreview.h27
-rw-r--r--karbon/widgets/vtoolbox.h1
-rw-r--r--karbon/widgets/vtranslate.cc64
-rw-r--r--karbon/widgets/vtranslate.h31
-rw-r--r--karbon/widgets/vtypebuttonbox.cc40
-rw-r--r--karbon/widgets/vtypebuttonbox.h7
25 files changed, 495 insertions, 487 deletions
diff --git a/karbon/widgets/vcanvas.cc b/karbon/widgets/vcanvas.cc
index c3c91670c..28b272ae3 100644
--- a/karbon/widgets/vcanvas.cc
+++ b/karbon/widgets/vcanvas.cc
@@ -17,9 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "karbon_view.h"
#include "karbon_part.h"
@@ -67,15 +67,15 @@ KoPoint VCanvas::snapToGrid( const KoPoint &point )
KoSize dist = m_part->document().grid().snap;
KoSize dxy = m_part->document().grid().freq;
- int dx = qRound( p.x() / dxy.width() );
- int dy = qRound( p.y() / dxy.height() );
+ int dx = tqRound( p.x() / dxy.width() );
+ int dy = tqRound( p.y() / dxy.height() );
- float distx = QMIN( QABS( p.x() - dxy.width() * dx ), QABS( p.x() - dxy.width() * ( dx + 1 ) ) );
- float disty = QMIN( QABS( p.y() - dxy.height() * dy ), QABS( p.y() - dxy.height() * ( dy + 1 ) ) );
+ float distx = TQMIN( TQABS( p.x() - dxy.width() * dx ), TQABS( p.x() - dxy.width() * ( dx + 1 ) ) );
+ float disty = TQMIN( TQABS( p.y() - dxy.height() * dy ), TQABS( p.y() - dxy.height() * ( dy + 1 ) ) );
if( distx < dist.width() )
{
- if( QABS(p.x() - dxy.width() * dx ) < QABS( p.x() - dxy.width() * ( dx + 1 ) ) )
+ if( TQABS(p.x() - dxy.width() * dx ) < TQABS( p.x() - dxy.width() * ( dx + 1 ) ) )
p.rx() = dxy.width() * dx;
else
p.rx() = dxy.width() * ( dx + 1 );
@@ -83,7 +83,7 @@ KoPoint VCanvas::snapToGrid( const KoPoint &point )
if( disty < dist.height() )
{
- if( QABS( p.y() - dxy.height() * dy ) < QABS( p.y() - dxy.height() * ( dy + 1 ) ) )
+ if( TQABS( p.y() - dxy.height() * dy ) < TQABS( p.y() - dxy.height() * ( dy + 1 ) ) )
p.ry() = dxy.height() * dy;
else
p.ry() = dxy.height() * ( dy + 1 );
@@ -93,22 +93,22 @@ KoPoint VCanvas::snapToGrid( const KoPoint &point )
}
-VCanvas::VCanvas( QWidget *parent, KarbonView* view, KarbonPart* part )
- : QScrollView( parent, "canvas", WStaticContents/*WNorthWestGravity*/ | WResizeNoErase |
+VCanvas::VCanvas( TQWidget *tqparent, KarbonView* view, KarbonPart* part )
+ : TQScrollView( tqparent, "canvas", WStaticContents/*WNorthWestGravity*/ | WResizeNoErase |
WRepaintNoErase ), m_part( part ), m_view( view )
{
- connect(this, SIGNAL( contentsMoving( int, int ) ), this, SLOT( slotContentsMoving( int, int ) ) );
- viewport()->setFocusPolicy( QWidget::StrongFocus );
+ connect(this, TQT_SIGNAL( contentsMoving( int, int ) ), this, TQT_SLOT( slotContentsMoving( int, int ) ) );
+ viewport()->setFocusPolicy( TQ_StrongFocus );
viewport()->setMouseTracking( true );
setMouseTracking( true );
- viewport()->setBackgroundColor( Qt::white );
- viewport()->setBackgroundMode( QWidget::NoBackground );
+ viewport()->setBackgroundColor( TQt::white );
+ viewport()->setBackgroundMode( TQWidget::NoBackground );
viewport()->installEventFilter( this );
resizeContents( 800, 600 );
- m_pixmap = new QPixmap( 800, 600 );
+ m_pixmap = new TQPixmap( 800, 600 );
setFocus();
@@ -126,21 +126,21 @@ void
VCanvas::setPos( const KoPoint& p )
{
KoPoint p2 = toViewport( p );
- QCursor::setPos( mapToGlobal( QPoint( int(p2.x()), int(p2.y()) ) ) );
+ TQCursor::setPos( mapToGlobal( TQPoint( int(p2.x()), int(p2.y()) ) ) );
}
bool
-VCanvas::eventFilter( QObject* object, QEvent* event )
+VCanvas::eventFilter( TQObject* object, TQEvent* event )
{
- QScrollView::eventFilter( object, event );
+ TQScrollView::eventFilter( object, event );
- if( event->type() == QEvent::AccelOverride || event->type() == QEvent::Accel )
- return QScrollView::eventFilter( object, event );
+ if( event->type() == TQEvent::AccelOverride || event->type() == TQEvent::Accel )
+ return TQScrollView::eventFilter( object, event );
- if( event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease )
+ if( event->type() == TQEvent::KeyPress || event->type() == TQEvent::KeyRelease )
return m_view->keyEvent( event );
- QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>( event );
+ TQMouseEvent* mouseEvent = dynamic_cast<TQMouseEvent*>( event );
if( mouseEvent && m_view )
{
@@ -152,9 +152,9 @@ VCanvas::eventFilter( QObject* object, QEvent* event )
}
-// This causes a repaint normally, so just overwriting it omits the repainting
+// This causes a tqrepaint normally, so just overwriting it omits the tqrepainting
void
-VCanvas::focusInEvent( QFocusEvent * )
+VCanvas::focusInEvent( TQFocusEvent * )
{
}
@@ -198,7 +198,7 @@ VCanvas::boundingBox() const
void
VCanvas::setYMirroring( VPainter *p )
{
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( pageOffsetX(), pageOffsetY() );
@@ -212,10 +212,10 @@ VCanvas::setYMirroring( VPainter *p )
}
void
-VCanvas::viewportPaintEvent( QPaintEvent *e )
+VCanvas::viewportPaintEvent( TQPaintEvent *e )
{
- QRect eventRect = e->rect();
- KoRect rect = KoRect::fromQRect( eventRect );
+ TQRect eventRect = e->rect();
+ KoRect rect = KoRect::fromTQRect( eventRect );
setYMirroring( m_view->painterFactory()->editpainter() );
viewport()->setUpdatesEnabled( false );
@@ -223,12 +223,12 @@ VCanvas::viewportPaintEvent( QPaintEvent *e )
// TODO : only update ROIs
p->begin();
- p->clear( rect, QColor( 195, 194, 193 ) );
+ p->clear( rect, TQColor( 195, 194, 193 ) );
p->setZoomFactor( m_view->zoom() );
setYMirroring( p );
// TRICK : slightly adjust the matrix so libart AA looks better
- QWMatrix mat = p->worldMatrix();
+ TQWMatrix mat = p->tqworldMatrix();
p->setWorldMatrix( mat.translate( -.5, -.5 ) );
// set up clippath
@@ -248,7 +248,7 @@ VCanvas::viewportPaintEvent( QPaintEvent *e )
p->end();
// draw handle:
- VQPainter qpainter( p->device() );
+ VTQPainter qpainter( p->device() );
setYMirroring( &qpainter );
qpainter.setZoomFactor( m_view->zoom() );
m_part->document().selection()->draw( &qpainter, m_view->zoom() );
@@ -286,14 +286,14 @@ VCanvas::setViewportRect( const KoRect &r )
}
void
-VCanvas::drawContents( QPainter* painter, int clipx, int clipy,
+VCanvas::drawContents( TQPainter* painter, int clipx, int clipy,
int clipw, int cliph )
{
drawDocument( painter, KoRect( clipx, clipy, clipw, cliph ) );
}
void
-VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
+VCanvas::drawDocument( TQPainter* /*painter*/, const KoRect&, bool drawVObjects )
{
setYMirroring( m_view->painterFactory()->editpainter() );
@@ -301,11 +301,11 @@ VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
if( drawVObjects )
{
p->begin();
- p->clear( QColor( 195, 194, 193 ) );
+ p->clear( TQColor( 195, 194, 193 ) );
p->setZoomFactor( m_view->zoom() );
setYMirroring( p );
// TRICK : slightly adjust the matrix so libart AA looks better
- QWMatrix mat = p->worldMatrix();
+ TQWMatrix mat = p->tqworldMatrix();
p->setWorldMatrix( mat.translate( -.5, -.5 ) );
m_part->document().drawPage( p, m_part->pageLayout(), m_view->showPageMargins() );
@@ -316,7 +316,7 @@ VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
}
// draw handle:
- VQPainter qpainter( p->device() );
+ VTQPainter qpainter( p->device() );
setYMirroring( &qpainter );
qpainter.setZoomFactor( m_view->zoom() );
m_part->document().selection()->draw( &qpainter, m_view->zoom() );
@@ -328,33 +328,33 @@ VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
}
void
-VCanvas::repaintAll( bool drawVObjects )
+VCanvas::tqrepaintAll( bool drawVObjects )
{
drawDocument( 0, KoRect( 0, 0, width(), height() ), drawVObjects );
}
-/// repaints just a rect area (no scrolling)
+/// tqrepaints just a rect area (no scrolling)
void
-VCanvas::repaintAll( const KoRect &r )
+VCanvas::tqrepaintAll( const KoRect &r )
{
drawDocument( 0, r );
}
void
-VCanvas::resizeEvent( QResizeEvent* event )
+VCanvas::resizeEvent( TQResizeEvent* event )
{
double centerX = double( contentsX() + 0.5 * visibleWidth() ) / double( contentsWidth() );
double centerY = double( contentsY() + 0.5 * visibleHeight() ) / double( contentsHeight() );
- QScrollView::resizeEvent( event );
+ TQScrollView::resizeEvent( event );
if( !m_pixmap )
- m_pixmap = new QPixmap( width(), height() );
+ m_pixmap = new TQPixmap( width(), height() );
else
m_pixmap->resize( width(), height() );
VPainter *p = m_view->painterFactory()->painter();
p->resize( width(), height() );
- p->clear( QColor( 195, 194, 193 ) );
+ p->clear( TQColor( 195, 194, 193 ) );
setViewport( centerX, centerY );
}
@@ -365,13 +365,13 @@ VCanvas::slotContentsMoving( int /*x*/, int /*y*/ )
}
void
-VCanvas::dragEnterEvent( QDragEnterEvent *e )
+VCanvas::dragEnterEvent( TQDragEnterEvent *e )
{
e->accept( KarbonDrag::canDecode( e ) || KColorDrag::canDecode( e ) );
}
void
-VCanvas::dropEvent( QDropEvent *e )
+VCanvas::dropEvent( TQDropEvent *e )
{
m_view->dropEvent( e );
}
diff --git a/karbon/widgets/vcanvas.h b/karbon/widgets/vcanvas.h
index d04460871..09dc07d3e 100644
--- a/karbon/widgets/vcanvas.h
+++ b/karbon/widgets/vcanvas.h
@@ -21,7 +21,7 @@
#define __VCANVAS_H__
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <koffice_export.h>
class KarbonPart;
class KarbonView;
@@ -29,19 +29,20 @@ class KoRect;
class KoPoint;
class VPainter;
-// The canvas is a QScrollView.
+// The canvas is a TQScrollView.
-class KARBONCOMMON_EXPORT VCanvas : public QScrollView
+class KARBONCOMMON_EXPORT VCanvas : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- VCanvas( QWidget *parent, KarbonView* view, KarbonPart* part );
+ VCanvas( TQWidget *tqparent, KarbonView* view, KarbonPart* part );
virtual ~VCanvas();
- void repaintAll( const KoRect & );
- void repaintAll( bool drawVObjects = true );
+ void tqrepaintAll( const KoRect & );
+ void tqrepaintAll( bool drawVObjects = true );
- QPixmap *pixmap() { return m_pixmap; }
+ TQPixmap *pixmap() { return m_pixmap; }
/**
* Sets mouse position to point p.
@@ -72,17 +73,17 @@ public:
KoPoint snapToGrid( const KoPoint & );
protected:
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void dropEvent( QDropEvent * );
- virtual void focusInEvent( QFocusEvent * );
- virtual void viewportPaintEvent( QPaintEvent* );
- virtual void drawContents( QPainter* painter, int clipx, int clipy,
+ virtual void dragEnterEvent( TQDragEnterEvent * );
+ virtual void dropEvent( TQDropEvent * );
+ virtual void focusInEvent( TQFocusEvent * );
+ virtual void viewportPaintEvent( TQPaintEvent* );
+ virtual void drawContents( TQPainter* painter, int clipx, int clipy,
int clipw, int cliph );
- void drawDocument( QPainter* painter, const KoRect& rect, bool drawVObjects = true );
+ void drawDocument( TQPainter* painter, const KoRect& rect, bool drawVObjects = true );
- virtual void resizeEvent( QResizeEvent* event );
+ virtual void resizeEvent( TQResizeEvent* event );
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
void setYMirroring( VPainter * );
@@ -93,7 +94,7 @@ signals:
void viewportChanged();
private:
- QPixmap *m_pixmap;
+ TQPixmap *m_pixmap;
KarbonPart* m_part;
KarbonView* m_view;
};
diff --git a/karbon/widgets/vcolorslider.cc b/karbon/widgets/vcolorslider.cc
index cd11951b0..e0c205558 100644
--- a/karbon/widgets/vcolorslider.cc
+++ b/karbon/widgets/vcolorslider.cc
@@ -20,23 +20,23 @@
/* vcolorslider.cc */
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <knuminput.h>
#include <kselect.h>
#include "vcolorslider.h"
-VColorSlider::VColorSlider( QWidget* parent, const char* name )
- : QWidget( parent, name )
+VColorSlider::VColorSlider( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
init();
}
// Label, left color, right color, min, max, value ...
-VColorSlider::VColorSlider( const QString& label, const QColor& col1,
- const QColor& col2, int min, int max, int value, QWidget* parent, const char* name )
- : QWidget( parent, name )
+VColorSlider::VColorSlider( const TQString& label, const TQColor& col1,
+ const TQColor& col2, int min, int max, int value, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
init();
setLabel( label );
@@ -53,34 +53,34 @@ VColorSlider::~VColorSlider()
void VColorSlider::init()
{
m_isDragging = false;
- QHBoxLayout *layout = new QHBoxLayout( this, 3 );
+ TQHBoxLayout *tqlayout = new TQHBoxLayout( this, 3 );
- m_label = new QLabel( this );
- m_gradientSelect = new KGradientSelector( KSelector::Horizontal, this );
+ m_label = new TQLabel( this );
+ m_gradientSelect = new KGradientSelector( Qt::Horizontal, this );
m_spinBox = new KIntSpinBox( this );
- layout->addWidget( m_label );
- layout->addWidget( m_gradientSelect, 2 );
- layout->addWidget( m_spinBox );
+ tqlayout->addWidget( m_label );
+ tqlayout->addWidget( m_gradientSelect, 2 );
+ tqlayout->addWidget( m_spinBox );
setValue( 0 );
setMinValue( 0 );
setMaxValue( 255 );
- connect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
- connect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ connect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
+ connect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
m_gradientSelect->installEventFilter( this );
- layout->activate();
+ tqlayout->activate();
}
-void VColorSlider::setLabel( const QString& label )
+void VColorSlider::setLabel( const TQString& label )
{
m_label->setText( label );
}
-void VColorSlider::setColors( const QColor& color1, const QColor& color2 )
+void VColorSlider::setColors( const TQColor& color1, const TQColor& color2 )
{
m_gradientSelect->setColors( color1, color2 );
}
@@ -114,9 +114,9 @@ void VColorSlider::updateFrom_spinBox( int value )
{
if ( value != m_gradientSelect->value() )
{
- disconnect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ disconnect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
m_gradientSelect->setValue( (m_maxValue - value) + m_minValue );
- connect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ connect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
emit valueChanged( value );
}
}
@@ -126,20 +126,20 @@ void VColorSlider::updateFrom_gradientSelect( int value )
value = (m_maxValue - value) + m_minValue;
if ( value != m_spinBox->value() )
{
- disconnect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
+ disconnect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
m_spinBox->setValue( value );
- connect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
+ connect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
emit valueChanged( value );
}
}
-bool VColorSlider::eventFilter( QObject *obj, QEvent *ev )
+bool VColorSlider::eventFilter( TQObject *obj, TQEvent *ev )
{
- if( obj == m_gradientSelect )
+ if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_gradientSelect) )
{
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
m_isDragging = true;
- else if( ev->type() == QEvent::MouseButtonRelease )
+ else if( ev->type() == TQEvent::MouseButtonRelease )
m_isDragging = false;
}
return FALSE;
diff --git a/karbon/widgets/vcolorslider.h b/karbon/widgets/vcolorslider.h
index 82c7f6ec5..dc3d659ad 100644
--- a/karbon/widgets/vcolorslider.h
+++ b/karbon/widgets/vcolorslider.h
@@ -22,9 +22,9 @@
#ifndef VCOLORSLIDER_H
#define VCOLORSLIDER_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QLabel;
+class TQLabel;
class KIntSpinBox;
class KGradientSelector;
@@ -32,17 +32,18 @@ class KGradientSelector;
* This is the color slider widget that is used to select color or color components.
* It combines a label, a gradient selector and a spinbox.
*/
-class VColorSlider : public QWidget
+class VColorSlider : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new color slider.
*
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param name the slider's name
*/
- VColorSlider( QWidget* parent = 0L, const char* name = 0L );
+ VColorSlider( TQWidget* tqparent = 0L, const char* name = 0L );
/**
* Constructs a new color slider.
@@ -53,11 +54,11 @@ public:
* @param min the minimum value
* @param max the maximum value
* @param value the actual value
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param name the slider's name
*/
- VColorSlider( const QString& label, const QColor& col1, const QColor& col2,
- int min, int max, int value, QWidget* parent = 0L, const char* name = 0L );
+ VColorSlider( const TQString& label, const TQColor& col1, const TQColor& col2,
+ int min, int max, int value, TQWidget* tqparent = 0L, const char* name = 0L );
/** Destroys the color slider */
~VColorSlider();
@@ -75,7 +76,7 @@ public slots:
*
* @param label the new label text
*/
- virtual void setLabel( const QString& label );
+ virtual void setLabel( const TQString& label );
/**
* Sets the colors for the slider.
@@ -83,7 +84,7 @@ public slots:
* @param color1 the new left color
* @param color2 the new right color
*/
- virtual void setColors( const QColor& color1, const QColor& color2 );
+ virtual void setColors( const TQColor& color1, const TQColor& color2 );
/**
* Sets the value of the spinbox (and the value of the vcolorslider).
@@ -115,8 +116,8 @@ public slots:
private:
void init();
- bool eventFilter( QObject *obj, QEvent *ev );
- QLabel* m_label;
+ bool eventFilter( TQObject *obj, TQEvent *ev );
+ TQLabel* m_label;
KIntSpinBox* m_spinBox;
KGradientSelector* m_gradientSelect;
bool m_isDragging;
diff --git a/karbon/widgets/vgradienttabwidget.cc b/karbon/widgets/vgradienttabwidget.cc
index 44bb53bc0..b8f955d8b 100644
--- a/karbon/widgets/vgradienttabwidget.cc
+++ b/karbon/widgets/vgradienttabwidget.cc
@@ -17,13 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qfileinfo.h>
-#include <qpixmap.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqfileinfo.h>
+#include <tqpixmap.h>
#include <knuminput.h>
#include <kcombobox.h>
@@ -37,14 +37,14 @@
#include "vkopainter.h"
#include "vfill.h"
-VGradientListItem::VGradientListItem( const VGradient& gradient, QString filename )
- : QListBoxItem( 0L ), m_filename( filename )
+VGradientListItem::VGradientListItem( const VGradient& gradient, TQString filename )
+ : TQListBoxItem( 0L ), m_filename( filename )
{
m_gradient = new VGradient( gradient );
m_pixmap.resize( 200, 16 );
- VKoPainter gp( &m_pixmap, m_pixmap.width(), m_pixmap.height() );
- gp.setRasterOp( Qt::XorROP );
+ VKoPainter gp( TQT_TQPAINTDEVICE(&m_pixmap), m_pixmap.width(), m_pixmap.height() );
+ gp.setRasterOp( TQt::XorROP );
gp.newPath();
VGradient grad( *m_gradient );
grad.setOrigin( KoPoint( 0, 0 ) );
@@ -62,11 +62,11 @@ VGradientListItem::VGradientListItem( const VGradient& gradient, QString filenam
gp.fillPath();
gp.end();
- m_delete = QFileInfo( filename ).isWritable();
+ m_delete = TQFileInfo( filename ).isWritable();
} // VGradientListItem::VGradientListItem
VGradientListItem::VGradientListItem( const VGradientListItem& gradient )
- : QListBoxItem( 0L )
+ : TQListBoxItem( 0L )
{
m_pixmap = gradient.m_pixmap;
m_delete = gradient.m_delete;
@@ -79,31 +79,31 @@ VGradientListItem::~VGradientListItem()
delete m_gradient;
} // VGradientListItem::~VGradientListItem
-int VGradientListItem::width( const QListBox* lb ) const
+int VGradientListItem::width( const TQListBox* lb ) const
{
return lb->width() - 25;
} // VGradientListItem::width
-void VGradientListItem::paint( QPainter* painter )
+void VGradientListItem::paint( TQPainter* painter )
{
painter->save();
- painter->setRasterOp( Qt::CopyROP );
- QRect r ( 0, 0, width( listBox() ), height( listBox() ) );
+ painter->setRasterOp( TQt::CopyROP );
+ TQRect r ( 0, 0, width( listBox() ), height( listBox() ) );
painter->scale( ( (float)( width( listBox() ) ) ) / 200., 1. );
painter->drawPixmap( 0, 0, m_pixmap );
painter->restore();
if ( isSelected() )
- painter->setPen( listBox()->colorGroup().highlightedText() );
+ painter->setPen( listBox()->tqcolorGroup().highlightedText() );
else
- painter->setPen( listBox()->colorGroup().base() );
+ painter->setPen( listBox()->tqcolorGroup().base() );
painter->drawRect( r );
painter->flush();
} // VGradientListItem::paint
-VGradientPreview::VGradientPreview( VGradient& gradient, double& opacity, QWidget* parent, const char* name )
- : QWidget( parent, name ), m_gradient( &gradient ), m_opacity( &opacity )
+VGradientPreview::VGradientPreview( VGradient& gradient, double& opacity, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ), m_gradient( &gradient ), m_opacity( &opacity )
{
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMinimumSize( 70, 70 );
} // VGradientPreview::VGradientPreview
@@ -111,11 +111,11 @@ VGradientPreview::~VGradientPreview()
{
} // VGradientPreview::~VGradientPreview
-void VGradientPreview::paintEvent( QPaintEvent* )
+void VGradientPreview::paintEvent( TQPaintEvent* )
{
- QPixmap pixmap( width(), height() );
- VKoPainter gp( &pixmap, width(), height() );
- gp.setRasterOp( Qt::XorROP );
+ TQPixmap pixmap( width(), height() );
+ VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() );
+ gp.setRasterOp( TQt::XorROP );
gp.newPath();
VGradient gradient( *m_gradient );
if( gradient.type() == VGradient::radial || gradient.type() == VGradient::conic )
@@ -149,15 +149,15 @@ void VGradientPreview::paintEvent( QPaintEvent* )
gp.fillPath();
gp.end();
- QPainter p( &pixmap );
+ TQPainter p( &pixmap );
- p.setPen( colorGroup().light() );
+ p.setPen( tqcolorGroup().light() );
p.moveTo( 1, height() - 1 );
p.lineTo( 1, 1 );
p.lineTo( width() - 1, 1 );
p.lineTo( width() - 1, height() - 1 );
p.lineTo( 1, height() - 1 );
- p.setPen( colorGroup().dark() );
+ p.setPen( tqcolorGroup().dark() );
p.moveTo( 0, height() - 1 );
p.lineTo( 0, 0 );
p.lineTo( width() - 1, 0 );
@@ -167,8 +167,8 @@ void VGradientPreview::paintEvent( QPaintEvent* )
bitBlt( this, 0, 0, &pixmap, 0, 0, width(), height() );
} // VGradientPreview::paintEvent
-VGradientTabWidget::VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, QWidget* parent, const char* name )
- : QTabWidget( parent, name ), m_gradient( gradient ), m_resourceServer( server )
+VGradientTabWidget::VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, TQWidget* tqparent, const char* name )
+ : TQTabWidget( tqparent, name ), m_gradient( gradient ), m_resourceServer( server )
{
setupUI();
setupConnections();
@@ -181,15 +181,15 @@ VGradientTabWidget::~VGradientTabWidget()
void VGradientTabWidget::setupUI()
{
- m_editGroup = new QGroupBox( i18n( "Edit Gradient" ) );
- QGridLayout* editLayout = new QGridLayout( m_editGroup, 7, 3 );
+ m_editGroup = new TQGroupBox( i18n( "Edit Gradient" ) );
+ TQGridLayout* editLayout = new TQGridLayout( m_editGroup, 7, 3 );
editLayout->setSpacing( 3 );
editLayout->setMargin( 6 );
editLayout->addRowSpacing( 0, 12 );
editLayout->addMultiCellWidget( m_gradientPreview = new VGradientPreview( m_gradient, m_gradOpacity, m_editGroup ), 1, 3, 0, 0 );
- editLayout->addWidget( new QLabel( i18n( "Type:" ), m_editGroup ), 1, 1 );
- editLayout->addWidget( new QLabel( i18n( "Repeat:" ), m_editGroup ), 2, 1 );
- editLayout->addWidget( new QLabel( i18n( "Target:" ), m_editGroup ), 3, 1 );
+ editLayout->addWidget( new TQLabel( i18n( "Type:" ), m_editGroup ), 1, 1 );
+ editLayout->addWidget( new TQLabel( i18n( "Repeat:" ), m_editGroup ), 2, 1 );
+ editLayout->addWidget( new TQLabel( i18n( "Target:" ), m_editGroup ), 3, 1 );
editLayout->addWidget( m_gradientType = new KComboBox( false, m_editGroup ), 1, 2 );
m_gradientType->insertItem( i18n( "Linear" ), 0 );
m_gradientType->insertItem( i18n( "Radial" ), 1 );
@@ -201,36 +201,36 @@ void VGradientTabWidget::setupUI()
editLayout->addWidget( m_gradientTarget = new KComboBox( false, m_editGroup ), 3, 2 );
m_gradientTarget->insertItem( i18n( "Stroke" ), 0 );
m_gradientTarget->insertItem( i18n( "Fill" ), 1 );
- editLayout->addMultiCellWidget( m_addToPredefs = new QPushButton( i18n( "&Add to Predefined Gradients" ), m_editGroup ), 6, 6, 0, 2 );
+ editLayout->addMultiCellWidget( m_addToPredefs = new TQPushButton( i18n( "&Add to Predefined Gradients" ), m_editGroup ), 6, 6, 0, 2 );
editLayout->addMultiCellWidget( m_gradientWidget = new VGradientWidget( m_gradient, m_editGroup ), 4, 4, 0, 2 );
- editLayout->addWidget( new QLabel( i18n( "Overall opacity:" ), m_editGroup ), 5, 0 );
+ editLayout->addWidget( new TQLabel( i18n( "Overall opacity:" ), m_editGroup ), 5, 0 );
m_opacity = new KIntNumInput( 100, m_editGroup );
m_opacity->setRange( 0, 100, 1, true );
m_opacity->setValue( 100 );
editLayout->addMultiCellWidget( m_opacity, 5, 5, 1, 2 );
addTab( m_editGroup, i18n( "Edit" ) );
- QGroupBox* predefGroup = new QGroupBox( i18n( "Predefined Gradients" ) );
- QGridLayout* predefLayout = new QGridLayout( predefGroup, 3, 2 );
+ TQGroupBox* predefGroup = new TQGroupBox( i18n( "Predefined Gradients" ) );
+ TQGridLayout* predefLayout = new TQGridLayout( predefGroup, 3, 2 );
predefLayout->setSpacing( 3 );
predefLayout->setMargin( 6 );
predefLayout->addRowSpacing( 0, 12 );
predefLayout->addMultiCellWidget( m_predefGradientsView = new KListBox( predefGroup ), 1, 1, 0, 2 );
- predefLayout->addWidget( m_predefDelete = new QPushButton( i18n( "&Delete" ), predefGroup ), 2, 0 );
- predefLayout->addWidget( m_predefImport = new QPushButton( i18n( "&Import" ), predefGroup ), 2, 1 );
+ predefLayout->addWidget( m_predefDelete = new TQPushButton( i18n( "&Delete" ), predefGroup ), 2, 0 );
+ predefLayout->addWidget( m_predefImport = new TQPushButton( i18n( "&Import" ), predefGroup ), 2, 1 );
m_predefImport->setEnabled( false );
addTab( predefGroup, i18n( "Predefined" ) );
} // VGradientTabWidget::setupUI
void VGradientTabWidget::setupConnections()
{
- connect( m_gradientType, SIGNAL( activated( int ) ), this, SLOT( combosChange( int ) ) );
- connect( m_gradientRepeat, SIGNAL( activated( int ) ), this, SLOT( combosChange( int ) ) );
- connect( m_gradientWidget, SIGNAL( changed() ), m_gradientPreview, SLOT( update() ) );
- connect( m_addToPredefs, SIGNAL( clicked() ), this, SLOT( addGradientToPredefs() ) );
- connect( m_predefGradientsView, SIGNAL( doubleClicked( QListBoxItem *, const QPoint & ) ), this, SLOT( changeToPredef( QListBoxItem* ) ) );
- connect( m_predefDelete, SIGNAL( clicked() ), this, SLOT( deletePredef() ) );
- connect( m_opacity, SIGNAL( valueChanged( int ) ), this, SLOT( opacityChanged( int ) ) );
+ connect( m_gradientType, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( combosChange( int ) ) );
+ connect( m_gradientRepeat, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( combosChange( int ) ) );
+ connect( m_gradientWidget, TQT_SIGNAL( changed() ), m_gradientPreview, TQT_SLOT( update() ) );
+ connect( m_addToPredefs, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addGradientToPredefs() ) );
+ connect( m_predefGradientsView, TQT_SIGNAL( doubleClicked( TQListBoxItem *, const TQPoint & ) ), this, TQT_SLOT( changeToPredef( TQListBoxItem* ) ) );
+ connect( m_predefDelete, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deletePredef() ) );
+ connect( m_opacity, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( opacityChanged( int ) ) );
} // VGradientTabWidget::setupConnection
void VGradientTabWidget::initUI()
@@ -241,7 +241,7 @@ void VGradientTabWidget::initUI()
m_opacity->setValue( 100 );
m_predefGradientsView->clear();
- QPtrList<VGradientListItem>* gradientList = m_resourceServer->gradients();
+ TQPtrList<VGradientListItem>* gradientList = m_resourceServer->gradients();
if( gradientList->count() > 0 )
for( VGradientListItem* g = gradientList->first(); g != NULL; g = gradientList->next() )
m_predefGradientsView->insertItem( new VGradientListItem( *g ) );
@@ -306,7 +306,7 @@ void VGradientTabWidget::addGradientToPredefs()
m_predefGradientsView->insertItem( item );
} // VGradientTabWidget::addGradientToPredefs()
-void VGradientTabWidget::predefSelected( QListBoxItem* item )
+void VGradientTabWidget::predefSelected( TQListBoxItem* item )
{
if( item )
{
@@ -315,7 +315,7 @@ void VGradientTabWidget::predefSelected( QListBoxItem* item )
}
} // VGradientTabWidget::predefSelected
-void VGradientTabWidget::changeToPredef( QListBoxItem* item )
+void VGradientTabWidget::changeToPredef( TQListBoxItem* item )
{
if( item )
{
diff --git a/karbon/widgets/vgradienttabwidget.h b/karbon/widgets/vgradienttabwidget.h
index 2c60cee3d..ba5f771f6 100644
--- a/karbon/widgets/vgradienttabwidget.h
+++ b/karbon/widgets/vgradienttabwidget.h
@@ -21,9 +21,9 @@
#ifndef _VGRADIENTTABWIDGET_H_
#define _VGRADIENTTABWIDGET_H_
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqlistbox.h>
#include <koffice_export.h>
#include "vgradient.h"
@@ -31,52 +31,53 @@ class KComboBox;
class VGradientWidget;
class KListBox;
class KIntNumInput;
-class QPushButton;
-class QGroupBox;
+class TQPushButton;
+class TQGroupBox;
class KarbonResourceServer;
-class VGradientListItem : public QListBoxItem
+class VGradientListItem : public TQListBoxItem
{
public:
- VGradientListItem( const VGradient& gradient, QString filename );
+ VGradientListItem( const VGradient& gradient, TQString filename );
VGradientListItem( const VGradientListItem& );
~VGradientListItem();
- QPixmap& pixmap() { return m_pixmap; }
+ TQPixmap& pixmap() { return m_pixmap; }
const VGradient* gradient() const { return m_gradient; }
- QString filename() { return m_filename; }
+ TQString filename() { return m_filename; }
bool canDelete() { return m_delete; }
- virtual int height( const QListBox* ) const { return 16; }
- virtual int width( const QListBox* lb ) const;
+ virtual int height( const TQListBox* ) const { return 16; }
+ virtual int width( const TQListBox* lb ) const;
protected:
- virtual void paint( QPainter* p );
+ virtual void paint( TQPainter* p );
private:
VGradient *m_gradient;
- QPixmap m_pixmap;
- QString m_filename;
+ TQPixmap m_pixmap;
+ TQString m_filename;
bool m_delete;
}; // VGradientListItem
-class VGradientPreview : public QWidget
+class VGradientPreview : public TQWidget
{
public:
- VGradientPreview( VGradient& gradient, double& opacity, QWidget* parent = 0L, const char* name = 0L );
+ VGradientPreview( VGradient& gradient, double& opacity, TQWidget* tqparent = 0L, const char* name = 0L );
~VGradientPreview();
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
protected:
VGradient* m_gradient;
double* m_opacity;
}; // VGradientPreview
-class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
+class KARBONBASE_EXPORT VGradientTabWidget : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum VGradientTarget {
@@ -84,7 +85,7 @@ class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
FILL
};
- VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, QWidget* parent = 0L, const char* name = 0L );
+ VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, TQWidget* tqparent = 0L, const char* name = 0L );
~VGradientTabWidget();
const VGradient& gradient();
@@ -99,8 +100,8 @@ class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
public slots:
void combosChange( int );
void addGradientToPredefs();
- void changeToPredef( QListBoxItem* );
- void predefSelected( QListBoxItem* );
+ void changeToPredef( TQListBoxItem* );
+ void predefSelected( TQListBoxItem* );
void deletePredef();
void opacityChanged( int );
@@ -110,16 +111,16 @@ class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
void setupConnections();
private:
- QGroupBox *m_editGroup;
+ TQGroupBox *m_editGroup;
VGradientWidget *m_gradientWidget;
KComboBox *m_gradientTarget;
KComboBox *m_gradientRepeat;
KComboBox *m_gradientType;
VGradientPreview *m_gradientPreview;
KListBox *m_predefGradientsView;
- QPushButton *m_predefDelete;
- QPushButton *m_predefImport;
- QPushButton *m_addToPredefs;
+ TQPushButton *m_predefDelete;
+ TQPushButton *m_predefImport;
+ TQPushButton *m_addToPredefs;
KIntNumInput *m_opacity;
VGradient m_gradient;
diff --git a/karbon/widgets/vgradientwidget.cc b/karbon/widgets/vgradientwidget.cc
index 25e29cd72..49410a35a 100644
--- a/karbon/widgets/vgradientwidget.cc
+++ b/karbon/widgets/vgradientwidget.cc
@@ -18,14 +18,14 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qframe.h>
-#include <qbitmap.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqbitmap.h>
#include <kcolorbutton.h>
#include <kcombobox.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include "vgradientwidget.h"
@@ -54,10 +54,10 @@ static unsigned char colorStop_bits[] = {
0x7c, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xff, 0x01
};
-VGradientWidget::VGradientWidget( VGradient& gradient, QWidget* parent, const char* name )
- : QWidget( parent, name ), m_gradient( &gradient )
+VGradientWidget::VGradientWidget( VGradient& gradient, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ), m_gradient( &gradient )
{
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMinimumSize( 105, 35 );
} // VGradientWidget::VGradientWidget
@@ -65,39 +65,39 @@ VGradientWidget::~VGradientWidget()
{
} // VGradientWidget::~VGradientWidget
-void VGradientWidget::paintColorStop( QPainter& p, int x, VColor& color )
+void VGradientWidget::paintColorStop( TQPainter& p, int x, VColor& color )
{
- QBitmap bitmap;
+ TQBitmap bitmap;
- bitmap = QBitmap( colorStop_width, colorStop_height, colorStop_bits, true );
+ bitmap = TQBitmap( colorStop_width, colorStop_height, colorStop_bits, true );
bitmap.setMask( bitmap );
p.setPen( color );
p.drawPixmap( x - 4, 1, bitmap );
- bitmap = QBitmap( colorStopBorder_width, colorStopBorder_height, colorStopBorder_bits, true );
+ bitmap = TQBitmap( colorStopBorder_width, colorStopBorder_height, colorStopBorder_bits, true );
bitmap.setMask( bitmap );
- p.setPen( Qt::black );
+ p.setPen( TQt::black );
p.drawPixmap( x - 5, 1, bitmap );
} // VGradientWidget::paintColorStop
-void VGradientWidget::paintMidPoint( QPainter& p, int x )
+void VGradientWidget::paintMidPoint( TQPainter& p, int x )
{
- QBitmap bitmap( midPoint_width, midPoint_height, midPoint_bits, true );
+ TQBitmap bitmap( midPoint_width, midPoint_height, midPoint_bits, true );
bitmap.setMask( bitmap );
- p.setPen( Qt::black );
+ p.setPen( TQt::black );
p.drawPixmap( x - 3, 1, bitmap );
} // VGradientWidget::paintMidPoint
-void VGradientWidget::paintEvent( QPaintEvent* )
+void VGradientWidget::paintEvent( TQPaintEvent* )
{
int w = width() - 4; // available width for gradient and points
int h = height() - 7; // available height for gradient and points
int ph = colorStopBorder_height + 2; // point marker height
int gh = h - ph; // gradient area height
- QPixmap pixmap( width(), height() );
- VKoPainter gp( &pixmap, width(), height() );
- gp.setRasterOp( Qt::XorROP );
+ TQPixmap pixmap( width(), height() );
+ VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() );
+ gp.setRasterOp( TQt::XorROP );
VGradient gradient( *m_gradient );
gradient.setType( VGradient::linear );
gradient.setOrigin( KoPoint( 2, 2 ) );
@@ -115,9 +115,9 @@ void VGradientWidget::paintEvent( QPaintEvent* )
gp.drawRect( KoRect( 2, 2, w, gh ) );
gp.end();
- QPainter p( &pixmap );
+ TQPainter p( &pixmap );
- p.setPen( colorGroup().light() );
+ p.setPen( tqcolorGroup().light() );
// light frame around widget
p.moveTo( 1, height() - 1 );
p.lineTo( 1, 1 );
@@ -129,7 +129,7 @@ void VGradientWidget::paintEvent( QPaintEvent* )
p.moveTo( 1, 3 + gh );
p.lineTo( width() - 1, 3 + gh );
- p.setPen( colorGroup().dark() );
+ p.setPen( tqcolorGroup().dark() );
// left-top frame around widget
p.moveTo( 0, height() - 1 );
p.lineTo( 0, 0 );
@@ -151,12 +151,12 @@ void VGradientWidget::paintEvent( QPaintEvent* )
m_pntArea.setRect( 2, height() - ph - 2, w, ph );
// clear point area
- p.fillRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height(), colorGroup().background() );
+ p.fillRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height(), tqcolorGroup().background() );
p.setClipRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height() );
p.translate( m_pntArea.x(), m_pntArea.y() );
- QPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
+ TQPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
if( colorStops.count() > 1 )
{
VColorStop* stop, *nextstop;
@@ -172,12 +172,12 @@ void VGradientWidget::paintEvent( QPaintEvent* )
bitBlt( this, 0, 0, &pixmap, 0, 0, width(), height() );
} // VGradientWidget::paintEvent
-void VGradientWidget::mousePressEvent( QMouseEvent* e )
+void VGradientWidget::mousePressEvent( TQMouseEvent* e )
{
- if( ! m_pntArea.contains( e->x(), e->y() ) )
+ if( ! m_pntArea.tqcontains( e->x(), e->y() ) )
return;
- QPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
+ TQPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
currentPoint = 0;
@@ -213,11 +213,11 @@ void VGradientWidget::mousePressEvent( QMouseEvent* e )
}
} // VGradientWidget::mousePressEvent
-void VGradientWidget::mouseReleaseEvent( QMouseEvent* e )
+void VGradientWidget::mouseReleaseEvent( TQMouseEvent* e )
{
if( e->button() == Qt::RightButton && currentPoint )
{
- if( m_pntArea.contains( e->x(), e->y() ) && ( currentPoint % 2 == 1 ) )
+ if( m_pntArea.tqcontains( e->x(), e->y() ) && ( currentPoint % 2 == 1 ) )
{
int x = e->x() - m_pntArea.left();
// check if we are still above the actual ramp point
@@ -230,12 +230,12 @@ void VGradientWidget::mouseReleaseEvent( QMouseEvent* e )
}
}
}
- setCursor( QCursor( Qt::ArrowCursor ) );
+ setCursor( TQCursor( TQt::ArrowCursor ) );
} // VGradientWidget::mouseReleaseEvent
-void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
+void VGradientWidget::mouseDoubleClickEvent( TQMouseEvent* e )
{
- if( ! m_pntArea.contains( e->x(), e->y() ) )
+ if( ! m_pntArea.tqcontains( e->x(), e->y() ) )
return;
if( e->button() != Qt::LeftButton )
@@ -244,8 +244,8 @@ void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
if( currentPoint % 2 == 1 )
{
// ramp point hit -> change color
- VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( currentPoint / 2 )->color, this->topLevelWidget() );
- if( d->exec() == QDialog::Accepted )
+ VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( currentPoint / 2 )->color, this->tqtopLevelWidget() );
+ if( d->exec() == TQDialog::Accepted )
{
m_gradient->m_colorStops.at( currentPoint / 2 )->color = d->Color();
update();
@@ -256,8 +256,8 @@ void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
else if( currentPoint == 0 )
{
// now point hit -> create new color stop
- VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( 0 )->color, this->topLevelWidget() );
- if( d->exec() == QDialog::Accepted )
+ VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( 0 )->color, this->tqtopLevelWidget() );
+ if( d->exec() == TQDialog::Accepted )
{
m_gradient->addStop( d->Color(), (float)( e->x() - 2 ) / ( m_pntArea.width() ), 0.5 );
update();
@@ -267,12 +267,12 @@ void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
}
} // VGradientWidget::mouseDoubleClickEvent
-void VGradientWidget::mouseMoveEvent( QMouseEvent* e )
+void VGradientWidget::mouseMoveEvent( TQMouseEvent* e )
{
if( e->state() & Qt::RightButton )
return;
- QPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
+ TQPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
if( currentPoint >= colorStops.count() * 2 )
return;
diff --git a/karbon/widgets/vgradientwidget.h b/karbon/widgets/vgradientwidget.h
index 76f7472dc..236e98f9a 100644
--- a/karbon/widgets/vgradientwidget.h
+++ b/karbon/widgets/vgradientwidget.h
@@ -20,41 +20,42 @@
#ifndef _VGRADIENTWIDGET_H_
#define _VGRADIENTWIDGET_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <koffice_export.h>
class VGradient;
-class QPainter;
+class TQPainter;
class VColor;
-class KARBONBASE_EXPORT VGradientWidget : public QWidget
+class KARBONBASE_EXPORT VGradientWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VGradientWidget( VGradient& gradient, QWidget* parent = 0L, const char* name = 0L );
+ VGradientWidget( VGradient& gradient, TQWidget* tqparent = 0L, const char* name = 0L );
~VGradientWidget();
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
signals:
void changed();
protected:
/** mouse events... For color stops manipulation */
- void mousePressEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
- void mouseDoubleClickEvent( QMouseEvent* );
- void mouseMoveEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
- void paintColorStop( QPainter& p, int x, VColor& color );
- void paintMidPoint( QPainter& p, int x );
+ void paintColorStop( TQPainter& p, int x, VColor& color );
+ void paintMidPoint( TQPainter& p, int x );
/** The gradient to modify. */
VGradient* m_gradient;
/** The point to modify. */
unsigned int currentPoint;
- QRect m_pntArea;
+ TQRect m_pntArea;
}; // VGradientWidget
#endif /* _VGRADIENTWIDGET_H_ */
diff --git a/karbon/widgets/vreference.cc b/karbon/widgets/vreference.cc
index 43b0e8b2a..c7553fe87 100644
--- a/karbon/widgets/vreference.cc
+++ b/karbon/widgets/vreference.cc
@@ -20,42 +20,42 @@
/* vreference.cc */
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include "vreference.h"
-VReference::VReference( QWidget *parent, const char *name ) : QFrame ( parent, name )
+VReference::VReference( TQWidget *tqparent, const char *name ) : TQFrame ( tqparent, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- mButtonGroup = new QButtonGroup (3, Vertical, this );
- QRadioButton* radio = new QRadioButton ( mButtonGroup );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ mButtonGroup = new TQButtonGroup (3,Qt::Vertical, this );
+ TQRadioButton* radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, TopLeft );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Left );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, BottomLeft );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Top );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Center );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Bottom );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, TopRight );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Right );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, BottomRight );
connect(
- mButtonGroup, SIGNAL( clicked( int ) ),
- this, SLOT( setReferencePoint( int ) ) );
+ mButtonGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( setReferencePoint( int ) ) );
mButtonGroup->setButton( Center );
- layout->addWidget( mButtonGroup );
- layout->activate();
+ tqlayout->addWidget( mButtonGroup );
+ tqlayout->activate();
setReferencePoint( Center );
}
diff --git a/karbon/widgets/vreference.h b/karbon/widgets/vreference.h
index 3c6c1a9fc..261b61506 100644
--- a/karbon/widgets/vreference.h
+++ b/karbon/widgets/vreference.h
@@ -24,9 +24,9 @@
#ifndef VREFERENCE_H
#define VREFERENCE_H
-#include <qframe.h>
+#include <tqframe.h>
-class QButtonGroup;
+class TQButtonGroup;
enum Choice
{
@@ -41,18 +41,19 @@ enum Choice
BottomRight
};
-class VReference : public QFrame
+class VReference : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- VReference( QWidget *parent = 0L, const char *name = 0L );
+ VReference( TQWidget *tqparent = 0L, const char *name = 0L );
int referencePoint();
public slots:
virtual void setReferencePoint ( int );
private:
int m_referencePoint;
- QButtonGroup* mButtonGroup;
+ TQButtonGroup* mButtonGroup;
signals:
void referencePointChanged( int referencePoint );
};
diff --git a/karbon/widgets/vruler.cc b/karbon/widgets/vruler.cc
index 0f7c2f62a..28ed8939f 100644
--- a/karbon/widgets/vruler.cc
+++ b/karbon/widgets/vruler.cc
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "kdebug.h"
@@ -40,7 +40,7 @@ const char *VRuler::m_nums[] = {
"XX XXXXXX XXX XXX XXXXXX XXX XXXX XXXXX XXXXX XXXX XXX"
};
-VRuler::VRuler(Qt::Orientation o, QWidget *parent, const char *name) : super(parent, name, WRepaintNoErase | WResizeNoErase), m_pixmapNums(m_nums)
+VRuler::VRuler(Qt::Orientation o, TQWidget *tqparent, const char *name) : super(tqparent, name, WRepaintNoErase | WResizeNoErase), m_pixmapNums(m_nums)
{
setBackgroundMode(NoBackground);
setFrameStyle(Box | Sunken);
@@ -67,9 +67,9 @@ VRuler::~VRuler()
delete m_pixmapBuffer;
}
-void VRuler::initMarker(Q_INT32 w, Q_INT32 h)
+void VRuler::initMarker(TQ_INT32 w, TQ_INT32 h)
{
- QPainter p;
+ TQPainter p;
m_pixmapMarker.resize(w, h);
p.begin(&m_pixmapMarker);
@@ -81,8 +81,8 @@ void VRuler::initMarker(Q_INT32 w, Q_INT32 h)
void VRuler::recalculateSize()
{
- Q_INT32 w;
- Q_INT32 h;
+ TQ_INT32 w;
+ TQ_INT32 h;
if (m_pixmapBuffer) {
delete m_pixmapBuffer;
@@ -97,7 +97,7 @@ void VRuler::recalculateSize()
h = height();
}
- m_pixmapBuffer = new QPixmap(w, h);
+ m_pixmapBuffer = new TQPixmap(w, h);
Q_CHECK_PTR(m_pixmapBuffer);
drawRuler();
@@ -114,7 +114,7 @@ void VRuler::setUnit(KoUnit::Unit u)
m_unit = u;
drawRuler();
updatePointer(m_currentPosition, m_currentPosition);
- repaint();
+ tqrepaint();
}
void VRuler::setZoom(double zoom)
@@ -123,15 +123,15 @@ void VRuler::setZoom(double zoom)
recalculateSize();
drawRuler();
updatePointer(m_currentPosition, m_currentPosition);
- repaint();
+ tqrepaint();
}
-void VRuler::updatePointer(Q_INT32 x, Q_INT32 y)
+void VRuler::updatePointer(TQ_INT32 x, TQ_INT32 y)
{
if (m_pixmapBuffer) {
if (m_orientation == Qt::Horizontal) {
if (m_currentPosition != -1)
- repaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT);
+ tqrepaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT);
if (x != -1) {
bitBlt(this, x, 1, &m_pixmapMarker, 0, 0, MARKER_WIDTH, MARKER_HEIGHT);
@@ -139,7 +139,7 @@ void VRuler::updatePointer(Q_INT32 x, Q_INT32 y)
}
} else {
if (m_currentPosition != -1)
- repaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH);
+ tqrepaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH);
if (y != -1) {
bitBlt(this, 1, y, &m_pixmapMarker, 0, 0, MARKER_HEIGHT, MARKER_WIDTH);
@@ -149,7 +149,7 @@ void VRuler::updatePointer(Q_INT32 x, Q_INT32 y)
}
}
-void VRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos)
+void VRuler::updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos)
{
if (m_orientation == Qt::Horizontal)
m_firstVisible = xpos;
@@ -158,15 +158,15 @@ void VRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos)
//kdDebug() << "--###-- VRuler::updateVisibleArea(" << xpos << ", " << ypos << ")" << endl;
drawRuler();
- repaint();
+ tqrepaint();
updatePointer(m_currentPosition, m_currentPosition);
//kdDebug() << "--###-- VRuler::updatePointer(" << m_currentPosition << ", " << m_currentPosition << ")" << endl;
}
-void VRuler::paintEvent(QPaintEvent *e)
+void VRuler::paintEvent(TQPaintEvent *e)
{
if (m_pixmapBuffer) {
- const QRect& rect = e -> rect();
+ const TQRect& rect = e -> rect();
bitBlt(this, rect.topLeft(), m_pixmapBuffer, rect);
super::paintEvent(e);
@@ -175,20 +175,20 @@ void VRuler::paintEvent(QPaintEvent *e)
void VRuler::drawRuler()
{
- QPainter p;
- QString buf;
- Q_INT32 st1 = 0;
- Q_INT32 st2 = 0;
- Q_INT32 st3 = 0;
- Q_INT32 st4 = 0;
- Q_INT32 stt = 0;
+ TQPainter p;
+ TQString buf;
+ TQ_INT32 st1 = 0;
+ TQ_INT32 st2 = 0;
+ TQ_INT32 st3 = 0;
+ TQ_INT32 st4 = 0;
+ TQ_INT32 stt = 0;
if (!m_pixmapBuffer)
return;
p.begin(m_pixmapBuffer);
- p.setPen(QColor(0x70, 0x70, 0x70));
- p.setBackgroundColor(colorGroup().background());
+ p.setPen(TQColor(0x70, 0x70, 0x70));
+ p.setBackgroundColor(tqcolorGroup().background());
p.eraseRect(0, 0, m_pixmapBuffer -> width(), m_pixmapBuffer -> height());
switch (m_unit) {
@@ -215,7 +215,7 @@ void VRuler::drawRuler()
break;
}
- Q_INT32 pos = 0;
+ TQ_INT32 pos = 0;
bool s1 = KoUnit::fromUserValue(st1, m_unit) * m_zoom > 3.0;
bool s2 = KoUnit::fromUserValue(st2, m_unit) * m_zoom > 3.0;
bool s3 = KoUnit::fromUserValue(st3, m_unit) * m_zoom > 3.0;
@@ -224,11 +224,11 @@ void VRuler::drawRuler()
if (m_orientation == Qt::Horizontal) {
// XXX: This was 7 * 4 -- why? what was the idea about having 30 point intervals?
float cx = KoUnit::fromUserValue(100, m_unit) / m_zoom;
- Q_INT32 step = qRound(cx);//((Q_INT32)(cx / (float)stt) + 1) * stt;
- Q_INT32 start = (Q_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
+ TQ_INT32 step = tqRound(cx);//((TQ_INT32)(cx / (float)stt) + 1) * stt;
+ TQ_INT32 start = (TQ_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
do {
- pos = (Q_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
+ pos = (TQ_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
if (!s3 && s4 && start % st4 == 0)
p.drawLine(pos, RULER_SIZE - 9, pos, RULER_SIZE);
@@ -243,7 +243,7 @@ void VRuler::drawRuler()
p.drawLine(pos, RULER_SIZE - 5, pos, RULER_SIZE);
if (step && start % step == 0) {
- buf.setNum(QABS(start));
+ buf.setNum(TQABS(start));
drawNums(&p, pos, 4, buf, true);
}
@@ -252,12 +252,12 @@ void VRuler::drawRuler()
} else {
m_firstVisible = 0;
float cx = KoUnit::fromUserValue(100, m_unit) / m_zoom;
- Q_INT32 height = m_pixmapBuffer -> height() - 1;
- Q_INT32 step = qRound(cx);
- Q_INT32 start = (Q_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
+ TQ_INT32 height = m_pixmapBuffer -> height() - 1;
+ TQ_INT32 step = tqRound(cx);
+ TQ_INT32 start = (TQ_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
do {
- pos = height - (Q_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
+ pos = height - (TQ_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
if (!s3 && s4 && start % st4 == 0)
p.drawLine(RULER_SIZE - 9, pos, RULER_SIZE, pos);
@@ -272,7 +272,7 @@ void VRuler::drawRuler()
p.drawLine(RULER_SIZE - 5, pos, RULER_SIZE, pos);
if (step && start % step == 0) {
- buf.setNum(QABS(start));
+ buf.setNum(TQABS(start));
drawNums(&p, 4, pos, buf, false);
}
@@ -283,7 +283,7 @@ void VRuler::drawRuler()
p.end();
}
-void VRuler::resizeEvent(QResizeEvent *)
+void VRuler::resizeEvent(TQResizeEvent *)
{
recalculateSize();
}
@@ -309,15 +309,15 @@ void VRuler::hide()
setFixedWidth(1);
}
-void VRuler::drawNums(QPainter *p, Q_INT32 x, Q_INT32 y, QString& num, bool orientationHoriz)
+void VRuler::drawNums(TQPainter *p, TQ_INT32 x, TQ_INT32 y, TQString& num, bool orientationHoriz)
{
if (orientationHoriz)
x -= 7;
else
y -= 8;
- for (Q_UINT32 k = 0; k < num.length(); k++) {
- Q_INT32 st = num.at(k).digitValue() * 7;
+ for (TQ_UINT32 k = 0; k < num.length(); k++) {
+ TQ_INT32 st = num.at(k).digitValue() * 7;
p -> drawPixmap(x, y, m_pixmapNums, st, 0, 7, 7);
diff --git a/karbon/widgets/vruler.h b/karbon/widgets/vruler.h
index c03de9a2a..a97b4cf0b 100644
--- a/karbon/widgets/vruler.h
+++ b/karbon/widgets/vruler.h
@@ -20,22 +20,23 @@
#ifndef VRULER_H_
#define VRULER_H_
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <KoUnit.h>
// XXX: Make this look more like the KOffice ruler -- the KOffice
// ruler is not quite suited to Krita. Also: start units with 0,
// print every 100 units.
-class QPainter;
+class TQPainter;
-class VRuler : public QFrame {
+class VRuler : public TQFrame {
Q_OBJECT
- typedef QFrame super;
+ TQ_OBJECT
+ typedef TQFrame super;
public:
- VRuler(Qt::Orientation, QWidget *parent = 0, const char *name = 0);
+ VRuler(Qt::Orientation, TQWidget *tqparent = 0, const char *name = 0);
virtual ~VRuler();
public:
@@ -43,30 +44,30 @@ public:
public slots:
void setZoom(double zoom);
- void updatePointer(Q_INT32 x, Q_INT32 y);
- void updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos);
+ void updatePointer(TQ_INT32 x, TQ_INT32 y);
+ void updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos);
void setUnit(KoUnit::Unit u);
void hide();
void show();
public:
- virtual void paintEvent(QPaintEvent *e);
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
protected:
void recalculateSize();
void drawRuler();
- void initMarker(Q_INT32 w, Q_INT32 h);
- void drawNums(QPainter *gc, Q_INT32 x, Q_INT32 y, QString& num, bool orientationHoriz);
+ void initMarker(TQ_INT32 w, TQ_INT32 h);
+ void drawNums(TQPainter *gc, TQ_INT32 x, TQ_INT32 y, TQString& num, bool orientationHoriz);
private:
KoUnit::Unit m_unit;
Qt::Orientation m_orientation;
- Q_INT32 m_firstVisible;
- Q_INT32 m_currentPosition;
- QPixmap *m_pixmapBuffer;
- QPixmap m_pixmapMarker;
- QPixmap m_pixmapNums;
+ TQ_INT32 m_firstVisible;
+ TQ_INT32 m_currentPosition;
+ TQPixmap *m_pixmapBuffer;
+ TQPixmap m_pixmapMarker;
+ TQPixmap m_pixmapNums;
double m_zoom;
private:
diff --git a/karbon/widgets/vselecttoolbar.cc b/karbon/widgets/vselecttoolbar.cc
index a39650d8a..fa01ba466 100644
--- a/karbon/widgets/vselecttoolbar.cc
+++ b/karbon/widgets/vselecttoolbar.cc
@@ -20,7 +20,7 @@
/* vselecttoolbar.cc */
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdebug.h>
@@ -36,30 +36,30 @@
VSelectToolBar::VSelectToolBar( KarbonView *view, const char* name ) : KToolBar( view, name ), m_view( view )
{
setCaption( i18n( "Object Properties" ) );
- QLabel *x_label = new QLabel( i18n( "X:" ), this, "kde toolbar widget" );
+ TQLabel *x_label = new TQLabel( i18n( "X:" ), this, "kde toolbar widget" );
insertWidget( 0, x_label->width(), x_label );
m_x = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_x, SIGNAL( valueChanged( double ) ), this, SLOT( slotXChanged( double ) ) );
+ connect( m_x, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotXChanged( double ) ) );
insertWidget( 1, m_x->width(), m_x );
- QLabel *y_label = new QLabel( i18n( "Y:" ), this, "kde toolbar widget" );
+ TQLabel *y_label = new TQLabel( i18n( "Y:" ), this, "kde toolbar widget" );
insertWidget( 2, y_label->width(), y_label );
m_y = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_y, SIGNAL( valueChanged( double ) ), this, SLOT( slotYChanged( double ) ) );
+ connect( m_y, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotYChanged( double ) ) );
insertWidget( 3, m_y->width(), m_y );
insertSeparator( 4 );
- QLabel *w_label = new QLabel( i18n( "selection width", "Width:" ), this, "kde toolbar widget" );
+ TQLabel *w_label = new TQLabel( i18n( "selection width", "Width:" ), this, "kde toolbar widget" );
insertWidget( 5, w_label->width(), w_label );
m_width = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_width, SIGNAL( valueChanged( double ) ), this, SLOT( slotWidthChanged( double ) ) );
+ connect( m_width, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotWidthChanged( double ) ) );
insertWidget( 6, m_width->width(), m_width );
- QLabel *h_label = new QLabel( i18n( "Height:" ), this, "kde toolbar widget" );
+ TQLabel *h_label = new TQLabel( i18n( "Height:" ), this, "kde toolbar widget" );
insertWidget( 7, h_label->width(), h_label );
m_height = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_height, SIGNAL( valueChanged( double ) ), this, SLOT( slotHeightChanged( double ) ) );
+ connect( m_height, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotHeightChanged( double ) ) );
insertWidget( 8, m_height->width(), m_height );
- connect( m_view, SIGNAL( selectionChange() ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_view, TQT_SIGNAL( selectionChange() ), this, TQT_SLOT( slotSelectionChanged() ) );
}
VSelectToolBar::~VSelectToolBar()
diff --git a/karbon/widgets/vselecttoolbar.h b/karbon/widgets/vselecttoolbar.h
index 376ca1342..ef6a9b32e 100644
--- a/karbon/widgets/vselecttoolbar.h
+++ b/karbon/widgets/vselecttoolbar.h
@@ -30,6 +30,7 @@ class KarbonView;
class VSelectToolBar : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
VSelectToolBar( KarbonView *view, const char* name = 0L );
~VSelectToolBar();
diff --git a/karbon/widgets/vsmallpreview.cc b/karbon/widgets/vsmallpreview.cc
index 7766f6e92..ab1b9261a 100644
--- a/karbon/widgets/vsmallpreview.cc
+++ b/karbon/widgets/vsmallpreview.cc
@@ -19,11 +19,11 @@
*/
/* vsmallpreview.cc */
-#include <qcolor.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
+#include <tqcolor.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <KoPoint.h>
@@ -39,24 +39,24 @@
#define FRAMEWIDTH 40
-VSmallPreview::VSmallPreview( QWidget* parent, const char* name )
- : QWidget( parent, name )
+VSmallPreview::VSmallPreview( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
- /* Create widget layout */
- QHBoxLayout *layout = new QHBoxLayout( this, 4 );
- m_strokeLabel = new QLabel( i18n( "Stroke: None" ), this );
- layout->addWidget( m_strokeLabel );
- m_strokeFrame = new QFrame( this );
+ /* Create widget tqlayout */
+ TQHBoxLayout *tqlayout = new TQHBoxLayout( this, 4 );
+ m_strokeLabel = new TQLabel( i18n( "Stroke: None" ), this );
+ tqlayout->addWidget( m_strokeLabel );
+ m_strokeFrame = new TQFrame( this );
m_strokeFrame->setFixedWidth ( FRAMEWIDTH );
- m_strokeFrame->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
- layout->addWidget( m_strokeFrame );
- m_fillLabel = new QLabel( i18n( "Fill: None" ), this );
- layout->addWidget( m_fillLabel );
- m_fillFrame = new QFrame( this );
+ m_strokeFrame->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
+ tqlayout->addWidget( m_strokeFrame );
+ m_fillLabel = new TQLabel( i18n( "Fill: None" ), this );
+ tqlayout->addWidget( m_fillLabel );
+ m_fillFrame = new TQFrame( this );
m_fillFrame->setFixedWidth ( FRAMEWIDTH );
- m_fillFrame->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
- layout->addWidget( m_fillFrame );
- layout->activate();
+ m_fillFrame->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
+ tqlayout->addWidget( m_fillFrame );
+ tqlayout->activate();
m_fill = VFill();
m_stroke = VStroke();
@@ -83,7 +83,7 @@ VSmallPreview::update( const VStroke &s, const VFill &f )
}
void
-VSmallPreview::paintEvent( QPaintEvent* /*event*/ )
+VSmallPreview::paintEvent( TQPaintEvent* /*event*/ )
{
drawStroke( m_stroke );
drawFill( m_fill );
@@ -95,13 +95,13 @@ VSmallPreview::drawFill( const VFill &f )
VFill fill;
VStroke stroke;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
- VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
+ VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin();
- m_painter->setPen( Qt::NoPen );
- fill.setColor( Qt::white );
+ m_painter->setPen( TQt::NoPen );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_fillFrame->width(), m_fillFrame->height() ) );
@@ -157,10 +157,10 @@ VSmallPreview::drawFill( const VFill &f )
default: //None or unknown
{
m_fillLabel->setText( i18n( "Fill: None") );
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_fillFrame->width(), m_fillFrame->height() ) );
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
stroke.setLineWidth( 2.0 );
m_painter->setPen( stroke );
m_painter->newPath();
@@ -190,13 +190,13 @@ VSmallPreview::drawStroke( const VStroke &s )
VFill fill;
VStroke stroke;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
- VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
+ VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin();
- m_painter->setPen( Qt::NoPen );
- fill.setColor( Qt::white );
+ m_painter->setPen( TQt::NoPen );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_strokeFrame->width(), m_strokeFrame->height() ) );
@@ -251,10 +251,10 @@ VSmallPreview::drawStroke( const VStroke &s )
default: //None or unknown
{
m_strokeLabel->setText( i18n( "Stroke: None") );
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_strokeFrame->width(), m_strokeFrame->height() ) );
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
stroke.setLineWidth( 2.0 );
m_painter->setPen( stroke );
m_painter->newPath();
diff --git a/karbon/widgets/vsmallpreview.h b/karbon/widgets/vsmallpreview.h
index 7b1abb158..f264553d5 100644
--- a/karbon/widgets/vsmallpreview.h
+++ b/karbon/widgets/vsmallpreview.h
@@ -24,32 +24,33 @@
#ifndef VSMALLPREVIEW_H
#define VSMALLPREVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QFrame;
-class QLabel;
+class TQFrame;
+class TQLabel;
class VFill;
class VStroke;
-class VSmallPreview : public QWidget
+class VSmallPreview : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VSmallPreview( QWidget* parent = 0L, const char* name = 0L );
+ VSmallPreview( TQWidget* tqparent = 0L, const char* name = 0L );
~VSmallPreview();
void update( const VStroke &, const VFill & );
protected:
- virtual void paintEvent( QPaintEvent* event );
+ virtual void paintEvent( TQPaintEvent* event );
private:
void drawFill( const VFill & );
void drawStroke( const VStroke & );
- QFrame *m_fillFrame;
- QFrame *m_strokeFrame;
- QLabel *m_fillLabel;
- QLabel *m_strokeLabel;
+ TQFrame *m_fillFrame;
+ TQFrame *m_strokeFrame;
+ TQLabel *m_fillLabel;
+ TQLabel *m_strokeLabel;
VFill m_fill;
VStroke m_stroke;
};
diff --git a/karbon/widgets/vstatebutton.cc b/karbon/widgets/vstatebutton.cc
index 635d3de71..197cf0eea 100644
--- a/karbon/widgets/vstatebutton.cc
+++ b/karbon/widgets/vstatebutton.cc
@@ -19,8 +19,8 @@
#include "vstatebutton.h"
-VStateButton::VStateButton( QWidget* parent, const char* name )
- : QPushButton( parent, name )
+VStateButton::VStateButton( TQWidget* tqparent, const char* name )
+ : TQPushButton( tqparent, name )
{
m_index = 0;
m_pixmaps.setAutoDelete( true );
@@ -31,9 +31,9 @@ VStateButton::~VStateButton()
}
void
-VStateButton::mouseReleaseEvent( QMouseEvent *e )
+VStateButton::mouseReleaseEvent( TQMouseEvent *e )
{
- QPushButton::mouseReleaseEvent( e );
+ TQPushButton::mouseReleaseEvent( e );
if( m_pixmaps.count() > 0 )
{
m_index = ++m_index % m_pixmaps.count();
diff --git a/karbon/widgets/vstatebutton.h b/karbon/widgets/vstatebutton.h
index 6273adcc1..08e4a1a28 100644
--- a/karbon/widgets/vstatebutton.h
+++ b/karbon/widgets/vstatebutton.h
@@ -20,24 +20,24 @@
#ifndef __VSTATEBUTTON_H__
#define __VSTATEBUTTON_H__
-#include <qpushbutton.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqpushbutton.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
-class VStateButton : public QPushButton
+class VStateButton : public TQPushButton
{
public:
- VStateButton( QWidget* parent = 0L, const char* name = 0L );
+ VStateButton( TQWidget* tqparent = 0L, const char* name = 0L );
~VStateButton();
- void addState( QPixmap *state ) { m_pixmaps.append( state ); }
+ void addState( TQPixmap *state ) { m_pixmaps.append( state ); }
void setState( unsigned int index );
unsigned int getState() const { return m_index; }
private:
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
- QPtrList<QPixmap> m_pixmaps;
+ TQPtrList<TQPixmap> m_pixmaps;
unsigned int m_index;
};
diff --git a/karbon/widgets/vstrokefillpreview.cc b/karbon/widgets/vstrokefillpreview.cc
index 40dbe4d69..93392d9b4 100644
--- a/karbon/widgets/vstrokefillpreview.cc
+++ b/karbon/widgets/vstrokefillpreview.cc
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <KoPoint.h>
@@ -52,21 +52,17 @@
VStrokeFillPreview::VStrokeFillPreview(
- KarbonPart *part, QWidget* parent, const char* name )
- : QFrame( parent, name ), m_part( part )
+ KarbonPart *part, TQWidget* tqparent, const char* name )
+ : TQFrame( tqparent, name ), m_part( part )
{
m_strokeWidget = false;
- setFocusPolicy( QWidget::NoFocus );
+ setFocusPolicy( TQ_NoFocus );
-#if QT_VERSION < 0x030100
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
-#else
- setFrameStyle( QFrame::GroupBoxPanel | QFrame::Sunken );
-#endif
+ setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Sunken );
installEventFilter( this );
m_pixmap.resize( int( PANEL_SIZEX ), int( PANEL_SIZEY ) );
- m_painter = new VKoPainter( &m_pixmap, uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) );
+ m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) );
}
VStrokeFillPreview::~VStrokeFillPreview()
@@ -75,25 +71,25 @@ VStrokeFillPreview::~VStrokeFillPreview()
}
void
-VStrokeFillPreview::paintEvent( QPaintEvent* event )
+VStrokeFillPreview::paintEvent( TQPaintEvent* event )
{
bitBlt( this,
(int)( width() - PANEL_SIZEX ) / 2, (int)( height() - PANEL_SIZEY ) / 2,
&m_pixmap,
0, 0, (int)PANEL_SIZEX, (int)PANEL_SIZEY );
- QFrame::paintEvent( event );
+ TQFrame::paintEvent( event );
}
bool
-VStrokeFillPreview::eventFilter( QObject *, QEvent *event )
+VStrokeFillPreview::eventFilter( TQObject *, TQEvent *event )
{
- QMouseEvent* e = static_cast<QMouseEvent *>( event );
+ TQMouseEvent* e = TQT_TQMOUSEEVENT( event );
int ex = e->x() - int( ( width() - PANEL_SIZEX ) / 2 );
int ey = e->y() - int( ( height() - PANEL_SIZEY ) / 2 );
- if( event && event->type() == QEvent::MouseButtonPress )
+ if( event && event->type() == TQEvent::MouseButtonPress )
{
if ( m_strokeWidget )
{
@@ -132,14 +128,14 @@ VStrokeFillPreview::eventFilter( QObject *, QEvent *event )
update( m_stroke, m_fill );
}
- if( event && event->type() == QEvent::MouseButtonDblClick )
+ if( event && event->type() == TQEvent::MouseButtonDblClick )
{
if(
ex >= FILL_TOPX && ex <= FILL_BOTTOMX &&
ey >= FILL_TOPY && ey <= FILL_BOTTOMY )
{
VColorDlg* dialog = new VColorDlg( m_fill.color(), this );
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
if( m_part && m_part->document().selection() ) m_part->addCommand( new VFillCmd( &m_part->document(), VFill( dialog->Color() ) ), true );
}
@@ -150,7 +146,7 @@ VStrokeFillPreview::eventFilter( QObject *, QEvent *event )
&& ey >= STROKE_TOPY && ey <= STROKE_BOTTOMY )
{
VColorDlg* dialog = new VColorDlg( m_stroke.color(), this );
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
if( m_part && m_part->document().selection() ) m_part->addCommand( new VStrokeCmd( &m_part->document(), dialog->Color() ), true );
}
@@ -176,12 +172,12 @@ VStrokeFillPreview::update( const VStroke &s, const VFill &f )
// draw checkerboard
VFill fill;
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
for( unsigned char y = 0; y < PANEL_SIZEY; y += 10 )
for( unsigned char x = 0; x < PANEL_SIZEX; x += 10 )
{
- fill.setColor( ( ( ( x + y ) % 20 ) == 0 ) ? QColor( 180, 180, 180 ) : QColor( 100, 100, 100 ) );
+ fill.setColor( ( ( ( x + y ) % 20 ) == 0 ) ? TQColor( 180, 180, 180 ) : TQColor( 100, 100, 100 ) );
m_painter->setBrush( fill );
m_painter->drawRect( x, y, 10, 10 );
}
@@ -199,7 +195,7 @@ VStrokeFillPreview::update( const VStroke &s, const VFill &f )
m_painter->end();
- repaint();
+ tqrepaint();
}
void
@@ -241,15 +237,15 @@ VStrokeFillPreview::drawFill( const VFill &f )
}
else
m_painter->setBrush( f );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
m_painter->drawRect( KoRect( FILL_TOPX, FILL_TOPY, FILL_BOTTOMX - FILL_TOPX, FILL_BOTTOMY - FILL_TOPY ) );
}
else
{
VFill fill;
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
m_painter->drawRect( KoRect( FILL_TOPX, FILL_TOPY,
FILL_BOTTOMX - FILL_TOPX,
@@ -259,7 +255,7 @@ VStrokeFillPreview::drawFill( const VFill &f )
// show 3D outline of fill part
VColor color;
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setBrush( TQt::NoBrush );
color.set( 1.0, 1.0, 1.0 );
stroke.setColor( color );
m_painter->setPen( stroke );
@@ -282,7 +278,7 @@ VStrokeFillPreview::drawFill( const VFill &f )
if( f.type() == VFill::none )
{
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
m_painter->setPen( stroke );
m_painter->newPath();
m_painter->moveTo( KoPoint( FILL_BOTTOMX, FILL_TOPY ) );
@@ -297,7 +293,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
VStroke stroke;
stroke.setLineWidth( 2.0 );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
if( s.type() != VStroke::none )
{
@@ -357,10 +353,10 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
{
VFill fill;
m_painter->setFillRule( evenOdd );
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
m_painter->newPath();
m_painter->moveTo( KoPoint( STROKE_TOPX, STROKE_TOPY ) );
@@ -382,7 +378,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
color.set( 1.0, 1.0, 1.0 );
stroke.setColor( color );
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setBrush( TQt::NoBrush );
m_painter->setPen( stroke );
m_painter->newPath();
@@ -401,7 +397,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
m_painter->lineTo( KoPoint( STROKE_TOPX - 1, STROKE_BOTTOMY + 1 ) );
m_painter->strokePath();
- //stroke.setColor( Qt::black.rgb() );
+ //stroke.setColor( TQt::black.rgb() );
//m_painter->setPen( stroke );
m_painter->newPath();
m_painter->moveTo( KoPoint( STROKE_BOTTOMX_INNER - 1, STROKE_TOPY_INNER + 1 ) );
@@ -421,7 +417,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
if( s.type() == VStroke::none )
{
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
m_painter->setPen( stroke );
m_painter->newPath();
diff --git a/karbon/widgets/vstrokefillpreview.h b/karbon/widgets/vstrokefillpreview.h
index 20b0acbd0..81fdffaef 100644
--- a/karbon/widgets/vstrokefillpreview.h
+++ b/karbon/widgets/vstrokefillpreview.h
@@ -20,32 +20,33 @@
#ifndef __VSTROKEFILLPREVIEW_H__
#define __VSTROKEFILLPREVIEW_H__
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
class VKoPainter;
class VFill;
class VStroke;
class KarbonPart;
-class VStrokeFillPreview : public QFrame
+class VStrokeFillPreview : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- VStrokeFillPreview( KarbonPart *part, QWidget* parent = 0L, const char* name = 0L );
+ VStrokeFillPreview( KarbonPart *part, TQWidget* tqparent = 0L, const char* name = 0L );
~VStrokeFillPreview();
- virtual QSize sizeHint() const
- { return QSize( 50, 50 ); }
- virtual QSize minimumSizeHint() const
- { return QSize( 20, 20 ); }
- virtual QSizePolicy sizePolicy() const
- { return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); }
+ virtual TQSize tqsizeHint() const
+ { return TQSize( 50, 50 ); }
+ virtual TQSize tqminimumSizeHint() const
+ { return TQSize( 20, 20 ); }
+ virtual TQSizePolicy sizePolicy() const
+ { return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); }
void update( const VStroke &, const VFill & );
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
bool strokeIsSelected() const { return m_strokeWidget; }
void setFillSelected();
@@ -57,13 +58,13 @@ signals:
void strokeSelected();
protected:
- virtual void paintEvent( QPaintEvent* event );
+ virtual void paintEvent( TQPaintEvent* event );
private:
VKoPainter* m_painter;
void drawFill( const VFill & );
void drawStroke( const VStroke & );
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
KarbonPart *m_part;
bool m_strokeWidget;
VFill m_fill;
diff --git a/karbon/widgets/vtoolbox.h b/karbon/widgets/vtoolbox.h
index 28c53f971..0646a1aee 100644
--- a/karbon/widgets/vtoolbox.h
+++ b/karbon/widgets/vtoolbox.h
@@ -28,6 +28,7 @@ class VTool;
class VToolBox : public KoToolBox
{
Q_OBJECT
+ TQ_OBJECT
public:
VToolBox( KMainWindow *mainWin, const char* name, KInstance* instance );
diff --git a/karbon/widgets/vtranslate.cc b/karbon/widgets/vtranslate.cc
index 1eaf81ed0..37bfe811e 100644
--- a/karbon/widgets/vtranslate.cc
+++ b/karbon/widgets/vtranslate.cc
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
#include <klocale.h>
#include <knuminput.h>
#include <kstdguiitem.h>
@@ -29,43 +29,43 @@
#include "vtranslate.h"
-VTranslate::VTranslate( QWidget* parent, const char* name )
- : QWidget( parent, name )
+VTranslate::VTranslate( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
setCaption( i18n( "Translate" ) );
- QVBoxLayout *mainlayout = new QVBoxLayout(this, 7);
- mainlayout->addSpacing(5);
+ TQVBoxLayout *maintqlayout = new TQVBoxLayout(this, 7);
+ maintqlayout->addSpacing(5);
- QGridLayout *inputlayout = new QGridLayout(this, 5, 3);
- mainlayout->addLayout(inputlayout);
- m_labelX = new QLabel(i18n("X:"), this);
- inputlayout->addWidget(m_labelX, 0, 0);
- labely = new QLabel(i18n("Y:"), this);
- inputlayout->addWidget(labely, 1, 0);
- inputlayout->addColSpacing(1, 1);
- inputlayout->addColSpacing(3, 5);
+ TQGridLayout *inputtqlayout = new TQGridLayout(this, 5, 3);
+ maintqlayout->addLayout(inputtqlayout);
+ m_labelX = new TQLabel(i18n("X:"), this);
+ inputtqlayout->addWidget(m_labelX, 0, 0);
+ labely = new TQLabel(i18n("Y:"), this);
+ inputtqlayout->addWidget(labely, 1, 0);
+ inputtqlayout->addColSpacing(1, 1);
+ inputtqlayout->addColSpacing(3, 5);
m_inputX = new KDoubleNumInput( this );
m_inputX->setRange(-10000.00, 10000.00, 1.00, false); //range is just for example - for now :-)
- inputlayout->addWidget(m_inputX, 0, 2);
+ inputtqlayout->addWidget(m_inputX, 0, 2);
m_inputY = new KDoubleNumInput( this );
m_inputY->setRange(-10000.00, 10000.00, 1.00, false);
- inputlayout->addWidget(m_inputY, 1, 2);
- m_labelUnit1 = new QLabel("", this);
- inputlayout->addWidget(m_labelUnit1, 0, 4);
- m_labelUnit2 = new QLabel("", this);
- inputlayout->addWidget(m_labelUnit2, 1, 4);
- mainlayout->addSpacing(5);
- m_checkBoxPosition = new QCheckBox(i18n("Relative &position"), this);
- mainlayout->addWidget(m_checkBoxPosition);
- mainlayout->addSpacing(5);
- m_buttonDuplicate = new QPushButton(i18n("&Duplicate"), this);
- mainlayout->addWidget(m_buttonDuplicate);
- mainlayout->addSpacing(1);
+ inputtqlayout->addWidget(m_inputY, 1, 2);
+ m_labelUnit1 = new TQLabel("", this);
+ inputtqlayout->addWidget(m_labelUnit1, 0, 4);
+ m_labelUnit2 = new TQLabel("", this);
+ inputtqlayout->addWidget(m_labelUnit2, 1, 4);
+ maintqlayout->addSpacing(5);
+ m_checkBoxPosition = new TQCheckBox(i18n("Relative &position"), this);
+ maintqlayout->addWidget(m_checkBoxPosition);
+ maintqlayout->addSpacing(5);
+ m_buttonDuplicate = new TQPushButton(i18n("&Duplicate"), this);
+ maintqlayout->addWidget(m_buttonDuplicate);
+ maintqlayout->addSpacing(1);
m_buttonApply = new KPushButton(KStdGuiItem::apply(), this);
- mainlayout->addWidget(m_buttonApply);
+ maintqlayout->addWidget(m_buttonApply);
- mainlayout->activate();
+ maintqlayout->activate();
setFixedSize(baseSize()); //Set the size tp fixed values
}
@@ -74,7 +74,7 @@ VTranslate::~VTranslate()
{
}
-void VTranslate::setUnits( const QString& units )
+void VTranslate::setUnits( const TQString& units )
{
m_labelUnit1->setText( units );
m_labelUnit2->setText( units );
diff --git a/karbon/widgets/vtranslate.h b/karbon/widgets/vtranslate.h
index 23fd1325b..1b019d4b8 100644
--- a/karbon/widgets/vtranslate.h
+++ b/karbon/widgets/vtranslate.h
@@ -21,36 +21,37 @@
#ifndef __VTRANSLATE_H__
#define __VTRANSLATE_H__
-#include <qwidget.h>
+#include <tqwidget.h>
-class QCheckBox;
-class QLabel;
-class QPushButton;
-class QString;
+class TQCheckBox;
+class TQLabel;
+class TQPushButton;
+class TQString;
class KDoubleNumInput;
-class VTranslate : public QWidget
+class VTranslate : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VTranslate( QWidget* parent = 0L, const char* name = 0L );
+ VTranslate( TQWidget* tqparent = 0L, const char* name = 0L );
~VTranslate();
public slots:
//sets the unit labels do display correct text (mm, cm, pixels etc):
- void setUnits( const QString& units );
+ void setUnits( const TQString& units );
private:
- QLabel* m_labelX;
+ TQLabel* m_labelX;
KDoubleNumInput* m_inputX; //X coordinate
- QLabel* labely;
+ TQLabel* labely;
KDoubleNumInput* m_inputY; //Y coordinate
- QLabel* m_labelUnit1;
- QLabel* m_labelUnit2;
- QCheckBox* m_checkBoxPosition; //If checked, displays coordinates of selected object
- QPushButton* m_buttonDuplicate; //duplicate (makes a copy of selected object(s) with a new position)
- QPushButton* m_buttonApply; //apply new position
+ TQLabel* m_labelUnit1;
+ TQLabel* m_labelUnit2;
+ TQCheckBox* m_checkBoxPosition; //If checked, displays coordinates of selected object
+ TQPushButton* m_buttonDuplicate; //duplicate (makes a copy of selected object(s) with a new position)
+ TQPushButton* m_buttonApply; //apply new position
};
#endif
diff --git a/karbon/widgets/vtypebuttonbox.cc b/karbon/widgets/vtypebuttonbox.cc
index 4a23d6dd2..f182341dc 100644
--- a/karbon/widgets/vtypebuttonbox.cc
+++ b/karbon/widgets/vtypebuttonbox.cc
@@ -203,9 +203,9 @@ static const char* const buttonpattern[]={
#endif
-#include <qpixmap.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqpixmap.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <klocale.h>
@@ -217,48 +217,48 @@ static const char* const buttonpattern[]={
#include "vtypebuttonbox.h"
VTypeButtonBox::VTypeButtonBox( KarbonPart *part,
- QWidget* parent, const char* name )
- : QHButtonGroup( parent, name ),
+ TQWidget* tqparent, const char* name )
+ : TQHButtonGroup( tqparent, name ),
m_part( part ), m_isStrokeManipulator( false )
{
- setMaximumWidth( parent->width() - 2 );
+ setMaximumWidth( tqparent->width() - 2 );
// The button for no fill
- QToolButton* button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttonnone ) );
+ TQToolButton* button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttonnone ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "None" ) );
+ TQToolTip::add( button, i18n( "None" ) );
insert( button, none );
// The button for solid fill
- button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttonsolid ) );
+ button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttonsolid ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "Solid" ) );
+ TQToolTip::add( button, i18n( "Solid" ) );
insert( button, solid );
// The button for gradient fill
- button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttongradient ) );
+ button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttongradient ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "Gradient" ) );
+ TQToolTip::add( button, i18n( "Gradient" ) );
insert( button, gradient );
// The button for pattern fill
- button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttonpattern ) );
+ button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttonpattern ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "Pattern" ) );
+ TQToolTip::add( button, i18n( "Pattern" ) );
insert( button, pattern );
setInsideMargin( 1 );
setInsideSpacing( 1 );
- connect( this, SIGNAL( clicked( int ) ),
- this, SLOT( slotButtonPressed( int ) ) );
+ connect( this, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotButtonPressed( int ) ) );
}
void
diff --git a/karbon/widgets/vtypebuttonbox.h b/karbon/widgets/vtypebuttonbox.h
index ab624c040..e033a3e43 100644
--- a/karbon/widgets/vtypebuttonbox.h
+++ b/karbon/widgets/vtypebuttonbox.h
@@ -20,13 +20,14 @@
#ifndef __VTYPEBUTTONBOX_H__
#define __VTYPEBUTTONBOX_H__
-#include <qhbuttongroup.h>
+#include <tqhbuttongroup.h>
class KarbonPart;
-class VTypeButtonBox : public QHButtonGroup
+class VTypeButtonBox : public TQHButtonGroup
{
Q_OBJECT
+ TQ_OBJECT
public:
enum buttonType {
@@ -36,7 +37,7 @@ public:
pattern = 3
};
- VTypeButtonBox( KarbonPart *part, QWidget* parent = 0L, const char* name = 0L );
+ VTypeButtonBox( KarbonPart *part, TQWidget* tqparent = 0L, const char* name = 0L );
bool isStrokeManipulator() { return m_isStrokeManipulator; }
public slots: