diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/ui | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/ui')
203 files changed, 5653 insertions, 5569 deletions
diff --git a/krita/ui/imageviewer.cc b/krita/ui/imageviewer.cc index 490f3451..52bc42b7 100644 --- a/krita/ui/imageviewer.cc +++ b/krita/ui/imageviewer.cc @@ -20,35 +20,35 @@ ***************************************************************************/ #include "imageviewer.h" -#include <qlabel.h> -#include <qpainter.h> -#include <qimage.h> -#include <qcursor.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqimage.h> +#include <tqcursor.h> #include <kapplication.h> #include <kdebug.h> #include <kis_cursor.h> -ImageViewer::ImageViewer(QWidget *widget, const char * name) - : QScrollView(widget, name) +ImageViewer::ImageViewer(TQWidget *widget, const char * name) + : TQScrollView(widget, name) , m_isDragging(false) - , m_image(QPixmap()) + , m_image(TQPixmap()) { - m_label = new QLabel( viewport()); - setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); + m_label = new TQLabel( viewport()); + tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); setCursor(KisCursor::handCursor()); addChild(m_label); } -void ImageViewer::setImage(QImage & image) +void ImageViewer::setImage(TQImage & image) { - m_image = QPixmap(image); + m_image = TQPixmap(image); m_label->setPixmap(m_image); resizeContents( m_image.width(), m_image.height() ); - repaintContents(false); + tqrepaintContents(false); } -void ImageViewer::contentsMousePressEvent(QMouseEvent *event) +void ImageViewer::contentsMousePressEvent(TQMouseEvent *event) { if(LeftButton == event->button()) { setCursor(KisCursor::closedHandCursor()); @@ -57,7 +57,7 @@ void ImageViewer::contentsMousePressEvent(QMouseEvent *event) } } -void ImageViewer::contentsMouseReleaseEvent(QMouseEvent *event) +void ImageViewer::contentsMouseReleaseEvent(TQMouseEvent *event) { if(LeftButton == event->button()) { setCursor(KisCursor::handCursor()); @@ -66,10 +66,10 @@ void ImageViewer::contentsMouseReleaseEvent(QMouseEvent *event) } } -void ImageViewer::contentsMouseMoveEvent(QMouseEvent *event) +void ImageViewer::contentsMouseMoveEvent(TQMouseEvent *event) { if(m_isDragging) { - QPoint delta = m_currentPos - event->globalPos(); + TQPoint delta = m_currentPos - event->globalPos(); scrollBy(delta.x(), delta.y()); m_currentPos = event->globalPos(); } diff --git a/krita/ui/imageviewer.h b/krita/ui/imageviewer.h index 17b482c6..1865e5d0 100644 --- a/krita/ui/imageviewer.h +++ b/krita/ui/imageviewer.h @@ -19,10 +19,10 @@ #ifndef PIXMAPVIEWER_H #define PIXMAPVIEWER_H -#include <qscrollview.h> -#include <qimage.h> +#include <tqscrollview.h> +#include <tqimage.h> -class QLabel; +class TQLabel; /** * A scrollable image view. @@ -30,23 +30,24 @@ class QLabel; * XXX: We should add a signal that emits newly eposed rects so the filters * don't have to filter everything, but just the the new bits. */ -class ImageViewer : public QScrollView { +class ImageViewer : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - ImageViewer(QWidget *widget, const char * name = 0); + ImageViewer(TQWidget *widget, const char * name = 0); - void setImage(QImage & image); + void setImage(TQImage & image); - void contentsMousePressEvent(QMouseEvent *event); - void contentsMouseReleaseEvent(QMouseEvent *event); - void contentsMouseMoveEvent(QMouseEvent *event); - void wheelEvent(QWheelEvent * event) { event->ignore(); }; + void contentsMousePressEvent(TQMouseEvent *event); + void contentsMouseReleaseEvent(TQMouseEvent *event); + void contentsMouseMoveEvent(TQMouseEvent *event); + void wheelEvent(TQWheelEvent * event) { event->ignore(); }; private: - QLabel* m_label; + TQLabel* m_label; bool m_isDragging; - QPoint m_currentPos; - QPixmap m_image; + TQPoint m_currentPos; + TQPixmap m_image; }; #endif diff --git a/krita/ui/kcurve.cc b/krita/ui/kcurve.cc index 8e50804f..59aa7efc 100644 --- a/krita/ui/kcurve.cc +++ b/krita/ui/kcurve.cc @@ -20,17 +20,17 @@ #include <cmath> #include <cstdlib> -// Qt includes. - -#include <qpixmap.h> -#include <qpainter.h> -#include <qpoint.h> -#include <qpen.h> -#include <qevent.h> -#include <qtimer.h> -#include <qrect.h> -#include <qfont.h> -#include <qfontmetrics.h> +// TQt includes. + +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqpoint.h> +#include <tqpen.h> +#include <tqevent.h> +#include <tqtimer.h> +#include <tqrect.h> +#include <tqfont.h> +#include <tqfontmetrics.h> // KDE includes. @@ -42,8 +42,8 @@ #include "kcurve.h" -KCurve::KCurve(QWidget *parent, const char *name, WFlags f) - : QWidget(parent, name, f) +KCurve::KCurve(TQWidget *tqparent, const char *name, WFlags f) + : TQWidget(tqparent, name, f) { m_grab_point = NULL; m_readOnlyMode = false; @@ -52,16 +52,16 @@ KCurve::KCurve(QWidget *parent, const char *name, WFlags f) m_pix = NULL; setMouseTracking(true); - setPaletteBackgroundColor(Qt::NoBackground); + setPaletteBackgroundColor(TQt::NoBackground); setMinimumSize(150, 50); - QPair<double,double> *p = new QPair<double,double>; + TQPair<double,double> *p = new TQPair<double,double>; p->first = 0.0; p->second=0.0; m_points.append(p); - p = new QPair<double,double>; + p = new TQPair<double,double>; p->first = 1.0; p->second=1.0; m_points.append(p); m_points.setAutoDelete(true); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); } KCurve::~KCurve() @@ -73,32 +73,32 @@ void KCurve::reset(void) { m_grab_point = NULL; m_guideVisible = false; - repaint(false); + tqrepaint(false); } -void KCurve::setCurveGuide(QColor color) +void KCurve::setCurveGuide(TQColor color) { m_guideVisible = true; m_colorGuide = color; - repaint(false); + tqrepaint(false); } -void KCurve::setPixmap(QPixmap pix) +void KCurve::setPixmap(TQPixmap pix) { if (m_pix) delete m_pix; - m_pix = new QPixmap(pix); - repaint(false); + m_pix = new TQPixmap(pix); + tqrepaint(false); } -void KCurve::keyPressEvent(QKeyEvent *e) +void KCurve::keyPressEvent(TQKeyEvent *e) { - if(e->key() == Qt::Key_Delete || e->key() == Qt::Key_Backspace) + if(e->key() == TQt::Key_Delete || e->key() == TQt::Key_Backspace) { - QPair<double,double> *closest_point=NULL; + TQPair<double,double> *closest_point=NULL; if(m_grab_point) { //first find closest point to get focus afterwards - QPair<double,double> *p = m_points.first(); + TQPair<double,double> *p = m_points.first(); double distance = 1000; // just a big number while(p) { @@ -113,13 +113,13 @@ void KCurve::keyPressEvent(QKeyEvent *e) m_points.remove(m_grab_point); } m_grab_point = closest_point; - repaint(false); + tqrepaint(false); } else - QWidget::keyPressEvent(e); + TQWidget::keyPressEvent(e); } -void KCurve::paintEvent(QPaintEvent *) +void KCurve::paintEvent(TQPaintEvent *) { int x, y; int wWidth = width(); @@ -129,10 +129,10 @@ void KCurve::paintEvent(QPaintEvent *) y = 0; // Drawing selection or all histogram values. - // A QPixmap is used for enable the double buffering. + // A TQPixmap is used for enable the double buffering. - QPixmap pm(size()); - QPainter p1; + TQPixmap pm(size()); + TQPainter p1; p1.begin(&pm, this); // draw background @@ -146,7 +146,7 @@ void KCurve::paintEvent(QPaintEvent *) pm.fill(); // Draw grid separators. - p1.setPen(QPen::QPen(Qt::gray, 1, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::gray, 1, TQt::SolidLine)); p1.drawLine(wWidth/3, 0, wWidth/3, wHeight); p1.drawLine(2*wWidth/3, 0, 2*wWidth/3, wHeight); p1.drawLine(0, wHeight/3, wWidth, wHeight/3); @@ -154,7 +154,7 @@ void KCurve::paintEvent(QPaintEvent *) // Draw curve. double curvePrevVal = getCurveValue(0.0); - p1.setPen(QPen::QPen(Qt::black, 1, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::black, 1, TQt::SolidLine)); for (x = 0 ; x < wWidth ; x++) { double curveX; @@ -175,7 +175,7 @@ void KCurve::paintEvent(QPaintEvent *) // Drawing curve handles. if ( !m_readOnlyMode ) { - QPair<double,double> *p = m_points.first(); + TQPair<double,double> *p = m_points.first(); while(p) { @@ -184,13 +184,13 @@ void KCurve::paintEvent(QPaintEvent *) if(p == m_grab_point) { - p1.setPen(QPen::QPen(Qt::red, 3, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::red, 3, TQt::SolidLine)); p1.drawEllipse( int(curveX * wWidth) - 2, wHeight - 2 - int(curveY * wHeight), 4, 4 ); } else { - p1.setPen(QPen::QPen(Qt::red, 1, Qt::SolidLine)); + p1.setPen(TQPen::TQPen(TQt::red, 1, TQt::SolidLine)); p1.drawEllipse( int(curveX * wWidth) - 3, wHeight - 3 - int(curveY * wHeight), 6, 6 ); @@ -204,11 +204,11 @@ void KCurve::paintEvent(QPaintEvent *) bitBlt(this, 0, 0, &pm); } -void KCurve::mousePressEvent ( QMouseEvent * e ) +void KCurve::mousePressEvent ( TQMouseEvent * e ) { if (m_readOnlyMode) return; - QPair<double,double> *closest_point=NULL; + TQPair<double,double> *closest_point=NULL; double distance; if (e->button() != Qt::LeftButton) @@ -219,7 +219,7 @@ void KCurve::mousePressEvent ( QMouseEvent * e ) distance = 1000; // just a big number - QPair<double,double> *p = m_points.first(); + TQPair<double,double> *p = m_points.first(); int insert_pos,pos=0; while(p) { @@ -239,14 +239,14 @@ void KCurve::mousePressEvent ( QMouseEvent * e ) if(closest_point == NULL) { - closest_point = new QPair<double,double>; + closest_point = new TQPair<double,double>; closest_point->first = x; closest_point->second = y; m_points.append(closest_point); } else if(distance * width() > 5) { - closest_point = new QPair<double,double>; + closest_point = new TQPair<double,double>; closest_point->first = x; closest_point->second = y; m_points.insert(insert_pos, closest_point); @@ -281,10 +281,10 @@ void KCurve::mousePressEvent ( QMouseEvent * e ) } p = m_points.next(); } - repaint(false); + tqrepaint(false); } -void KCurve::mouseReleaseEvent ( QMouseEvent * e ) +void KCurve::mouseReleaseEvent ( TQMouseEvent * e ) { if (m_readOnlyMode) return; @@ -293,22 +293,22 @@ void KCurve::mouseReleaseEvent ( QMouseEvent * e ) setCursor( KCursor::arrowCursor() ); m_dragging = false; - repaint(false); + tqrepaint(false); emit modified(); } -void KCurve::mouseMoveEvent ( QMouseEvent * e ) +void KCurve::mouseMoveEvent ( TQMouseEvent * e ) { if (m_readOnlyMode) return; double x = e->pos().x() / (float)width(); double y = 1.0 - e->pos().y() / (float)height(); - if (m_dragging == false) // If no point is selected set the the cursor shape if on top + if (m_dragging == false) // If no point is selected set the the cursor tqshape if on top { double distance = 1000; double ydistance = 1000; - QPair<double,double> *p = m_points.first(); + TQPair<double,double> *p = m_points.first(); while(p) { if (fabs (x - p->first) < distance) @@ -349,7 +349,7 @@ void KCurve::mouseMoveEvent ( QMouseEvent * e ) emit modified(); } - repaint(false); + tqrepaint(false); } double KCurve::getCurveValue(double x) @@ -357,11 +357,11 @@ double KCurve::getCurveValue(double x) return getCurveValue(m_points, x); } -double KCurve::getCurveValue(QPtrList<QPair<double,double> > &curve, double x) +double KCurve::getCurveValue(TQPtrList<TQPair<double,double> > &curve, double x) { double t; - QPair<double,double> *p; - QPair<double,double> *p0,*p1,*p2,*p3; + TQPair<double,double> *p; + TQPair<double,double> *p0,*p1,*p2,*p3; double c0,c1,c2,c3; double val; @@ -411,39 +411,39 @@ double KCurve::getCurveValue(QPtrList<QPair<double,double> > &curve, double x) return val; } -QPtrList<QPair<double,double> > KCurve::getCurve() +TQPtrList<TQPair<double,double> > KCurve::getCurve() { - QPtrList<QPair<double,double> > outlist; - QPair<double,double> *p; - QPair<double,double> *outpoint; + TQPtrList<TQPair<double,double> > outlist; + TQPair<double,double> *p; + TQPair<double,double> *outpoint; p = m_points.first(); while(p) { - outpoint = new QPair<double,double>(p->first, p->second); + outpoint = new TQPair<double,double>(p->first, p->second); outlist.append(outpoint); p = m_points.next(); } return outlist; } -void KCurve::setCurve(QPtrList<QPair<double,double> >inlist) +void KCurve::setCurve(TQPtrList<TQPair<double,double> >inlist) { - QPair<double,double> *p; - QPair<double,double> *inpoint; + TQPair<double,double> *p; + TQPair<double,double> *inpoint; m_points.clear(); inpoint = inlist.first(); while(inpoint) { - p = new QPair<double,double>(inpoint->first, inpoint->second); + p = new TQPair<double,double>(inpoint->first, inpoint->second); m_points.append(p); inpoint = inlist.next(); } } -void KCurve::leaveEvent( QEvent * ) +void KCurve::leaveEvent( TQEvent * ) { } diff --git a/krita/ui/kcurve.h b/krita/ui/kcurve.h index 412efe5b..820b5f5a 100644 --- a/krita/ui/kcurve.h +++ b/krita/ui/kcurve.h @@ -19,25 +19,26 @@ #ifndef KCURVE_H #define KCURVE_H -// Qt includes. +// TQt includes. -#include <qwidget.h> -#include <qcolor.h> -#include <qpair.h> -#include <qsortedlist.h> +#include <tqwidget.h> +#include <tqcolor.h> +#include <tqpair.h> +#include <tqsortedlist.h> #include <koffice_export.h> -class KRITAUI_EXPORT KCurve : public QWidget +class KRITAUI_EXPORT KCurve : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KCurve(QWidget *parent = 0, const char *name = 0, WFlags f = 0); + KCurve(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); virtual ~KCurve(); void reset(void); - void setCurveGuide(QColor color); - void setPixmap(QPixmap pix); + void setCurveGuide(TQColor color); + void setPixmap(TQPixmap pix); signals: @@ -46,33 +47,33 @@ signals: protected: - void keyPressEvent(QKeyEvent *); - void paintEvent(QPaintEvent *); - void mousePressEvent (QMouseEvent * e); - void mouseReleaseEvent ( QMouseEvent * e ); - void mouseMoveEvent ( QMouseEvent * e ); - void leaveEvent ( QEvent * ); + void keyPressEvent(TQKeyEvent *); + void paintEvent(TQPaintEvent *); + void mousePressEvent (TQMouseEvent * e); + void mouseReleaseEvent ( TQMouseEvent * e ); + void mouseMoveEvent ( TQMouseEvent * e ); + void leaveEvent ( TQEvent * ); public: - static double getCurveValue(QPtrList<QPair<double,double> > &curve, double x); + static double getCurveValue(TQPtrList<TQPair<double,double> > &curve, double x); double getCurveValue(double x); - QPtrList<QPair<double,double> > getCurve(); - void setCurve(QPtrList<QPair<double,double> >inlist); + TQPtrList<TQPair<double,double> > getCurve(); + void setCurve(TQPtrList<TQPair<double,double> >inlist); private: double m_leftmost; double m_rightmost; - QPair<double,double> *m_grab_point; + TQPair<double,double> *m_grab_point; bool m_dragging; double m_grabOffsetX; double m_grabOffsetY; bool m_readOnlyMode; bool m_guideVisible; - QColor m_colorGuide; - QPtrList<QPair<double,double> > m_points; - QPixmap *m_pix; + TQColor m_colorGuide; + TQPtrList<TQPair<double,double> > m_points; + TQPixmap *m_pix; }; diff --git a/krita/ui/kis_autobrush.cc b/krita/ui/kis_autobrush.cc index d1f6dce2..3d081188 100644 --- a/krita/ui/kis_autobrush.cc +++ b/krita/ui/kis_autobrush.cc @@ -19,14 +19,14 @@ #include "kis_autobrush.h" #include <KoImageResource.h> #include <kdebug.h> -#include <qspinbox.h> -#include <qtoolbutton.h> -#include <qimage.h> -#include <qcombobox.h> -#include <qlabel.h> +#include <tqspinbox.h> +#include <tqtoolbutton.h> +#include <tqimage.h> +#include <tqcombobox.h> +#include <tqlabel.h> -KisAutobrush::KisAutobrush(QWidget *parent, const char* name, const QString& caption) : KisWdgAutobrush(parent, name) +KisAutobrush::KisAutobrush(TQWidget *tqparent, const char* name, const TQString& caption) : KisWdgAutobrush(tqparent, name) { setCaption(caption); @@ -36,30 +36,30 @@ KisAutobrush::KisAutobrush(QWidget *parent, const char* name, const QString& cap linkFadeToggled(m_linkSize); linkSizeToggled(m_linkFade); - connect(bnLinkSize, SIGNAL(toggled(bool)), this, SLOT(linkSizeToggled( bool ))); - connect(bnLinkFade, SIGNAL(toggled(bool)), this, SLOT(linkFadeToggled( bool ))); + connect(bnLinkSize, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(linkSizeToggled( bool ))); + connect(bnLinkFade, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(linkFadeToggled( bool ))); - connect((QObject*)comboBoxShape, SIGNAL(activated(int)), this, SLOT(paramChanged())); + connect((TQObject*)comboBoxShape, TQT_SIGNAL(activated(int)), this, TQT_SLOT(paramChanged())); spinBoxWidth->setMinValue(1); - connect(spinBoxWidth,SIGNAL(valueChanged(int)),this,SLOT(spinBoxWidthChanged(int))); + connect(spinBoxWidth,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxWidthChanged(int))); spinBoxHeigth->setMinValue(1); - connect(spinBoxHeigth,SIGNAL(valueChanged(int)),this,SLOT(spinBoxHeigthChanged(int))); + connect(spinBoxHeigth,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHeigthChanged(int))); spinBoxHorizontal->setMinValue(0); - connect(spinBoxHorizontal,SIGNAL(valueChanged(int)),this,SLOT(spinBoxHorizontalChanged(int))); + connect(spinBoxHorizontal,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHorizontalChanged(int))); spinBoxVertical->setMinValue(0); - connect(spinBoxVertical,SIGNAL(valueChanged(int)),this,SLOT(spinBoxVerticalChanged(int))); + connect(spinBoxVertical,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxVerticalChanged(int))); - m_brsh = new QImage(1,1,32); + m_brsh = new TQImage(1,1,32); Q_CHECK_PTR(m_brsh); paramChanged(); - connect(brushPreview, SIGNAL(clicked()), SLOT(paramChanged())); + connect(brushPreview, TQT_SIGNAL(clicked()), TQT_SLOT(paramChanged())); } -void KisAutobrush::resizeEvent ( QResizeEvent * ) +void KisAutobrush::resizeEvent ( TQResizeEvent * ) { brushPreview->setMinimumHeight(brushPreview->width()); // dirty hack ! brushPreview->setMaximumHeight(brushPreview->width()); // dirty hack ! @@ -72,8 +72,8 @@ void KisAutobrush::activate() void KisAutobrush::paramChanged() { - Q_INT32 fh = QMIN( spinBoxWidth->value()/2, spinBoxHorizontal->value() ) ; - Q_INT32 fv = QMIN( spinBoxHeigth->value()/2, spinBoxVertical->value() ); + TQ_INT32 fh = TQMIN( spinBoxWidth->value()/2, spinBoxHorizontal->value() ) ; + TQ_INT32 fv = TQMIN( spinBoxHeigth->value()/2, spinBoxVertical->value() ); KisAutobrushShape* kas; if(comboBoxShape->currentItem() == 0) // use index compare instead of comparing a translatable string @@ -88,8 +88,8 @@ void KisAutobrush::paramChanged() } kas->createBrush(m_brsh); - QPixmap p; - QImage pi(*m_brsh); + TQPixmap p; + TQImage pi(*m_brsh); double coeff = 1.0; int bPw = brushPreview->width()-3; if(pi.width() > bPw) diff --git a/krita/ui/kis_autobrush.h b/krita/ui/kis_autobrush.h index 35392320..92b8509d 100644 --- a/krita/ui/kis_autobrush.h +++ b/krita/ui/kis_autobrush.h @@ -19,15 +19,16 @@ #ifndef _KIS_AUTOBRUSH_H_ #define _KIS_AUTOBRUSH_H_ -#include <qobject.h> +#include <tqobject.h> #include "wdgautobrush.h" #include <kis_autobrush_resource.h> class KisAutobrush : public KisWdgAutobrush { Q_OBJECT + TQ_OBJECT public: - KisAutobrush(QWidget *parent, const char* name, const QString& caption); + KisAutobrush(TQWidget *tqparent, const char* name, const TQString& caption); void activate(); signals: @@ -43,10 +44,10 @@ private slots: void linkFadeToggled(bool); protected: - virtual void resizeEvent ( QResizeEvent * ); + virtual void resizeEvent ( TQResizeEvent * ); private: - QImage* m_brsh; + TQImage* m_brsh; bool m_linkSize; bool m_linkFade; }; diff --git a/krita/ui/kis_autogradient.cc b/krita/ui/kis_autogradient.cc index 79b6bb63..86b755f9 100644 --- a/krita/ui/kis_autogradient.cc +++ b/krita/ui/kis_autogradient.cc @@ -19,8 +19,8 @@ #include "kis_autogradient.h" -#include <qpainter.h> -#include <qcombobox.h> +#include <tqpainter.h> +#include <tqcombobox.h> #include <kcolorbutton.h> #include <knuminput.h> @@ -32,23 +32,23 @@ /****************************** KisAutogradient ******************************/ -KisAutogradient::KisAutogradient(QWidget *parent, const char* name, const QString& caption) : KisWdgAutogradient(parent, name) +KisAutogradient::KisAutogradient(TQWidget *tqparent, const char* name, const TQString& caption) : KisWdgAutogradient(tqparent, name) { setCaption(caption); m_autogradientResource = new KisAutogradientResource(); - m_autogradientResource->createSegment( INTERP_LINEAR, COLOR_INTERP_RGB, 0.0, 1.0, 0.5, Qt::black, Qt::white ); - connect(gradientSlider, SIGNAL( sigSelectedSegment( KisGradientSegment* ) ), SLOT( slotSelectedSegment(KisGradientSegment*) )); - connect(gradientSlider, SIGNAL( sigChangedSegment(KisGradientSegment*) ), SLOT( slotChangedSegment(KisGradientSegment*) )); + m_autogradientResource->createSegment( INTERP_LINEAR, COLOR_INTERP_RGB, 0.0, 1.0, 0.5, TQt::black, TQt::white ); + connect(gradientSlider, TQT_SIGNAL( sigSelectedSegment( KisGradientSegment* ) ), TQT_SLOT( slotSelectedSegment(KisGradientSegment*) )); + connect(gradientSlider, TQT_SIGNAL( sigChangedSegment(KisGradientSegment*) ), TQT_SLOT( slotChangedSegment(KisGradientSegment*) )); gradientSlider->setGradientResource( m_autogradientResource ); - connect(comboBoxColorInterpolationType, SIGNAL( activated(int) ), SLOT( slotChangedColorInterpolation(int) )); - connect(comboBoxInterpolationType, SIGNAL( activated(int) ), SLOT( slotChangedInterpolation(int) )); - connect(leftColorButton, SIGNAL( changed(const QColor&) ), SLOT( slotChangedLeftColor(const QColor&) )); - connect(rightColorButton, SIGNAL( changed(const QColor&) ), SLOT( slotChangedRightColor(const QColor&) )); + connect(comboBoxColorInterpolationType, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotChangedColorInterpolation(int) )); + connect(comboBoxInterpolationType, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotChangedInterpolation(int) )); + connect(leftColorButton, TQT_SIGNAL( changed(const TQColor&) ), TQT_SLOT( slotChangedLeftColor(const TQColor&) )); + connect(rightColorButton, TQT_SIGNAL( changed(const TQColor&) ), TQT_SLOT( slotChangedRightColor(const TQColor&) )); // intNumInputLeftOpacity->setRange( 0, 100, false); - connect(intNumInputLeftOpacity, SIGNAL( valueChanged(int) ), SLOT( slotChangedLeftOpacity(int) )); + connect(intNumInputLeftOpacity, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotChangedLeftOpacity(int) )); // intNumInputRightOpacity->setRange( 0, 100, false); - connect(intNumInputRightOpacity, SIGNAL( valueChanged(int) ), SLOT( slotChangedRightOpacity(int) )); + connect(intNumInputRightOpacity, TQT_SIGNAL( valueChanged(int) ), TQT_SLOT( slotChangedRightOpacity(int) )); } @@ -64,10 +64,10 @@ void KisAutogradient::slotSelectedSegment(KisGradientSegment* segment) comboBoxColorInterpolationType->setCurrentItem( segment->colorInterpolation() ); comboBoxInterpolationType->setCurrentItem( segment->interpolation() ); - int leftOpacity = qRound(segment->startColor().alpha() * 100); + int leftOpacity = tqRound(segment->startColor().alpha() * 100); intNumInputLeftOpacity->setValue( leftOpacity ); - int rightOpacity = qRound(segment->endColor().alpha() * 100); + int rightOpacity = tqRound(segment->endColor().alpha() * 100); intNumInputRightOpacity->setValue( rightOpacity ); paramChanged(); @@ -98,7 +98,7 @@ void KisAutogradient::slotChangedColorInterpolation(int type) paramChanged(); } -void KisAutogradient::slotChangedLeftColor( const QColor& color) +void KisAutogradient::slotChangedLeftColor( const TQColor& color) { KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) @@ -108,12 +108,12 @@ void KisAutogradient::slotChangedLeftColor( const QColor& color) paramChanged(); } -void KisAutogradient::slotChangedRightColor( const QColor& color) +void KisAutogradient::slotChangedRightColor( const TQColor& color) { KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) segment->setEndColor( Color( color, segment->endColor().alpha() ) ); - gradientSlider->repaint(); + gradientSlider->tqrepaint(); paramChanged(); } @@ -123,7 +123,7 @@ void KisAutogradient::slotChangedLeftOpacity( int value ) KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) segment->setStartColor( Color( segment->startColor().color(), (double)value / 100 ) ); - gradientSlider->repaint(false); + gradientSlider->tqrepaint(false); paramChanged(); } @@ -133,7 +133,7 @@ void KisAutogradient::slotChangedRightOpacity( int value ) KisGradientSegment* segment = gradientSlider->selectedSegment(); if(segment) segment->setEndColor( Color( segment->endColor().color(), (double)value / 100 ) ); - gradientSlider->repaint(false); + gradientSlider->tqrepaint(false); paramChanged(); } diff --git a/krita/ui/kis_autogradient.h b/krita/ui/kis_autogradient.h index a2865d5e..7399aa67 100644 --- a/krita/ui/kis_autogradient.h +++ b/krita/ui/kis_autogradient.h @@ -29,9 +29,10 @@ class KisAutogradientResource; class KisAutogradient : public KisWdgAutogradient { Q_OBJECT + TQ_OBJECT public: - KisAutogradient(QWidget *parent, const char* name, const QString& caption); + KisAutogradient(TQWidget *tqparent, const char* name, const TQString& caption); void activate(); signals: void activatedResource(KisResource *r); @@ -42,8 +43,8 @@ class KisAutogradient : public KisWdgAutogradient void slotChangedSegment(KisGradientSegment* segment); void slotChangedInterpolation(int type); void slotChangedColorInterpolation(int type); - void slotChangedLeftColor( const QColor& color); - void slotChangedRightColor( const QColor& color); + void slotChangedLeftColor( const TQColor& color); + void slotChangedRightColor( const TQColor& color); void slotChangedLeftOpacity( int value ); void slotChangedRightOpacity( int value ); void paramChanged(); diff --git a/krita/ui/kis_birdeye_box.cc b/krita/ui/kis_birdeye_box.cc index 54335f9c..1484563f 100644 --- a/krita/ui/kis_birdeye_box.cc +++ b/krita/ui/kis_birdeye_box.cc @@ -17,15 +17,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qlayout.h" -#include "qlabel.h" -#include "qpixmap.h" -#include "qpainter.h" -#include "qimage.h" +#include "tqlayout.h" +#include "tqlabel.h" +#include "tqpixmap.h" +#include "tqpainter.h" +#include "tqimage.h" #include "config.h" #include LCMS_HEADER #include "klocale.h" -#include "qtooltip.h" +#include "tqtooltip.h" #include "kis_view.h" #include "kis_doc.h" @@ -66,11 +66,11 @@ namespace { return m_canvasSubject->zoomFactor(); } - virtual QRect size() + virtual TQRect size() { - if (!m_canvasSubject->currentImg()) return QRect(0,0,0,0); + if (!m_canvasSubject->currentImg()) return TQRect(0,0,0,0); - return QRect(0, 0, m_canvasSubject->currentImg()->width(), m_canvasSubject->currentImg()->height()); + return TQRect(0, 0, m_canvasSubject->currentImg()->width(), m_canvasSubject->currentImg()->height()); } virtual void setViewCenterPoint(double x, double y) @@ -119,37 +119,37 @@ namespace { public: - virtual QSize pixelSize() + virtual TQSize pixelSize() { - if (!m_image) return QSize(0, 0); - return QSize(m_image->width(), m_image->height()); + if (!m_image) return TQSize(0, 0); + return TQSize(m_image->width(), m_image->height()); } - virtual QImage image(QRect r, QSize thumbnailSize) + virtual TQImage image(TQRect r, TQSize thumbnailSize) { if (!m_image || r.isEmpty() || thumbnailSize.width() == 0 || thumbnailSize.height() == 0) { - return QImage(); + return TQImage(); } KisPaintDevice thumbnailRect(m_image->colorSpace(), "thumbnailRect"); KisPaintDeviceSP mergedImage = m_image->projection(); - Q_INT32 imageWidth = m_image->width(); - Q_INT32 imageHeight = m_image->height(); - Q_UINT32 pixelSize = m_image->colorSpace()->pixelSize(); + TQ_INT32 imageWidth = m_image->width(); + TQ_INT32 imageHeight = m_image->height(); + TQ_UINT32 pixelSize = m_image->colorSpace()->pixelSize(); - for (Q_INT32 y = 0; y < r.height(); ++y) { + for (TQ_INT32 y = 0; y < r.height(); ++y) { KisHLineIteratorPixel it = thumbnailRect.createHLineIterator(0, y, r.width(), true); - Q_INT32 thumbnailY = r.y() + y; - Q_INT32 thumbnailX = r.x(); - Q_INT32 imageY = (thumbnailY * imageHeight) / thumbnailSize.height(); + TQ_INT32 thumbnailY = r.y() + y; + TQ_INT32 thumbnailX = r.x(); + TQ_INT32 imageY = (thumbnailY * imageHeight) / thumbnailSize.height(); KisHLineIteratorPixel srcIt = mergedImage -> createHLineIterator(0, imageY, imageWidth, false); while (!it.isDone()) { - Q_INT32 imageX = (thumbnailX * imageWidth) / thumbnailSize.width(); - Q_INT32 dx = imageX - srcIt.x(); + TQ_INT32 imageX = (thumbnailX * imageWidth) / thumbnailSize.width(); + TQ_INT32 dx = imageX - srcIt.x(); srcIt += dx; //KisColor pixelColor = mergedImage->colorAt(imageX, imageY); @@ -160,7 +160,7 @@ namespace { } } - return thumbnailRect.convertToQImage(m_canvasSubject->monitorProfile(), 0, 0, r.width(), r.height(), + return thumbnailRect.convertToTQImage(m_canvasSubject->monitorProfile(), 0, 0, r.width(), r.height(), m_canvasSubject->HDRExposure()); } @@ -177,12 +177,12 @@ namespace { } -KisBirdEyeBox::KisBirdEyeBox(KisView * view, QWidget* parent, const char* name) - : QWidget(parent, name) +KisBirdEyeBox::KisBirdEyeBox(KisView * view, TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name) , m_view(view) , m_subject(view->canvasSubject()) { - QVBoxLayout * l = new QVBoxLayout(this); + TQVBoxLayout * l = new TQVBoxLayout(this); m_image = m_subject->currentImg(); @@ -192,38 +192,38 @@ KisBirdEyeBox::KisBirdEyeBox(KisView * view, QWidget* parent, const char* name) m_birdEyePanel = new KoBirdEyePanel(m_zoomAdapter, ktp, kpc, this); - connect(view, SIGNAL(cursorPosition( Q_INT32, Q_INT32 )), m_birdEyePanel, SLOT(cursorPosChanged( Q_INT32, Q_INT32 ))); - connect(view, SIGNAL(viewTransformationsChanged()), m_birdEyePanel, SLOT(slotViewTransformationChanged())); + connect(view, TQT_SIGNAL(cursorPosition( TQ_INT32, TQ_INT32 )), m_birdEyePanel, TQT_SLOT(cursorPosChanged( TQ_INT32, TQ_INT32 ))); + connect(view, TQT_SIGNAL(viewTransformationsChanged()), m_birdEyePanel, TQT_SLOT(slotViewTransformationChanged())); l->addWidget(m_birdEyePanel); - QHBoxLayout * hl = new QHBoxLayout(l); + TQHBoxLayout * hl = new TQHBoxLayout(l); - m_exposureLabel = new QLabel(i18n("Exposure:"), this); + m_exposureLabel = new TQLabel(i18n("Exposure:"), this); hl->addWidget(m_exposureLabel); m_exposureDoubleWidget = new KisDoubleWidget(-10, 10, this); - m_exposureDoubleWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + m_exposureDoubleWidget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); hl->addWidget(m_exposureDoubleWidget); - QToolTip::add(m_exposureDoubleWidget, i18n("Select the exposure (stops) for HDR images")); - l->addItem(new QSpacerItem(0, 1, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding)); + TQToolTip::add(m_exposureDoubleWidget, i18n("Select the exposure (stops) for HDR images")); + l->addItem(new TQSpacerItem(0, 1, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding)); m_exposureDoubleWidget->setPrecision(1); m_exposureDoubleWidget->setValue(0); m_exposureDoubleWidget->setLineStep(0.1); m_exposureDoubleWidget->setPageStep(1); - connect(m_exposureDoubleWidget, SIGNAL(valueChanged(double)), SLOT(exposureValueChanged(double))); - connect(m_exposureDoubleWidget, SIGNAL(sliderPressed()), SLOT(exposureSliderPressed())); - connect(m_exposureDoubleWidget, SIGNAL(sliderReleased()), SLOT(exposureSliderReleased())); + connect(m_exposureDoubleWidget, TQT_SIGNAL(valueChanged(double)), TQT_SLOT(exposureValueChanged(double))); + connect(m_exposureDoubleWidget, TQT_SIGNAL(sliderPressed()), TQT_SLOT(exposureSliderPressed())); + connect(m_exposureDoubleWidget, TQT_SIGNAL(sliderReleased()), TQT_SLOT(exposureSliderReleased())); m_draggingExposureSlider = false; Q_ASSERT(m_subject->document() != 0); - connect(m_subject->document(), SIGNAL(sigCommandExecuted()), SLOT(slotDocCommandExecuted())); + connect(m_subject->document(), TQT_SIGNAL(sigCommandExecuted()), TQT_SLOT(slotDocCommandExecuted())); if (m_image) { - connect(m_image, SIGNAL(sigImageUpdated(QRect)), SLOT(slotImageUpdated(QRect))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(slotImageUpdated(TQRect))); } } @@ -245,9 +245,9 @@ void KisBirdEyeBox::setImage(KisImageSP image) m_birdEyePanel->setThumbnailProvider(ktp); if (m_image) { - connect(m_image, SIGNAL(sigImageUpdated(QRect)), SLOT(slotImageUpdated(QRect))); - connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); - connect(m_image, SIGNAL(sigColorSpaceChanged(KisColorSpace *)), SLOT(slotImageColorSpaceChanged(KisColorSpace *))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(slotImageUpdated(TQRect))); + connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); + connect(m_image, TQT_SIGNAL(sigColorSpaceChanged(KisColorSpace *)), TQT_SLOT(slotImageColorSpaceChanged(KisColorSpace *))); m_birdEyePanel->slotUpdate(m_image->bounds()); slotImageColorSpaceChanged(m_image->colorSpace()); } @@ -259,16 +259,16 @@ void KisBirdEyeBox::slotDocCommandExecuted() if (!m_dirtyRect.isEmpty()) { m_birdEyePanel->slotUpdate(m_dirtyRect); } - m_dirtyRect = QRect(); + m_dirtyRect = TQRect(); } } -void KisBirdEyeBox::slotImageUpdated(QRect r) +void KisBirdEyeBox::slotImageUpdated(TQRect r) { m_dirtyRect |= r; } -void KisBirdEyeBox::slotImageSizeChanged(Q_INT32 /*w*/, Q_INT32 /*h*/) +void KisBirdEyeBox::slotImageSizeChanged(TQ_INT32 /*w*/, TQ_INT32 /*h*/) { if (m_image) { m_birdEyePanel->slotUpdate(m_image->bounds()); diff --git a/krita/ui/kis_birdeye_box.h b/krita/ui/kis_birdeye_box.h index 46b6d72d..b9550474 100644 --- a/krita/ui/kis_birdeye_box.h +++ b/krita/ui/kis_birdeye_box.h @@ -20,7 +20,7 @@ #ifndef KIS_BIRDEYE_BOX_H #define KIS_BIRDEYE_BOX_H -#include "qwidget.h" +#include "tqwidget.h" #include "kis_types.h" @@ -31,21 +31,22 @@ class KisCanvasSubject; class KoZoomAdapter; class KisColorSpace; -class KisBirdEyeBox : public QWidget +class KisBirdEyeBox : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KisBirdEyeBox(KisView * view, QWidget * parent = 0, const char* name=0); + KisBirdEyeBox(KisView * view, TQWidget * tqparent = 0, const char* name=0); ~KisBirdEyeBox(); void setImage(KisImageSP image); public slots: void slotDocCommandExecuted(); - void slotImageUpdated(QRect r); - void slotImageSizeChanged(Q_INT32 w, Q_INT32 h); + void slotImageUpdated(TQRect r); + void slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h); void slotImageColorSpaceChanged(KisColorSpace *cs); protected slots: @@ -56,13 +57,13 @@ protected slots: private: KoBirdEyePanel * m_birdEyePanel; KisDoubleWidget * m_exposureDoubleWidget; - QLabel *m_exposureLabel; + TQLabel *m_exposureLabel; KisView * m_view; KisCanvasSubject * m_subject; bool m_draggingExposureSlider; KoZoomAdapter * m_zoomAdapter; KisImageSP m_image; - QRect m_dirtyRect; + TQRect m_dirtyRect; }; #endif // KIS_BIRDEYE_BOX_H diff --git a/krita/ui/kis_boundary_painter.cc b/krita/ui/kis_boundary_painter.cc index b8dfc761..f8918a9d 100644 --- a/krita/ui/kis_boundary_painter.cc +++ b/krita/ui/kis_boundary_painter.cc @@ -15,17 +15,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqpainter.h> #include "kis_boundary.h" #include "kis_boundary_painter.h" #include "kis_canvas.h" #include "kis_canvas_painter.h" -QPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h) +TQPixmap KisBoundaryPainter::createPixmap(const KisBoundary& boundary, int w, int h) { - QPixmap target(w, h); + TQPixmap target(w, h); KisCanvasPainter painter(&target); painter.eraseRect(0, 0, w, h); @@ -41,7 +41,7 @@ void KisBoundaryPainter::paint(const KisBoundary& boundary, KisCanvasPainter& pa KisBoundary::PointPairListList::const_iterator it = boundary.m_horSegments.constBegin(); KisBoundary::PointPairListList::const_iterator end = boundary.m_horSegments.constEnd(); - // Horizontal + //Qt::Horizontal while (it != end) { KisBoundary::PointPairList::const_iterator lineIt = (*it).constBegin(); KisBoundary::PointPairList::const_iterator lineEnd = (*it).constEnd(); @@ -58,7 +58,7 @@ void KisBoundaryPainter::paint(const KisBoundary& boundary, KisCanvasPainter& pa ++it; } - // Vertical + //Qt::Vertical it = boundary.m_vertSegments.constBegin(); end = boundary.m_vertSegments.constEnd(); diff --git a/krita/ui/kis_boundary_painter.h b/krita/ui/kis_boundary_painter.h index 10665ee9..c8f18cd4 100644 --- a/krita/ui/kis_boundary_painter.h +++ b/krita/ui/kis_boundary_painter.h @@ -26,7 +26,7 @@ class KisCanvasPainter; class KRITACORE_EXPORT KisBoundaryPainter { public: static void paint(const KisBoundary& boundary, KisCanvasPainter& painter); - static QPixmap createPixmap(const KisBoundary& boundary, int w, int h); + static TQPixmap createPixmap(const KisBoundary& boundary, int w, int h); }; #endif // _KIS_BOUNDARY_PAINTER_H_ diff --git a/krita/ui/kis_brush_chooser.cc b/krita/ui/kis_brush_chooser.cc index 03f6c502..69aeafdf 100644 --- a/krita/ui/kis_brush_chooser.cc +++ b/krita/ui/kis_brush_chooser.cc @@ -15,9 +15,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> #include <klocale.h> #include <koIconChooser.h> @@ -27,26 +27,26 @@ #include "kis_icon_item.h" #include "kis_brush.h" -KisBrushChooser::KisBrushChooser(QWidget *parent, const char *name) - : super(parent, name) +KisBrushChooser::KisBrushChooser(TQWidget *tqparent, const char *name) + : super(tqparent, name) { - m_lbSpacing = new QLabel(i18n("Spacing:"), this); + m_lbSpacing = new TQLabel(i18n("Spacing:"), this); m_slSpacing = new KisDoubleWidget(0.0, 10, this, "double_widget"); - m_slSpacing->setTickmarks(QSlider::Below); + m_slSpacing->setTickmarks(TQSlider::Below); m_slSpacing->setTickInterval(1); - QObject::connect(m_slSpacing, SIGNAL(valueChanged(double)), this, SLOT(slotSetItemSpacing(double))); + TQObject::connect(m_slSpacing, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotSetItemSpacing(double))); - m_chkColorMask = new QCheckBox(i18n("Use color as mask"), this); - QObject::connect(m_chkColorMask, SIGNAL(toggled(bool)), this, SLOT(slotSetItemUseColorAsMask(bool))); + m_chkColorMask = new TQCheckBox(i18n("Use color as tqmask"), this); + TQObject::connect(m_chkColorMask, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetItemUseColorAsMask(bool))); - m_lbName = new QLabel(this); + m_lbName = new TQLabel(this); - QVBoxLayout *mainLayout = new QVBoxLayout(this, 2, -1, "main layout"); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 2, -1, "main tqlayout"); mainLayout->addWidget(m_lbName); mainLayout->addWidget(chooserWidget(), 10); - QGridLayout *spacingLayout = new QGridLayout( 2, 2); + TQGridLayout *spacingLayout = new TQGridLayout( 2, 2); mainLayout->addLayout(spacingLayout, 1); @@ -89,7 +89,7 @@ void KisBrushChooser::update(KoIconItem *item) if (kisItem) { KisBrush *brush = static_cast<KisBrush *>(kisItem->resource()); - QString text = QString("%1 (%2 x %3)").arg(brush->name()).arg(brush->width()).arg(brush->height()); + TQString text = TQString("%1 (%2 x %3)").tqarg(brush->name()).tqarg(brush->width()).tqarg(brush->height()); m_lbName->setText(text); m_slSpacing->setValue(brush->spacing()); diff --git a/krita/ui/kis_brush_chooser.h b/krita/ui/kis_brush_chooser.h index 942742d1..99438e70 100644 --- a/krita/ui/kis_brush_chooser.h +++ b/krita/ui/kis_brush_chooser.h @@ -20,17 +20,18 @@ #include "kis_itemchooser.h" -class QLabel; -class QCheckBox; +class TQLabel; +class TQCheckBox; class KisDoubleWidget; class KisBrushChooser : public KisItemChooser { typedef KisItemChooser super; Q_OBJECT + TQ_OBJECT public: - KisBrushChooser(QWidget *parent = 0, const char *name = 0); + KisBrushChooser(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisBrushChooser(); protected: @@ -41,10 +42,10 @@ private slots: void slotSetItemUseColorAsMask(bool); private: - QLabel *m_lbName; - QLabel *m_lbSpacing; + TQLabel *m_lbName; + TQLabel *m_lbSpacing; KisDoubleWidget *m_slSpacing; - QCheckBox *m_chkColorMask; + TQCheckBox *m_chkColorMask; }; #endif // KIS_BRUSH_CHOOSER_H_ diff --git a/krita/ui/kis_button_event.h b/krita/ui/kis_button_event.h index e8b7fc2b..f9b6a385 100644 --- a/krita/ui/kis_button_event.h +++ b/krita/ui/kis_button_event.h @@ -23,7 +23,7 @@ class KisButtonEvent : public KisEvent { typedef KisEvent super; public: - Qt::ButtonState button() const { return m_button; } + TQt::ButtonState button() const { return m_button; } protected: KisButtonEvent() {} @@ -33,12 +33,12 @@ protected: const KisPoint& globalPos, double pressure, double xTilt, double yTilt, - Qt::ButtonState button, - Qt::ButtonState state) + TQt::ButtonState button, + TQt::ButtonState state) : super(type, device, pos, globalPos, pressure, xTilt, yTilt, state) , m_button(button) {} - Qt::ButtonState m_button; + TQt::ButtonState m_button; }; #endif // KIS_BUTTON_EVENT_H_ diff --git a/krita/ui/kis_button_press_event.h b/krita/ui/kis_button_press_event.h index 51ad0d66..20dfafc6 100644 --- a/krita/ui/kis_button_press_event.h +++ b/krita/ui/kis_button_press_event.h @@ -24,7 +24,7 @@ class KisButtonPressEvent : public KisButtonEvent { typedef KisButtonEvent super; public: KisButtonPressEvent() {} - KisButtonPressEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState button, Qt::ButtonState state) : super(ButtonPressEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} + KisButtonPressEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState button, TQt::ButtonState state) : super(ButtonPressEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} }; #endif // KIS_BUTTON_PRESS_EVENT_H_ diff --git a/krita/ui/kis_button_release_event.h b/krita/ui/kis_button_release_event.h index 3d9234f0..f6da4dfd 100644 --- a/krita/ui/kis_button_release_event.h +++ b/krita/ui/kis_button_release_event.h @@ -24,7 +24,7 @@ class KisButtonReleaseEvent : public KisButtonEvent { typedef KisButtonEvent super; public: KisButtonReleaseEvent() {} - KisButtonReleaseEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState button, Qt::ButtonState state) : super(ButtonReleaseEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} + KisButtonReleaseEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState button, TQt::ButtonState state) : super(ButtonReleaseEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} }; #endif // KIS_BUTTON_RELEASE_EVENT_H_ diff --git a/krita/ui/kis_canvas.cc b/krita/ui/kis_canvas.cc index 499f4c29..4335c197 100644 --- a/krita/ui/kis_canvas.cc +++ b/krita/ui/kis_canvas.cc @@ -18,7 +18,7 @@ * Some of the X11-specific event handling code is based upon code from - src/kernel/qapplication_x11.cpp from the Qt GUI Toolkit and is subject + src/kernel/qapplication_x11.cpp from the TQt GUI Toolkit and is subject to the following license and copyright: **************************************************************************** @@ -30,27 +30,27 @@ ** ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. ** -** This file is part of the kernel module of the Qt GUI Toolkit. +** This file is part of the kernel module of the TQt GUI Toolkit. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file -** LICENSE.QPL included in the packaging of this file. +** LICENSE.TQPL included in the packaging of this file. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses for Unix/X11 may use this file in accordance with the Qt Commercial +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses for Unix/X11 may use this file in accordance with the TQt Commercial ** License Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. -** See http://www.trolltech.com/qpl/ for QPL licensing information. +** information about TQt Commercial License Agreements. +** See http://www.trolltech.com/qpl/ for TQPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are @@ -58,7 +58,7 @@ ** **********************************************************************/ -#include <qcursor.h> +#include <tqcursor.h> #include "kis_canvas.h" #include "kis_cursor.h" @@ -73,10 +73,10 @@ #include "kis_input_device.h" #include "fixx11h.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 -#include <qdesktopwidget.h> -#include <qapplication.h> +#include <tqdesktopwidget.h> +#include <tqapplication.h> #include <X11/keysym.h> @@ -97,14 +97,14 @@ std::map<XID, KisCanvasWidget::X11TabletDevice> KisCanvasWidget::X11TabletDevice #endif // EXTENDED_X11_TABLET_SUPPORT -#endif // Q_WS_X11 +#endif // TQ_WS_X11 KisCanvasWidget::KisCanvasWidget() { m_enableMoveEventCompressionHint = false; m_lastPressure = 0; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (!X11SupportInitialised) { initX11Support(); } @@ -118,74 +118,74 @@ KisCanvasWidget::~KisCanvasWidget() { } -void KisCanvasWidget::widgetGotPaintEvent(QPaintEvent *e) +void KisCanvasWidget::widgetGotPaintEvent(TQPaintEvent *e) { emit sigGotPaintEvent(e); } -void KisCanvasWidget::widgetGotMousePressEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMousePressEvent(TQMouseEvent *e) { KisButtonPressEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->button(), e->state()); buttonPressEvent(&ke); } -void KisCanvasWidget::widgetGotMouseReleaseEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMouseReleaseEvent(TQMouseEvent *e) { KisButtonReleaseEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->button(), e->state()); buttonReleaseEvent(&ke); } -void KisCanvasWidget::widgetGotMouseDoubleClickEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMouseDoubleClickEvent(TQMouseEvent *e) { KisDoubleClickEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->button(), e->state()); doubleClickEvent(&ke); } -void KisCanvasWidget::widgetGotMouseMoveEvent(QMouseEvent *e) +void KisCanvasWidget::widgetGotMouseMoveEvent(TQMouseEvent *e) { KisMoveEvent ke(KisInputDevice::mouse(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->state()); moveEvent(&ke); } -void KisCanvasWidget::widgetGotTabletEvent(QTabletEvent *e) +void KisCanvasWidget::widgetGotTabletEvent(TQTabletEvent *e) { KisInputDevice device; switch (e->device()) { default: - case QTabletEvent::NoDevice: - case QTabletEvent::Stylus: + case TQTabletEvent::NoDevice: + case TQTabletEvent::Stylus: device = KisInputDevice::stylus(); break; - case QTabletEvent::Puck: + case TQTabletEvent::Puck: device = KisInputDevice::puck(); break; - case QTabletEvent::Eraser: + case TQTabletEvent::Eraser: device = KisInputDevice::eraser(); break; } double pressure = e->pressure() / 255.0; - if (e->type() == QEvent::TabletPress) { + if (e->type() == TQEvent::TabletPress) { KisButtonPressEvent ke(device, e->pos(), e->globalPos(), pressure, e->xTilt(), e->yTilt(), Qt::LeftButton, Qt::NoButton); translateTabletEvent(&ke); } else - if (e->type() == QEvent::TabletRelease) { + if (e->type() == TQEvent::TabletRelease) { KisButtonReleaseEvent ke(device, e->pos(), e->globalPos(), pressure, e->xTilt(), e->yTilt(), Qt::LeftButton, Qt::NoButton); translateTabletEvent(&ke); } else { KisMoveEvent ke(device, e->pos(), e->globalPos(), pressure, e->xTilt(), e->yTilt(), Qt::NoButton); translateTabletEvent(&ke); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 // Fix the problem that when you change from using a tablet device to the mouse, // the first mouse button event is not recognised. This is because we handle - // X11 core mouse move events directly so Qt does not get to see them. This breaks - // the tablet event accept/ignore mechanism, causing Qt to consume the first + // X11 core mouse move events directly so TQt does not get to see them. This breaks + // the tablet event accept/ignore mechanism, causing TQt to consume the first // mouse button event it sees, instead of a mouse move. 'Ignoring' tablet move events - // stops Qt from stealing the next mouse button event. This does not affect the + // stops TQt from stealing the next mouse button event. This does not affect the // tablet aware tools as they do not care about mouse moves while the tablet device is // drawing. e->ignore(); @@ -193,37 +193,37 @@ void KisCanvasWidget::widgetGotTabletEvent(QTabletEvent *e) } } -void KisCanvasWidget::widgetGotEnterEvent(QEvent *e) +void KisCanvasWidget::widgetGotEnterEvent(TQEvent *e) { emit sigGotEnterEvent(e); } -void KisCanvasWidget::widgetGotLeaveEvent(QEvent *e) +void KisCanvasWidget::widgetGotLeaveEvent(TQEvent *e) { emit sigGotLeaveEvent(e); } -void KisCanvasWidget::widgetGotWheelEvent(QWheelEvent *e) +void KisCanvasWidget::widgetGotWheelEvent(TQWheelEvent *e) { emit sigGotMouseWheelEvent(e); } -void KisCanvasWidget::widgetGotKeyPressEvent(QKeyEvent *e) +void KisCanvasWidget::widgetGotKeyPressEvent(TQKeyEvent *e) { emit sigGotKeyPressEvent(e); } -void KisCanvasWidget::widgetGotKeyReleaseEvent(QKeyEvent *e) +void KisCanvasWidget::widgetGotKeyReleaseEvent(TQKeyEvent *e) { emit sigGotKeyReleaseEvent(e); } -void KisCanvasWidget::widgetGotDragEnterEvent(QDragEnterEvent *e) +void KisCanvasWidget::widgetGotDragEnterEvent(TQDragEnterEvent *e) { emit sigGotDragEnterEvent(e); } -void KisCanvasWidget::widgetGotDropEvent(QDropEvent *e) +void KisCanvasWidget::widgetGotDropEvent(TQDropEvent *e) { emit sigGotDropEvent(e); } @@ -235,7 +235,7 @@ void KisCanvasWidget::moveEvent(KisMoveEvent *e) void KisCanvasWidget::buttonPressEvent(KisButtonPressEvent *e) { - QWidget *widget = dynamic_cast<QWidget *>(this); + TQWidget *widget = dynamic_cast<TQWidget *>(this); Q_ASSERT(widget != 0); if (widget) { @@ -291,7 +291,7 @@ void KisCanvasWidget::translateTabletEvent(KisEvent *e) m_lastPressure = e->pressure(); } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 void KisCanvasWidget::initX11Support() { @@ -302,25 +302,25 @@ void KisCanvasWidget::initX11Support() X11SupportInitialised = true; - Display *x11Display = QApplication::desktop()->x11Display(); + Display *x11Display = TQApplication::desktop()->x11Display(); - // Look at the modifier mapping and get the correct masks for alt/meta + // Look at the modifier mapping and get the correct tqmasks for alt/meta XModifierKeymap *map = XGetModifierMapping(x11Display); if (map) { int mapIndex = 0; - for (int maskIndex = 0; maskIndex < 8; maskIndex++) { + for (int tqmaskIndex = 0; tqmaskIndex < 8; tqmaskIndex++) { for (int i = 0; i < map->max_keypermod; i++) { if (map->modifiermap[mapIndex]) { KeySym sym = XKeycodeToKeysym(x11Display, map->modifiermap[mapIndex], 0); if (X11AltMask == 0 && (sym == XK_Alt_L || sym == XK_Alt_R)) { - X11AltMask = 1 << maskIndex; + X11AltMask = 1 << tqmaskIndex; } if (X11MetaMask == 0 && (sym == XK_Meta_L || sym == XK_Meta_R)) { - X11MetaMask = 1 << maskIndex; + X11MetaMask = 1 << tqmaskIndex; } } @@ -356,9 +356,9 @@ void KisCanvasWidget::initX11Support() tabletDevice.readSettingsFromConfig(); - QString lowerCaseName = tabletDevice.name().lower(); + TQString lowerCaseName = tabletDevice.name().lower(); - // Find the devices that Qt will use as its stylus and eraser devices. + // Find the devices that TQt will use as its stylus and eraser devices. if (!foundStylus || !foundEraser) { if (lowerCaseName.startsWith("stylus") || lowerCaseName.startsWith("pen")) { lastStylusSeen = device->id; @@ -411,7 +411,7 @@ void KisCanvasWidget::initX11Support() #endif // EXTENDED_X11_TABLET_SUPPORT } -Qt::ButtonState KisCanvasWidget::translateX11ButtonState(int state) +TQt::ButtonState KisCanvasWidget::translateX11ButtonState(int state) { int buttonState = 0; @@ -422,20 +422,20 @@ Qt::ButtonState KisCanvasWidget::translateX11ButtonState(int state) if (state & Button3Mask) buttonState |= Qt::RightButton; if (state & ShiftMask) - buttonState |= Qt::ShiftButton; + buttonState |= TQt::ShiftButton; if (state & ControlMask) - buttonState |= Qt::ControlButton; + buttonState |= TQt::ControlButton; if (state & X11AltMask) - buttonState |= Qt::AltButton; + buttonState |= TQt::AltButton; if (state & X11MetaMask) - buttonState |= Qt::MetaButton; + buttonState |= TQt::MetaButton; - return static_cast<Qt::ButtonState>(buttonState); + return static_cast<TQt::ButtonState>(buttonState); } -Qt::ButtonState KisCanvasWidget::translateX11Button(unsigned int X11Button) +TQt::ButtonState KisCanvasWidget::translateX11Button(unsigned int X11Button) { - Qt::ButtonState qtButton; + TQt::ButtonState qtButton; switch (X11Button) { case Button1: @@ -525,7 +525,7 @@ KisCanvasWidget::X11TabletDevice::X11TabletDevice(const XDeviceInfo *deviceInfo) m_proximityInEvent = -1; m_proximityOutEvent = -1; - m_XDevice = XOpenDevice(QApplication::desktop()->x11Display(), m_deviceId); + m_XDevice = XOpenDevice(TQApplication::desktop()->x11Display(), m_deviceId); if (m_XDevice != NULL) { for (int i = 0; i < m_XDevice->num_classes; i++) { @@ -554,7 +554,7 @@ KisCanvasWidget::X11TabletDevice::X11TabletDevice(const XDeviceInfo *deviceInfo) } } - // Note: We don't XCloseXDevice() since Qt will have already opened + // Note: We don't XCloseXDevice() since TQt will have already opened // it, and only one XCloseDevice() call closes it for all opens. } @@ -573,87 +573,87 @@ bool KisCanvasWidget::X11TabletDevice::enabled() const return m_enabled; } -Q_INT32 KisCanvasWidget::X11TabletDevice::numAxes() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::numAxes() const { return m_axisInfo.count(); } -void KisCanvasWidget::X11TabletDevice::setXAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setXAxis(TQ_INT32 axis) { m_xAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setYAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setYAxis(TQ_INT32 axis) { m_yAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setPressureAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setPressureAxis(TQ_INT32 axis) { m_pressureAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setXTiltAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setXTiltAxis(TQ_INT32 axis) { m_xTiltAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setYTiltAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setYTiltAxis(TQ_INT32 axis) { m_yTiltAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setWheelAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setWheelAxis(TQ_INT32 axis) { m_wheelAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setToolIDAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setToolIDAxis(TQ_INT32 axis) { m_toolIDAxis = axis; } -void KisCanvasWidget::X11TabletDevice::setSerialNumberAxis(Q_INT32 axis) +void KisCanvasWidget::X11TabletDevice::setSerialNumberAxis(TQ_INT32 axis) { m_serialNumberAxis = axis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::xAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::xAxis() const { return m_xAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::yAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::yAxis() const { return m_yAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::pressureAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::pressureAxis() const { return m_pressureAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::xTiltAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::xTiltAxis() const { return m_xTiltAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::yTiltAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::yTiltAxis() const { return m_yTiltAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::wheelAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::wheelAxis() const { return m_wheelAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::toolIDAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::toolIDAxis() const { return m_toolIDAxis; } -Q_INT32 KisCanvasWidget::X11TabletDevice::serialNumberAxis() const +TQ_INT32 KisCanvasWidget::X11TabletDevice::serialNumberAxis() const { return m_serialNumberAxis; } @@ -731,7 +731,7 @@ void KisCanvasWidget::X11TabletDevice::writeSettingsToConfig() cfg.setTabletDeviceAxis(m_name, "SerialNumberAxis", m_serialNumberAxis); } -void KisCanvasWidget::X11TabletDevice::enableEvents(QWidget *widget) const +void KisCanvasWidget::X11TabletDevice::enableEvents(TQWidget *widget) const { if (!m_eventClassList.isEmpty()) { int result = XSelectExtensionEvent(widget->x11AppDisplay(), widget->handle(), @@ -760,7 +760,7 @@ double KisCanvasWidget::X11TabletDevice::translateAxisValue(int value, const XAx } KisCanvasWidget::X11TabletDevice::State::State(const KisPoint& pos, double pressure, const KisVector2D& tilt, double wheel, - Q_UINT32 toolID, Q_UINT32 serialNumber) + TQ_UINT32 toolID, TQ_UINT32 serialNumber) : m_pos(pos), m_pressure(pressure), m_tilt(tilt), @@ -786,21 +786,21 @@ KisCanvasWidget::X11TabletDevice::State KisCanvasWidget::X11TabletDevice::transl } KisVector2D tilt = KisVector2D(0, 0); - Q_UINT32 toolID = 0; - Q_UINT32 serialNumber = 0; + TQ_UINT32 toolID = 0; + TQ_UINT32 serialNumber = 0; if (m_xTiltAxis != NoAxis) { // Latest wacom driver returns the tool id and serial number in // the upper 16 bits of the x and y tilts and wheel. - int xTiltAxisValue = (Q_INT16)(axisData[m_xTiltAxis] & 0xffff); - toolID = ((Q_UINT32)axisData[m_xTiltAxis] >> 16) & 0xffff; + int xTiltAxisValue = (TQ_INT16)(axisData[m_xTiltAxis] & 0xffff); + toolID = ((TQ_UINT32)axisData[m_xTiltAxis] >> 16) & 0xffff; tilt.setX(translateAxisValue(xTiltAxisValue, m_axisInfo[m_xTiltAxis])); } if (m_yTiltAxis != NoAxis) { - int yTiltAxisValue = (Q_INT16)(axisData[m_yTiltAxis] & 0xffff); - serialNumber = (Q_UINT32)axisData[m_yTiltAxis] & 0xffff0000; + int yTiltAxisValue = (TQ_INT16)(axisData[m_yTiltAxis] & 0xffff); + serialNumber = (TQ_UINT32)axisData[m_yTiltAxis] & 0xffff0000; tilt.setY(translateAxisValue(yTiltAxisValue, m_axisInfo[m_yTiltAxis])); } @@ -808,13 +808,13 @@ KisCanvasWidget::X11TabletDevice::State KisCanvasWidget::X11TabletDevice::transl double wheel = 0; if (m_wheelAxis != NoAxis) { - int wheelAxisValue = (Q_INT16)(axisData[m_wheelAxis] & 0xffff); - serialNumber |= ((Q_UINT32)axisData[m_wheelAxis] >> 16) & 0xffff; + int wheelAxisValue = (TQ_INT16)(axisData[m_wheelAxis] & 0xffff); + serialNumber |= ((TQ_UINT32)axisData[m_wheelAxis] >> 16) & 0xffff; wheel = translateAxisValue(wheelAxisValue, m_axisInfo[m_wheelAxis]); } - //QString ids; + //TQString ids; //ids.sprintf("Tool ID: %8x Serial Number: %8x", toolID, serialNumber); return State(pos, pressure, tilt, wheel, toolID, serialNumber); @@ -825,7 +825,7 @@ KisCanvasWidget::X11XIDTabletDeviceMap& KisCanvasWidget::tabletDeviceMap() return X11TabletDeviceMap; } -void KisCanvasWidget::selectTabletDeviceEvents(QWidget *widget) +void KisCanvasWidget::selectTabletDeviceEvents(TQWidget *widget) { for (X11XIDTabletDeviceMap::const_iterator it = X11TabletDeviceMap.begin(); it != X11TabletDeviceMap.end(); ++it) { @@ -839,20 +839,20 @@ void KisCanvasWidget::selectTabletDeviceEvents(QWidget *widget) #endif // EXTENDED_X11_TABLET_SUPPORT -bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QPoint widgetOriginPos) +bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, TQPoint widgetOriginPos) { if (event->type == MotionNotify) { // Mouse move if (!m_enableMoveEventCompressionHint) { XMotionEvent motion = event->xmotion; - QPoint globalPos(motion.x_root, motion.y_root); + TQPoint globalPos(motion.x_root, motion.y_root); if (globalPos.x() != m_lastRootX || globalPos.y() != m_lastRootY) { int state = translateX11ButtonState(motion.state); - QPoint pos(motion.x, motion.y); - QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, state); + TQPoint pos(motion.x, motion.y); + TQMouseEvent e(TQEvent::MouseMove, pos, globalPos, Qt::NoButton, state); widgetGotMouseMoveEvent(&e); } @@ -872,8 +872,8 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP // Tablet event. int deviceId; const int *axisData; - Qt::ButtonState button; - Qt::ButtonState buttonState; + TQt::ButtonState button; + TQt::ButtonState buttonState; if (event->type == X11DeviceMotionNotifyEvent) { // Tablet move @@ -922,7 +922,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP button = translateX11Button(buttonPressed->button); buttonState = translateX11ButtonState(buttonPressed->state); - if (QApplication::activePopupWidget() == 0) { + if (TQApplication::activePopupWidget() == 0) { XEvent mouseEvent; // Look for and swallow an accompanying core event, but only if there's @@ -945,7 +945,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP button = translateX11Button(buttonReleased->button); buttonState = translateX11ButtonState(buttonReleased->state); - if (QApplication::activePopupWidget() == 0) { + if (TQApplication::activePopupWidget() == 0) { XEvent mouseEvent; // Look for and swallow an accompanying core event, but only if there's @@ -961,7 +961,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP } } - X11XIDTabletDeviceMap::const_iterator it = X11TabletDeviceMap.find(deviceId); + X11XIDTabletDeviceMap::const_iterator it = X11TabletDeviceMap.tqfind(deviceId); if (it != X11TabletDeviceMap.end()) { @@ -971,7 +971,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP X11TabletDevice::State deviceState = tabletDevice.translateAxisData(axisData); // Map normalised position coordinates to screen coordinates - QDesktopWidget *desktop = QApplication::desktop(); + TQDesktopWidget *desktop = TQApplication::desktop(); KisPoint globalPos(deviceState.pos().x() * desktop->width(), deviceState.pos().y() * desktop->height()); // Convert screen coordinates to widget coordinates KisPoint pos = globalPos - KoPoint( widgetOriginPos ); @@ -994,8 +994,8 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, QP } } - // Consume the event even if the device is disabled otherwise Qt will - // process it and send a QTabletEvent. + // Consume the event even if the device is disabled otherwise TQt will + // process it and send a TQTabletEvent. return true; } else { @@ -1018,7 +1018,7 @@ KisInputDevice KisCanvasWidget::findActiveInputDevice() for (it = X11TabletDeviceMap.begin(); it != X11TabletDeviceMap.end(); ++it) { const X11TabletDevice& tabletDevice = (*it).second; - XDeviceState *deviceState = XQueryDeviceState(QApplication::desktop()->x11Display(), + XDeviceState *deviceState = XQueryDeviceState(TQApplication::desktop()->x11Display(), tabletDevice.xDevice()); // If your the laptop sleeps, and you remove the mouse from the usb @@ -1057,21 +1057,21 @@ KisInputDevice KisCanvasWidget::findActiveInputDevice() #endif // EXTENDED_X11_TABLET_SUPPORT -#endif // Q_WS_X11 +#endif // TQ_WS_X11 /*************************************************************************/ -#define QPAINTDEVICE_CANVAS_WIDGET false +#define TQPAINTDEVICE_CANVAS_WIDGET false #define OPENGL_CANVAS_WIDGET true -KisCanvas::KisCanvas(QWidget *parent, const char *name) +KisCanvas::KisCanvas(TQWidget *tqparent, const char *name) { - m_parent = parent; + m_parent = tqparent; m_name = name; m_enableMoveEventCompressionHint = false; m_canvasWidget = 0; m_useOpenGL = false; - createCanvasWidget(QPAINTDEVICE_CANVAS_WIDGET); + createCanvasWidget(TQPAINTDEVICE_CANVAS_WIDGET); } KisCanvas::~KisCanvas() @@ -1080,7 +1080,7 @@ KisCanvas::~KisCanvas() } #ifdef HAVE_GL -void KisCanvas::createCanvasWidget(bool useOpenGL, QGLWidget *sharedContextWidget) +void KisCanvas::createCanvasWidget(bool useOpenGL, TQGLWidget *sharedContextWidget) #else void KisCanvas::createCanvasWidget(bool useOpenGL) #endif @@ -1090,7 +1090,7 @@ void KisCanvas::createCanvasWidget(bool useOpenGL) #ifndef HAVE_GL useOpenGL = false; #else - if (useOpenGL && !QGLFormat::hasOpenGL()) { + if (useOpenGL && !TQGLFormat::hasOpenGL()) { kdDebug(41001) << "Tried to create OpenGL widget when system doesn't have OpenGL\n"; useOpenGL = false; } @@ -1100,15 +1100,15 @@ void KisCanvas::createCanvasWidget(bool useOpenGL) } else #endif { - m_canvasWidget = new KisQPaintDeviceCanvasWidget(m_parent, m_name.latin1()); + m_canvasWidget = new KisTQPaintDeviceCanvasWidget(m_parent, m_name.latin1()); } m_useOpenGL = useOpenGL; Q_CHECK_PTR(m_canvasWidget); - QWidget *widget = dynamic_cast<QWidget *>(m_canvasWidget); + TQWidget *widget = dynamic_cast<TQWidget *>(m_canvasWidget); - widget->setBackgroundMode(QWidget::NoBackground); + widget->setBackgroundMode(TQWidget::NoBackground); widget->setMouseTracking(true); widget->setAcceptDrops(true); m_canvasWidget->enableMoveEventCompressionHint(m_enableMoveEventCompressionHint); @@ -1117,27 +1117,27 @@ void KisCanvas::createCanvasWidget(bool useOpenGL) selectTabletDeviceEvents(); #endif - connect(m_canvasWidget, SIGNAL(sigGotPaintEvent(QPaintEvent *)), SIGNAL(sigGotPaintEvent(QPaintEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotEnterEvent(QEvent*)), SIGNAL(sigGotEnterEvent(QEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotLeaveEvent(QEvent*)), SIGNAL(sigGotLeaveEvent(QEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotMouseWheelEvent(QWheelEvent*)), SIGNAL(sigGotMouseWheelEvent(QWheelEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), SIGNAL(sigGotKeyPressEvent(QKeyEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotKeyReleaseEvent(QKeyEvent*)), SIGNAL(sigGotKeyReleaseEvent(QKeyEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotDragEnterEvent(QDragEnterEvent*)), SIGNAL(sigGotDragEnterEvent(QDragEnterEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotDropEvent(QDropEvent*)), SIGNAL(sigGotDropEvent(QDropEvent*))); - connect(m_canvasWidget, SIGNAL(sigGotMoveEvent(KisMoveEvent *)), SIGNAL(sigGotMoveEvent(KisMoveEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *)), SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *)), SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *))); - connect(m_canvasWidget, SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *)), SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotPaintEvent(TQPaintEvent *)), TQT_SIGNAL(sigGotPaintEvent(TQPaintEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotEnterEvent(TQEvent*)), TQT_SIGNAL(sigGotEnterEvent(TQEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotLeaveEvent(TQEvent*)), TQT_SIGNAL(sigGotLeaveEvent(TQEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotMouseWheelEvent(TQWheelEvent*)), TQT_SIGNAL(sigGotMouseWheelEvent(TQWheelEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotKeyReleaseEvent(TQKeyEvent*)), TQT_SIGNAL(sigGotKeyReleaseEvent(TQKeyEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotDragEnterEvent(TQDragEnterEvent*)), TQT_SIGNAL(sigGotDragEnterEvent(TQDragEnterEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotDropEvent(TQDropEvent*)), TQT_SIGNAL(sigGotDropEvent(TQDropEvent*))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent *)), TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *)), TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *)), TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent *))); + connect(m_canvasWidget, TQT_SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *)), TQT_SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent *))); } -void KisCanvas::createQPaintDeviceCanvas() +void KisCanvas::createTQPaintDeviceCanvas() { - createCanvasWidget(QPAINTDEVICE_CANVAS_WIDGET); + createCanvasWidget(TQPAINTDEVICE_CANVAS_WIDGET); } #ifdef HAVE_GL -void KisCanvas::createOpenGLCanvas(QGLWidget *sharedContextWidget) +void KisCanvas::createOpenGLCanvas(TQGLWidget *sharedContextWidget) { createCanvasWidget(OPENGL_CANVAS_WIDGET, sharedContextWidget); } @@ -1156,20 +1156,20 @@ void KisCanvas::enableMoveEventCompressionHint(bool enableMoveCompression) } } -QWidget *KisCanvas::QPaintDeviceWidget() const +TQWidget *KisCanvas::TQPaintDeviceWidget() const { if (m_useOpenGL) { return 0; } else { - return dynamic_cast<QWidget *>(m_canvasWidget); + return dynamic_cast<TQWidget *>(m_canvasWidget); } } #ifdef HAVE_GL -QGLWidget *KisCanvas::OpenGLWidget() const +TQGLWidget *KisCanvas::OpenGLWidget() const { if (m_useOpenGL) { - return dynamic_cast<QGLWidget *>(m_canvasWidget); + return dynamic_cast<TQGLWidget *>(m_canvasWidget); } else { return 0; } @@ -1190,115 +1190,115 @@ KisCanvasWidget *KisCanvas::canvasWidget() const void KisCanvas::setGeometry(int x, int y, int width, int height) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->setGeometry(x, y, width, height); + dynamic_cast<TQWidget *>(m_canvasWidget)->setGeometry(x, y, width, height); } void KisCanvas::show() { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->show(); + dynamic_cast<TQWidget *>(m_canvasWidget)->show(); } void KisCanvas::hide() { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->hide(); + dynamic_cast<TQWidget *>(m_canvasWidget)->hide(); } int KisCanvas::width() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast<QWidget *>(m_canvasWidget)->width(); + return dynamic_cast<TQWidget *>(m_canvasWidget)->width(); } int KisCanvas::height() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast<QWidget *>(m_canvasWidget)->height(); + return dynamic_cast<TQWidget *>(m_canvasWidget)->height(); } void KisCanvas::update() { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->update(); + dynamic_cast<TQWidget *>(m_canvasWidget)->update(); } -void KisCanvas::update(const QRect& r) +void KisCanvas::update(const TQRect& r) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->update(r); + dynamic_cast<TQWidget *>(m_canvasWidget)->update(r); } void KisCanvas::update(int x, int y, int width, int height) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->update(x, y, width, height); + dynamic_cast<TQWidget *>(m_canvasWidget)->update(x, y, width, height); } -void KisCanvas::repaint() +void KisCanvas::tqrepaint() { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->repaint(); + dynamic_cast<TQWidget *>(m_canvasWidget)->tqrepaint(); } -void KisCanvas::repaint(bool erase) +void KisCanvas::tqrepaint(bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->repaint(erase); + dynamic_cast<TQWidget *>(m_canvasWidget)->tqrepaint(erase); } -void KisCanvas::repaint(int x, int y, int width, int height, bool erase) +void KisCanvas::tqrepaint(int x, int y, int width, int height, bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->repaint(x, y, width, height, erase); + dynamic_cast<TQWidget *>(m_canvasWidget)->tqrepaint(x, y, width, height, erase); } -void KisCanvas::repaint(const QRect& r, bool erase) +void KisCanvas::tqrepaint(const TQRect& r, bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->repaint(r, erase); + dynamic_cast<TQWidget *>(m_canvasWidget)->tqrepaint(r, erase); } -void KisCanvas::repaint(const QRegion& r, bool erase) +void KisCanvas::tqrepaint(const TQRegion& r, bool erase) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->repaint(r, erase); + dynamic_cast<TQWidget *>(m_canvasWidget)->tqrepaint(r, erase); } bool KisCanvas::isUpdatesEnabled() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast<QWidget *>(m_canvasWidget)->isUpdatesEnabled(); + return dynamic_cast<TQWidget *>(m_canvasWidget)->isUpdatesEnabled(); } void KisCanvas::setUpdatesEnabled(bool updatesEnabled) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->setUpdatesEnabled(updatesEnabled); + dynamic_cast<TQWidget *>(m_canvasWidget)->setUpdatesEnabled(updatesEnabled); } void KisCanvas::updateGeometry() { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->updateGeometry(); + dynamic_cast<TQWidget *>(m_canvasWidget)->updateGeometry(); } -void KisCanvas::setFocusPolicy(QWidget::FocusPolicy focusPolicy) +void KisCanvas::setFocusPolicy(TQWidget::FocusPolicy focusPolicy) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->setFocusPolicy(focusPolicy); + dynamic_cast<TQWidget *>(m_canvasWidget)->setFocusPolicy(focusPolicy); } -const QCursor& KisCanvas::cursor() const +const TQCursor& KisCanvas::cursor() const { Q_ASSERT(m_canvasWidget); - return dynamic_cast<QWidget *>(m_canvasWidget)->cursor(); + return dynamic_cast<TQWidget *>(m_canvasWidget)->cursor(); } -void KisCanvas::setCursor(const QCursor& cursor) +void KisCanvas::setCursor(const TQCursor& cursor) { Q_ASSERT(m_canvasWidget); - dynamic_cast<QWidget *>(m_canvasWidget)->setCursor(cursor); + dynamic_cast<TQWidget *>(m_canvasWidget)->setCursor(cursor); } #if defined(EXTENDED_X11_TABLET_SUPPORT) @@ -1311,38 +1311,38 @@ void KisCanvas::selectTabletDeviceEvents() bool KisCanvas::cursorIsOverCanvas() const { - if (QApplication::activePopupWidget() != 0) { + if (TQApplication::activePopupWidget() != 0) { return false; } - if (QApplication::activeModalWidget() != 0) { + if (TQApplication::activeModalWidget() != 0) { return false; } - QWidget *canvasWidget = dynamic_cast<QWidget *>(m_canvasWidget); + TQWidget *canvasWidget = dynamic_cast<TQWidget *>(m_canvasWidget); Q_ASSERT(canvasWidget != 0); if (canvasWidget) { - if (QApplication::widgetAt(QCursor::pos(), true) == canvasWidget) { + if (TQApplication::widgetAt(TQCursor::pos(), true) == canvasWidget) { return true; } } return false; } -void KisCanvas::handleKeyEvent(QEvent *e) +void KisCanvas::handleKeyEvent(TQEvent *e) { - QKeyEvent *ke = dynamic_cast<QKeyEvent *>(e); + TQKeyEvent *ke = dynamic_cast<TQKeyEvent *>(e); Q_ASSERT(ke != 0); if (ke) { - QWidget *canvasWidget = dynamic_cast<QWidget *>(m_canvasWidget); + TQWidget *canvasWidget = dynamic_cast<TQWidget *>(m_canvasWidget); Q_ASSERT(canvasWidget != 0); if (canvasWidget) { canvasWidget->setFocus(); - if (e->type() == QEvent::KeyPress) { + if (e->type() == TQEvent::KeyPress) { emit sigGotKeyPressEvent(ke); } else { emit sigGotKeyReleaseEvent(ke); diff --git a/krita/ui/kis_canvas.h b/krita/ui/kis_canvas.h index b9e38738..aff09e65 100644 --- a/krita/ui/kis_canvas.h +++ b/krita/ui/kis_canvas.h @@ -24,21 +24,21 @@ #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> #ifdef HAVE_GL -#include <qgl.h> +#include <tqgl.h> #endif -#include <qpainter.h> +#include <tqpainter.h> #include "kis_global.h" #include "kis_point.h" #include "kis_vec.h" #include "kis_input_device.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 // Irix has a different (and better) XInput tablet driver to -// the XFree/xorg driver. Qt needs a separate code path for that +// the XFree/xorg driver. TQt needs a separate code path for that // and so would we. #if defined(HAVE_XINPUTEXT) && !defined(Q_OS_IRIX) #define EXTENDED_X11_TABLET_SUPPORT @@ -51,7 +51,7 @@ #include <X11/extensions/XInput.h> #endif -#endif // Q_WS_X11 +#endif // TQ_WS_X11 class KisEvent; class KisMoveEvent; @@ -60,8 +60,9 @@ class KisButtonReleaseEvent; class KisDoubleClickEvent; class KisCanvasWidgetPainter; -class KisCanvasWidget : public QObject { +class KisCanvasWidget : public TQObject { Q_OBJECT + TQ_OBJECT public: KisCanvasWidget(); @@ -78,41 +79,41 @@ public: static KisInputDevice findActiveInputDevice(); virtual void selectTabletDeviceEvents() = 0; - static void selectTabletDeviceEvents(QWidget *widget); + static void selectTabletDeviceEvents(TQWidget *widget); #endif -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 static void initX11Support(); #endif signals: - void sigGotPaintEvent(QPaintEvent*); - void sigGotEnterEvent(QEvent*); - void sigGotLeaveEvent(QEvent*); - void sigGotMouseWheelEvent(QWheelEvent*); - void sigGotKeyPressEvent(QKeyEvent*); - void sigGotKeyReleaseEvent(QKeyEvent*); - void sigGotDragEnterEvent(QDragEnterEvent*); - void sigGotDropEvent(QDropEvent*); + void sigGotPaintEvent(TQPaintEvent*); + void sigGotEnterEvent(TQEvent*); + void sigGotLeaveEvent(TQEvent*); + void sigGotMouseWheelEvent(TQWheelEvent*); + void sigGotKeyPressEvent(TQKeyEvent*); + void sigGotKeyReleaseEvent(TQKeyEvent*); + void sigGotDragEnterEvent(TQDragEnterEvent*); + void sigGotDropEvent(TQDropEvent*); void sigGotMoveEvent(KisMoveEvent *); void sigGotButtonPressEvent(KisButtonPressEvent *); void sigGotButtonReleaseEvent(KisButtonReleaseEvent *); void sigGotDoubleClickEvent(KisDoubleClickEvent *); protected: - void widgetGotPaintEvent(QPaintEvent *event); - void widgetGotMousePressEvent(QMouseEvent *event); - void widgetGotMouseReleaseEvent(QMouseEvent *event); - void widgetGotMouseDoubleClickEvent(QMouseEvent *event); - void widgetGotMouseMoveEvent(QMouseEvent *event); - void widgetGotTabletEvent(QTabletEvent *event); - void widgetGotEnterEvent(QEvent *event ); - void widgetGotLeaveEvent(QEvent *event); - void widgetGotWheelEvent(QWheelEvent *event); - void widgetGotKeyPressEvent(QKeyEvent *event); - void widgetGotKeyReleaseEvent(QKeyEvent *event); - void widgetGotDragEnterEvent(QDragEnterEvent *event); - void widgetGotDropEvent(QDropEvent *event); + void widgetGotPaintEvent(TQPaintEvent *event); + void widgetGotMousePressEvent(TQMouseEvent *event); + void widgetGotMouseReleaseEvent(TQMouseEvent *event); + void widgetGotMouseDoubleClickEvent(TQMouseEvent *event); + void widgetGotMouseMoveEvent(TQMouseEvent *event); + void widgetGotTabletEvent(TQTabletEvent *event); + void widgetGotEnterEvent(TQEvent *event ); + void widgetGotLeaveEvent(TQEvent *event); + void widgetGotWheelEvent(TQWheelEvent *event); + void widgetGotKeyPressEvent(TQKeyEvent *event); + void widgetGotKeyReleaseEvent(TQKeyEvent *event); + void widgetGotDragEnterEvent(TQDragEnterEvent *event); + void widgetGotDropEvent(TQDropEvent *event); void moveEvent(KisMoveEvent *event); void buttonPressEvent(KisButtonPressEvent *event); void buttonReleaseEvent(KisButtonReleaseEvent *event); @@ -124,18 +125,18 @@ protected: bool m_enableMoveEventCompressionHint; double m_lastPressure; -#ifdef Q_WS_X11 - // On X11 systems, Qt throws away mouse move events if the application +#ifdef TQ_WS_X11 + // On X11 systems, TQt throws away mouse move events if the application // is unable to keep up with them. We override this behaviour so that // we receive all move events, so that painting follows the mouse's motion // accurately. - bool x11Event(XEvent *event, Display *x11Display, WId winId, QPoint widgetOriginPos); - static Qt::ButtonState translateX11ButtonState(int state); - static Qt::ButtonState translateX11Button(unsigned int button); + bool x11Event(XEvent *event, Display *x11Display, WId winId, TQPoint widgetOriginPos); + static TQt::ButtonState translateX11ButtonState(int state); + static TQt::ButtonState translateX11Button(unsigned int button); static bool X11SupportInitialised; - // Modifier masks for alt/meta - detected at run-time + // Modifier tqmasks for alt/meta - detected at run-time static long X11AltMask; static long X11MetaMask; @@ -155,7 +156,7 @@ public: XID id() const { return m_deviceId; } XDevice *xDevice() const { return m_XDevice; } - QString name() const { return m_name; } + TQString name() const { return m_name; } KisInputDevice inputDevice() const { return m_inputDevice; } void setInputDevice(KisInputDevice inputDevice) { m_inputDevice = inputDevice; } @@ -163,28 +164,28 @@ public: void setEnabled(bool enabled); bool enabled() const; - Q_INT32 numAxes() const; - - void setXAxis(Q_INT32 axis); - void setYAxis(Q_INT32 axis); - void setPressureAxis(Q_INT32 axis); - void setXTiltAxis(Q_INT32 axis); - void setYTiltAxis(Q_INT32 axis); - void setWheelAxis(Q_INT32 axis); - void setToolIDAxis(Q_INT32 axis); - void setSerialNumberAxis(Q_INT32 axis); - - static const Q_INT32 NoAxis = -1; - static const Q_INT32 DefaultAxis = -2; - - Q_INT32 xAxis() const; - Q_INT32 yAxis() const; - Q_INT32 pressureAxis() const; - Q_INT32 xTiltAxis() const; - Q_INT32 yTiltAxis() const; - Q_INT32 wheelAxis() const; - Q_INT32 toolIDAxis() const; - Q_INT32 serialNumberAxis() const; + TQ_INT32 numAxes() const; + + void setXAxis(TQ_INT32 axis); + void setYAxis(TQ_INT32 axis); + void setPressureAxis(TQ_INT32 axis); + void setXTiltAxis(TQ_INT32 axis); + void setYTiltAxis(TQ_INT32 axis); + void setWheelAxis(TQ_INT32 axis); + void setToolIDAxis(TQ_INT32 axis); + void setSerialNumberAxis(TQ_INT32 axis); + + static const TQ_INT32 NoAxis = -1; + static const TQ_INT32 DefaultAxis = -2; + + TQ_INT32 xAxis() const; + TQ_INT32 yAxis() const; + TQ_INT32 pressureAxis() const; + TQ_INT32 xTiltAxis() const; + TQ_INT32 yTiltAxis() const; + TQ_INT32 wheelAxis() const; + TQ_INT32 toolIDAxis() const; + TQ_INT32 serialNumberAxis() const; void readSettingsFromConfig(); void writeSettingsToConfig(); @@ -196,14 +197,14 @@ public: int proximityInEvent() const { return m_proximityInEvent; } int proximityOutEvent() const { return m_proximityOutEvent; } - void enableEvents(QWidget *widget) const; + void enableEvents(TQWidget *widget) const; class State { public: State() {} State(const KisPoint& pos, double pressure, const KisVector2D& tilt, double wheel, - Q_UINT32 toolID, Q_UINT32 serialNumber); + TQ_UINT32 toolID, TQ_UINT32 serialNumber); // Position, pressure and wheel are normalised to 0 - 1 KisPoint pos() const { return m_pos; } @@ -212,16 +213,16 @@ public: KisVector2D tilt() const { return m_tilt; } double wheel() const { return m_wheel; } // Wacom tool id and serial number of device. - Q_UINT32 toolID() const { return m_toolID; } - Q_UINT32 serialNumber() const { return m_serialNumber; } + TQ_UINT32 toolID() const { return m_toolID; } + TQ_UINT32 serialNumber() const { return m_serialNumber; } private: KisPoint m_pos; double m_pressure; KisVector2D m_tilt; double m_wheel; - Q_UINT32 m_toolID; - Q_UINT32 m_serialNumber; + TQ_UINT32 m_toolID; + TQ_UINT32 m_serialNumber; }; State translateAxisData(const int *axisData) const; @@ -232,23 +233,23 @@ public: XID m_deviceId; XDevice *m_XDevice; - QString m_name; + TQString m_name; bool m_mightBeTabletDevice; KisInputDevice m_inputDevice; bool m_enabled; - Q_INT32 m_xAxis; - Q_INT32 m_yAxis; - Q_INT32 m_pressureAxis; - Q_INT32 m_xTiltAxis; - Q_INT32 m_yTiltAxis; - Q_INT32 m_wheelAxis; - Q_INT32 m_toolIDAxis; - Q_INT32 m_serialNumberAxis; + TQ_INT32 m_xAxis; + TQ_INT32 m_yAxis; + TQ_INT32 m_pressureAxis; + TQ_INT32 m_xTiltAxis; + TQ_INT32 m_yTiltAxis; + TQ_INT32 m_wheelAxis; + TQ_INT32 m_toolIDAxis; + TQ_INT32 m_serialNumberAxis; - QValueVector<XAxisInfo> m_axisInfo; + TQValueVector<XAxisInfo> m_axisInfo; int m_motionNotifyEvent; int m_buttonPressEvent; @@ -256,7 +257,7 @@ public: int m_proximityInEvent; int m_proximityOutEvent; - QValueVector<XEventClass> m_eventClassList; + TQValueVector<XEventClass> m_eventClassList; }; typedef std::map<XID, X11TabletDevice> X11XIDTabletDeviceMap; @@ -273,14 +274,15 @@ protected: #endif // EXTENDED_X11_TABLET_SUPPORT -#endif // Q_WS_X11 +#endif // TQ_WS_X11 }; -class KisCanvas : public QObject { +class KisCanvas : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisCanvas(QWidget *parent, const char *name); + KisCanvas(TQWidget *tqparent, const char *name); virtual ~KisCanvas(); // When enabled, the canvas may throw away move events if the application @@ -299,19 +301,19 @@ public: * Handle the given event (which must be a key event) as if the canvas * had received it directly. */ - void handleKeyEvent(QEvent *e); + void handleKeyEvent(TQEvent *e); int width() const; int height() const; void update(); - void update(const QRect& r); + void update(const TQRect& r); void update(int x, int y, int width, int height); - void repaint(); - void repaint(bool erase); - void repaint(int x, int y, int width, int height, bool erase = true); - void repaint(const QRect& r, bool erase = true); - void repaint(const QRegion& r, bool erase = true); + void tqrepaint(); + void tqrepaint(bool erase); + void tqrepaint(int x, int y, int width, int height, bool erase = true); + void tqrepaint(const TQRect& r, bool erase = true); + void tqrepaint(const TQRegion& r, bool erase = true); void updateGeometry(); @@ -320,14 +322,14 @@ public: #endif signals: - void sigGotPaintEvent(QPaintEvent*); - void sigGotEnterEvent(QEvent*); - void sigGotLeaveEvent(QEvent*); - void sigGotMouseWheelEvent(QWheelEvent*); - void sigGotKeyPressEvent(QKeyEvent*); - void sigGotKeyReleaseEvent(QKeyEvent*); - void sigGotDragEnterEvent(QDragEnterEvent*); - void sigGotDropEvent(QDropEvent*); + void sigGotPaintEvent(TQPaintEvent*); + void sigGotEnterEvent(TQEvent*); + void sigGotLeaveEvent(TQEvent*); + void sigGotMouseWheelEvent(TQWheelEvent*); + void sigGotKeyPressEvent(TQKeyEvent*); + void sigGotKeyReleaseEvent(TQKeyEvent*); + void sigGotDragEnterEvent(TQDragEnterEvent*); + void sigGotDropEvent(TQDropEvent*); void sigGotMoveEvent(KisMoveEvent *); void sigGotButtonPressEvent(KisButtonPressEvent *); void sigGotButtonReleaseEvent(KisButtonReleaseEvent *); @@ -339,15 +341,15 @@ protected: friend class KisView; friend class KisCanvasPainter; - // One of these will be valid, the other null. In Qt3, using a QPainter on - // a QGLWidget is not reliable. - QWidget *QPaintDeviceWidget() const; + // One of these will be valid, the other null. In TQt3, using a TQPainter on + // a TQGLWidget is not reliable. + TQWidget *TQPaintDeviceWidget() const; #ifdef HAVE_GL - QGLWidget *OpenGLWidget() const; + TQGLWidget *OpenGLWidget() const; #endif - void createQPaintDeviceCanvas(); + void createTQPaintDeviceCanvas(); #ifdef HAVE_GL - void createOpenGLCanvas(QGLWidget *sharedContextWidget); + void createOpenGLCanvas(TQGLWidget *sharedContextWidget); #endif void show(); void hide(); @@ -356,22 +358,22 @@ protected: void setUpdatesEnabled(bool updatesEnabled); bool isUpdatesEnabled() const; - void setFocusPolicy(QWidget::FocusPolicy focusPolicy); + void setFocusPolicy(TQWidget::FocusPolicy focusPolicy); - const QCursor& cursor() const; - void setCursor(const QCursor& cursor); + const TQCursor& cursor() const; + void setCursor(const TQCursor& cursor); KisCanvasWidgetPainter *createPainter(); KisCanvasWidget *canvasWidget() const; protected: #ifdef HAVE_GL - void createCanvasWidget(bool useOpenGL, QGLWidget *sharedContextWidget = 0); + void createCanvasWidget(bool useOpenGL, TQGLWidget *sharedContextWidget = 0); #else void createCanvasWidget(bool useOpenGL); #endif - QWidget *m_parent; - QString m_name; + TQWidget *m_parent; + TQString m_name; KisCanvasWidget *m_canvasWidget; bool m_enableMoveEventCompressionHint; bool m_useOpenGL; diff --git a/krita/ui/kis_canvas_painter.cc b/krita/ui/kis_canvas_painter.cc index f9103e65..51338b42 100644 --- a/krita/ui/kis_canvas_painter.cc +++ b/krita/ui/kis_canvas_painter.cc @@ -41,31 +41,31 @@ void KisCanvasWidgetPainter::restore() { } -QFontMetrics KisCanvasWidgetPainter::fontMetrics() const +TQFontMetrics KisCanvasWidgetPainter::fontMetrics() const { - return QFontMetrics(QFont()); + return TQFontMetrics(TQFont()); } -QFontInfo KisCanvasWidgetPainter::fontInfo() const +TQFontInfo KisCanvasWidgetPainter::fontInfo() const { - return QFontInfo(QFont()); + return TQFontInfo(TQFont()); } -const QFont& KisCanvasWidgetPainter::font() const +const TQFont& KisCanvasWidgetPainter::font() const { return m_defaultFont; } -void KisCanvasWidgetPainter::setFont(const QFont& /*font*/) +void KisCanvasWidgetPainter::setFont(const TQFont& /*font*/) { } -const QPen& KisCanvasWidgetPainter::pen() const +const TQPen& KisCanvasWidgetPainter::pen() const { return m_defaultPen; } -void KisCanvasWidgetPainter::setPen(const QPen& /*pen*/) +void KisCanvasWidgetPainter::setPen(const TQPen& /*pen*/) { } @@ -73,60 +73,60 @@ void KisCanvasWidgetPainter::setPen(Qt::PenStyle /*penStyle*/) { } -void KisCanvasWidgetPainter::setPen(const QColor& /*color*/) +void KisCanvasWidgetPainter::setPen(const TQColor& /*color*/) { } -const QBrush& KisCanvasWidgetPainter::brush() const +const TQBrush& KisCanvasWidgetPainter::brush() const { return m_defaultBrush; } -void KisCanvasWidgetPainter::setBrush(const QBrush& /*brush*/) +void KisCanvasWidgetPainter::setBrush(const TQBrush& /*brush*/) { } -void KisCanvasWidgetPainter::setBrush(Qt::BrushStyle /*brushStyle*/) +void KisCanvasWidgetPainter::setBrush(TQt::BrushStyle /*brushStyle*/) { } -void KisCanvasWidgetPainter::setBrush(const QColor& /*color*/) +void KisCanvasWidgetPainter::setBrush(const TQColor& /*color*/) { } -QPoint KisCanvasWidgetPainter::pos() const +TQPoint KisCanvasWidgetPainter::pos() const { - return QPoint(); + return TQPoint(); } -const QColor& KisCanvasWidgetPainter::backgroundColor() const +const TQColor& KisCanvasWidgetPainter::backgroundColor() const { return m_defaultColor; } -void KisCanvasWidgetPainter::setBackgroundColor(const QColor& /*color*/) +void KisCanvasWidgetPainter::setBackgroundColor(const TQColor& /*color*/) { } -Qt::Qt::BGMode KisCanvasWidgetPainter::backgroundMode() const +TQt::Qt::BGMode KisCanvasWidgetPainter::backgroundMode() const { - return Qt::TransparentMode; + return TQt::TransparentMode; } -void KisCanvasWidgetPainter::setBackgroundMode(Qt::Qt::BGMode /*bgMode*/) +void KisCanvasWidgetPainter::setBackgroundMode(TQt::Qt::BGMode /*bgMode*/) { } -Qt::Qt::RasterOp KisCanvasWidgetPainter::rasterOp() const +TQt::TQt::RasterOp KisCanvasWidgetPainter::rasterOp() const { - return Qt::CopyROP; + return TQt::CopyROP; } -void KisCanvasWidgetPainter::setRasterOp(Qt::RasterOp /*rasterOp*/) +void KisCanvasWidgetPainter::setRasterOp(TQt::RasterOp /*rasterOp*/) { } -const QPoint& KisCanvasWidgetPainter::brushOrigin() const +const TQPoint& KisCanvasWidgetPainter::brushOrigin() const { return m_defaultBrushOrigin; } @@ -135,7 +135,7 @@ void KisCanvasWidgetPainter::setBrushOrigin(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::setBrushOrigin(const QPoint& /*origin*/) +void KisCanvasWidgetPainter::setBrushOrigin(const TQPoint& /*origin*/) { } @@ -153,12 +153,12 @@ void KisCanvasWidgetPainter::setViewXForm(bool /*enable*/) { } -QRect KisCanvasWidgetPainter::window() const +TQRect KisCanvasWidgetPainter::window() const { - return QRect(); + return TQRect(); } -void KisCanvasWidgetPainter::setWindow(const QRect& /*r*/) +void KisCanvasWidgetPainter::setWindow(const TQRect& /*r*/) { } @@ -166,12 +166,12 @@ void KisCanvasWidgetPainter::setWindow(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -QRect KisCanvasWidgetPainter::viewport() const +TQRect KisCanvasWidgetPainter::viewport() const { - return QRect(); + return TQRect(); } -void KisCanvasWidgetPainter::setViewport(const QRect& /*r*/) +void KisCanvasWidgetPainter::setViewport(const TQRect& /*r*/) { } @@ -184,12 +184,12 @@ void KisCanvasWidgetPainter::setWorldXForm(bool /*enable*/) { } -const QWMatrix& KisCanvasWidgetPainter::worldMatrix() const +const TQWMatrix& KisCanvasWidgetPainter::tqworldMatrix() const { return m_defaultWorldMatrix; } -void KisCanvasWidgetPainter::setWorldMatrix(const QWMatrix& /*matrix*/, bool /*combine*/) +void KisCanvasWidgetPainter::setWorldMatrix(const TQWMatrix& /*matrix*/, bool /*combine*/) { } @@ -231,42 +231,42 @@ double KisCanvasWidgetPainter::translationY() const return 0; } -QPoint KisCanvasWidgetPainter::xForm(const QPoint& point) const +TQPoint KisCanvasWidgetPainter::xForm(const TQPoint& point) const { return point; } -QRect KisCanvasWidgetPainter::xForm(const QRect& r) const +TQRect KisCanvasWidgetPainter::xForm(const TQRect& r) const { return r; } -QPointArray KisCanvasWidgetPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisCanvasWidgetPainter::xForm(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisCanvasWidgetPainter::xForm(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisCanvasWidgetPainter::xForm(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } -QPoint KisCanvasWidgetPainter::xFormDev(const QPoint& point) const +TQPoint KisCanvasWidgetPainter::xFormDev(const TQPoint& point) const { return point; } -QRect KisCanvasWidgetPainter::xFormDev(const QRect& r) const +TQRect KisCanvasWidgetPainter::xFormDev(const TQRect& r) const { return r; } -QPointArray KisCanvasWidgetPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisCanvasWidgetPainter::xFormDev(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisCanvasWidgetPainter::xFormDev(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisCanvasWidgetPainter::xFormDev(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } @@ -280,20 +280,20 @@ bool KisCanvasWidgetPainter::hasClipping() const return true; } -QRegion KisCanvasWidgetPainter::clipRegion(QPainter::CoordinateMode /*mode*/) const +TQRegion KisCanvasWidgetPainter::clipRegion(TQPainter::CoordinateMode /*mode*/) const { - return QRegion(); + return TQRegion(); } -void KisCanvasWidgetPainter::setClipRect(const QRect& /*r*/, QPainter::CoordinateMode /*mode*/) +void KisCanvasWidgetPainter::setClipRect(const TQRect& /*r*/, TQPainter::CoordinateMode /*mode*/) { } -void KisCanvasWidgetPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, QPainter::CoordinateMode /*mode*/) +void KisCanvasWidgetPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, TQPainter::CoordinateMode /*mode*/) { } -void KisCanvasWidgetPainter::setClipRegion(const QRegion& /*rgn*/, QPainter::CoordinateMode /*mode*/) +void KisCanvasWidgetPainter::setClipRegion(const TQRegion& /*rgn*/, TQPainter::CoordinateMode /*mode*/) { } @@ -301,11 +301,11 @@ void KisCanvasWidgetPainter::drawPoint(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::drawPoint(const QPoint& /*point*/) +void KisCanvasWidgetPainter::drawPoint(const TQPoint& /*point*/) { } -void KisCanvasWidgetPainter::drawPoints(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawPoints(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } @@ -313,7 +313,7 @@ void KisCanvasWidgetPainter::moveTo(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::moveTo(const QPoint& /*point*/) +void KisCanvasWidgetPainter::moveTo(const TQPoint& /*point*/) { } @@ -321,7 +321,7 @@ void KisCanvasWidgetPainter::lineTo(int /*x*/, int /*y*/) { } -void KisCanvasWidgetPainter::lineTo(const QPoint& /*point*/) +void KisCanvasWidgetPainter::lineTo(const TQPoint& /*point*/) { } @@ -329,7 +329,7 @@ void KisCanvasWidgetPainter::drawLine(int /*x1*/, int /*y1*/, int /*x2*/, int /* { } -void KisCanvasWidgetPainter::drawLine(const QPoint& /*start*/, const QPoint& /*end*/) +void KisCanvasWidgetPainter::drawLine(const TQPoint& /*start*/, const TQPoint& /*end*/) { } @@ -337,7 +337,7 @@ void KisCanvasWidgetPainter::drawRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/ { } -void KisCanvasWidgetPainter::drawRect(const QRect& /*r*/) +void KisCanvasWidgetPainter::drawRect(const TQRect& /*r*/) { } @@ -345,15 +345,15 @@ void KisCanvasWidgetPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, i { } -void KisCanvasWidgetPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QColor& /*bgColor*/) +void KisCanvasWidgetPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQColor& /*bgColor*/) { } -void KisCanvasWidgetPainter::drawWinFocusRect(const QRect& /*r*/) +void KisCanvasWidgetPainter::drawWinFocusRect(const TQRect& /*r*/) { } -void KisCanvasWidgetPainter::drawWinFocusRect(const QRect& /*r*/, const QColor& /*bgColor*/) +void KisCanvasWidgetPainter::drawWinFocusRect(const TQRect& /*r*/, const TQColor& /*bgColor*/) { } @@ -361,7 +361,7 @@ void KisCanvasWidgetPainter::drawRoundRect(int /*x*/, int /*y*/, int /*w*/, int { } -void KisCanvasWidgetPainter::drawRoundRect(const QRect& /*r*/, int /*xRnd*/, int /*yRnd*/) +void KisCanvasWidgetPainter::drawRoundRect(const TQRect& /*r*/, int /*xRnd*/, int /*yRnd*/) { } @@ -369,7 +369,7 @@ void KisCanvasWidgetPainter::drawEllipse(int /*x*/, int /*y*/, int /*w*/, int /* { } -void KisCanvasWidgetPainter::drawEllipse(const QRect& /*r*/) +void KisCanvasWidgetPainter::drawEllipse(const TQRect& /*r*/) { } @@ -377,7 +377,7 @@ void KisCanvasWidgetPainter::drawArc(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisCanvasWidgetPainter::drawArc(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisCanvasWidgetPainter::drawArc(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -385,7 +385,7 @@ void KisCanvasWidgetPainter::drawPie(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisCanvasWidgetPainter::drawPie(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisCanvasWidgetPainter::drawPie(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -393,79 +393,79 @@ void KisCanvasWidgetPainter::drawChord(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisCanvasWidgetPainter::drawChord(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisCanvasWidgetPainter::drawChord(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } -void KisCanvasWidgetPainter::drawLineSegments(const QPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) +void KisCanvasWidgetPainter::drawLineSegments(const TQPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) { } -void KisCanvasWidgetPainter::drawPolyline(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawPolyline(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } -void KisCanvasWidgetPainter::drawPolygon(const QPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawPolygon(const TQPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) { } -void KisCanvasWidgetPainter::drawConvexPolygon(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisCanvasWidgetPainter::drawConvexPolygon(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } -void KisCanvasWidgetPainter::drawCubicBezier(const QPointArray& /*pointArray*/, int /*index*/) +void KisCanvasWidgetPainter::drawCubicBezier(const TQPointArray& /*pointArray*/, int /*index*/) { } -void KisCanvasWidgetPainter::drawPixmap(int /*x*/, int /*y*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) +void KisCanvasWidgetPainter::drawPixmap(int /*x*/, int /*y*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) { } -void KisCanvasWidgetPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/, const QRect& /*sr*/) +void KisCanvasWidgetPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/, const TQRect& /*sr*/) { } -void KisCanvasWidgetPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/) +void KisCanvasWidgetPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/) { } -void KisCanvasWidgetPainter::drawPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisCanvasWidgetPainter::drawPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisCanvasWidgetPainter::drawImage(int /*x*/, int /*y*/, const QImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) +void KisCanvasWidgetPainter::drawImage(int /*x*/, int /*y*/, const TQImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) { } -void KisCanvasWidgetPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, const QRect& /*sr*/, int /*conversionFlags*/) +void KisCanvasWidgetPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, const TQRect& /*sr*/, int /*conversionFlags*/) { } -void KisCanvasWidgetPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, int /*conversion_flags*/) +void KisCanvasWidgetPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, int /*conversion_flags*/) { } -void KisCanvasWidgetPainter::drawImage(const QRect& /*r*/, const QImage& /*image*/) +void KisCanvasWidgetPainter::drawImage(const TQRect& /*r*/, const TQImage& /*image*/) { } -void KisCanvasWidgetPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) +void KisCanvasWidgetPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) { } -void KisCanvasWidgetPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/, const QPoint& /*point*/) +void KisCanvasWidgetPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/, const TQPoint& /*point*/) { } -void KisCanvasWidgetPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisCanvasWidgetPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisCanvasWidgetPainter::fillRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QBrush& /*brush*/) +void KisCanvasWidgetPainter::fillRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQBrush& /*brush*/) { } -void KisCanvasWidgetPainter::fillRect(const QRect& /*r*/, const QBrush& /*brush*/) +void KisCanvasWidgetPainter::fillRect(const TQRect& /*r*/, const TQBrush& /*brush*/) { } @@ -473,50 +473,50 @@ void KisCanvasWidgetPainter::eraseRect(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisCanvasWidgetPainter::eraseRect(const QRect& /*r*/) +void KisCanvasWidgetPainter::eraseRect(const TQRect& /*r*/) { } -void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisCanvasWidgetPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisCanvasWidgetPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisCanvasWidgetPainter::drawText(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisCanvasWidgetPainter::drawText(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisCanvasWidgetPainter::drawTextItem(int /*x*/, int /*y*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisCanvasWidgetPainter::tqdrawTextItem(int /*x*/, int /*y*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -void KisCanvasWidgetPainter::drawTextItem(const QPoint& /*p*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisCanvasWidgetPainter::tqdrawTextItem(const TQPoint& /*p*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -QRect KisCanvasWidgetPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisCanvasWidgetPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } -QRect KisCanvasWidgetPainter::boundingRect(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisCanvasWidgetPainter::boundingRect(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } int KisCanvasWidgetPainter::tabStops() const @@ -549,9 +549,9 @@ KisCanvasPainter::KisCanvasPainter(KisCanvas *canvas) m_canvasWidgetPainter = canvas->createPainter(); } -KisCanvasPainter::KisCanvasPainter(const QPaintDevice *paintDevice) +KisCanvasPainter::KisCanvasPainter(const TQPaintDevice *paintDevice) { - m_canvasWidgetPainter = new KisQPaintDeviceCanvasPainter(paintDevice); + m_canvasWidgetPainter = new KisTQPaintDeviceCanvasPainter(paintDevice); } KisCanvasPainter::~KisCanvasPainter() @@ -566,11 +566,11 @@ bool KisCanvasPainter::begin(KisCanvas *canvas, bool unclipped) return m_canvasWidgetPainter->begin(canvas->canvasWidget(), unclipped); } -bool KisCanvasPainter::begin(const QPaintDevice *paintDevice, bool unclipped) +bool KisCanvasPainter::begin(const TQPaintDevice *paintDevice, bool unclipped) { delete m_canvasWidgetPainter; - m_canvasWidgetPainter = new KisQPaintDeviceCanvasPainter(); - return static_cast<KisQPaintDeviceCanvasPainter *>(m_canvasWidgetPainter)->begin(paintDevice, unclipped); + m_canvasWidgetPainter = new KisTQPaintDeviceCanvasPainter(); + return static_cast<KisTQPaintDeviceCanvasPainter *>(m_canvasWidgetPainter)->begin(paintDevice, unclipped); } bool KisCanvasPainter::end() @@ -595,23 +595,23 @@ void KisCanvasPainter::restore() } } -QFontMetrics KisCanvasPainter::fontMetrics() const +TQFontMetrics KisCanvasPainter::fontMetrics() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->fontMetrics(); } - return QFontMetrics(QFont()); + return TQFontMetrics(TQFont()); } -QFontInfo KisCanvasPainter::fontInfo() const +TQFontInfo KisCanvasPainter::fontInfo() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->fontInfo(); } - return QFontInfo(QFont()); + return TQFontInfo(TQFont()); } -const QFont& KisCanvasPainter::font() const +const TQFont& KisCanvasPainter::font() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->font(); @@ -619,14 +619,14 @@ const QFont& KisCanvasPainter::font() const return m_defaultFont; } -void KisCanvasPainter::setFont(const QFont& font) +void KisCanvasPainter::setFont(const TQFont& font) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setFont(font); } } -const QPen& KisCanvasPainter::pen() const +const TQPen& KisCanvasPainter::pen() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->pen(); @@ -634,7 +634,7 @@ const QPen& KisCanvasPainter::pen() const return m_defaultPen; } -void KisCanvasPainter::setPen(const QPen& pen) +void KisCanvasPainter::setPen(const TQPen& pen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setPen(pen); @@ -648,14 +648,14 @@ void KisCanvasPainter::setPen(Qt::PenStyle penStyle) } } -void KisCanvasPainter::setPen(const QColor& color) +void KisCanvasPainter::setPen(const TQColor& color) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setPen(color);; } } -const QBrush& KisCanvasPainter::brush() const +const TQBrush& KisCanvasPainter::brush() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->brush(); @@ -663,36 +663,36 @@ const QBrush& KisCanvasPainter::brush() const return m_defaultBrush; } -void KisCanvasPainter::setBrush(const QBrush& brush) +void KisCanvasPainter::setBrush(const TQBrush& brush) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrush(brush); } } -void KisCanvasPainter::setBrush(Qt::BrushStyle brushStyle) +void KisCanvasPainter::setBrush(TQt::BrushStyle brushStyle) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrush(brushStyle); } } -void KisCanvasPainter::setBrush(const QColor& color) +void KisCanvasPainter::setBrush(const TQColor& color) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrush(color); } } -QPoint KisCanvasPainter::pos() const +TQPoint KisCanvasPainter::pos() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->pos(); } - return QPoint(); + return TQPoint(); } -const QColor& KisCanvasPainter::backgroundColor() const +const TQColor& KisCanvasPainter::backgroundColor() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->backgroundColor(); @@ -700,7 +700,7 @@ const QColor& KisCanvasPainter::backgroundColor() const return m_defaultColor; } -void KisCanvasPainter::setBackgroundColor(const QColor& color) +void KisCanvasPainter::setBackgroundColor(const TQColor& color) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBackgroundColor(color); @@ -712,7 +712,7 @@ Qt::BGMode KisCanvasPainter::backgroundMode() const if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->backgroundMode(); } - return Qt::TransparentMode; + return TQt::TransparentMode; } void KisCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) @@ -722,22 +722,22 @@ void KisCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) } } -Qt::RasterOp KisCanvasPainter::rasterOp() const +TQt::RasterOp KisCanvasPainter::rasterOp() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->rasterOp(); } - return Qt::CopyROP; + return TQt::CopyROP; } -void KisCanvasPainter::setRasterOp(Qt::RasterOp rasterOp) +void KisCanvasPainter::setRasterOp(TQt::RasterOp rasterOp) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setRasterOp(rasterOp); } } -const QPoint& KisCanvasPainter::brushOrigin() const +const TQPoint& KisCanvasPainter::brushOrigin() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->brushOrigin(); @@ -752,7 +752,7 @@ void KisCanvasPainter::setBrushOrigin(int x, int y) } } -void KisCanvasPainter::setBrushOrigin(const QPoint& origin) +void KisCanvasPainter::setBrushOrigin(const TQPoint& origin) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setBrushOrigin(origin); @@ -782,15 +782,15 @@ void KisCanvasPainter::setViewXForm(bool enable) } } -QRect KisCanvasPainter::window() const +TQRect KisCanvasPainter::window() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->window(); } - return QRect(); + return TQRect(); } -void KisCanvasPainter::setWindow(const QRect& r) +void KisCanvasPainter::setWindow(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setWindow(r); @@ -804,15 +804,15 @@ void KisCanvasPainter::setWindow(int x, int y, int w, int h) } } -QRect KisCanvasPainter::viewport() const +TQRect KisCanvasPainter::viewport() const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->viewport(); } - return QRect(); + return TQRect(); } -void KisCanvasPainter::setViewport(const QRect& r) +void KisCanvasPainter::setViewport(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setViewport(r); @@ -833,15 +833,15 @@ void KisCanvasPainter::setWorldXForm(bool enable) } } -const QWMatrix& KisCanvasPainter::worldMatrix() const +const TQWMatrix& KisCanvasPainter::tqworldMatrix() const { if (m_canvasWidgetPainter != 0) { - return m_canvasWidgetPainter->worldMatrix(); + return m_canvasWidgetPainter->tqworldMatrix(); } return m_defaultWorldMatrix; } -void KisCanvasPainter::setWorldMatrix(const QWMatrix& matrix, bool combine) +void KisCanvasPainter::setWorldMatrix(const TQWMatrix& matrix, bool combine) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setWorldMatrix(matrix, combine); @@ -913,7 +913,7 @@ double KisCanvasPainter::translationY() const return 0; } -QPoint KisCanvasPainter::xForm(const QPoint& point) const +TQPoint KisCanvasPainter::xForm(const TQPoint& point) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(point); @@ -921,7 +921,7 @@ QPoint KisCanvasPainter::xForm(const QPoint& point) const return point; } -QRect KisCanvasPainter::xForm(const QRect& r) const +TQRect KisCanvasPainter::xForm(const TQRect& r) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(r); @@ -929,7 +929,7 @@ QRect KisCanvasPainter::xForm(const QRect& r) const return r; } -QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisCanvasPainter::xForm(const TQPointArray& pointArray) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(pointArray); @@ -937,7 +937,7 @@ QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray) const return pointArray; } -QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisCanvasPainter::xForm(const TQPointArray& pointArray, int index, int npoints) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xForm(pointArray, index, npoints); @@ -945,7 +945,7 @@ QPointArray KisCanvasPainter::xForm(const QPointArray& pointArray, int index, in return pointArray; } -QPoint KisCanvasPainter::xFormDev(const QPoint& point) const +TQPoint KisCanvasPainter::xFormDev(const TQPoint& point) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(point); @@ -953,7 +953,7 @@ QPoint KisCanvasPainter::xFormDev(const QPoint& point) const return point; } -QRect KisCanvasPainter::xFormDev(const QRect& r) const +TQRect KisCanvasPainter::xFormDev(const TQRect& r) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(r); @@ -961,7 +961,7 @@ QRect KisCanvasPainter::xFormDev(const QRect& r) const return r; } -QPointArray KisCanvasPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisCanvasPainter::xFormDev(const TQPointArray& pointArray) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(pointArray); @@ -969,7 +969,7 @@ QPointArray KisCanvasPainter::xFormDev(const QPointArray& pointArray) const return pointArray; } -QPointArray KisCanvasPainter::xFormDev(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisCanvasPainter::xFormDev(const TQPointArray& pointArray, int index, int npoints) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->xFormDev(pointArray, index, npoints); @@ -992,29 +992,29 @@ bool KisCanvasPainter::hasClipping() const return true; } -QRegion KisCanvasPainter::clipRegion(QPainter::CoordinateMode mode) const +TQRegion KisCanvasPainter::clipRegion(TQPainter::CoordinateMode mode) const { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->clipRegion(mode); } - return QRegion(); + return TQRegion(); } -void KisCanvasPainter::setClipRect(const QRect& r, QPainter::CoordinateMode mode) +void KisCanvasPainter::setClipRect(const TQRect& r, TQPainter::CoordinateMode mode) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setClipRect(r, mode); } } -void KisCanvasPainter::setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode mode) +void KisCanvasPainter::setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode mode) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setClipRect(x, y, w, h, mode); } } -void KisCanvasPainter::setClipRegion(const QRegion& rgn, QPainter::CoordinateMode mode) +void KisCanvasPainter::setClipRegion(const TQRegion& rgn, TQPainter::CoordinateMode mode) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->setClipRegion(rgn, mode); @@ -1028,14 +1028,14 @@ void KisCanvasPainter::drawPoint(int x, int y) } } -void KisCanvasPainter::drawPoint(const QPoint& point) +void KisCanvasPainter::drawPoint(const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPoint(point); } } -void KisCanvasPainter::drawPoints(const QPointArray& pointArray, int index, int npoints) +void KisCanvasPainter::drawPoints(const TQPointArray& pointArray, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPoints(pointArray, index, npoints); @@ -1049,7 +1049,7 @@ void KisCanvasPainter::moveTo(int x, int y) } } -void KisCanvasPainter::moveTo(const QPoint& point) +void KisCanvasPainter::moveTo(const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->moveTo(point); @@ -1063,7 +1063,7 @@ void KisCanvasPainter::lineTo(int x, int y) } } -void KisCanvasPainter::lineTo(const QPoint& point) +void KisCanvasPainter::lineTo(const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->lineTo(point); @@ -1077,7 +1077,7 @@ void KisCanvasPainter::drawLine(int x1, int y1, int x2, int y2) } } -void KisCanvasPainter::drawLine(const QPoint& start, const QPoint& end) +void KisCanvasPainter::drawLine(const TQPoint& start, const TQPoint& end) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawLine(start, end); @@ -1091,7 +1091,7 @@ void KisCanvasPainter::drawRect(int x, int y, int w, int h) } } -void KisCanvasPainter::drawRect(const QRect& r) +void KisCanvasPainter::drawRect(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawRect(r); @@ -1105,21 +1105,21 @@ void KisCanvasPainter::drawWinFocusRect(int x, int y, int w, int h) } } -void KisCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const QColor& bgColor) +void KisCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const TQColor& bgColor) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawWinFocusRect(x, y, w, h, bgColor); } } -void KisCanvasPainter::drawWinFocusRect(const QRect& r) +void KisCanvasPainter::drawWinFocusRect(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawWinFocusRect(r); } } -void KisCanvasPainter::drawWinFocusRect(const QRect& r, const QColor& bgColor) +void KisCanvasPainter::drawWinFocusRect(const TQRect& r, const TQColor& bgColor) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawWinFocusRect(r, bgColor); @@ -1133,7 +1133,7 @@ void KisCanvasPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int y } } -void KisCanvasPainter::drawRoundRect(const QRect& r, int xRnd, int yRnd) +void KisCanvasPainter::drawRoundRect(const TQRect& r, int xRnd, int yRnd) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawRoundRect(r, xRnd, yRnd); @@ -1147,7 +1147,7 @@ void KisCanvasPainter::drawEllipse(int x, int y, int w, int h) } } -void KisCanvasPainter::drawEllipse(const QRect& r) +void KisCanvasPainter::drawEllipse(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawEllipse(r); @@ -1161,7 +1161,7 @@ void KisCanvasPainter::drawArc(int x, int y, int w, int h, int a, int alen) } } -void KisCanvasPainter::drawArc(const QRect& r, int a, int alen) +void KisCanvasPainter::drawArc(const TQRect& r, int a, int alen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawArc(r, a, alen); @@ -1175,7 +1175,7 @@ void KisCanvasPainter::drawPie(int x, int y, int w, int h, int a, int alen) } } -void KisCanvasPainter::drawPie(const QRect& r, int a, int alen) +void KisCanvasPainter::drawPie(const TQRect& r, int a, int alen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPie(r, a, alen); @@ -1189,133 +1189,133 @@ void KisCanvasPainter::drawChord(int x, int y, int w, int h, int a, int alen) } } -void KisCanvasPainter::drawChord(const QRect& r, int a, int alen) +void KisCanvasPainter::drawChord(const TQRect& r, int a, int alen) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawChord(r, a, alen); } } -void KisCanvasPainter::drawLineSegments(const QPointArray& pointArray, int index, int nlines) +void KisCanvasPainter::drawLineSegments(const TQPointArray& pointArray, int index, int nlines) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawLineSegments(pointArray, index, nlines); } } -void KisCanvasPainter::drawPolyline(const QPointArray& pointArray, int index, int npoints) +void KisCanvasPainter::drawPolyline(const TQPointArray& pointArray, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPolyline(pointArray, index, npoints); } } -void KisCanvasPainter::drawPolygon(const QPointArray& pointArray, bool winding, int index, int npoints) +void KisCanvasPainter::drawPolygon(const TQPointArray& pointArray, bool winding, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPolygon(pointArray, winding, index, npoints); } } -void KisCanvasPainter::drawConvexPolygon(const QPointArray& pointArray, int index, int npoints) +void KisCanvasPainter::drawConvexPolygon(const TQPointArray& pointArray, int index, int npoints) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawConvexPolygon(pointArray, index, npoints); } } -void KisCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int index) +void KisCanvasPainter::drawCubicBezier(const TQPointArray& pointArray, int index) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawCubicBezier(pointArray, index); } } -void KisCanvasPainter::drawPixmap(int x, int y, const QPixmap& pixmap, int sx, int sy, int sw, int sh) +void KisCanvasPainter::drawPixmap(int x, int y, const TQPixmap& pixmap, int sx, int sy, int sw, int sh) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(x, y, pixmap, sx, sy, sw, sh); } } -void KisCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap, const QRect& sr) +void KisCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap, const TQRect& sr) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(point, pixmap, sr); } } -void KisCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap) +void KisCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(point, pixmap); } } -void KisCanvasPainter::drawPixmap(const QRect& r, const QPixmap& pixmap) +void KisCanvasPainter::drawPixmap(const TQRect& r, const TQPixmap& pixmap) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawPixmap(r, pixmap); } } -void KisCanvasPainter::drawImage(int x, int y, const QImage& image, int sx, int sy, int sw, int sh, int conversionFlags) +void KisCanvasPainter::drawImage(int x, int y, const TQImage& image, int sx, int sy, int sw, int sh, int conversionFlags) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(x, y, image, sx, sy, sw, sh, conversionFlags); } } -void KisCanvasPainter::drawImage(const QPoint& point, const QImage& image, const QRect& sr, int conversionFlags) +void KisCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, const TQRect& sr, int conversionFlags) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(point, image, sr, conversionFlags); } } -void KisCanvasPainter::drawImage(const QPoint& point, const QImage& image, int conversion_flags) +void KisCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, int conversion_flags) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(point, image, conversion_flags); } } -void KisCanvasPainter::drawImage(const QRect& r, const QImage& image) +void KisCanvasPainter::drawImage(const TQRect& r, const TQImage& image) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawImage(r, image); } } -void KisCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const QPixmap& pixmap, int sx, int sy) +void KisCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const TQPixmap& pixmap, int sx, int sy) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawTiledPixmap(x, y, w, h, pixmap, sx, sy); } } -void KisCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap, const QPoint& point) +void KisCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap, const TQPoint& point) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawTiledPixmap(r, pixmap, point); } } -void KisCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap) +void KisCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawTiledPixmap(r, pixmap); } } -void KisCanvasPainter::fillRect(int x, int y, int w, int h, const QBrush& brush) +void KisCanvasPainter::fillRect(int x, int y, int w, int h, const TQBrush& brush) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->fillRect(x, y, w, h, brush); } } -void KisCanvasPainter::fillRect(const QRect& r, const QBrush& brush) +void KisCanvasPainter::fillRect(const TQRect& r, const TQBrush& brush) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->fillRect(r, brush); @@ -1329,83 +1329,83 @@ void KisCanvasPainter::eraseRect(int x, int y, int w, int h) } } -void KisCanvasPainter::eraseRect(const QRect& r) +void KisCanvasPainter::eraseRect(const TQRect& r) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->eraseRect(r); } } -void KisCanvasPainter::drawText(int x, int y, const QString& text, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(int x, int y, const TQString& text, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(x, y, text, len, dir); } } -void KisCanvasPainter::drawText(const QPoint& point, const QString& text, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(const TQPoint& point, const TQString& text, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(point, text, len, dir); } } -void KisCanvasPainter::drawText(int x, int y, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(int x, int y, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(x, y, text, pos, len, dir); } } -void KisCanvasPainter::drawText(const QPoint& point, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisCanvasPainter::drawText(const TQPoint& point, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(point, text, pos, len, dir); } } -void KisCanvasPainter::drawText(int x, int y, int w, int h, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisCanvasPainter::drawText(int x, int y, int w, int h, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(x, y, w, h, flags, text, len, br, intern); } } -void KisCanvasPainter::drawText(const QRect& r, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisCanvasPainter::drawText(const TQRect& r, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { m_canvasWidgetPainter->drawText(r, flags, text, len, br, intern); } } -void KisCanvasPainter::drawTextItem(int x, int y, const QTextItem& ti, int textflags) +void KisCanvasPainter::tqdrawTextItem(int x, int y, const TQTextItem& ti, int textflags) { if (m_canvasWidgetPainter != 0) { - m_canvasWidgetPainter->drawTextItem(x, y, ti, textflags); + m_canvasWidgetPainter->tqdrawTextItem(x, y, ti, textflags); } } -void KisCanvasPainter::drawTextItem(const QPoint& p, const QTextItem& ti, int textflags) +void KisCanvasPainter::tqdrawTextItem(const TQPoint& p, const TQTextItem& ti, int textflags) { if (m_canvasWidgetPainter != 0) { - m_canvasWidgetPainter->drawTextItem(p, ti, textflags); + m_canvasWidgetPainter->tqdrawTextItem(p, ti, textflags); } } -QRect KisCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const TQString& text, int len, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->boundingRect(x, y, w, h, flags, text, len, intern); } - return QRect(); + return TQRect(); } -QRect KisCanvasPainter::boundingRect(const QRect& r, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisCanvasPainter::boundingRect(const TQRect& r, int flags, const TQString& text, int len, TQTextParag **intern) { if (m_canvasWidgetPainter != 0) { return m_canvasWidgetPainter->boundingRect(r, flags, text, len, intern); } - return QRect(); + return TQRect(); } int KisCanvasPainter::tabStops() const diff --git a/krita/ui/kis_canvas_painter.h b/krita/ui/kis_canvas_painter.h index 5559057d..9a719eea 100644 --- a/krita/ui/kis_canvas_painter.h +++ b/krita/ui/kis_canvas_painter.h @@ -23,7 +23,7 @@ #include <config.h> #endif -#include <qpainter.h> +#include <tqpainter.h> #include "kis_global.h" @@ -41,45 +41,45 @@ public: virtual void save(); virtual void restore(); - virtual QFontMetrics fontMetrics() const; - virtual QFontInfo fontInfo() const; + virtual TQFontMetrics fontMetrics() const; + virtual TQFontInfo fontInfo() const; - virtual const QFont& font() const; - virtual void setFont(const QFont&); - virtual const QPen& pen() const; - virtual void setPen(const QPen&); + virtual const TQFont& font() const; + virtual void setFont(const TQFont&); + virtual const TQPen& pen() const; + virtual void setPen(const TQPen&); virtual void setPen(Qt::PenStyle); - virtual void setPen(const QColor&); - virtual const QBrush&brush() const; - virtual void setBrush(const QBrush&); - virtual void setBrush(Qt::BrushStyle); - virtual void setBrush(const QColor&); - virtual QPoint pos() const; - - virtual const QColor&backgroundColor() const; - virtual void setBackgroundColor(const QColor&); + virtual void setPen(const TQColor&); + virtual const TQBrush&brush() const; + virtual void setBrush(const TQBrush&); + virtual void setBrush(TQt::BrushStyle); + virtual void setBrush(const TQColor&); + virtual TQPoint pos() const; + + virtual const TQColor&backgroundColor() const; + virtual void setBackgroundColor(const TQColor&); virtual Qt::BGMode backgroundMode() const; virtual void setBackgroundMode(Qt::BGMode); - virtual Qt::RasterOp rasterOp() const; - virtual void setRasterOp(Qt::RasterOp); - virtual const QPoint&brushOrigin() const; + virtual TQt::RasterOp rasterOp() const; + virtual void setRasterOp(TQt::RasterOp); + virtual const TQPoint&brushOrigin() const; virtual void setBrushOrigin(int x, int y); - virtual void setBrushOrigin(const QPoint&); + virtual void setBrushOrigin(const TQPoint&); virtual bool hasViewXForm() const; virtual bool hasWorldXForm() const; virtual void setViewXForm(bool); - virtual QRect window() const; - virtual void setWindow(const QRect&); + virtual TQRect window() const; + virtual void setWindow(const TQRect&); virtual void setWindow(int x, int y, int w, int h); - virtual QRect viewport() const; - virtual void setViewport(const QRect&); + virtual TQRect viewport() const; + virtual void setViewport(const TQRect&); virtual void setViewport(int x, int y, int w, int h); virtual void setWorldXForm(bool); - virtual const QWMatrix&worldMatrix() const; - virtual void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + virtual const TQWMatrix&tqworldMatrix() const; + virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void saveWorldMatrix(); virtual void restoreWorldMatrix(); @@ -93,86 +93,86 @@ public: virtual double translationX() const; virtual double translationY() const; - virtual QPoint xForm(const QPoint&) const; - virtual QRect xForm(const QRect&) const; - virtual QPointArray xForm(const QPointArray&) const; - virtual QPointArray xForm(const QPointArray&, int index, int npoints) const; - virtual QPoint xFormDev(const QPoint&) const; - virtual QRect xFormDev(const QRect&) const; - virtual QPointArray xFormDev(const QPointArray&) const; - virtual QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + virtual TQPoint xForm(const TQPoint&) const; + virtual TQRect xForm(const TQRect&) const; + virtual TQPointArray xForm(const TQPointArray&) const; + virtual TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + virtual TQPoint xFormDev(const TQPoint&) const; + virtual TQRect xFormDev(const TQRect&) const; + virtual TQPointArray xFormDev(const TQPointArray&) const; + virtual TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; virtual void setClipping(bool); virtual bool hasClipping() const; - virtual QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - virtual void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + virtual TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + virtual void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); virtual void drawPoint(int x, int y); - virtual void drawPoint(const QPoint&); - virtual void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + virtual void drawPoint(const TQPoint&); + virtual void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); virtual void moveTo(int x, int y); - virtual void moveTo(const QPoint&); + virtual void moveTo(const TQPoint&); virtual void lineTo(int x, int y); - virtual void lineTo(const QPoint&); + virtual void lineTo(const TQPoint&); virtual void drawLine(int x1, int y1, int x2, int y2); - virtual void drawLine(const QPoint&, const QPoint&); + virtual void drawLine(const TQPoint&, const TQPoint&); virtual void drawRect(int x, int y, int w, int h); - virtual void drawRect(const QRect&); + virtual void drawRect(const TQRect&); virtual void drawWinFocusRect(int x, int y, int w, int h); - virtual void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - virtual void drawWinFocusRect(const QRect&); - virtual void drawWinFocusRect(const QRect&, const QColor&bgColor); + virtual void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + virtual void drawWinFocusRect(const TQRect&); + virtual void drawWinFocusRect(const TQRect&, const TQColor&bgColor); virtual void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - virtual void drawRoundRect(const QRect&, int = 25, int = 25); + virtual void drawRoundRect(const TQRect&, int = 25, int = 25); virtual void drawEllipse(int x, int y, int w, int h); - virtual void drawEllipse(const QRect&); + virtual void drawEllipse(const TQRect&); virtual void drawArc(int x, int y, int w, int h, int a, int alen); - virtual void drawArc(const QRect&, int a, int alen); + virtual void drawArc(const TQRect&, int a, int alen); virtual void drawPie(int x, int y, int w, int h, int a, int alen); - virtual void drawPie(const QRect&, int a, int alen); + virtual void drawPie(const TQRect&, int a, int alen); virtual void drawChord(int x, int y, int w, int h, int a, int alen); - virtual void drawChord(const QRect&, int a, int alen); - virtual void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - virtual void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - virtual void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - virtual void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - virtual void drawCubicBezier(const QPointArray&, int index=0); - virtual void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - virtual void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - virtual void drawPixmap(const QPoint&, const QPixmap&); - virtual void drawPixmap(const QRect&, const QPixmap&); - virtual void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - virtual void drawImage(const QRect&, const QImage&); - virtual void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - virtual void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - virtual void drawTiledPixmap(const QRect&, const QPixmap&); - //virtual void drawPicture(const QPicture&); - //virtual void drawPicture(int x, int y, const QPicture&); - //virtual void drawPicture(const QPoint&, const QPicture&); - - virtual void fillRect(int x, int y, int w, int h, const QBrush&); - virtual void fillRect(const QRect&, const QBrush&); + virtual void drawChord(const TQRect&, int a, int alen); + virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawCubicBezier(const TQPointArray&, int index=0); + virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + virtual void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + virtual void drawPixmap(const TQPoint&, const TQPixmap&); + virtual void drawPixmap(const TQRect&, const TQPixmap&); + virtual void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + virtual void drawImage(const TQRect&, const TQImage&); + virtual void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&); + //virtual void drawPicture(const TQPicture&); + //virtual void drawPicture(int x, int y, const TQPicture&); + //virtual void drawPicture(const TQPoint&, const TQPicture&); + + virtual void fillRect(int x, int y, int w, int h, const TQBrush&); + virtual void fillRect(const TQRect&, const TQBrush&); virtual void eraseRect(int x, int y, int w, int h); - virtual void eraseRect(const QRect&); + virtual void eraseRect(const TQRect&); - virtual void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - virtual void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + virtual void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + virtual void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - virtual void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - virtual void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - virtual QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - virtual QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + virtual TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + virtual TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); virtual int tabStops() const; virtual void setTabStops(int); @@ -180,69 +180,69 @@ public: virtual void setTabArray(int *); protected: - QFont m_defaultFont; - QPen m_defaultPen; - QBrush m_defaultBrush; - QColor m_defaultColor; - QPoint m_defaultBrushOrigin; - QWMatrix m_defaultWorldMatrix; + TQFont m_defaultFont; + TQPen m_defaultPen; + TQBrush m_defaultBrush; + TQColor m_defaultColor; + TQPoint m_defaultBrushOrigin; + TQWMatrix m_defaultWorldMatrix; }; class KisCanvasPainter { public: KisCanvasPainter(); KisCanvasPainter(KisCanvas *canvas); - KisCanvasPainter(const QPaintDevice *paintDevice); + KisCanvasPainter(const TQPaintDevice *paintDevice); ~KisCanvasPainter(); bool begin(KisCanvas *canvas, bool unclipped = false); - bool begin(const QPaintDevice *paintDevice, bool unclipped = false); + bool begin(const TQPaintDevice *paintDevice, bool unclipped = false); bool end(); void save(); void restore(); - QFontMetrics fontMetrics() const; - QFontInfo fontInfo() const; + TQFontMetrics fontMetrics() const; + TQFontInfo fontInfo() const; - const QFont& font() const; - void setFont(const QFont&); - const QPen& pen() const; - void setPen(const QPen&); + const TQFont& font() const; + void setFont(const TQFont&); + const TQPen& pen() const; + void setPen(const TQPen&); void setPen(Qt::PenStyle); - void setPen(const QColor&); - const QBrush&brush() const; - void setBrush(const QBrush&); - void setBrush(Qt::BrushStyle); - void setBrush(const QColor&); - QPoint pos() const; - - const QColor&backgroundColor() const; - void setBackgroundColor(const QColor&); + void setPen(const TQColor&); + const TQBrush&brush() const; + void setBrush(const TQBrush&); + void setBrush(TQt::BrushStyle); + void setBrush(const TQColor&); + TQPoint pos() const; + + const TQColor&backgroundColor() const; + void setBackgroundColor(const TQColor&); Qt::BGMode backgroundMode() const; void setBackgroundMode(Qt::BGMode); - Qt::RasterOp rasterOp() const; - void setRasterOp(Qt::RasterOp); - const QPoint&brushOrigin() const; + TQt::RasterOp rasterOp() const; + void setRasterOp(TQt::RasterOp); + const TQPoint&brushOrigin() const; void setBrushOrigin(int x, int y); - void setBrushOrigin(const QPoint&); + void setBrushOrigin(const TQPoint&); bool hasViewXForm() const; bool hasWorldXForm() const; void setViewXForm(bool); - QRect window() const; - void setWindow(const QRect&); + TQRect window() const; + void setWindow(const TQRect&); void setWindow(int x, int y, int w, int h); - QRect viewport() const; - void setViewport(const QRect&); + TQRect viewport() const; + void setViewport(const TQRect&); void setViewport(int x, int y, int w, int h); void setWorldXForm(bool); - const QWMatrix&worldMatrix() const; - void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + const TQWMatrix&tqworldMatrix() const; + void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); void saveWorldMatrix(); void restoreWorldMatrix(); @@ -256,86 +256,86 @@ public: double translationX() const; double translationY() const; - QPoint xForm(const QPoint&) const; - QRect xForm(const QRect&) const; - QPointArray xForm(const QPointArray&) const; - QPointArray xForm(const QPointArray&, int index, int npoints) const; - QPoint xFormDev(const QPoint&) const; - QRect xFormDev(const QRect&) const; - QPointArray xFormDev(const QPointArray&) const; - QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + TQPoint xForm(const TQPoint&) const; + TQRect xForm(const TQRect&) const; + TQPointArray xForm(const TQPointArray&) const; + TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + TQPoint xFormDev(const TQPoint&) const; + TQRect xFormDev(const TQRect&) const; + TQPointArray xFormDev(const TQPointArray&) const; + TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; void setClipping(bool); bool hasClipping() const; - QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); void drawPoint(int x, int y); - void drawPoint(const QPoint&); - void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + void drawPoint(const TQPoint&); + void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); void moveTo(int x, int y); - void moveTo(const QPoint&); + void moveTo(const TQPoint&); void lineTo(int x, int y); - void lineTo(const QPoint&); + void lineTo(const TQPoint&); void drawLine(int x1, int y1, int x2, int y2); - void drawLine(const QPoint&, const QPoint&); + void drawLine(const TQPoint&, const TQPoint&); void drawRect(int x, int y, int w, int h); - void drawRect(const QRect&); + void drawRect(const TQRect&); void drawWinFocusRect(int x, int y, int w, int h); - void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - void drawWinFocusRect(const QRect&); - void drawWinFocusRect(const QRect&, const QColor&bgColor); + void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + void drawWinFocusRect(const TQRect&); + void drawWinFocusRect(const TQRect&, const TQColor&bgColor); void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - void drawRoundRect(const QRect&, int = 25, int = 25); + void drawRoundRect(const TQRect&, int = 25, int = 25); void drawEllipse(int x, int y, int w, int h); - void drawEllipse(const QRect&); + void drawEllipse(const TQRect&); void drawArc(int x, int y, int w, int h, int a, int alen); - void drawArc(const QRect&, int a, int alen); + void drawArc(const TQRect&, int a, int alen); void drawPie(int x, int y, int w, int h, int a, int alen); - void drawPie(const QRect&, int a, int alen); + void drawPie(const TQRect&, int a, int alen); void drawChord(int x, int y, int w, int h, int a, int alen); - void drawChord(const QRect&, int a, int alen); - void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - void drawCubicBezier(const QPointArray&, int index=0); - void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - void drawPixmap(const QPoint&, const QPixmap&); - void drawPixmap(const QRect&, const QPixmap&); - void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - void drawImage(const QRect&, const QImage&); - void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - void drawTiledPixmap(const QRect&, const QPixmap&); - //void drawPicture(const QPicture&); - //void drawPicture(int x, int y, const QPicture&); - //void drawPicture(const QPoint&, const QPicture&); - - void fillRect(int x, int y, int w, int h, const QBrush&); - void fillRect(const QRect&, const QBrush&); + void drawChord(const TQRect&, int a, int alen); + void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + void drawCubicBezier(const TQPointArray&, int index=0); + void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + void drawPixmap(const TQPoint&, const TQPixmap&); + void drawPixmap(const TQRect&, const TQPixmap&); + void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + void drawImage(const TQRect&, const TQImage&); + void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + void drawTiledPixmap(const TQRect&, const TQPixmap&); + //void drawPicture(const TQPicture&); + //void drawPicture(int x, int y, const TQPicture&); + //void drawPicture(const TQPoint&, const TQPicture&); + + void fillRect(int x, int y, int w, int h, const TQBrush&); + void fillRect(const TQRect&, const TQBrush&); void eraseRect(int x, int y, int w, int h); - void eraseRect(const QRect&); + void eraseRect(const TQRect&); - void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); int tabStops() const; void setTabStops(int); @@ -344,12 +344,12 @@ public: protected: KisCanvasWidgetPainter *m_canvasWidgetPainter; - QFont m_defaultFont; - QPen m_defaultPen; - QBrush m_defaultBrush; - QColor m_defaultColor; - QPoint m_defaultBrushOrigin; - QWMatrix m_defaultWorldMatrix; + TQFont m_defaultFont; + TQPen m_defaultPen; + TQBrush m_defaultBrush; + TQColor m_defaultColor; + TQPoint m_defaultBrushOrigin; + TQWMatrix m_defaultWorldMatrix; }; #endif // KIS_CANVAS_PAINTER_H_ diff --git a/krita/ui/kis_clipboard.cc b/krita/ui/kis_clipboard.cc index 8b6a6cd8..b6a273c9 100644 --- a/krita/ui/kis_clipboard.cc +++ b/krita/ui/kis_clipboard.cc @@ -15,12 +15,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qclipboard.h> -#include <qobject.h> -#include <qimage.h> -#include <qmessagebox.h> -#include <qbuffer.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqobject.h> +#include <tqimage.h> +#include <tqmessagebox.h> +#include <tqbuffer.h> #include <kmultipledrag.h> #include <klocale.h> @@ -52,8 +52,8 @@ KisClipboard::KisClipboard() clipboardDataChanged(); // Make sure we are notified when clipboard changes - connect( QApplication::clipboard(), SIGNAL( dataChanged() ), - this, SLOT( clipboardDataChanged() ) ); + connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + this, TQT_SLOT( clipboardDataChanged() ) ); } KisClipboard::~KisClipboard() @@ -80,8 +80,8 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) m_hasClip = true; // We'll create a store (ZIP format) in memory - QBuffer buffer; - QCString mimeType("application/x-krita-selection"); + TQBuffer buffer; + TQCString mimeType("application/x-krita-selection"); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType ); Q_ASSERT( store ); Q_ASSERT( !store->bad() ); @@ -98,7 +98,7 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) // ColorSpace id of layer data if (store->open("colorspace")) { - QString csName = selection->colorSpace()->id().id(); + TQString csName = selection->colorSpace()->id().id(); store->write(csName.ascii(), strlen(csName.ascii())); store->close(); } @@ -116,14 +116,14 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) delete store; - // We also create a QImage so we can interchange with other applications - QImage qimg; + // We also create a TQImage so we can interchange with other applications + TQImage qimg; KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); KisProfile * monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); - qimg = selection->convertToQImage(monitorProfile); + qimg = selection->convertToTQImage(monitorProfile); - QImageDrag *qimgDrag = new QImageDrag(qimg); + TQImageDrag *qimgDrag = new TQImageDrag(qimg); KMultipleDrag *multiDrag = new KMultipleDrag(); if ( !qimg.isNull() ) multiDrag->addDragObject( qimgDrag ); @@ -132,36 +132,36 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) multiDrag->addDragObject( storeDrag ); - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setData(multiDrag); m_pushedClipboard = true; } KisPaintDeviceSP KisClipboard::clip() { - QClipboard *cb = QApplication::clipboard(); - QCString mimeType("application/x-krita-selection"); - QMimeSource *cbData = cb->data(); + TQClipboard *cb = TQApplication::tqclipboard(); + TQCString mimeType("application/x-krita-selection"); + TQMimeSource *cbData = cb->data(); if(cbData && cbData->provides(mimeType)) { - QBuffer buffer(cbData->encodedData(mimeType)); + TQBuffer buffer(cbData->tqencodedData(mimeType)); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { - QByteArray data; + TQByteArray data; store->open("profile.icc"); data = store->read(store->size()); store->close(); profile = new KisProfile(data); } - QString csName; + TQString csName; // ColorSpace id of layer data if (store->hasFile("colorspace")) { store->open("colorspace"); - csName = QString(store->read(store->size())); + csName = TQString(store->read(store->size())); store->close(); } @@ -178,30 +178,30 @@ KisPaintDeviceSP KisClipboard::clip() } else { - QImage qimg = cb->image(); + TQImage qimg = cb->image(); if (qimg.isNull()) return 0; KisConfig cfg; - Q_UINT32 behaviour = cfg.pasteBehaviour(); + TQ_UINT32 behaviour = cfg.pasteBehaviour(); if(behaviour==2) { // Ask user each time - behaviour = QMessageBox::question(0,i18n("Pasting data from simple source"),i18n("The image data you are trying to paste has no colour profile information.\n\nOn the web and in simple applications the data are supposed to be in sRGB color format.\nImporting as web will show it as it is supposed to look.\nMost monitors are not perfect though so if you made the image yourself\nyou might want to import it as it looked on you monitor.\n\nHow do you want to interpret these data?"),i18n("As &Web"),i18n("As on &Monitor")); + behaviour = TQMessageBox::question(0,i18n("Pasting data from simple source"),i18n("The image data you are trying to paste has no colour profile information.\n\nOn the web and in simple applications the data are supposed to be in sRGB color format.\nImporting as web will show it as it is supposed to look.\nMost monitors are not perfect though so if you made the image yourself\nyou might want to import it as it looked on you monitor.\n\nHow do you want to interpret these data?"),i18n("As &Web"),i18n("As on &Monitor")); } KisColorSpace * cs; - QString profileName(""); + TQString profileName(""); if(behaviour==1) profileName = cfg.monitorProfile(); cs = KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("RGBA",""), profileName); m_clip = new KisPaintDevice(cs, "from paste"); Q_CHECK_PTR(m_clip); - m_clip->convertFromQImage(qimg, profileName); + m_clip->convertFromTQImage(qimg, profileName); } return m_clip; @@ -211,10 +211,10 @@ void KisClipboard::clipboardDataChanged() { if (!m_pushedClipboard) { m_hasClip = false; - QClipboard *cb = QApplication::clipboard(); - QImage qimg = cb->image(); - QMimeSource *cbData = cb->data(); - QCString mimeType("application/x-krita-selection"); + TQClipboard *cb = TQApplication::tqclipboard(); + TQImage qimg = cb->image(); + TQMimeSource *cbData = cb->data(); + TQCString mimeType("application/x-krita-selection"); if(cbData && cbData->provides(mimeType)) m_hasClip = true; @@ -232,34 +232,34 @@ bool KisClipboard::hasClip() return m_hasClip; } -QSize KisClipboard::clipSize() +TQSize KisClipboard::clipSize() { - QClipboard *cb = QApplication::clipboard(); - QCString mimeType("application/x-krita-selection"); - QMimeSource *cbData = cb->data(); + TQClipboard *cb = TQApplication::tqclipboard(); + TQCString mimeType("application/x-krita-selection"); + TQMimeSource *cbData = cb->data(); KisPaintDeviceSP clip; if(cbData && cbData->provides(mimeType)) { - QBuffer buffer(cbData->encodedData(mimeType)); + TQBuffer buffer(cbData->tqencodedData(mimeType)); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { - QByteArray data; + TQByteArray data; store->open("profile.icc"); data = store->read(store->size()); store->close(); profile = new KisProfile(data); } - QString csName; + TQString csName; // ColorSpace id of layer data if (store->hasFile("colorspace")) { store->open("colorspace"); - csName = QString(store->read(store->size())); + csName = TQString(store->read(store->size())); store->close(); } @@ -277,7 +277,7 @@ QSize KisClipboard::clipSize() return clip->exactBounds().size(); } else { - QImage qimg = cb->image(); + TQImage qimg = cb->image(); return qimg.size(); } ; diff --git a/krita/ui/kis_clipboard.h b/krita/ui/kis_clipboard.h index 346cc742..783791a6 100644 --- a/krita/ui/kis_clipboard.h +++ b/krita/ui/kis_clipboard.h @@ -22,18 +22,19 @@ #define __KIS_CLIPBOARD_H_ -#include <qsize.h> +#include <tqsize.h> #include "kis_types.h" -class QImage; +class TQImage; /** * The Krita clipboard is a clipboard that can store paint devices * instead of just qimage's. */ -class KisClipboard : public QObject { +class KisClipboard : public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -43,7 +44,7 @@ public: /** * Sets the clipboard to the contents of the specified paint device; also - * set the system clipboard to a QImage representation of the specified + * set the system clipboard to a TQImage representation of the specified * paint device. */ void setClip(KisPaintDeviceSP layer); @@ -55,7 +56,7 @@ public: bool hasClip(); - QSize clipSize(); + TQSize clipSize(); private slots: diff --git a/krita/ui/kis_cmb_composite.cc b/krita/ui/kis_cmb_composite.cc index 03c846c1..4ede96ae 100644 --- a/krita/ui/kis_cmb_composite.cc +++ b/krita/ui/kis_cmb_composite.cc @@ -18,18 +18,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qcombobox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kdebug.h> #include "kis_cmb_composite.h" -KisCmbComposite::KisCmbComposite(QWidget * parent, const char * name) - : super( false, parent, name ) +KisCmbComposite::KisCmbComposite(TQWidget * tqparent, const char * name) + : super( false, tqparent, name ) { - connect(this, SIGNAL(activated(int)), this, SLOT(slotOpActivated(int))); - connect(this, SIGNAL(highlighted(int)), this, SLOT(slotOpHighlighted(int))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotOpActivated(int))); + connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotOpHighlighted(int))); } KisCmbComposite::~KisCmbComposite() @@ -47,7 +47,7 @@ void KisCmbComposite::setCompositeOpList(const KisCompositeOpList & list) KisCompositeOp KisCmbComposite::currentItem() const { - Q_UINT32 i = super::currentItem(); + TQ_UINT32 i = super::currentItem(); if (i > m_list.count()) return KisCompositeOp(); return m_list[i]; @@ -55,12 +55,12 @@ KisCompositeOp KisCmbComposite::currentItem() const void KisCmbComposite::setCurrentItem(const KisCompositeOp& op) { - if (m_list.find(op) != m_list.end()) { + if (m_list.tqfind(op) != m_list.end()) { super::setCurrentText(op.id().name()); } } -void KisCmbComposite::setCurrentText(const QString & s) +void KisCmbComposite::setCurrentText(const TQString & s) { KisCompositeOpList::iterator it; for( it = m_list.begin(); it != m_list.end(); ++it ) @@ -71,14 +71,14 @@ void KisCmbComposite::setCurrentText(const QString & s) void KisCmbComposite::slotOpActivated(int i) { - if ((Q_UINT32)i > m_list.count()) return; + if ((TQ_UINT32)i > m_list.count()) return; emit activated(m_list[i]); } void KisCmbComposite::slotOpHighlighted(int i) { - if ((Q_UINT32)i > m_list.count()) return; + if ((TQ_UINT32)i > m_list.count()) return; emit highlighted(m_list[i]); } diff --git a/krita/ui/kis_cmb_composite.h b/krita/ui/kis_cmb_composite.h index fa930301..cee803c4 100644 --- a/krita/ui/kis_cmb_composite.h +++ b/krita/ui/kis_cmb_composite.h @@ -22,7 +22,7 @@ #define KIS_CMB_COMPOSITE_H_ #include <koffice_export.h> -#include "qcombobox.h" +#include "tqcombobox.h" #include "kis_composite_op.h" /** @@ -36,22 +36,23 @@ * But that's for later... */ -class KRITAUI_EXPORT KisCmbComposite : public QComboBox +class KRITAUI_EXPORT KisCmbComposite : public TQComboBox { - typedef QComboBox super; + typedef TQComboBox super; Q_OBJECT + TQ_OBJECT public: - KisCmbComposite(QWidget * parent = 0, const char * name = 0 ); + KisCmbComposite(TQWidget * tqparent = 0, const char * name = 0 ); virtual ~KisCmbComposite(); KisCompositeOp currentItem() const; void setCompositeOpList(const KisCompositeOpList& list); void setCurrentItem(const KisCompositeOp& op); - void setCurrentText(const QString & s); + void setCurrentText(const TQString & s); signals: diff --git a/krita/ui/kis_cmb_idlist.cc b/krita/ui/kis_cmb_idlist.cc index 570a1ac0..254b7f16 100644 --- a/krita/ui/kis_cmb_idlist.cc +++ b/krita/ui/kis_cmb_idlist.cc @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qcombobox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kdebug.h> @@ -26,11 +26,11 @@ #include "kis_id.h" #include "kis_cmb_idlist.h" -KisCmbIDList::KisCmbIDList(QWidget * parent, const char * name) - : super( false, parent, name ) +KisCmbIDList::KisCmbIDList(TQWidget * tqparent, const char * name) + : super( false, tqparent, name ) { - connect(this, SIGNAL(activated(int)), this, SLOT(slotIDActivated(int))); - connect(this, SIGNAL(highlighted(int)), this, SLOT(slotIDHighlighted(int))); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotIDActivated(int))); + connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotIDHighlighted(int))); } KisCmbIDList::~KisCmbIDList() @@ -49,7 +49,7 @@ void KisCmbIDList::setIDList(const KisIDList & list) KisID KisCmbIDList::currentItem() const { - Q_UINT32 i = super::currentItem(); + TQ_UINT32 i = super::currentItem(); if (i > m_list.count()) return KisID(); return m_list[i]; @@ -57,7 +57,7 @@ KisID KisCmbIDList::currentItem() const void KisCmbIDList::setCurrent(const KisID id) { - if (m_list.find(id) != m_list.end()) + if (m_list.tqfind(id) != m_list.end()) super::setCurrentText(id.name()); else { m_list.push_back(id); @@ -66,7 +66,7 @@ void KisCmbIDList::setCurrent(const KisID id) } } -void KisCmbIDList::setCurrentText(const QString & s) +void KisCmbIDList::setCurrentText(const TQString & s) { KisIDList::iterator it; for( it = m_list.begin(); it != m_list.end(); ++it ) diff --git a/krita/ui/kis_cmb_idlist.h b/krita/ui/kis_cmb_idlist.h index 287797ea..fc088b3e 100644 --- a/krita/ui/kis_cmb_idlist.h +++ b/krita/ui/kis_cmb_idlist.h @@ -21,7 +21,7 @@ #ifndef KIS_CMB_IDLIST_H_ #define KIS_CMB_IDLIST_H_ -#include "qcombobox.h" +#include "tqcombobox.h" #include "kis_id.h" @@ -30,22 +30,23 @@ * descriptive (i18n'ed) text is displayed, but the various * signals return a KisID. */ -class KisCmbIDList : public QComboBox +class KisCmbIDList : public TQComboBox { - typedef QComboBox super; + typedef TQComboBox super; Q_OBJECT + TQ_OBJECT public: - KisCmbIDList(QWidget * parent = 0, const char * name = 0 ); + KisCmbIDList(TQWidget * tqparent = 0, const char * name = 0 ); virtual ~KisCmbIDList(); public: void setIDList(const KisIDList & list); void setCurrent(const KisID id); - void setCurrentText(const QString & s); + void setCurrentText(const TQString & s); KisID currentItem() const; diff --git a/krita/ui/kis_color_cup.cc b/krita/ui/kis_color_cup.cc index 3342305f..f5ac4bc5 100644 --- a/krita/ui/kis_color_cup.cc +++ b/krita/ui/kis_color_cup.cc @@ -19,20 +19,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpushbutton.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qcolor.h> -#include <qdrawutil.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qspinbox.h> -#include <qstyle.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qframe.h> +#include <tqpushbutton.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqcolor.h> +#include <tqdrawutil.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqspinbox.h> +#include <tqstyle.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqframe.h> #include <kcolordialog.h> #include <klocale.h> @@ -43,13 +43,13 @@ #include <kis_color.h> #include <kis_color_cup.h> -KisColorPopup::KisColorPopup(QColor c, QWidget * parent, const char * name) - : QFrame(parent, name, WType_Popup | WStyle_Customize | WStyle_NoBorder) +KisColorPopup::KisColorPopup(TQColor c, TQWidget * tqparent, const char * name) + : TQFrame(tqparent, name, WType_Popup | WStyle_Customize | WStyle_NoBorder) { m_color = c; setMargin(4); setFocusPolicy(StrongFocus); - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); l->add(m_khsSelector = new KHSSelector(this)); m_khsSelector->setMinimumSize(140, 7); l->add(m_valueSelector = new KValueSelector(this)); @@ -59,16 +59,16 @@ KisColorPopup::KisColorPopup(QColor c, QWidget * parent, const char * name) } -KisColorCup::KisColorCup(QWidget * parent, const char * name) - : QPushButton(parent, name) +KisColorCup::KisColorCup(TQWidget * tqparent, const char * name) + : TQPushButton(tqparent, name) { - m_color = Qt::black; + m_color = TQt::black; m_popup = new KisColorPopup(m_color, this, "colorpopup"); - connect(this, SIGNAL(clicked()), this, SLOT(slotClicked())); - connect(m_popup, SIGNAL(changed( const QColor &)), this, SLOT(setColor(const QColor &))); + connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked())); + connect(m_popup, TQT_SIGNAL(changed( const TQColor &)), this, TQT_SLOT(setColor(const TQColor &))); } -void KisColorCup::setColor(const QColor & c) +void KisColorCup::setColor(const TQColor & c) { m_color = c; emit changed(c); @@ -81,36 +81,36 @@ void KisColorCup::slotClicked() emit changed(m_color); } -QSize KisColorCup::sizeHint() const +TQSize KisColorCup::tqsizeHint() const { - return style().sizeFromContents(QStyle::CT_PushButton, this, QSize(24, 24)). - expandedTo(QApplication::globalStrut()); + return style().sizeFromContents(TQStyle::CT_PushButton, this, TQSize(24, 24)). + expandedTo(TQApplication::globalStrut()); } -void KisColorCup::drawButtonLabel( QPainter *painter ) +void KisColorCup::drawButtonLabel( TQPainter *painter ) { int x, y, w, h; - QRect r = style().subRect( QStyle::SR_PushButtonContents, this ); + TQRect r = style().subRect( TQStyle::SR_PushButtonContents, this ); r.rect(&x, &y, &w, &h); - int margin = 2; //style().pixelMetric( QStyle::PM_ButtonMargin, this ); + int margin = 2; //style().tqpixelMetric( TQStyle::PM_ButtonMargin, this ); x += margin; y += margin; w -= 2*margin; h -= 2*margin; if (isOn() || isDown()) { - x += style().pixelMetric( QStyle::PM_ButtonShiftHorizontal, this ); - y += style().pixelMetric( QStyle::PM_ButtonShiftVertical, this ); + x += style().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); + y += style().tqpixelMetric( TQStyle::PM_ButtonShiftVertical, this ); } - qDrawShadePanel( painter, x, y, w, h, colorGroup(), true, 1, NULL); + qDrawShadePanel( painter, x, y, w, h, tqcolorGroup(), true, 1, NULL); if ( m_color.isValid() ) painter->fillRect( x+1, y+1, w-2, h-2, m_color ); if ( hasFocus() ) { - QRect focusRect = style().subRect( QStyle::SR_PushButtonFocusRect, this ); - style().drawPrimitive( QStyle::PE_FocusRect, painter, focusRect, colorGroup() ); + TQRect focusRect = style().subRect( TQStyle::SR_PushButtonFocusRect, this ); + style().drawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, tqcolorGroup() ); } } diff --git a/krita/ui/kis_color_cup.h b/krita/ui/kis_color_cup.h index eb98616f..7a59837a 100644 --- a/krita/ui/kis_color_cup.h +++ b/krita/ui/kis_color_cup.h @@ -19,62 +19,64 @@ #ifndef KIS_COLOR_CUP_H #define KIS_COLOR_CUP_H -#include <qpushbutton.h> -#include <qcolor.h> -#include <qframe.h> +#include <tqpushbutton.h> +#include <tqcolor.h> +#include <tqframe.h> #include <koffice_export.h> -class QSize; -class QPainter; -class QWidget; +class TQSize; +class TQPainter; +class TQWidget; class KHSSelector; class KValueSelector; -class KisColorPopup : public QFrame { +class KisColorPopup : public TQFrame { Q_OBJECT + TQ_OBJECT public: - KisColorPopup(QColor color, QWidget * w, const char * name); + KisColorPopup(TQColor color, TQWidget * w, const char * name); virtual ~KisColorPopup() {}; signals: - void changed(const QColor &); + void changed(const TQColor &); private: KHSSelector * m_khsSelector; KValueSelector * m_valueSelector; - QColor m_color; + TQColor m_color; }; -class KRITAUI_EXPORT KisColorCup : public QPushButton { +class KRITAUI_EXPORT KisColorCup : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - KisColorCup(QWidget * parent, const char * name = 0); + KisColorCup(TQWidget * tqparent, const char * name = 0); virtual ~KisColorCup() {}; - QColor color() { return m_color; }; + TQColor color() { return m_color; }; signals: - void changed(const QColor &); + void changed(const TQColor &); public: - QSize sizeHint() const; + TQSize tqsizeHint() const; public slots: - void setColor(const QColor & c); + void setColor(const TQColor & c); private slots: @@ -83,12 +85,12 @@ private slots: protected: - virtual void drawButtonLabel( QPainter *p ); + virtual void drawButtonLabel( TQPainter *p ); private: KisColorPopup * m_popup; - QColor m_color; + TQColor m_color; }; #endif diff --git a/krita/ui/kis_config.cc b/krita/ui/kis_config.cc index b233a1eb..6d07790b 100644 --- a/krita/ui/kis_config.cc +++ b/krita/ui/kis_config.cc @@ -30,15 +30,15 @@ namespace { const double IMG_DEFAULT_RESOLUTION = 100.0; - const Q_INT32 IMG_DEFAULT_WIDTH = 512; - const Q_INT32 IMG_DEFAULT_HEIGHT = 512; + const TQ_INT32 IMG_DEFAULT_WIDTH = 512; + const TQ_INT32 IMG_DEFAULT_HEIGHT = 512; const enumCursorStyle DEFAULT_CURSOR_STYLE = CURSOR_STYLE_OUTLINE; - const Q_INT32 DEFAULT_MAX_THREADS = 4; - const Q_INT32 DEFAULT_MAX_TILES_MEM = 500; // 8192 kilobytes given 64x64 tiles with 32bpp - const Q_INT32 DEFAULT_SWAPPINESS = 100; - const Q_INT32 DEFAULT_PRESSURE_CORRECTION = 50; - const Q_INT32 DEFAULT_DOCKABILITY = 0; - const Q_INT32 DEFAULT_UNDO_LIMIT = 50; + const TQ_INT32 DEFAULT_MAX_THREADS = 4; + const TQ_INT32 DEFAULT_MAX_TILES_MEM = 500; // 8192 kilobytes given 64x64 tiles with 32bpp + const TQ_INT32 DEFAULT_SWAPPINESS = 100; + const TQ_INT32 DEFAULT_PRESSURE_CORRECTION = 50; + const TQ_INT32 DEFAULT_DOCKABILITY = 0; + const TQ_INT32 DEFAULT_UNDO_LIMIT = 50; } KisConfig::KisConfig() @@ -80,22 +80,22 @@ void KisConfig::setUndoEnabled(bool undo) } -Q_INT32 KisConfig::defUndoLimit() const +TQ_INT32 KisConfig::defUndoLimit() const { return m_cfg->readNumEntry("undolimit", DEFAULT_UNDO_LIMIT); } -void KisConfig::defUndoLimit(Q_INT32 limit) +void KisConfig::defUndoLimit(TQ_INT32 limit) { m_cfg->writeEntry("undolimit", limit); } -Q_INT32 KisConfig::defImgWidth() const +TQ_INT32 KisConfig::defImgWidth() const { return m_cfg->readNumEntry("imgWidthDef", IMG_DEFAULT_WIDTH); } -Q_INT32 KisConfig::defImgHeight() const +TQ_INT32 KisConfig::defImgHeight() const { return m_cfg->readNumEntry("imgHeightDef", IMG_DEFAULT_HEIGHT); } @@ -105,12 +105,12 @@ double KisConfig::defImgResolution() const return m_cfg->readDoubleNumEntry("imgResolutionDef", IMG_DEFAULT_RESOLUTION); } -void KisConfig::defImgWidth(Q_INT32 width) +void KisConfig::defImgWidth(TQ_INT32 width) { m_cfg->writeEntry("imgWidthDef", width); } -void KisConfig::defImgHeight(Q_INT32 height) +void KisConfig::defImgHeight(TQ_INT32 height) { m_cfg->writeEntry("imgHeightDef", height); } @@ -136,45 +136,45 @@ void KisConfig::setCursorStyle(enumCursorStyle style) } -QString KisConfig::monitorProfile() const +TQString KisConfig::monitorProfile() const { return m_cfg->readEntry("monitorProfile", ""); } -void KisConfig::setMonitorProfile(QString monitorProfile) +void KisConfig::setMonitorProfile(TQString monitorProfile) { m_cfg->writeEntry("monitorProfile", monitorProfile); } -QString KisConfig::workingColorSpace() const +TQString KisConfig::workingColorSpace() const { return m_cfg->readEntry("workingColorSpace", "RGBA"); } -void KisConfig::setWorkingColorSpace(QString workingColorSpace) +void KisConfig::setWorkingColorSpace(TQString workingColorSpace) { m_cfg->writeEntry(workingColorSpace, workingColorSpace); } -QString KisConfig::printerColorSpace() const +TQString KisConfig::printerColorSpace() const { return m_cfg->readEntry("printerColorSpace", "CMYK"); } -void KisConfig::setPrinterColorSpace(QString printerColorSpace) +void KisConfig::setPrinterColorSpace(TQString printerColorSpace) { m_cfg->writeEntry("printerColorSpace", printerColorSpace); } -QString KisConfig::printerProfile() const +TQString KisConfig::printerProfile() const { return m_cfg->readEntry("printerProfile", ""); } -void KisConfig::setPrinterProfile(QString printerProfile) +void KisConfig::setPrinterProfile(TQString printerProfile) { m_cfg->writeEntry("printerProfile", printerProfile); } @@ -202,23 +202,23 @@ void KisConfig::setShowRulers(bool rulers) } -Q_INT32 KisConfig::pasteBehaviour() const +TQ_INT32 KisConfig::pasteBehaviour() const { return m_cfg->readNumEntry("pasteBehaviour", 2); } -void KisConfig::setPasteBehaviour(Q_INT32 renderIntent) +void KisConfig::setPasteBehaviour(TQ_INT32 renderIntent) { m_cfg->writeEntry("pasteBehaviour", renderIntent); } -Q_INT32 KisConfig::renderIntent() const +TQ_INT32 KisConfig::renderIntent() const { return m_cfg->readNumEntry("renderIntent", INTENT_PERCEPTUAL); } -void KisConfig::setRenderIntent(Q_INT32 renderIntent) +void KisConfig::setRenderIntent(TQ_INT32 renderIntent) { m_cfg->writeEntry("renderIntent", renderIntent); } @@ -243,82 +243,82 @@ void KisConfig::setUseOpenGLShaders(bool useOpenGLShaders) m_cfg->writeEntry("useOpenGLShaders", useOpenGLShaders); } -Q_INT32 KisConfig::maxNumberOfThreads() +TQ_INT32 KisConfig::maxNumberOfThreads() { return m_cfg->readNumEntry("maxthreads", DEFAULT_MAX_THREADS); } -void KisConfig::setMaxNumberOfThreads(Q_INT32 maxThreads) +void KisConfig::setMaxNumberOfThreads(TQ_INT32 maxThreads) { m_cfg->writeEntry("maxthreads", maxThreads); } -Q_INT32 KisConfig::maxTilesInMem() const +TQ_INT32 KisConfig::maxTilesInMem() const { return m_cfg->readNumEntry("maxtilesinmem", DEFAULT_MAX_TILES_MEM); } -void KisConfig::setMaxTilesInMem(Q_INT32 tiles) +void KisConfig::setMaxTilesInMem(TQ_INT32 tiles) { m_cfg->writeEntry("maxtilesinmem", tiles); } -Q_INT32 KisConfig::swappiness() const +TQ_INT32 KisConfig::swappiness() const { return m_cfg->readNumEntry("swappiness", DEFAULT_SWAPPINESS); } -void KisConfig::setSwappiness(Q_INT32 swappiness) +void KisConfig::setSwappiness(TQ_INT32 swappiness) { m_cfg->writeEntry("swappiness", swappiness); } -Q_INT32 KisConfig::getPressureCorrection() +TQ_INT32 KisConfig::getPressureCorrection() { return m_cfg->readNumEntry( "pressurecorrection", DEFAULT_PRESSURE_CORRECTION ); } -void KisConfig::setPressureCorrection( Q_INT32 correction ) +void KisConfig::setPressureCorrection( TQ_INT32 correction ) { m_cfg->writeEntry( "pressurecorrection", correction ); } -Q_INT32 KisConfig::getDefaultPressureCorrection() +TQ_INT32 KisConfig::getDefaultPressureCorrection() { return DEFAULT_PRESSURE_CORRECTION; } -bool KisConfig::tabletDeviceEnabled(const QString& tabletDeviceName) const +bool KisConfig::tabletDeviceEnabled(const TQString& tabletDeviceName) const { return m_cfg->readBoolEntry("TabletDevice" + tabletDeviceName + "Enabled", false); } -void KisConfig::setTabletDeviceEnabled(const QString& tabletDeviceName, bool enabled) +void KisConfig::setTabletDeviceEnabled(const TQString& tabletDeviceName, bool enabled) { m_cfg->writeEntry("TabletDevice" + tabletDeviceName + "Enabled", enabled); } -Q_INT32 KisConfig::tabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 defaultAxis) const +TQ_INT32 KisConfig::tabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 defaultAxis) const { return m_cfg->readNumEntry("TabletDevice" + tabletDeviceName + axisName, defaultAxis); } -void KisConfig::setTabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 axis) const +void KisConfig::setTabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 axis) const { m_cfg->writeEntry("TabletDevice" + tabletDeviceName + axisName, axis); } -void KisConfig::setDockability( Q_INT32 dockability ) +void KisConfig::setDockability( TQ_INT32 dockability ) { m_cfg->writeEntry( "palettesdockability", dockability ); } -Q_INT32 KisConfig::dockability() +TQ_INT32 KisConfig::dockability() { return m_cfg->readNumEntry("palettesdockability", DEFAULT_DOCKABILITY); } -Q_INT32 KisConfig::getDefaultDockability() +TQ_INT32 KisConfig::getDefaultDockability() { return DEFAULT_DOCKABILITY; } @@ -330,7 +330,7 @@ float KisConfig::dockerFontSize() float KisConfig::getDefaultDockerFontSize() { - float ps = QMIN(9, KGlobalSettings::generalFont().pointSize() * 0.8); + float ps = TQMIN(9, KGlobalSettings::generalFont().pointSize() * 0.8); if (ps < 6) ps = 6; return ps; } @@ -340,102 +340,102 @@ void KisConfig::setDockerFontSize(float size) m_cfg->writeEntry("palettefontsize", size); } -Q_UINT32 KisConfig::getGridMainStyle() +TQ_UINT32 KisConfig::getGridMainStyle() { - Q_UINT32 v = m_cfg->readNumEntry("gridmainstyle", 0); + TQ_UINT32 v = m_cfg->readNumEntry("gridmainstyle", 0); if (v > 2) v = 2; return v; } -void KisConfig::setGridMainStyle(Q_UINT32 v) +void KisConfig::setGridMainStyle(TQ_UINT32 v) { m_cfg->writeEntry("gridmainstyle", v); } -Q_UINT32 KisConfig::getGridSubdivisionStyle() +TQ_UINT32 KisConfig::getGridSubdivisionStyle() { - Q_UINT32 v = m_cfg->readNumEntry("gridsubdivisionstyle", 1); + TQ_UINT32 v = m_cfg->readNumEntry("gridsubdivisionstyle", 1); if (v > 2) v = 2; return v; } -void KisConfig::setGridSubdivisionStyle(Q_UINT32 v) +void KisConfig::setGridSubdivisionStyle(TQ_UINT32 v) { m_cfg->writeEntry("gridsubdivisionstyle", v); } -QColor KisConfig::getGridMainColor() +TQColor KisConfig::getGridMainColor() { - return m_cfg->readColorEntry("gridmaincolor", new QColor(99,99,99)); + return m_cfg->readColorEntry("gridmaincolor", new TQColor(99,99,99)); } -void KisConfig::setGridMainColor(QColor v) +void KisConfig::setGridMainColor(TQColor v) { m_cfg->writeEntry("gridmaincolor", v); } -QColor KisConfig::getGridSubdivisionColor() +TQColor KisConfig::getGridSubdivisionColor() { - return m_cfg->readColorEntry("gridsubdivisioncolor", new QColor(150,150,150)); + return m_cfg->readColorEntry("gridsubdivisioncolor", new TQColor(150,150,150)); } -void KisConfig::setGridSubdivisionColor(QColor v) +void KisConfig::setGridSubdivisionColor(TQColor v) { m_cfg->writeEntry("gridsubdivisioncolor", v); } -Q_UINT32 KisConfig::getGridHSpacing() +TQ_UINT32 KisConfig::getGridHSpacing() { - Q_INT32 v = m_cfg->readNumEntry("gridhspacing", 10); - return (Q_UINT32)QMAX(1, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridhspacing", 10); + return (TQ_UINT32)TQMAX(1, v ); } -void KisConfig::setGridHSpacing(Q_UINT32 v) +void KisConfig::setGridHSpacing(TQ_UINT32 v) { m_cfg->writeEntry("gridhspacing", v); } -Q_UINT32 KisConfig::getGridVSpacing() +TQ_UINT32 KisConfig::getGridVSpacing() { - Q_INT32 v = m_cfg->readNumEntry("gridvspacing", 10); - return (Q_UINT32)QMAX(1, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridvspacing", 10); + return (TQ_UINT32)TQMAX(1, v ); } -void KisConfig::setGridVSpacing(Q_UINT32 v) +void KisConfig::setGridVSpacing(TQ_UINT32 v) { m_cfg->writeEntry("gridvspacing", v); } -Q_UINT32 KisConfig::getGridSubdivisions() +TQ_UINT32 KisConfig::getGridSubdivisions() { - Q_INT32 v = m_cfg->readNumEntry("gridsubsivisons", 2); - return (Q_UINT32)QMAX(1, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridsubsivisons", 2); + return (TQ_UINT32)TQMAX(1, v ); } -void KisConfig::setGridSubdivisions(Q_UINT32 v) +void KisConfig::setGridSubdivisions(TQ_UINT32 v) { return m_cfg->writeEntry("gridsubsivisons", v); } -Q_UINT32 KisConfig::getGridOffsetX() +TQ_UINT32 KisConfig::getGridOffsetX() { - Q_INT32 v = m_cfg->readNumEntry("gridoffsetx", 0); - return (Q_UINT32)QMAX(0, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridoffsetx", 0); + return (TQ_UINT32)TQMAX(0, v ); } -void KisConfig::setGridOffsetX(Q_UINT32 v) +void KisConfig::setGridOffsetX(TQ_UINT32 v) { m_cfg->writeEntry("gridoffsetx", v); } -Q_UINT32 KisConfig::getGridOffsetY() +TQ_UINT32 KisConfig::getGridOffsetY() { - Q_INT32 v = m_cfg->readNumEntry("gridoffsety", 0); - return (Q_UINT32)QMAX(0, v ); + TQ_INT32 v = m_cfg->readNumEntry("gridoffsety", 0); + return (TQ_UINT32)TQMAX(0, v ); } -void KisConfig::setGridOffsetY(Q_UINT32 v) +void KisConfig::setGridOffsetY(TQ_UINT32 v) { m_cfg->writeEntry("gridoffsety", v); } diff --git a/krita/ui/kis_config.h b/krita/ui/kis_config.h index 66824007..4fe971df 100644 --- a/krita/ui/kis_config.h +++ b/krita/ui/kis_config.h @@ -32,14 +32,14 @@ public: bool undoEnabled() const; void setUndoEnabled(bool undo); - Q_INT32 defUndoLimit() const; - void defUndoLimit(Q_INT32 limit); + TQ_INT32 defUndoLimit() const; + void defUndoLimit(TQ_INT32 limit); - Q_INT32 defImgWidth() const; - void defImgWidth(Q_INT32 width); + TQ_INT32 defImgWidth() const; + void defImgWidth(TQ_INT32 width); - Q_INT32 defImgHeight() const; - void defImgHeight(Q_INT32 height); + TQ_INT32 defImgHeight() const; + void defImgHeight(TQ_INT32 height); double defImgResolution() const; void defImgResolution(double res); @@ -48,20 +48,20 @@ public: enumCursorStyle getDefaultCursorStyle() const; void setCursorStyle(enumCursorStyle style); - QString monitorProfile() const; - void setMonitorProfile(QString monitorProfile); + TQString monitorProfile() const; + void setMonitorProfile(TQString monitorProfile); - QString workingColorSpace() const; - void setWorkingColorSpace(QString workingColorSpace); + TQString workingColorSpace() const; + void setWorkingColorSpace(TQString workingColorSpace); - QString importProfile() const; - void setImportProfile(QString importProfile); + TQString importProfile() const; + void setImportProfile(TQString importProfile); - QString printerColorSpace() const; - void setPrinterColorSpace(QString printerColorSpace); + TQString printerColorSpace() const; + void setPrinterColorSpace(TQString printerColorSpace); - QString printerProfile() const; - void setPrinterProfile(QString printerProfile); + TQString printerProfile() const; + void setPrinterProfile(TQString printerProfile); bool useBlackPointCompensation() const; void setUseBlackPointCompensation(bool useBlackPointCompensation); @@ -69,11 +69,11 @@ public: bool showRulers() const; void setShowRulers(bool rulers); - Q_INT32 pasteBehaviour() const; - void setPasteBehaviour(Q_INT32 behaviour); + TQ_INT32 pasteBehaviour() const; + void setPasteBehaviour(TQ_INT32 behaviour); - Q_INT32 renderIntent() const; - void setRenderIntent(Q_INT32 renderIntent); + TQ_INT32 renderIntent() const; + void setRenderIntent(TQ_INT32 renderIntent); bool useOpenGL() const; void setUseOpenGL(bool useOpenGL); @@ -81,55 +81,55 @@ public: bool useOpenGLShaders() const; void setUseOpenGLShaders(bool useOpenGLShaders); - Q_INT32 maxNumberOfThreads(); - void setMaxNumberOfThreads(Q_INT32 numberOfThreads); + TQ_INT32 maxNumberOfThreads(); + void setMaxNumberOfThreads(TQ_INT32 numberOfThreads); /// Maximum tiles in memory (this is a guideline, not absolute) - Q_INT32 maxTilesInMem() const; - void setMaxTilesInMem(Q_INT32 tiles); + TQ_INT32 maxTilesInMem() const; + void setMaxTilesInMem(TQ_INT32 tiles); /// Number of tiles that will be swapped at once. The higher, the more swapped, but more /// chance that it will become slow - Q_INT32 swappiness() const; - void setSwappiness(Q_INT32 swappiness); + TQ_INT32 swappiness() const; + void setSwappiness(TQ_INT32 swappiness); - Q_INT32 getPressureCorrection(); - void setPressureCorrection( Q_INT32 correction); - Q_INT32 getDefaultPressureCorrection(); + TQ_INT32 getPressureCorrection(); + void setPressureCorrection( TQ_INT32 correction); + TQ_INT32 getDefaultPressureCorrection(); - bool tabletDeviceEnabled(const QString& tabletDeviceName) const; - void setTabletDeviceEnabled(const QString& tabletDeviceName, bool enabled); + bool tabletDeviceEnabled(const TQString& tabletDeviceName) const; + void setTabletDeviceEnabled(const TQString& tabletDeviceName, bool enabled); - Q_INT32 tabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 defaultAxis) const; - void setTabletDeviceAxis(const QString& tabletDeviceName, const QString& axisName, Q_INT32 axis) const; + TQ_INT32 tabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 defaultAxis) const; + void setTabletDeviceAxis(const TQString& tabletDeviceName, const TQString& axisName, TQ_INT32 axis) const; - Q_INT32 dockability(); - Q_INT32 getDefaultDockability(); - void setDockability( Q_INT32 dockability); + TQ_INT32 dockability(); + TQ_INT32 getDefaultDockability(); + void setDockability( TQ_INT32 dockability); float dockerFontSize(); float getDefaultDockerFontSize(); void setDockerFontSize(float); - Q_UINT32 getGridMainStyle(); - void setGridMainStyle(Q_UINT32 v); - Q_UINT32 getGridSubdivisionStyle(); - void setGridSubdivisionStyle(Q_UINT32 v); - QColor getGridMainColor(); - void setGridMainColor(QColor v); - QColor getGridSubdivisionColor(); - void setGridSubdivisionColor(QColor v); - Q_UINT32 getGridHSpacing(); - void setGridHSpacing(Q_UINT32 v); - Q_UINT32 getGridVSpacing(); - void setGridVSpacing(Q_UINT32 v); - Q_UINT32 getGridSubdivisions(); - void setGridSubdivisions(Q_UINT32 v); - Q_UINT32 getGridOffsetX(); - void setGridOffsetX(Q_UINT32 v); - Q_UINT32 getGridOffsetY(); - void setGridOffsetY(Q_UINT32 v); + TQ_UINT32 getGridMainStyle(); + void setGridMainStyle(TQ_UINT32 v); + TQ_UINT32 getGridSubdivisionStyle(); + void setGridSubdivisionStyle(TQ_UINT32 v); + TQColor getGridMainColor(); + void setGridMainColor(TQColor v); + TQColor getGridSubdivisionColor(); + void setGridSubdivisionColor(TQColor v); + TQ_UINT32 getGridHSpacing(); + void setGridHSpacing(TQ_UINT32 v); + TQ_UINT32 getGridVSpacing(); + void setGridVSpacing(TQ_UINT32 v); + TQ_UINT32 getGridSubdivisions(); + void setGridSubdivisions(TQ_UINT32 v); + TQ_UINT32 getGridOffsetX(); + void setGridOffsetX(TQ_UINT32 v); + TQ_UINT32 getGridOffsetY(); + void setGridOffsetY(TQ_UINT32 v); private: diff --git a/krita/ui/kis_controlframe.cc b/krita/ui/kis_controlframe.cc index d2e5a432..08f0c4c3 100644 --- a/krita/ui/kis_controlframe.cc +++ b/krita/ui/kis_controlframe.cc @@ -22,12 +22,12 @@ #include <stdlib.h> -#include <qapplication.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qframe.h> -#include <qwidget.h> -#include <qevent.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqframe.h> +#include <tqwidget.h> +#include <tqevent.h> #include <ktoolbar.h> #include <kmainwindow.h> @@ -60,15 +60,15 @@ #ifdef HAVE_TEXT_BRUSH #include "kis_text_brush.h" #endif -KisPopupFrame::KisPopupFrame(QWidget * parent, const char* name) - : QPopupMenu(parent, name) +KisPopupFrame::KisPopupFrame(TQWidget * tqparent, const char* name) + : TQPopupMenu(tqparent, name) { setFocusPolicy(StrongFocus); } -void KisPopupFrame::keyPressEvent(QKeyEvent * e) +void KisPopupFrame::keyPressEvent(TQKeyEvent * e) { - if (e->key()== Qt::Key_Escape) + if (e->key()== TQt::Key_Escape) { hide(); e->accept(); @@ -80,8 +80,8 @@ void KisPopupFrame::keyPressEvent(QKeyEvent * e) KisControlFrame::KisControlFrame( KMainWindow * /*window*/, KisView * view, const char* name ) - : QObject(view, name) - //: KToolBar ( window, Qt::DockTop, false, name, true, true ) + : TQObject(view, name) + //: KToolBar ( window, TQt::DockTop, false, name, true, true ) , m_view(view) , m_brushWidget(0) , m_patternWidget(0) @@ -218,11 +218,11 @@ void KisControlFrame::createBrushesChooser(KisView * view) m_brushChooserPopup = new KisPopupFrame(m_brushWidget, "brush_chooser_popup"); - QHBoxLayout * l = new QHBoxLayout(m_brushChooserPopup, 2, 2, "brushpopuplayout"); + TQHBoxLayout * l = new TQHBoxLayout(m_brushChooserPopup, 2, 2, "brushpopuptqlayout"); - QTabWidget * m_brushesTab = new QTabWidget(m_brushChooserPopup, "brushestab"); - m_brushesTab->setTabShape(QTabWidget::Triangular); - m_brushesTab->setFocusPolicy(QWidget::NoFocus); + TQTabWidget * m_brushesTab = new TQTabWidget(m_brushChooserPopup, "brushestab"); + m_brushesTab->setTabShape(TQTabWidget::Triangular); + m_brushesTab->setFocusPolicy(TQ_NoFocus); m_brushesTab->setFont(m_font); m_brushesTab->setMargin(1); @@ -230,7 +230,7 @@ void KisControlFrame::createBrushesChooser(KisView * view) KisAutobrush * m_autobrush = new KisAutobrush(m_brushesTab, "autobrush", i18n("Autobrush")); m_brushesTab->addTab( m_autobrush, i18n("Autobrush")); - connect(m_autobrush, SIGNAL(activatedResource(KisResource*)), m_view, SLOT(brushActivated( KisResource* ))); + connect(m_autobrush, TQT_SIGNAL(activatedResource(KisResource*)), m_view, TQT_SLOT(brushActivated( KisResource* ))); KisBrushChooser * m_brushChooser = new KisBrushChooser(m_brushesTab, "brush_chooser"); m_brushesTab->addTab( m_brushChooser, i18n("Predefined Brushes")); @@ -238,19 +238,19 @@ void KisControlFrame::createBrushesChooser(KisView * view) KisCustomBrush* customBrushes = new KisCustomBrush(m_brushesTab, "custombrush", i18n("Custom Brush"), m_view); m_brushesTab->addTab( customBrushes, i18n("Custom Brush")); - connect(customBrushes, SIGNAL(activatedResource(KisResource*)), - m_view, SLOT(brushActivated(KisResource*))); + connect(customBrushes, TQT_SIGNAL(activatedResource(KisResource*)), + m_view, TQT_SLOT(brushActivated(KisResource*))); #ifdef HAVE_TEXT_BRUSH KisTextBrush* textBrushes = new KisTextBrush(m_brushesTab, "textbrush", i18n("Text Brush")/*, m_view*/); m_brushesTab->addTab( textBrushes, i18n("Text Brush")); - connect(textBrushes, SIGNAL(activatedResource(KisResource*)), - m_view, SLOT(brushActivated(KisResource*))); + connect(textBrushes, TQT_SIGNAL(activatedResource(KisResource*)), + m_view, TQT_SLOT(brushActivated(KisResource*))); #endif m_brushChooser->setFont(m_font); m_brushMediator = new KisResourceMediator( m_brushChooser, this); - connect(m_brushMediator, SIGNAL(activatedResource(KisResource*)), m_view, SLOT(brushActivated(KisResource*))); + connect(m_brushMediator, TQT_SIGNAL(activatedResource(KisResource*)), m_view, TQT_SLOT(brushActivated(KisResource*))); KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("ImagePipeBrushServer"); @@ -258,7 +258,7 @@ void KisControlFrame::createBrushesChooser(KisView * view) rServer = KisResourceServerRegistry::instance()->get("BrushServer"); m_brushMediator->connectServer(rServer); - KisControlFrame::connect(view, SIGNAL(brushChanged(KisBrush *)), this, SLOT(slotBrushChanged( KisBrush *))); + KisControlFrame::connect(view, TQT_SIGNAL(brushChanged(KisBrush *)), this, TQT_SLOT(slotBrushChanged( KisBrush *))); m_brushChooser->setCurrent( 0 ); m_brushMediator->setActiveItem( m_brushChooser->currentItem() ); customBrushes->setResourceServer(rServer); @@ -270,11 +270,11 @@ void KisControlFrame::createPatternsChooser(KisView * view) { m_patternChooserPopup = new KisPopupFrame(m_patternWidget, "pattern_chooser_popup"); - QHBoxLayout * l2 = new QHBoxLayout(m_patternChooserPopup, 2, 2, "patternpopuplayout"); + TQHBoxLayout * l2 = new TQHBoxLayout(m_patternChooserPopup, 2, 2, "patternpopuptqlayout"); - QTabWidget * m_patternsTab = new QTabWidget(m_patternChooserPopup, "patternstab"); - m_patternsTab->setTabShape(QTabWidget::Triangular); - m_patternsTab->setFocusPolicy(QWidget::NoFocus); + TQTabWidget * m_patternsTab = new TQTabWidget(m_patternChooserPopup, "patternstab"); + m_patternsTab->setTabShape(TQTabWidget::Triangular); + m_patternsTab->setFocusPolicy(TQ_NoFocus); m_patternsTab->setFont(m_font); m_patternsTab->setMargin(1); l2->add( m_patternsTab ); @@ -291,15 +291,15 @@ void KisControlFrame::createPatternsChooser(KisView * view) m_patternMediator = new KisResourceMediator( chooser, view); - connect( m_patternMediator, SIGNAL(activatedResource(KisResource*)), view, SLOT(patternActivated(KisResource*))); - connect(customPatterns, SIGNAL(activatedResource(KisResource*)), - view, SLOT(patternActivated(KisResource*))); + connect( m_patternMediator, TQT_SIGNAL(activatedResource(KisResource*)), view, TQT_SLOT(patternActivated(KisResource*))); + connect(customPatterns, TQT_SIGNAL(activatedResource(KisResource*)), + view, TQT_SLOT(patternActivated(KisResource*))); KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("PatternServer"); m_patternMediator->connectServer(rServer); - KisControlFrame::connect(view, SIGNAL(patternChanged(KisPattern *)), this, SLOT(slotPatternChanged( KisPattern *))); + KisControlFrame::connect(view, TQT_SIGNAL(patternChanged(KisPattern *)), this, TQT_SLOT(slotPatternChanged( KisPattern *))); chooser->setCurrent( 0 ); m_patternMediator->setActiveItem( chooser->currentItem() ); @@ -311,11 +311,11 @@ void KisControlFrame::createGradientsChooser(KisView * view) { m_gradientChooserPopup = new KisPopupFrame(m_gradientWidget, "gradient_chooser_popup"); - QHBoxLayout * l2 = new QHBoxLayout(m_gradientChooserPopup, 2, 2, "gradientpopuplayout"); + TQHBoxLayout * l2 = new TQHBoxLayout(m_gradientChooserPopup, 2, 2, "gradientpopuptqlayout"); - QTabWidget * m_gradientTab = new QTabWidget(m_gradientChooserPopup, "gradientstab"); - m_gradientTab->setTabShape(QTabWidget::Triangular); - m_gradientTab->setFocusPolicy(QWidget::NoFocus); + TQTabWidget * m_gradientTab = new TQTabWidget(m_gradientChooserPopup, "gradientstab"); + m_gradientTab->setTabShape(TQTabWidget::Triangular); + m_gradientTab->setFocusPolicy(TQ_NoFocus); m_gradientTab->setFont(m_font); m_gradientTab->setMargin(1); @@ -327,13 +327,13 @@ void KisControlFrame::createGradientsChooser(KisView * view) m_gradientTab->addTab( m_gradientChooser, i18n("Gradients")); m_gradientMediator = new KisResourceMediator( m_gradientChooser, view); - connect(m_gradientMediator, SIGNAL(activatedResource(KisResource*)), view, SLOT(gradientActivated(KisResource*))); + connect(m_gradientMediator, TQT_SIGNAL(activatedResource(KisResource*)), view, TQT_SLOT(gradientActivated(KisResource*))); KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("GradientServer"); m_gradientMediator->connectServer(rServer); - connect(view, SIGNAL(gradientChanged(KisGradient *)), this, SLOT(slotGradientChanged( KisGradient *))); + connect(view, TQT_SIGNAL(gradientChanged(KisGradient *)), this, TQT_SLOT(slotGradientChanged( KisGradient *))); m_gradientChooser->setCurrent( 0 ); m_gradientMediator->setActiveItem( m_gradientChooser->currentItem() ); } diff --git a/krita/ui/kis_controlframe.h b/krita/ui/kis_controlframe.h index 2007d5cc..f3058702 100644 --- a/krita/ui/kis_controlframe.h +++ b/krita/ui/kis_controlframe.h @@ -22,14 +22,14 @@ #ifndef __kis_controlframe_h__ #define __kis_controlframe_h__ -#include <qpopupmenu.h> +#include <tqpopupmenu.h> #include <ktoolbar.h> #include <koFrameButton.h> -class QWidget; -class QTabWidget; +class TQWidget; +class TQTabWidget; class KToolBar; @@ -49,14 +49,15 @@ class KisResourceMediator; class KisPaintopBox; class KisView; -class KisPopupFrame : public QPopupMenu { +class KisPopupFrame : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KisPopupFrame(QWidget * parent, const char * name = 0); - virtual void keyPressEvent(QKeyEvent *); + KisPopupFrame(TQWidget * tqparent, const char * name = 0); + virtual void keyPressEvent(TQKeyEvent *); public: @@ -72,9 +73,10 @@ private: * Control Frame - status display with access to * color selector, brushes, patterns, and preview */ -class KisControlFrame : public QObject //: public KToolBar +class KisControlFrame : public TQObject //: public KToolBar { Q_OBJECT + TQ_OBJECT public: KisControlFrame(KMainWindow * window, KisView * view, const char *name = 0 ); @@ -98,11 +100,11 @@ private: private: - QFont m_font; + TQFont m_font; KisView * m_view; - QTabWidget * m_brushesTab; - QTabWidget * m_gradientTab; + TQTabWidget * m_brushesTab; + TQTabWidget * m_gradientTab; KisIconWidget *m_brushWidget; KisIconWidget *m_patternWidget; diff --git a/krita/ui/kis_cursor.cc b/krita/ui/kis_cursor.cc index 0b0b6ea5..33c6ae04 100644 --- a/krita/ui/kis_cursor.cc +++ b/krita/ui/kis_cursor.cc @@ -19,10 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qbitmap.h> -#include <qcursor.h> -#include <qimage.h> -#include <qpainter.h> +#include <tqbitmap.h> +#include <tqcursor.h> +#include <tqimage.h> +#include <tqpainter.h> #include <kcursor.h> #include <kiconloader.h> @@ -34,76 +34,76 @@ KisCursor::KisCursor() {} /* - * Predefined Qt cursors + * Predefined TQt cursors */ -QCursor KisCursor::arrowCursor() +TQCursor KisCursor::arrowCursor() { - return Qt::arrowCursor; + return TQt::arrowCursor; } -QCursor KisCursor::upArrowCursor() +TQCursor KisCursor::upArrowCursor() { - return Qt::upArrowCursor; + return TQt::upArrowCursor; } -QCursor KisCursor::crossCursor() +TQCursor KisCursor::crossCursor() { - return Qt::crossCursor; + return TQt::crossCursor; } -QCursor KisCursor::waitCursor() +TQCursor KisCursor::waitCursor() { - return Qt::waitCursor; + return TQt::waitCursor; } -QCursor KisCursor::ibeamCursor() +TQCursor KisCursor::ibeamCursor() { - return Qt::ibeamCursor; + return TQt::ibeamCursor; } -QCursor KisCursor::sizeVerCursor() +TQCursor KisCursor::sizeVerCursor() { - return Qt::sizeVerCursor; + return TQt::sizeVerCursor; } -QCursor KisCursor::sizeHorCursor() +TQCursor KisCursor::sizeHorCursor() { - return Qt::sizeHorCursor; + return TQt::sizeHorCursor; } -QCursor KisCursor::sizeBDiagCursor() +TQCursor KisCursor::sizeBDiagCursor() { - return Qt::sizeBDiagCursor; + return TQt::sizeBDiagCursor; } -QCursor KisCursor::sizeFDiagCursor() +TQCursor KisCursor::sizeFDiagCursor() { - return Qt::sizeFDiagCursor; + return TQt::sizeFDiagCursor; } -QCursor KisCursor::sizeAllCursor() +TQCursor KisCursor::sizeAllCursor() { - return Qt::sizeAllCursor; + return TQt::sizeAllCursor; } -QCursor KisCursor::blankCursor() +TQCursor KisCursor::blankCursor() { - return Qt::blankCursor; + return TQt::blankCursor; } -QCursor KisCursor::splitVCursor() +TQCursor KisCursor::splitVCursor() { - return Qt::splitVCursor; + return TQt::splitVCursor; } -QCursor KisCursor::splitHCursor() +TQCursor KisCursor::splitHCursor() { - return Qt::splitHCursor; + return TQt::splitHCursor; } -QCursor KisCursor::pointingHandCursor() +TQCursor KisCursor::pointingHandCursor() { - return Qt::pointingHandCursor; + return TQt::pointingHandCursor; } @@ -111,7 +111,7 @@ QCursor KisCursor::pointingHandCursor() * Existing custom KimageShop cursors. Use the 'load' function for all new cursors. */ -QCursor KisCursor::pickerCursor() +TQCursor KisCursor::pickerCursor() { static unsigned char picker_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x7a, @@ -121,14 +121,14 @@ QCursor KisCursor::pickerCursor() 0x20, 0x07, 0x00, 0x90, 0x03, 0x00, 0xc8, 0x01, 0x00, 0xe4, 0x00, 0x00, 0x74, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap picker_bitmap(24, 24, picker_bits, true); - QBitmap picker_mask = picker_bitmap.createHeuristicMask( false ); + TQBitmap picker_bitmap(24, 24, picker_bits, true); + TQBitmap picker_tqmask = picker_bitmap.createHeuristicMask( false ); - return QCursor( picker_bitmap, picker_mask, 1, 22 ); + return TQCursor( picker_bitmap, picker_tqmask, 1, 22 ); } -QCursor KisCursor::pickerPlusCursor() +TQCursor KisCursor::pickerPlusCursor() { static unsigned char pickerplus_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x7a, @@ -138,14 +138,14 @@ QCursor KisCursor::pickerPlusCursor() 0x20, 0x07, 0x0c, 0x90, 0x83, 0x7f, 0xc8, 0x81, 0x7f, 0xe4, 0x00, 0x0c, 0x74, 0x00, 0x0c, 0x32, 0x00, 0x0c, 0x0a, 0x00, 0x0c, 0x00, 0x00, 0x00}; - QBitmap picker_bitmap(24, 24, pickerplus_bits, true); - QBitmap picker_mask = picker_bitmap.createHeuristicMask( false ); + TQBitmap picker_bitmap(24, 24, pickerplus_bits, true); + TQBitmap picker_tqmask = picker_bitmap.createHeuristicMask( false ); - return QCursor( picker_bitmap, picker_mask, 1, 22 ); + return TQCursor( picker_bitmap, picker_tqmask, 1, 22 ); } -QCursor KisCursor::pickerMinusCursor() +TQCursor KisCursor::pickerMinusCursor() { static unsigned char pickerminus_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x34, 0x00, 0x00, 0x7a, @@ -155,15 +155,15 @@ QCursor KisCursor::pickerMinusCursor() 0x20, 0x07, 0x00, 0x90, 0xc3, 0x7f, 0xc8, 0xc1, 0x7f, 0xe4, 0x00, 0x00, 0x74, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap picker_bitmap(24, 24, pickerminus_bits, true); - QBitmap picker_mask = picker_bitmap.createHeuristicMask( false ); + TQBitmap picker_bitmap(24, 24, pickerminus_bits, true); + TQBitmap picker_tqmask = picker_bitmap.createHeuristicMask( false ); - return QCursor( picker_bitmap, picker_mask, 1, 22 ); + return TQCursor( picker_bitmap, picker_tqmask, 1, 22 ); } -QCursor KisCursor::penCursor() +TQCursor KisCursor::penCursor() { static unsigned char pen_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x7d, @@ -173,13 +173,13 @@ QCursor KisCursor::penCursor() 0xd0, 0x0f, 0x00, 0x88, 0x07, 0x00, 0x88, 0x03, 0x00, 0xe4, 0x01, 0x00, 0x7c, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap pen_bitmap( 24, 24, pen_bits, true ); - QBitmap pen_mask = pen_bitmap.createHeuristicMask( false ); + TQBitmap pen_bitmap( 24, 24, pen_bits, true ); + TQBitmap pen_tqmask = pen_bitmap.createHeuristicMask( false ); - return QCursor( pen_bitmap, pen_mask, 1, 22 ); + return TQCursor( pen_bitmap, pen_tqmask, 1, 22 ); } -QCursor KisCursor::brushCursor() +TQCursor KisCursor::brushCursor() { static unsigned char brush_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x68, 0x00, @@ -191,13 +191,13 @@ QCursor KisCursor::brushCursor() 0xd0, 0x0f, 0x00, 0x00, 0xe8, 0x07, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap brush_bitmap( 25, 23, brush_bits, true ); - QBitmap brush_mask = brush_bitmap.createHeuristicMask( false ); + TQBitmap brush_bitmap( 25, 23, brush_bits, true ); + TQBitmap brush_tqmask = brush_bitmap.createHeuristicMask( false ); - return QCursor( brush_bitmap, brush_mask, 1, 21 ); + return TQCursor( brush_bitmap, brush_tqmask, 1, 21 ); } -QCursor KisCursor::airbrushCursor() +TQCursor KisCursor::airbrushCursor() { static unsigned char airbrush_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x68, 0x00, 0x00, 0x74, @@ -207,13 +207,13 @@ QCursor KisCursor::airbrushCursor() 0xd0, 0xff, 0x31, 0xe8, 0xf7, 0x30, 0xf4, 0x03, 0x18, 0xfc, 0x01, 0x0c, 0xf8, 0x00, 0x06, 0x76, 0x00, 0x03, 0x36, 0x00, 0x03, 0x00, 0x00, 0x00}; - QBitmap airbrush_bitmap( 24, 24, airbrush_bits, true ); - QBitmap airbrush_mask = airbrush_bitmap.createHeuristicMask( false ); + TQBitmap airbrush_bitmap( 24, 24, airbrush_bits, true ); + TQBitmap airbrush_tqmask = airbrush_bitmap.createHeuristicMask( false ); - return QCursor( airbrush_bitmap, airbrush_mask, 1, 22 ); + return TQCursor( airbrush_bitmap, airbrush_tqmask, 1, 22 ); } -QCursor KisCursor::eraserCursor() +TQCursor KisCursor::eraserCursor() { static unsigned char eraser_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x1d, 0x00, @@ -225,13 +225,13 @@ QCursor KisCursor::eraserCursor() 0xe2, 0x0f, 0x00, 0x00, 0xc4, 0x07, 0x00, 0x00, 0x88, 0x03, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - QBitmap eraser_bitmap( 25, 24, eraser_bits, true ); - QBitmap eraser_mask = eraser_bitmap.createHeuristicMask( false ); + TQBitmap eraser_bitmap( 25, 24, eraser_bits, true ); + TQBitmap eraser_tqmask = eraser_bitmap.createHeuristicMask( false ); - return QCursor( eraser_bitmap, eraser_mask, 7, 22 ); + return TQCursor( eraser_bitmap, eraser_tqmask, 7, 22 ); } -QCursor KisCursor::fillerCursor() +TQCursor KisCursor::fillerCursor() { static unsigned char filler_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x28, 0x00, @@ -241,13 +241,13 @@ QCursor KisCursor::fillerCursor() 0x9c, 0x01, 0x05, 0x1c, 0x82, 0x02, 0x18, 0x4c, 0x01, 0x18, 0xb0, 0x00, 0x08, 0x60, 0x00, 0x00, 0x00, 0x00}; - QBitmap filler_bitmap( 22, 22, filler_bits, true ); - QBitmap filler_mask = filler_bitmap.createHeuristicMask( false ); + TQBitmap filler_bitmap( 22, 22, filler_bits, true ); + TQBitmap filler_tqmask = filler_bitmap.createHeuristicMask( false ); - return QCursor( filler_bitmap, filler_mask, 3, 20 ); + return TQCursor( filler_bitmap, filler_tqmask, 3, 20 ); } -QCursor KisCursor::colorChangerCursor() +TQCursor KisCursor::colorChangerCursor() { static unsigned char colorChanger_bits[] = { 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x10, 0x01, 0x0e, 0x08, 0x02, 0x11, @@ -257,13 +257,13 @@ QCursor KisCursor::colorChangerCursor() 0xe8, 0x3d, 0x17, 0xd0, 0x3c, 0x10, 0x20, 0x38, 0x08, 0x40, 0x00, 0x06, 0x80, 0x81, 0x01, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00}; - QBitmap colorChanger_bitmap( 24, 23, colorChanger_bits, true ); - QBitmap colorChanger_mask = colorChanger_bitmap.createHeuristicMask( false ); + TQBitmap colorChanger_bitmap( 24, 23, colorChanger_bits, true ); + TQBitmap colorChanger_tqmask = colorChanger_bitmap.createHeuristicMask( false ); - return QCursor( colorChanger_bitmap, colorChanger_mask, 12, 10 ); + return TQCursor( colorChanger_bitmap, colorChanger_tqmask, 12, 10 ); } -QCursor KisCursor::zoomCursor() +TQCursor KisCursor::zoomCursor() { static unsigned char zoom_bits[] = { 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0xf0, 0x3f, 0x00, 0x38, 0x70, 0x00, @@ -273,13 +273,13 @@ QCursor KisCursor::zoomCursor() 0x00, 0xc0, 0x17, 0x00, 0x80, 0x2f, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00}; - QBitmap zoom_bitmap( 24, 23, zoom_bits, true ); - QBitmap zoom_mask = zoom_bitmap.createHeuristicMask( false ); + TQBitmap zoom_bitmap( 24, 23, zoom_bits, true ); + TQBitmap zoom_tqmask = zoom_bitmap.createHeuristicMask( false ); - return QCursor( zoom_bitmap, zoom_mask, 9, 8 ); + return TQCursor( zoom_bitmap, zoom_tqmask, 9, 8 ); } -QCursor KisCursor::moveCursor() +TQCursor KisCursor::moveCursor() { static unsigned char move_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x7e, 0x00, @@ -289,18 +289,18 @@ QCursor KisCursor::moveCursor() 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00}; - QBitmap move_bitmap( 24, 24, move_bits, true ); - QBitmap move_mask = move_bitmap.createHeuristicMask( false ); + TQBitmap move_bitmap( 24, 24, move_bits, true ); + TQBitmap move_tqmask = move_bitmap.createHeuristicMask( false ); - return QCursor( move_bitmap, move_mask, 12, 11 ); + return TQCursor( move_bitmap, move_tqmask, 12, 11 ); } -QCursor KisCursor::handCursor() +TQCursor KisCursor::handCursor() { return KCursor::handCursor(); } -QCursor KisCursor::selectCursor() +TQCursor KisCursor::selectCursor() { static unsigned char select_bits[] = { 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, @@ -310,65 +310,65 @@ QCursor KisCursor::selectCursor() 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00}; - QBitmap select_bitmap(23, 23, select_bits, true); - QBitmap select_mask = select_bitmap.createHeuristicMask( false ); + TQBitmap select_bitmap(23, 23, select_bits, true); + TQBitmap select_tqmask = select_bitmap.createHeuristicMask( false ); - return QCursor( select_bitmap, select_mask, 11, 11 ); + return TQCursor( select_bitmap, select_tqmask, 11, 11 ); } -QCursor KisCursor::openHandCursor() +TQCursor KisCursor::openHandCursor() { return load("openhand_cursor.xpm"); } -QCursor KisCursor::closedHandCursor() +TQCursor KisCursor::closedHandCursor() { return load("closedhand_cursor.xpm"); } -QCursor KisCursor::rotateCursor() +TQCursor KisCursor::rotateCursor() { return load("rotate_cursor.xpm"); } -QCursor KisCursor::load(const QString & iconName, int hotspotX, int hotspotY) +TQCursor KisCursor::load(const TQString & iconName, int hotspotX, int hotspotY) { - QString filename = KisFactory::instance()->dirs()->findResource("kis_pics", iconName); - QImage cursorImage; + TQString filename = KisFactory::instance()->dirs()->findResource("kis_pics", iconName); + TQImage cursorImage; cursorImage.load(filename); Q_ASSERT(!cursorImage.isNull()); Q_ASSERT(cursorImage.hasAlphaBuffer()); - QBitmap bitmap(cursorImage.width(), cursorImage.height()); - QBitmap mask(cursorImage.width(), cursorImage.height()); + TQBitmap bitmap(cursorImage.width(), cursorImage.height()); + TQBitmap tqmask(cursorImage.width(), cursorImage.height()); - QPainter bitmapPainter(&bitmap); - QPainter maskPainter(&mask); + TQPainter bitmapPainter(&bitmap); + TQPainter tqmaskPainter(&tqmask); - for (Q_INT32 x = 0; x < cursorImage.width(); ++x) { - for (Q_INT32 y = 0; y < cursorImage.height(); ++y) { + for (TQ_INT32 x = 0; x < cursorImage.width(); ++x) { + for (TQ_INT32 y = 0; y < cursorImage.height(); ++y) { - QRgb pixel = cursorImage.pixel(x, y); + TQRgb pixel = cursorImage.pixel(x, y); - if (qAlpha(pixel) < 128) { - bitmapPainter.setPen(Qt::color0); - maskPainter.setPen(Qt::color0); + if (tqAlpha(pixel) < 128) { + bitmapPainter.setPen(TQt::color0); + tqmaskPainter.setPen(TQt::color0); } else { - maskPainter.setPen(Qt::color1); + tqmaskPainter.setPen(TQt::color1); - if (qGray(pixel) < 128) { - bitmapPainter.setPen(Qt::color1); + if (tqGray(pixel) < 128) { + bitmapPainter.setPen(TQt::color1); } else { - bitmapPainter.setPen(Qt::color0); + bitmapPainter.setPen(TQt::color0); } } bitmapPainter.drawPoint(x, y); - maskPainter.drawPoint(x, y); + tqmaskPainter.drawPoint(x, y); } } - return QCursor(bitmap, mask, hotspotX, hotspotY); + return TQCursor(bitmap, tqmask, hotspotX, hotspotY); } diff --git a/krita/ui/kis_cursor.h b/krita/ui/kis_cursor.h index b4e7e344..69c5cbd5 100644 --- a/krita/ui/kis_cursor.h +++ b/krita/ui/kis_cursor.h @@ -22,7 +22,7 @@ #ifndef __kis_cursor_h__ #define __kis_cursor_h__ #include <koffice_export.h> -class QCursor; +class TQCursor; class KRITACORE_EXPORT KisCursor { @@ -31,43 +31,43 @@ public: KisCursor(); - // Predefined Qt cursors. - static QCursor arrowCursor(); // standard arrow cursor - static QCursor upArrowCursor(); // upwards arrow - static QCursor crossCursor(); // crosshair - static QCursor waitCursor(); // hourglass/watch - static QCursor ibeamCursor(); // ibeam/text entry - static QCursor sizeVerCursor(); // vertical resize - static QCursor sizeHorCursor(); // horizontal resize - static QCursor sizeBDiagCursor(); // diagonal resize (/) - static QCursor sizeFDiagCursor(); // diagonal resize (\) - static QCursor sizeAllCursor(); // all directions resize - static QCursor blankCursor(); // blank/invisible cursor - static QCursor splitVCursor(); // vertical splitting - static QCursor splitHCursor(); // horziontal splitting - static QCursor pointingHandCursor(); // a pointing hand + // Predefined TQt cursors. + static TQCursor arrowCursor(); // standard arrow cursor + static TQCursor upArrowCursor(); // upwards arrow + static TQCursor crossCursor(); // crosshair + static TQCursor waitCursor(); // hourglass/watch + static TQCursor ibeamCursor(); // ibeam/text entry + static TQCursor sizeVerCursor(); // vertical resize + static TQCursor sizeHorCursor(); // horizontal resize + static TQCursor sizeBDiagCursor(); // diagonal resize (/) + static TQCursor sizeFDiagCursor(); // diagonal resize (\) + static TQCursor sizeAllCursor(); // all directions resize + static TQCursor blankCursor(); // blank/invisible cursor + static TQCursor splitVCursor(); // vertical splitting + static TQCursor splitHCursor(); // horziontal splitting + static TQCursor pointingHandCursor(); // a pointing hand // Existing custom KimageShop cursors. Use the 'load' function for all new cursors. - static QCursor moveCursor(); // move tool cursor - static QCursor penCursor(); // pen tool cursor - static QCursor brushCursor(); // brush tool cursor - static QCursor airbrushCursor(); // airbrush tool cursor - static QCursor eraserCursor(); // eraser tool cursor - static QCursor fillerCursor(); // filler tool cursor - static QCursor pickerCursor(); // color picker cursor - static QCursor pickerPlusCursor(); // color picker cursor - static QCursor pickerMinusCursor(); // color picker cursor - static QCursor colorChangerCursor(); // color changer tool cursor - static QCursor selectCursor(); // select cursor - static QCursor zoomCursor(); // zoom tool cursor - static QCursor handCursor(); // hand tool cursor - static QCursor openHandCursor(); // Pan tool cursor - static QCursor closedHandCursor(); // Pan tool cursor - static QCursor rotateCursor(); // Transform tool cursor + static TQCursor moveCursor(); // move tool cursor + static TQCursor penCursor(); // pen tool cursor + static TQCursor brushCursor(); // brush tool cursor + static TQCursor airbrushCursor(); // airbrush tool cursor + static TQCursor eraserCursor(); // eraser tool cursor + static TQCursor fillerCursor(); // filler tool cursor + static TQCursor pickerCursor(); // color picker cursor + static TQCursor pickerPlusCursor(); // color picker cursor + static TQCursor pickerMinusCursor(); // color picker cursor + static TQCursor colorChangerCursor(); // color changer tool cursor + static TQCursor selectCursor(); // select cursor + static TQCursor zoomCursor(); // zoom tool cursor + static TQCursor handCursor(); // hand tool cursor + static TQCursor openHandCursor(); // Pan tool cursor + static TQCursor closedHandCursor(); // Pan tool cursor + static TQCursor rotateCursor(); // Transform tool cursor // Load a cursor from an image file. The image should have an alpha channel // and will be converted to black and white on loading. Any format loadable by - // QImage can be used. - static QCursor load(const QString & imageFilename, int hotspotX = -1, int hotspotY = -1); + // TQImage can be used. + static TQCursor load(const TQString & imageFilename, int hotspotX = -1, int hotspotY = -1); }; #endif // __kis_cursor_h__ diff --git a/krita/ui/kis_custom_brush.cc b/krita/ui/kis_custom_brush.cc index 3e6046e7..492d2003 100644 --- a/krita/ui/kis_custom_brush.cc +++ b/krita/ui/kis_custom_brush.cc @@ -18,11 +18,11 @@ #include <KoImageResource.h> #include <kdebug.h> -#include <qlabel.h> -#include <qimage.h> -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqimage.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kglobal.h> #include <kstandarddirs.h> #include <ktempfile.h> @@ -39,8 +39,8 @@ #include "kis_paint_layer.h" #include "kis_group_layer.h" -KisCustomBrush::KisCustomBrush(QWidget *parent, const char* name, const QString& caption, KisView* view) - : KisWdgCustomBrush(parent, name), m_view(view) +KisCustomBrush::KisCustomBrush(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view) + : KisWdgCustomBrush(tqparent, name), m_view(view) { Q_ASSERT(m_view); m_mediator = 0; @@ -50,18 +50,18 @@ KisCustomBrush::KisCustomBrush(QWidget *parent, const char* name, const QString& preview->setScaledContents(true); - connect(addButton, SIGNAL(pressed()), this, SLOT(slotAddPredefined())); - connect(brushButton, SIGNAL(pressed()), this, SLOT(slotUseBrush())); -// connect(exportButton, SIGNAL(pressed()), this, SLOT(slotExport())); - connect(style, SIGNAL(activated(int)), this, SLOT(slotUpdateCurrentBrush(int))); - connect(colorAsMask, SIGNAL(stateChanged(int)), this, SLOT(slotUpdateCurrentBrush(int))); + connect(addButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPredefined())); + connect(brushButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUseBrush())); +// connect(exportButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotExport())); + connect(style, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateCurrentBrush(int))); + connect(colorAsMask, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotUpdateCurrentBrush(int))); } KisCustomBrush::~KisCustomBrush() { delete m_brush; } -void KisCustomBrush::showEvent(QShowEvent *) { +void KisCustomBrush::showEvent(TQShowEvent *) { slotUpdateCurrentBrush(0); } @@ -69,7 +69,7 @@ void KisCustomBrush::slotUpdateCurrentBrush(int) { delete m_brush; if (m_view->canvasSubject() && m_view->canvasSubject()->currentImg()) { createBrush(); - preview->setPixmap(QPixmap(m_brush->img())); + preview->setPixmap(TQPixmap(m_brush->img())); } else { m_brush = 0; } @@ -82,8 +82,8 @@ void KisCustomBrush::slotExport() { void KisCustomBrush::slotAddPredefined() { // Save in the directory that is likely to be: ~/.kde/share/apps/krita/brushes // a unique file with this brushname - QString dir = KGlobal::dirs()->saveLocation("data", "krita/brushes"); - QString extension; + TQString dir = KGlobal::dirs()->saveLocation("data", "krita/brushes"); + TQString extension; if (style->currentItem() == 0) { extension = ".gbr"; @@ -124,8 +124,8 @@ void KisCustomBrush::createBrush() { } // For each layer in the current image, create a new image, and add it to the list - QValueVector< QValueVector<KisPaintDevice*> > devices; - devices.push_back(QValueVector<KisPaintDevice*>()); + TQValueVector< TQValueVector<KisPaintDevice*> > devices; + devices.push_back(TQValueVector<KisPaintDevice*>()); int w = img->width(); int h = img->height(); @@ -138,7 +138,7 @@ void KisCustomBrush::createBrush() { devices.at(0).push_back(paint->paintDevice()); layer = layer->nextSibling(); } - QValueVector<KisPipeBrushParasite::SelectionMode> modes; + TQValueVector<KisPipeBrushParasite::SelectionMode> modes; switch(comboBox2->currentItem()) { case 0: modes.push_back(KisPipeBrushParasite::Constant); break; diff --git a/krita/ui/kis_custom_brush.h b/krita/ui/kis_custom_brush.h index 8beb52c2..56e90553 100644 --- a/krita/ui/kis_custom_brush.h +++ b/krita/ui/kis_custom_brush.h @@ -19,7 +19,7 @@ #ifndef KIS_CUSTOM_BRUSH_H_ #define KIS_CUSTOM_BRUSH_H_ -#include <qobject.h> +#include <tqobject.h> #include "wdgcustombrush.h" @@ -31,8 +31,9 @@ class KisResourceServerBase; class KisCustomBrush : public KisWdgCustomBrush { Q_OBJECT + TQ_OBJECT public: - KisCustomBrush(QWidget *parent, const char* name, const QString& caption, KisView* view); + KisCustomBrush(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view); virtual ~KisCustomBrush(); void setResourceServer(KisResourceServerBase* server) { m_server = server; } @@ -43,7 +44,7 @@ signals: void activatedResource(KisResource *); protected: - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private slots: void slotExport(); diff --git a/krita/ui/kis_custom_image_widget.cc b/krita/ui/kis_custom_image_widget.cc index 79b9389f..0b77da9f 100644 --- a/krita/ui/kis_custom_image_widget.cc +++ b/krita/ui/kis_custom_image_widget.cc @@ -33,14 +33,14 @@ #include <kcolorcombo.h> #include <kdebug.h> -#include <qpushbutton.h> -#include <qslider.h> -#include <qtextedit.h> +#include <tqpushbutton.h> +#include <tqslider.h> +#include <tqtextedit.h> #include <KoUnitWidgets.h> -#include <qlabel.h> +#include <tqlabel.h> -KisCustomImageWidget::KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 defWidth, Q_INT32 defHeight, double resolution, QString defColorSpaceName, QString imageName) - : WdgNewImage(parent) { +KisCustomImageWidget::KisCustomImageWidget(TQWidget *tqparent, KisDoc *doc, TQ_INT32 defWidth, TQ_INT32 defHeight, double resolution, TQString defColorSpaceName, TQString imageName) + : WdgNewImage(tqparent) { m_doc = doc; txtName->setText(imageName); @@ -52,9 +52,9 @@ KisCustomImageWidget::KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 cmbColorSpaces->setIDList(KisMetaRegistry::instance()->csRegistry()->listKeys()); cmbColorSpaces->setCurrentText(defColorSpaceName); - connect(cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbProfiles(const KisID &))); - connect (m_createButton, SIGNAL( clicked() ), this, SLOT (buttonClicked()) ); + connect(cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbProfiles(const KisID &))); + connect (m_createButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT (buttonClicked()) ); m_createButton -> setDefault(true); fillCmbProfiles(cmbColorSpaces->currentItem()); @@ -65,9 +65,9 @@ KisCustomImageWidget::KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 void KisCustomImageWidget::buttonClicked() { KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getColorSpace(cmbColorSpaces->currentItem(), cmbProfile->currentText()); - QColor qc(cmbColor->color()); + TQColor qc(cmbColor->color()); - m_doc->newImage(txtName->text(), (Q_INT32)intWidth->value(), (Q_INT32)intHeight->value(), cs, KisColor(qc, cs), txtDescription->text(), doubleResolution->value()); + m_doc->newImage(txtName->text(), (TQ_INT32)intWidth->value(), (TQ_INT32)intHeight->value(), cs, KisColor(qc, cs), txtDescription->text(), doubleResolution->value()); KisImageSP img = m_doc->currentImage(); if (img) { KisLayerSP layer = img->activeLayer(); @@ -78,9 +78,9 @@ void KisCustomImageWidget::buttonClicked() { emit documentSelected(); } -Q_UINT8 KisCustomImageWidget::backgroundOpacity() const +TQ_UINT8 KisCustomImageWidget::backgroundOpacity() const { - Q_INT32 opacity = sliderOpacity->value(); + TQ_INT32 opacity = sliderOpacity->value(); if (!opacity) return 0; @@ -99,8 +99,8 @@ void KisCustomImageWidget::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); if (csf == 0) return; - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector<KisProfile *> ::iterator it; + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector<KisProfile *> ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { cmbProfile->insertItem((*it)->productName()); } diff --git a/krita/ui/kis_custom_image_widget.h b/krita/ui/kis_custom_image_widget.h index 31455f85..d951cb9e 100644 --- a/krita/ui/kis_custom_image_widget.h +++ b/krita/ui/kis_custom_image_widget.h @@ -32,13 +32,14 @@ class KisID; */ class KisCustomImageWidget : public WdgNewImage { Q_OBJECT + TQ_OBJECT public: /** * Constructor. Please note that this class is being used/created by KisDoc. - * @param parent the parent widget + * @param tqparent the tqparent widget * @param doc the document that wants to be altered */ - KisCustomImageWidget(QWidget *parent, KisDoc *doc, Q_INT32 defWidth, Q_INT32 defHeight, double resolution, QString defColorSpaceName, QString imageName); + KisCustomImageWidget(TQWidget *tqparent, KisDoc *doc, TQ_INT32 defWidth, TQ_INT32 defHeight, double resolution, TQString defColorSpaceName, TQString imageName); private slots: void buttonClicked(); @@ -49,7 +50,7 @@ signals: void documentSelected(); private: - Q_UINT8 backgroundOpacity() const; + TQ_UINT8 backgroundOpacity() const; KisDoc *m_doc; }; diff --git a/krita/ui/kis_custom_palette.cc b/krita/ui/kis_custom_palette.cc index 16631116..2a6c1489 100644 --- a/krita/ui/kis_custom_palette.cc +++ b/krita/ui/kis_custom_palette.cc @@ -18,11 +18,11 @@ #include <KoImageResource.h> #include <kdebug.h> -#include <qlineedit.h> -#include <qimage.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qvalidator.h> +#include <tqlineedit.h> +#include <tqimage.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqvalidator.h> #include <kglobal.h> #include <kstandarddirs.h> @@ -39,8 +39,8 @@ #include "kis_resource_mediator.h" #include "kis_resourceserver.h" -KisCustomPalette::KisCustomPalette(QWidget *parent, const char* name, const QString& caption, KisView* view) - : KisWdgCustomPalette(parent, name), m_view(view) +KisCustomPalette::KisCustomPalette(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view) + : KisWdgCustomPalette(tqparent, name), m_view(view) { Q_ASSERT(m_view); m_mediator = 0; @@ -52,9 +52,9 @@ KisCustomPalette::KisCustomPalette(QWidget *parent, const char* name, const QStr m_ownPalette = true; this->view->setPalette(m_palette); - connect(addColor, SIGNAL(pressed()), this, SLOT(slotAddNew())); - connect(removeColor, SIGNAL(pressed()), this, SLOT(slotRemoveCurrent())); - connect(addPalette, SIGNAL(pressed()), this, SLOT(slotAddPredefined())); + connect(addColor, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddNew())); + connect(removeColor, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotRemoveCurrent())); + connect(addPalette, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPredefined())); } KisCustomPalette::~KisCustomPalette() { @@ -85,16 +85,16 @@ void KisCustomPalette::slotAddNew() { // FIXME also let him add the current paint color to the palette // or even better, let the color picker have an option 'Add to palette'! - QColor color; + TQColor color; int result = KColorDialog::getColor(color); if (result != KColorDialog::Accepted) return; bool ok; - QRegExpValidator validator(QRegExp(".*"), this); - QString name = KInputDialog::getText(i18n("Add Color to Palette"), + TQRegExpValidator validator(TQRegExp(".*"), this); + TQString name = KInputDialog::getText(i18n("Add Color to Palette"), i18n("Color name (optional):"), - QString::null, &ok, + TQString(), &ok, 0, 0, &validator); if (!ok) return; @@ -121,8 +121,8 @@ void KisCustomPalette::slotAddPredefined() { if (!m_editMode) { // Save in the directory that is likely to be: ~/.kde/share/apps/krita/palettes // a unique file with this palettename - QString dir = KGlobal::dirs()->saveLocation("data", "krita/palettes"); - QString extension; + TQString dir = KGlobal::dirs()->saveLocation("data", "krita/palettes"); + TQString extension; extension = ".gpl"; KTempFile file(dir, extension); @@ -136,7 +136,7 @@ void KisCustomPalette::slotAddPredefined() { if (!m_palette->save()) { KMessageBox::error(0, i18n("Cannot write to palette file %1. Maybe it is read-only.") - .arg(m_palette->filename()), i18n("Palette")); + .tqarg(m_palette->filename()), i18n("Palette")); return; } diff --git a/krita/ui/kis_custom_palette.h b/krita/ui/kis_custom_palette.h index 1a2cfd95..7ff9c9d8 100644 --- a/krita/ui/kis_custom_palette.h +++ b/krita/ui/kis_custom_palette.h @@ -19,7 +19,7 @@ #ifndef KIS_CUSTOM_PALETTE_H_ #define KIS_CUSTOM_PALETTE_H_ -#include <qobject.h> +#include <tqobject.h> #include "wdgcustompalette.h" @@ -32,8 +32,9 @@ class KisResourceServerBase; class KisCustomPalette : public KisWdgCustomPalette { Q_OBJECT + TQ_OBJECT public: - KisCustomPalette(QWidget *parent, const char* name, const QString& caption, KisView* view); + KisCustomPalette(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view); virtual ~KisCustomPalette(); void setResourceServer(KisResourceServerBase* server) { m_server = server; } void setEditMode(bool b); diff --git a/krita/ui/kis_custom_pattern.cc b/krita/ui/kis_custom_pattern.cc index 41ba73a7..275bfa57 100644 --- a/krita/ui/kis_custom_pattern.cc +++ b/krita/ui/kis_custom_pattern.cc @@ -18,10 +18,10 @@ #include <KoImageResource.h> #include <kdebug.h> -#include <qlabel.h> -#include <qimage.h> -#include <qpushbutton.h> -#include <qcombobox.h> +#include <tqlabel.h> +#include <tqimage.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> #include <kglobal.h> #include <kstandarddirs.h> #include <ktempfile.h> @@ -36,8 +36,8 @@ #include "kis_resourceserver.h" #include "kis_paint_layer.h" -KisCustomPattern::KisCustomPattern(QWidget *parent, const char* name, const QString& caption, KisView* view) - : KisWdgCustomPattern(parent, name), m_view(view) +KisCustomPattern::KisCustomPattern(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view) + : KisWdgCustomPattern(tqparent, name), m_view(view) { Q_ASSERT(m_view); m_mediator = 0; @@ -47,16 +47,16 @@ KisCustomPattern::KisCustomPattern(QWidget *parent, const char* name, const QStr preview->setScaledContents(true); - connect(addButton, SIGNAL(pressed()), this, SLOT(slotAddPredefined())); - connect(patternButton, SIGNAL(pressed()), this, SLOT(slotUsePattern())); - connect(exportButton, SIGNAL(pressed()), this, SLOT(slotExport())); + connect(addButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPredefined())); + connect(patternButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUsePattern())); + connect(exportButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotExport())); } KisCustomPattern::~KisCustomPattern() { delete m_pattern; } -void KisCustomPattern::showEvent(QShowEvent *) { +void KisCustomPattern::showEvent(TQShowEvent *) { slotUpdateCurrentPattern(0); } @@ -64,7 +64,7 @@ void KisCustomPattern::slotUpdateCurrentPattern(int) { delete m_pattern; if (m_view->canvasSubject() && m_view->canvasSubject()->currentImg()) { createPattern(); - preview->setPixmap(QPixmap(m_pattern->img())); + preview->setPixmap(TQPixmap(m_pattern->img())); } else { m_pattern = 0; } @@ -80,8 +80,8 @@ void KisCustomPattern::slotAddPredefined() { // Save in the directory that is likely to be: ~/.kde/share/apps/krita/patterns // a unique file with this pattern name - QString dir = KGlobal::dirs()->saveLocation("data", "krita/patterns"); - QString extension; + TQString dir = KGlobal::dirs()->saveLocation("data", "krita/patterns"); + TQString extension; KTempFile file(dir, ".pat"); file.close(); // If we don't, and pattern->save first, it might get truncated! diff --git a/krita/ui/kis_custom_pattern.h b/krita/ui/kis_custom_pattern.h index 0e45e556..993c9d10 100644 --- a/krita/ui/kis_custom_pattern.h +++ b/krita/ui/kis_custom_pattern.h @@ -19,7 +19,7 @@ #ifndef KIS_CUSTOM_PATTERN_H_ #define KIS_CUSTOM_PATTERN_H_ -#include <qobject.h> +#include <tqobject.h> #include "wdgcustompattern.h" @@ -31,8 +31,9 @@ class KisResourceServerBase; class KisCustomPattern : public KisWdgCustomPattern { Q_OBJECT + TQ_OBJECT public: - KisCustomPattern(QWidget *parent, const char* name, const QString& caption, KisView* view); + KisCustomPattern(TQWidget *tqparent, const char* name, const TQString& caption, KisView* view); virtual ~KisCustomPattern(); void setResourceServer(KisResourceServerBase* server) { m_server = server; } @@ -40,7 +41,7 @@ signals: void activatedResource(KisResource *); protected: - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private slots: void slotExport(); diff --git a/krita/ui/kis_dlg_adj_layer_props.cc b/krita/ui/kis_dlg_adj_layer_props.cc index b994ae5d..c955eba3 100644 --- a/krita/ui/kis_dlg_adj_layer_props.cc +++ b/krita/ui/kis_dlg_adj_layer_props.cc @@ -18,9 +18,9 @@ */ #include <klocale.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> #include <klocale.h> @@ -42,11 +42,11 @@ #include "kis_filter_configuration.h" KisDlgAdjLayerProps::KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, - const QString & layerName, - const QString & caption, - QWidget *parent, + const TQString & layerName, + const TQString & caption, + TQWidget *tqparent, const char *name) - : KDialogBase(parent, name, true, "", Ok | Cancel) + : KDialogBase(tqparent, name, true, "", Ok | Cancel) { Q_ASSERT( layer ); m_layer = layer; @@ -84,27 +84,27 @@ KisDlgAdjLayerProps::KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, dev = new KisPaintDevice(m_layer->image()->colorSpace()); } setCaption(caption); - QWidget * page = new QWidget(this, "page widget"); - QHBoxLayout * layout = new QHBoxLayout(page, 0, 6); + TQWidget * page = new TQWidget(this, "page widget"); + TQHBoxLayout * tqlayout = new TQHBoxLayout(page, 0, 6); setMainWidget(page); m_preview = new KisPreviewWidget(page, "dlgadjustment.preview"); m_preview->slotSetDevice( dev ); - connect( m_preview, SIGNAL(updated()), this, SLOT(refreshPreview())); - layout->addWidget(m_preview, 1, 1); + connect( m_preview, TQT_SIGNAL(updated()), this, TQT_SLOT(refreshPreview())); + tqlayout->addWidget(m_preview, 1, 1); - QVBoxLayout *v1 = new QVBoxLayout( layout ); - QHBoxLayout *hl = new QHBoxLayout( v1 ); + TQVBoxLayout *v1 = new TQVBoxLayout( tqlayout ); + TQHBoxLayout *hl = new TQHBoxLayout( v1 ); - QLabel * lblName = new QLabel(i18n("Layer name:"), page, "lblName"); + TQLabel * lblName = new TQLabel(i18n("Layer name:"), page, "lblName"); hl->addWidget(lblName, 0, 0); m_layerName = new KLineEdit(page, "m_layerName"); m_layerName->setText(layerName); - m_layerName->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + m_layerName->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); hl->addWidget(m_layerName, 0, 1); - connect( m_layerName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_layerName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); if ( m_currentFilter ) { m_currentConfigWidget = m_currentFilter->createConfigurationWidget(page, dev); @@ -113,19 +113,19 @@ KisDlgAdjLayerProps::KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, } } if ( m_currentFilter == 0 || m_currentConfigWidget == 0 ) { - QLabel * labelNoConfigWidget = new QLabel( i18n("No configuration options are available for this filter"), page ); + TQLabel * labelNoConfigWidget = new TQLabel( i18n("No configuration options are available for this filter"), page ); v1->addWidget( labelNoConfigWidget ); } else { v1->addWidget( m_currentConfigWidget ); - connect(m_currentConfigWidget, SIGNAL(sigPleaseUpdatePreview()), this, SLOT(slotConfigChanged())); + connect(m_currentConfigWidget, TQT_SIGNAL(sigPleaseUpdatePreview()), this, TQT_SLOT(slotConfigChanged())); } refreshPreview(); enableButtonOK( !m_layerName->text().isEmpty() ); } -void KisDlgAdjLayerProps::slotNameChanged( const QString & text ) +void KisDlgAdjLayerProps::slotNameChanged( const TQString & text ) { enableButtonOK( !text.isEmpty() ); } @@ -135,7 +135,7 @@ KisFilterConfiguration * KisDlgAdjLayerProps::filterConfiguration() const return m_currentFilter->configuration(m_currentConfigWidget); } -QString KisDlgAdjLayerProps::layerName() const +TQString KisDlgAdjLayerProps::layerName() const { return m_layerName->text(); } diff --git a/krita/ui/kis_dlg_adj_layer_props.h b/krita/ui/kis_dlg_adj_layer_props.h index 783e65e5..de848002 100644 --- a/krita/ui/kis_dlg_adj_layer_props.h +++ b/krita/ui/kis_dlg_adj_layer_props.h @@ -22,14 +22,14 @@ #include <kdialogbase.h> class KisFilter; -class QIconViewItem; -class QLabel; -class QHBoxLayout; +class TQIconViewItem; +class TQLabel; +class TQHBoxLayout; class KisPreviewWidget; class KisFiltersListView; class KisFilterConfiguration; class KisImage; -class QGroupBox; +class TQGroupBox; /** * Create a new adjustment layer. @@ -38,6 +38,7 @@ class KisDlgAdjLayerProps : public KDialogBase { Q_OBJECT + TQ_OBJECT public: @@ -49,21 +50,21 @@ public: * @param caption the caption for the dialog -- create or properties * @param create if true, set the dialog up for creating a new adj. layer, if false, edit the * propeties of the current adj. layer - * @param parent the widget parent of this dialog - * @param name the QObject name, if any + * @param tqparent the widget tqparent of this dialog + * @param name the TQObject name, if any */ KisDlgAdjLayerProps(KisAdjustmentLayerSP layer, - const QString & layerName, - const QString & caption, - QWidget *parent = 0, + const TQString & layerName, + const TQString & caption, + TQWidget *tqparent = 0, const char *name = 0); KisFilterConfiguration * filterConfiguration() const; - QString layerName() const; + TQString layerName() const; protected slots: - void slotNameChanged( const QString & ); + void slotNameChanged( const TQString & ); void slotConfigChanged(); void refreshPreview(); diff --git a/krita/ui/kis_dlg_adjustment_layer.cc b/krita/ui/kis_dlg_adjustment_layer.cc index 407340ac..22cb9c0d 100644 --- a/krita/ui/kis_dlg_adjustment_layer.cc +++ b/krita/ui/kis_dlg_adjustment_layer.cc @@ -18,9 +18,9 @@ */ #include <klocale.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> #include <klocale.h> @@ -42,11 +42,11 @@ #include "kis_filter_configuration.h" KisDlgAdjustmentLayer::KisDlgAdjustmentLayer(KisImage * img, - const QString & /*layerName*/, - const QString & caption, - QWidget *parent, + const TQString & /*layerName*/, + const TQString & caption, + TQWidget *tqparent, const char *name) - : KDialogBase(parent, name, true, "", Ok | Cancel) + : KDialogBase(tqparent, name, true, "", Ok | Cancel) , m_image(img) , m_currentFilter(0) , m_customName(false) @@ -75,44 +75,44 @@ KisDlgAdjustmentLayer::KisDlgAdjustmentLayer(KisImage * img, } setCaption(caption); - QWidget * page = new QWidget(this, "page widget"); - QGridLayout * grid = new QGridLayout(page, 3, 2, 0, 6); + TQWidget * page = new TQWidget(this, "page widget"); + TQGridLayout * grid = new TQGridLayout(page, 3, 2, 0, 6); setMainWidget(page); - QLabel * lblName = new QLabel(i18n("Layer name:"), page, "lblName"); + TQLabel * lblName = new TQLabel(i18n("Layer name:"), page, "lblName"); grid->addWidget(lblName, 0, 0); m_layerName = new KLineEdit(page, "m_layerName"); grid->addWidget(m_layerName, 0, 1); - connect( m_layerName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_layerName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); m_filtersList = new KisFiltersListView(m_dev, page, true, "dlgadjustment.filtersList"); - connect(m_filtersList , SIGNAL(selectionChanged(QIconViewItem*)), this, SLOT(selectionHasChanged(QIconViewItem* ))); + connect(m_filtersList , TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(selectionHasChanged(TQIconViewItem* ))); grid->addMultiCellWidget(m_filtersList, 1, 2, 0, 0); m_preview = new KisPreviewWidget(page, "dlgadjustment.preview"); m_preview->slotSetDevice( m_dev ); - connect( m_preview, SIGNAL(updated()), this, SLOT(refreshPreview())); + connect( m_preview, TQT_SIGNAL(updated()), this, TQT_SLOT(refreshPreview())); grid->addWidget(m_preview, 1, 1); - m_configWidgetHolder = new QGroupBox(i18n("Configuration"), page, "currentConfigWidget"); + m_configWidgetHolder = new TQGroupBox(i18n("Configuration"), page, "currentConfigWidget"); m_configWidgetHolder->setColumnLayout(0, Qt::Horizontal); grid->addWidget(m_configWidgetHolder, 2, 1); - m_labelNoConfigWidget = new QLabel(i18n("No configuration options are available for this filter"), + m_labelNoConfigWidget = new TQLabel(i18n("No configuration options are available for this filter"), m_configWidgetHolder); - m_configWidgetHolder->layout()->add(m_labelNoConfigWidget); + m_configWidgetHolder->tqlayout()->add(m_labelNoConfigWidget); m_labelNoConfigWidget->hide(); - resize( QSize(600, 480).expandedTo(minimumSizeHint()) ); + resize( TQSize(600, 480).expandedTo(tqminimumSizeHint()) ); m_currentConfigWidget = 0; enableButtonOK(0); } -void KisDlgAdjustmentLayer::slotNameChanged( const QString & text ) +void KisDlgAdjustmentLayer::slotNameChanged( const TQString & text ) { if (m_freezeName) return; @@ -126,7 +126,7 @@ KisFilterConfiguration * KisDlgAdjustmentLayer::filterConfiguration() const return m_currentFilter->configuration(m_currentConfigWidget); } -QString KisDlgAdjustmentLayer::layerName() const +TQString KisDlgAdjustmentLayer::layerName() const { return m_layerName->text(); } @@ -148,7 +148,7 @@ void KisDlgAdjustmentLayer::refreshPreview() m_preview->runFilter(m_currentFilter, config); } -void KisDlgAdjustmentLayer::selectionHasChanged ( QIconViewItem * item ) +void KisDlgAdjustmentLayer::selectionHasChanged ( TQIconViewItem * item ) { KisFiltersIconViewItem* kisitem = (KisFiltersIconViewItem*) item; @@ -156,7 +156,7 @@ void KisDlgAdjustmentLayer::selectionHasChanged ( QIconViewItem * item ) if ( m_currentConfigWidget != 0 ) { - m_configWidgetHolder->layout()->remove(m_currentConfigWidget); + m_configWidgetHolder->tqlayout()->remove(m_currentConfigWidget); delete m_currentConfigWidget; m_currentConfigWidget = 0; @@ -173,9 +173,9 @@ void KisDlgAdjustmentLayer::selectionHasChanged ( QIconViewItem * item ) if (m_currentConfigWidget != 0) { - m_configWidgetHolder->layout()->add(m_currentConfigWidget); + m_configWidgetHolder->tqlayout()->add(m_currentConfigWidget); m_currentConfigWidget->show(); - connect(m_currentConfigWidget, SIGNAL(sigPleaseUpdatePreview()), this, SLOT(slotConfigChanged())); + connect(m_currentConfigWidget, TQT_SIGNAL(sigPleaseUpdatePreview()), this, TQT_SLOT(slotConfigChanged())); } else { m_labelNoConfigWidget->show(); } diff --git a/krita/ui/kis_dlg_adjustment_layer.h b/krita/ui/kis_dlg_adjustment_layer.h index 93b32fda..4e20b8fd 100644 --- a/krita/ui/kis_dlg_adjustment_layer.h +++ b/krita/ui/kis_dlg_adjustment_layer.h @@ -22,14 +22,14 @@ #include <kdialogbase.h> class KisFilter; -class QIconViewItem; -class QLabel; -class QHBoxLayout; +class TQIconViewItem; +class TQLabel; +class TQHBoxLayout; class KisPreviewWidget; class KisFiltersListView; class KisFilterConfiguration; class KisImage; -class QGroupBox; +class TQGroupBox; /** * Create a new adjustment layer. @@ -38,6 +38,7 @@ class KisDlgAdjustmentLayer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: @@ -49,35 +50,35 @@ public: * @param caption the caption for the dialog -- create or properties * @param create if true, set the dialog up for creating a new adj. layer, if false, edit the * propeties of the current adj. layer - * @param parent the widget parent of this dialog - * @param name the QObject name, if any + * @param tqparent the widget tqparent of this dialog + * @param name the TQObject name, if any */ KisDlgAdjustmentLayer(KisImage * img, - const QString & layerName, - const QString & caption, - QWidget *parent = 0, + const TQString & layerName, + const TQString & caption, + TQWidget *tqparent = 0, const char *name = 0); KisFilterConfiguration * filterConfiguration() const; - QString layerName() const; + TQString layerName() const; protected slots: - void slotNameChanged( const QString & ); + void slotNameChanged( const TQString & ); void slotConfigChanged(); void refreshPreview(); - void selectionHasChanged ( QIconViewItem * item ); + void selectionHasChanged ( TQIconViewItem * item ); private: KisImage * m_image; KisPaintDeviceSP m_dev; KisFiltersListView * m_filtersList; KisPreviewWidget * m_preview; - QGroupBox * m_configWidgetHolder; - QWidget * m_currentConfigWidget; + TQGroupBox * m_configWidgetHolder; + TQWidget * m_currentConfigWidget; KisFilter* m_currentFilter; KLineEdit * m_layerName; - QLabel* m_labelNoConfigWidget; + TQLabel* m_labelNoConfigWidget; bool m_customName; bool m_freezeName; }; diff --git a/krita/ui/kis_dlg_apply_profile.cc b/krita/ui/kis_dlg_apply_profile.cc index 5240a47d..12134aa0 100644 --- a/krita/ui/kis_dlg_apply_profile.cc +++ b/krita/ui/kis_dlg_apply_profile.cc @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qcombobox.h> +#include <tqcombobox.h> #include <klocale.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include "kis_factory.h" #include "kis_colorspace_factory_registry.h" @@ -34,15 +34,15 @@ #include "wdgapplyprofile.h" // XXX: Hardcode RGBA name. This should be a constant, somewhere. -KisDlgApplyProfile::KisDlgApplyProfile(QWidget *parent, const char *name) - : super(parent, name, true, "", Ok | Cancel) +KisDlgApplyProfile::KisDlgApplyProfile(TQWidget *tqparent, const char *name) + : super(tqparent, name, true, "", Ok | Cancel) { setCaption(i18n("Apply Image Profile to Clipboard Data")); m_page = new WdgApplyProfile(this); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); // XXX: This is BAD! (bsar) fillCmbProfiles(KisID("RGBA", "")); @@ -59,7 +59,7 @@ KisDlgApplyProfile::~KisDlgApplyProfile() KisProfile * KisDlgApplyProfile::profile() const { - QString profileName; + TQString profileName; profileName = m_page->cmbProfile->currentText(); @@ -84,8 +84,8 @@ void KisDlgApplyProfile::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); if (csf == 0) return; - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector<KisProfile *> ::iterator it; + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector<KisProfile *> ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page->cmbProfile->insertItem((*it)->productName()); } diff --git a/krita/ui/kis_dlg_apply_profile.h b/krita/ui/kis_dlg_apply_profile.h index 2e956629..18f56d0a 100644 --- a/krita/ui/kis_dlg_apply_profile.h +++ b/krita/ui/kis_dlg_apply_profile.h @@ -27,9 +27,10 @@ class KisDlgApplyProfile : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - KisDlgApplyProfile(QWidget *parent = 0, + KisDlgApplyProfile(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisDlgApplyProfile(); diff --git a/krita/ui/kis_dlg_image_properties.cc b/krita/ui/kis_dlg_image_properties.cc index 871fd9d6..72c26ec5 100644 --- a/krita/ui/kis_dlg_image_properties.cc +++ b/krita/ui/kis_dlg_image_properties.cc @@ -15,16 +15,16 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qbuttongroup.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qgroupbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qslider.h> -#include <qtextedit.h> -#include <qcheckbox.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqslider.h> +#include <tqtextedit.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kcolorcombo.h> @@ -44,8 +44,8 @@ #include "squeezedcombobox.h" #include "wdgnewimage.h" -KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, const char *name) - : super(parent, name, true, "", Ok | Cancel) +KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, TQWidget *tqparent, const char *name) + : super(tqparent, name, true, "", Ok | Cancel) { setCaption(i18n("Image Properties")); @@ -58,7 +58,7 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, m_image = image; setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); m_page->txtName->setText(image->name()); m_page->m_createButton->hide(); @@ -72,7 +72,7 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, //m_page->cmbColorSpaces->hide(); //m_page->lblColorSpaces->setText(image->colorSpace()->id().name()); KisIDList colorSpaces = KisMetaRegistry::instance()->csRegistry()->listKeys(); - KisIDList::iterator i = colorSpaces.find(KisID("WET","")); + KisIDList::iterator i = colorSpaces.tqfind(KisID("WET","")); if (i != colorSpaces.end()) { colorSpaces.remove(i); } @@ -96,8 +96,8 @@ KisDlgImageProperties::KisDlgImageProperties(KisImageSP image, QWidget *parent, m_page->cmbColor->hide(); m_page->lblColor->hide(); - connect(m_page->cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbProfiles(const KisID &))); + connect(m_page->cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbProfiles(const KisID &))); } @@ -122,7 +122,7 @@ int KisDlgImageProperties::opacity() return m_page->sliderOpacity->value(); } -QString KisDlgImageProperties::imageName() +TQString KisDlgImageProperties::imageName() { return m_page->txtName->text(); } @@ -132,7 +132,7 @@ double KisDlgImageProperties::resolution() return m_page->doubleResolution->value(); } -QString KisDlgImageProperties::description() +TQString KisDlgImageProperties::description() { return m_page->txtDescription->text(); } @@ -144,8 +144,8 @@ KisColorSpace * KisDlgImageProperties::colorSpace() KisProfile * KisDlgImageProperties::profile() { - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( m_image->colorSpace()->id() ); - Q_UINT32 index = m_page->cmbProfile->currentItem(); + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( m_image->colorSpace()->id() ); + TQ_UINT32 index = m_page->cmbProfile->currentItem(); if (index < profileList.count()) { return profileList.at(index); @@ -160,8 +160,8 @@ void KisDlgImageProperties::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); m_page->cmbProfile->clear(); - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector<KisProfile *> ::iterator it; + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector<KisProfile *> ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page->cmbProfile->insertItem((*it)->productName()); } diff --git a/krita/ui/kis_dlg_image_properties.h b/krita/ui/kis_dlg_image_properties.h index 2a4b84c9..934adc05 100644 --- a/krita/ui/kis_dlg_image_properties.h +++ b/krita/ui/kis_dlg_image_properties.h @@ -23,25 +23,26 @@ #include <kis_types.h> class WdgNewImage; -class QButtonGroup; +class TQButtonGroup; class KisID; class KisDlgImageProperties : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: KisDlgImageProperties(KisImageSP image, - QWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); virtual ~KisDlgImageProperties(); int imageWidth(); int imageHeight(); int opacity(); - QString imageName(); + TQString imageName(); double resolution(); - QString description(); + TQString description(); KisColorSpace * colorSpace(); KisProfile * profile(); diff --git a/krita/ui/kis_dlg_layer_properties.cc b/krita/ui/kis_dlg_layer_properties.cc index 442d2da1..68df970b 100644 --- a/krita/ui/kis_dlg_layer_properties.cc +++ b/krita/ui/kis_dlg_layer_properties.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <limits.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qslider.h> -#include <qstring.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqslider.h> +#include <tqstring.h> #include <klineedit.h> #include <klocale.h> #include <kpushbutton.h> @@ -35,15 +35,15 @@ #include "kis_int_spinbox.h" #include "kis_colorspace.h" -KisDlgLayerProperties::KisDlgLayerProperties(const QString& deviceName, - Q_INT32 opacity, +KisDlgLayerProperties::KisDlgLayerProperties(const TQString& deviceName, + TQ_INT32 opacity, const KisCompositeOp& compositeOp, const KisColorSpace * colorSpace, - QWidget *parent, const char *name, WFlags f) - : super(parent, name, f, name, Ok | Cancel) + TQWidget *tqparent, const char *name, WFlags f) + : super(tqparent, name, f, name, Ok | Cancel) { m_page = new WdgLayerProperties(this); - m_page->layout()->setMargin(0); + m_page->tqlayout()->setMargin(0); opacity = int((opacity * 100.0) / 255 + 0.5); @@ -51,12 +51,12 @@ KisDlgLayerProperties::KisDlgLayerProperties(const QString& deviceName, setMainWidget(m_page); m_page->editName->setText(deviceName); - connect( m_page->editName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_page->editName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); m_page->cmbColorSpaces->setCurrent(colorSpace->id()); m_page->cmbColorSpaces->setEnabled(false); - QString profilename; + TQString profilename; if (KisProfile* profile = const_cast<KisColorSpace *>(colorSpace)->getProfile()) profilename = profile->productName(); m_page->cmbProfile->insertItem(profilename); @@ -75,19 +75,19 @@ KisDlgLayerProperties::~KisDlgLayerProperties() { } -void KisDlgLayerProperties::slotNameChanged( const QString &_text ) +void KisDlgLayerProperties::slotNameChanged( const TQString &_text ) { enableButtonOK( !_text.isEmpty() ); } -QString KisDlgLayerProperties::getName() const +TQString KisDlgLayerProperties::getName() const { return m_page->editName->text(); } int KisDlgLayerProperties::getOpacity() const { - Q_INT32 opacity = m_page->intOpacity->value(); + TQ_INT32 opacity = m_page->intOpacity->value(); if (!opacity) return 0; diff --git a/krita/ui/kis_dlg_layer_properties.h b/krita/ui/kis_dlg_layer_properties.h index 2dc823ce..c2b2a5e0 100644 --- a/krita/ui/kis_dlg_layer_properties.h +++ b/krita/ui/kis_dlg_layer_properties.h @@ -20,7 +20,7 @@ #include <kdialogbase.h> -class QWidget; +class TQWidget; class WdgLayerProperties; class KisCompositeOp; class KisColorSpace; @@ -28,22 +28,23 @@ class KisColorSpace; class KisDlgLayerProperties : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - KisDlgLayerProperties(const QString& deviceName, - Q_INT32 opacity, + KisDlgLayerProperties(const TQString& deviceName, + TQ_INT32 opacity, const KisCompositeOp& compositeOp, const KisColorSpace * colorSpace, - QWidget *parent = 0, const char *name = 0, WFlags f = 0); + TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); virtual ~KisDlgLayerProperties(); - QString getName() const; - Q_INT32 getOpacity() const; + TQString getName() const; + TQ_INT32 getOpacity() const; KisCompositeOp getCompositeOp() const; protected slots: - void slotNameChanged( const QString & ); + void slotNameChanged( const TQString & ); private: WdgLayerProperties * m_page; diff --git a/krita/ui/kis_dlg_new_layer.cc b/krita/ui/kis_dlg_new_layer.cc index 3cdd58d4..a0a97a7e 100644 --- a/krita/ui/kis_dlg_new_layer.cc +++ b/krita/ui/kis_dlg_new_layer.cc @@ -18,9 +18,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> #include <klocale.h> @@ -41,14 +41,14 @@ #include "kis_int_spinbox.h" NewLayerDialog::NewLayerDialog(const KisID colorSpaceID, - const QString & profilename, - const QString & deviceName, - QWidget *parent, + const TQString & profilename, + const TQString & deviceName, + TQWidget *tqparent, const char *name) - : super(parent, name, true, "", Ok | Cancel) + : super(tqparent, name, true, "", Ok | Cancel) { m_page = new WdgLayerProperties(this); - m_page->layout()->setMargin(0); + m_page->tqlayout()->setMargin(0); setCaption(i18n("New Layer")); @@ -64,10 +64,10 @@ NewLayerDialog::NewLayerDialog(const KisID colorSpaceID, // ColorSpace m_page->cmbColorSpaces->setIDList(KisMetaRegistry::instance()->csRegistry()->listKeys()); m_page->cmbColorSpaces->setCurrentText(colorSpaceID.id()); - connect(m_page->cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbProfiles(const KisID &))); - connect(m_page->cmbColorSpaces, SIGNAL(activated(const KisID &)), - this, SLOT(fillCmbComposite(const KisID &))); + connect(m_page->cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbProfiles(const KisID &))); + connect(m_page->cmbColorSpaces, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(fillCmbComposite(const KisID &))); // Init profiles fillCmbProfiles(m_page->cmbColorSpaces->currentItem()); @@ -77,7 +77,7 @@ NewLayerDialog::NewLayerDialog(const KisID colorSpaceID, fillCmbComposite(m_page->cmbColorSpaces->currentItem()); /* - connect( m_page->editName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); + connect( m_page->editName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotNameChanged( const TQString & ) ) ); slotNameChanged( m_page->editName->text() ); */ @@ -100,8 +100,8 @@ void NewLayerDialog::fillCmbProfiles(const KisID & s) KisColorSpaceFactory * csf = KisMetaRegistry::instance()->csRegistry()->get(s); if (csf == 0) return; - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector<KisProfile *> ::iterator it; + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector<KisProfile *> ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { m_page->cmbProfile->insertItem((*it)->productName()); } @@ -124,7 +124,7 @@ void NewLayerDialog::fillCmbComposite(const KisID & s) int NewLayerDialog::opacity() const { - Q_INT32 opacity = m_page->intOpacity->value(); + TQ_INT32 opacity = m_page->intOpacity->value(); if (!opacity) return 0; @@ -145,12 +145,12 @@ KisID NewLayerDialog::colorSpaceID() const return m_page->cmbColorSpaces->currentItem(); } -QString NewLayerDialog::layerName() const +TQString NewLayerDialog::layerName() const { return m_page->editName->text(); } -QString NewLayerDialog::profileName() const +TQString NewLayerDialog::profileName() const { return m_page->cmbProfile-> currentText(); } diff --git a/krita/ui/kis_dlg_new_layer.h b/krita/ui/kis_dlg_new_layer.h index e250185c..b484e1dc 100644 --- a/krita/ui/kis_dlg_new_layer.h +++ b/krita/ui/kis_dlg_new_layer.h @@ -25,26 +25,27 @@ #include "kis_composite_op.h" #include <kis_global.h> -class QWidget; +class TQWidget; class KisPaintDevice; class WdgLayerProperties; class NewLayerDialog : public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: NewLayerDialog(const KisID colorSpace, - const QString & profilename, - const QString & deviceName, - QWidget *parent = 0, + const TQString & profilename, + const TQString & deviceName, + TQWidget *tqparent = 0, const char *name = 0); - QString layerName() const; + TQString layerName() const; KisCompositeOp compositeOp() const; - Q_INT32 opacity() const; + TQ_INT32 opacity() const; KisID colorSpaceID() const; - QString profileName() const; + TQString profileName() const; void setColorSpaceEnabled(bool enabled); diff --git a/krita/ui/kis_dlg_preferences.cc b/krita/ui/kis_dlg_preferences.cc index 5522bcdf..75ec0593 100644 --- a/krita/ui/kis_dlg_preferences.cc +++ b/krita/ui/kis_dlg_preferences.cc @@ -22,21 +22,21 @@ #include <config.h> #endif -#include <qbitmap.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcursor.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qslider.h> -#include <qtoolbutton.h> -#include <qvbox.h> +#include <tqbitmap.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcursor.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqslider.h> +#include <tqtoolbutton.h> +#include <tqvbox.h> #ifdef HAVE_GL -#include <qgl.h> +#include <tqgl.h> #endif #include <KoImageResource.h> @@ -71,13 +71,13 @@ // for the performance update #include "tiles/kis_tilemanager.h" -GeneralTab::GeneralTab( QWidget *_parent, const char *_name ) +GeneralTab::GeneralTab( TQWidget *_parent, const char *_name ) : WdgGeneralSettings( _parent, _name ) { KisConfig cfg; - m_cmbCursorShape->setCurrentItem(cfg.cursorStyle()); + m_cmbtqCursorShape->setCurrentItem(cfg.cursorStyle()); grpDockability->setButton(cfg.dockability()); numDockerFontSize->setValue((int)cfg.dockerFontSize()); } @@ -86,14 +86,14 @@ void GeneralTab::setDefault() { KisConfig cfg; - m_cmbCursorShape->setCurrentItem( cfg.getDefaultCursorStyle()); + m_cmbtqCursorShape->setCurrentItem( cfg.getDefaultCursorStyle()); grpDockability->setButton(cfg.getDefaultDockability()); numDockerFontSize->setValue((int)(cfg.getDefaultDockerFontSize())); } enumCursorStyle GeneralTab::cursorStyle() { - return (enumCursorStyle)m_cmbCursorShape->currentItem(); + return (enumCursorStyle)m_cmbtqCursorShape->currentItem(); } enumKoDockability GeneralTab::dockability() @@ -108,13 +108,13 @@ float GeneralTab::dockerFontSize() //--------------------------------------------------------------------------------------------------- -ColorSettingsTab::ColorSettingsTab(QWidget *parent, const char *name ) - : QWidget(parent, name) +ColorSettingsTab::ColorSettingsTab(TQWidget *tqparent, const char *name ) + : TQWidget(tqparent, name) { // XXX: Make sure only profiles that fit the specified color model // are shown in the profile combos - QGridLayout * l = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint()); + TQGridLayout * l = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint()); l->setMargin(0); m_page = new WdgColorSettings(this); l->addWidget( m_page, 0, 0); @@ -130,16 +130,16 @@ ColorSettingsTab::ColorSettingsTab(QWidget *parent, const char *name ) refillMonitorProfiles(KisID("RGBA", "")); refillPrintProfiles(KisID(cfg.printerColorSpace(), "")); - if(m_page->cmbMonitorProfile->contains(cfg.monitorProfile())) + if(m_page->cmbMonitorProfile->tqcontains(cfg.monitorProfile())) m_page->cmbMonitorProfile->setCurrentText(cfg.monitorProfile()); - if(m_page->cmbPrintProfile->contains(cfg.printerProfile())) + if(m_page->cmbPrintProfile->tqcontains(cfg.printerProfile())) m_page->cmbPrintProfile->setCurrentText(cfg.printerProfile()); m_page->chkBlackpoint->setChecked(cfg.useBlackPointCompensation()); m_page->grpPasteBehaviour->setButton(cfg.pasteBehaviour()); m_page->cmbMonitorIntent->setCurrentItem(cfg.renderIntent()); - connect(m_page->cmbPrintingColorSpace, SIGNAL(activated(const KisID &)), - this, SLOT(refillPrintProfiles(const KisID &))); + connect(m_page->cmbPrintingColorSpace, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(refillPrintProfiles(const KisID &))); } void ColorSettingsTab::setDefault() @@ -164,8 +164,8 @@ void ColorSettingsTab::refillMonitorProfiles(const KisID & s) if ( !csf ) return; - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector<KisProfile *> ::iterator it; + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector<KisProfile *> ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { if ((*it)->deviceClass() == icSigDisplayClass) m_page->cmbMonitorProfile->insertItem((*it)->productName()); @@ -183,8 +183,8 @@ void ColorSettingsTab::refillPrintProfiles(const KisID & s) if ( !csf ) return; - QValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); - QValueVector<KisProfile *> ::iterator it; + TQValueVector<KisProfile *> profileList = KisMetaRegistry::instance()->csRegistry()->profilesFor( csf ); + TQValueVector<KisProfile *> ::iterator it; for ( it = profileList.begin(); it != profileList.end(); ++it ) { if ((*it)->deviceClass() == icSigOutputClass) m_page->cmbPrintProfile->insertItem((*it)->productName()); @@ -195,8 +195,8 @@ void ColorSettingsTab::refillPrintProfiles(const KisID & s) //--------------------------------------------------------------------------------------------------- -PerformanceTab::PerformanceTab(QWidget *parent, const char *name ) - : WdgPerformanceSettings(parent, name) +PerformanceTab::PerformanceTab(TQWidget *tqparent, const char *name ) + : WdgPerformanceSettings(tqparent, name) { // XXX: Make sure only profiles that fit the specified color model // are shown in the profile combos @@ -216,8 +216,8 @@ void PerformanceTab::setDefault() //--------------------------------------------------------------------------------------------------- -TabletSettingsTab::TabletSettingsTab( QWidget *parent, const char *name) - : WdgTabletSettings( parent, name ) +TabletSettingsTab::TabletSettingsTab( TQWidget *tqparent, const char *name) + : WdgTabletSettings( tqparent, name ) { #ifdef EXTENDED_X11_TABLET_SUPPORT initTabletDevices(); @@ -240,9 +240,9 @@ void TabletSettingsTab::applySettings() #ifdef EXTENDED_X11_TABLET_SUPPORT TabletSettingsTab::DeviceSettings::DeviceSettings(KisCanvasWidget::X11TabletDevice *tabletDevice, bool enabled, - Q_INT32 xAxis, Q_INT32 yAxis, Q_INT32 pressureAxis, - Q_INT32 xTiltAxis, Q_INT32 yTiltAxis, Q_INT32 wheelAxis, - Q_INT32 toolIDAxis, Q_INT32 serialNumberAxis) + TQ_INT32 xAxis, TQ_INT32 yAxis, TQ_INT32 pressureAxis, + TQ_INT32 xTiltAxis, TQ_INT32 yTiltAxis, TQ_INT32 wheelAxis, + TQ_INT32 toolIDAxis, TQ_INT32 serialNumberAxis) : m_tabletDevice(tabletDevice), m_enabled(enabled), m_xAxis(xAxis), @@ -294,104 +294,104 @@ bool TabletSettingsTab::DeviceSettings::enabled() const return m_enabled; } -Q_INT32 TabletSettingsTab::DeviceSettings::numAxes() const +TQ_INT32 TabletSettingsTab::DeviceSettings::numAxes() const { return m_tabletDevice->numAxes(); } -void TabletSettingsTab::DeviceSettings::setXAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setXAxis(TQ_INT32 axis) { m_xAxis = axis; } -void TabletSettingsTab::DeviceSettings::setYAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setYAxis(TQ_INT32 axis) { m_yAxis = axis; } -void TabletSettingsTab::DeviceSettings::setPressureAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setPressureAxis(TQ_INT32 axis) { m_pressureAxis = axis; } -void TabletSettingsTab::DeviceSettings::setXTiltAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setXTiltAxis(TQ_INT32 axis) { m_xTiltAxis = axis; } -void TabletSettingsTab::DeviceSettings::setYTiltAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setYTiltAxis(TQ_INT32 axis) { m_yTiltAxis = axis; } -void TabletSettingsTab::DeviceSettings::setWheelAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setWheelAxis(TQ_INT32 axis) { m_wheelAxis = axis; } -void TabletSettingsTab::DeviceSettings::setToolIDAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setToolIDAxis(TQ_INT32 axis) { m_toolIDAxis = axis; } -void TabletSettingsTab::DeviceSettings::setSerialNumberAxis(Q_INT32 axis) +void TabletSettingsTab::DeviceSettings::setSerialNumberAxis(TQ_INT32 axis) { m_serialNumberAxis = axis; } -Q_INT32 TabletSettingsTab::DeviceSettings::xAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::xAxis() const { return m_xAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::yAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::yAxis() const { return m_yAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::pressureAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::pressureAxis() const { return m_pressureAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::xTiltAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::xTiltAxis() const { return m_xTiltAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::yTiltAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::yTiltAxis() const { return m_yTiltAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::wheelAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::wheelAxis() const { return m_wheelAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::toolIDAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::toolIDAxis() const { return m_toolIDAxis; } -Q_INT32 TabletSettingsTab::DeviceSettings::serialNumberAxis() const +TQ_INT32 TabletSettingsTab::DeviceSettings::serialNumberAxis() const { return m_serialNumberAxis; } -TabletSettingsTab::TabletDeviceSettingsDialog::TabletDeviceSettingsDialog(const QString& deviceName, DeviceSettings settings, - QWidget *parent, const char *name) - : super(parent, name, true, "", Ok | Cancel) +TabletSettingsTab::TabletDeviceSettingsDialog::TabletDeviceSettingsDialog(const TQString& deviceName, DeviceSettings settings, + TQWidget *tqparent, const char *name) + : super(tqparent, name, true, "", Ok | Cancel) { - setCaption(i18n("Configure %1").arg(deviceName)); + setCaption(i18n("Configure %1").tqarg(deviceName)); m_page = new WdgTabletDeviceSettings(this); setMainWidget(m_page); - resize(m_page->sizeHint()); + resize(m_page->tqsizeHint()); - for (Q_INT32 axis = 0; axis < settings.numAxes(); axis++) { - QString axisString; + for (TQ_INT32 axis = 0; axis < settings.numAxes(); axis++) { + TQString axisString; axisString.setNum(axis); @@ -472,7 +472,7 @@ TabletSettingsTab::TabletDeviceSettingsDialog::~TabletDeviceSettingsDialog() TabletSettingsTab::DeviceSettings TabletSettingsTab::TabletDeviceSettingsDialog::settings() { - const Q_INT32 noAxis = m_settings.numAxes(); + const TQ_INT32 noAxis = m_settings.numAxes(); if (m_page->cbX->currentItem() != noAxis ) { m_settings.setXAxis(m_page->cbX->currentItem()); @@ -527,9 +527,9 @@ TabletSettingsTab::DeviceSettings TabletSettingsTab::TabletDeviceSettingsDialog: void TabletSettingsTab::initTabletDevices() { - connect(cbTabletDevice, SIGNAL(activated(int)), SLOT(slotActivateDevice(int))); - connect(chkEnableTabletDevice, SIGNAL(toggled(bool)), SLOT(slotSetDeviceEnabled(bool))); - connect(btnConfigureTabletDevice, SIGNAL(clicked()), SLOT(slotConfigureDevice())); + connect(cbTabletDevice, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivateDevice(int))); + connect(chkEnableTabletDevice, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetDeviceEnabled(bool))); + connect(btnConfigureTabletDevice, TQT_SIGNAL(clicked()), TQT_SLOT(slotConfigureDevice())); KisCanvasWidget::X11XIDTabletDeviceMap& tabletDevices = KisCanvasWidget::tabletDeviceMap(); @@ -574,7 +574,7 @@ void TabletSettingsTab::slotConfigureDevice() TabletDeviceSettingsDialog dialog(cbTabletDevice->currentText(), m_deviceSettings[cbTabletDevice->currentItem()], this, "TabletDeviceSettings"); - if (dialog.exec() == QDialog::Accepted) + if (dialog.exec() == TQDialog::Accepted) { m_deviceSettings[cbTabletDevice->currentItem()] = dialog.settings(); } @@ -582,14 +582,14 @@ void TabletSettingsTab::slotConfigureDevice() void TabletSettingsTab::applyTabletDeviceSettings() { - for (Q_UINT32 deviceIndex = 0; deviceIndex < m_deviceSettings.count(); ++deviceIndex) { + for (TQ_UINT32 deviceIndex = 0; deviceIndex < m_deviceSettings.count(); ++deviceIndex) { m_deviceSettings[deviceIndex].applySettings(); } } #else // EXTENDED_X11_TABLET_SUPPORT -// Fix compilation. moc seems to not see the undefined symbol needed +// Fix compilation. tqmoc seems to not see the undefined symbol needed // for these slots to be declared. void TabletSettingsTab::slotActivateDevice(int /*deviceIndex*/) { @@ -611,13 +611,13 @@ void TabletSettingsTab::applyTabletDeviceSettings() //--------------------------------------------------------------------------------------------------- -DisplaySettingsTab::DisplaySettingsTab( QWidget *parent, const char *name) - : WdgDisplaySettings( parent, name ) +DisplaySettingsTab::DisplaySettingsTab( TQWidget *tqparent, const char *name) + : WdgDisplaySettings( tqparent, name ) { #ifdef HAVE_GL KisConfig cfg; - if (!QGLFormat::hasOpenGL()) { + if (!TQGLFormat::hasOpenGL()) { cbUseOpenGL->setEnabled(false); //cbUseOpenGLShaders->setEnabled(false); } else { @@ -630,7 +630,7 @@ DisplaySettingsTab::DisplaySettingsTab( QWidget *parent, const char *name) //cbUseOpenGLShaders->setEnabled(false); #endif - connect(cbUseOpenGL, SIGNAL(toggled(bool)), SLOT(slotUseOpenGLToggled(bool))); + connect(cbUseOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUseOpenGLToggled(bool))); } void DisplaySettingsTab::setDefault() @@ -646,15 +646,15 @@ void DisplaySettingsTab::slotUseOpenGLToggled(bool /*isChecked*/) } //--------------------------------------------------------------------------------------------------- -GridSettingsTab::GridSettingsTab(QWidget* parent) : WdgGridSettingsBase(parent) +GridSettingsTab::GridSettingsTab(TQWidget* tqparent) : WdgGridSettingsBase(tqparent) { KisConfig cfg; selectMainStyle->setCurrentItem(cfg.getGridMainStyle()); selectSubdivisionStyle->setCurrentItem(cfg.getGridSubdivisionStyle()); #if KDE_IS_VERSION(3,4,0) - colorMain->setDefaultColor( QColor( 99, 99, 99 ) ); - colorSubdivision->setDefaultColor( QColor( 200, 200, 200 ) ); + colorMain->setDefaultColor( TQColor( 99, 99, 99 ) ); + colorSubdivision->setDefaultColor( TQColor( 200, 200, 200 ) ); #endif colorMain->setColor(cfg.getGridMainColor()); colorSubdivision->setColor(cfg.getGridSubdivisionColor()); @@ -666,10 +666,10 @@ GridSettingsTab::GridSettingsTab(QWidget* parent) : WdgGridSettingsBase(parent) intOffsetY->setValue( cfg.getGridOffsetY()); linkSpacingToggled(true); - connect(bnLinkSpacing, SIGNAL(toggled(bool)), this, SLOT(linkSpacingToggled( bool ))); + connect(bnLinkSpacing, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(linkSpacingToggled( bool ))); - connect(intHSpacing, SIGNAL(valueChanged(int)),this,SLOT(spinBoxHSpacingChanged(int))); - connect(intVSpacing, SIGNAL(valueChanged(int)),this,SLOT(spinBoxVSpacingChanged(int))); + connect(intHSpacing, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxHSpacingChanged(int))); + connect(intVSpacing, TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(spinBoxVSpacingChanged(int))); } @@ -680,8 +680,8 @@ void GridSettingsTab::setDefault() selectMainStyle->setCurrentItem(0); selectSubdivisionStyle->setCurrentItem(1); - colorMain->setColor(QColor(99,99,99)); - colorSubdivision->setColor(QColor(199,199,199)); + colorMain->setColor(TQColor(99,99,99)); + colorSubdivision->setColor(TQColor(199,199,199)); intHSpacing->setValue( 10 ); intVSpacing->setValue( 10 ); @@ -723,10 +723,10 @@ void GridSettingsTab::linkSpacingToggled(bool b) //--------------------------------------------------------------------------------------------------- -PreferencesDialog::PreferencesDialog( QWidget* parent, const char* name ) - : KDialogBase( IconList, i18n("Preferences"), Ok | Cancel | Help | Default /*| Apply*/, Ok, parent, name, true, true ) +PreferencesDialog::PreferencesDialog( TQWidget* tqparent, const char* name ) + : KDialogBase( IconList, i18n("Preferences"), Ok | Cancel | Help | Default /*| Apply*/, Ok, tqparent, name, true, true ) { - QVBox *vbox; + TQVBox *vbox; vbox = addVBoxPage( i18n( "General"), i18n( "General"), BarIcon( "misc", KIcon::SizeMedium )); m_general = new GeneralTab( vbox ); diff --git a/krita/ui/kis_dlg_preferences.h b/krita/ui/kis_dlg_preferences.h index 2d79826b..3869fe9e 100644 --- a/krita/ui/kis_dlg_preferences.h +++ b/krita/ui/kis_dlg_preferences.h @@ -21,7 +21,7 @@ #ifndef __preferencesdlg_h__ #define __preferencesdlg_h__ -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> @@ -36,8 +36,8 @@ #include "wdgdisplaysettings.h" #include "wdggridsettings.h" -class QLineEdit; -class QCheckBox; +class TQLineEdit; +class TQCheckBox; class KURLRequester; class WdgColorSettings; class KisCmbIDList; @@ -49,10 +49,11 @@ class KisID; class GeneralTab : public WdgGeneralSettings { Q_OBJECT + TQ_OBJECT public: - GeneralTab( QWidget *parent = 0, const char *name = 0 ); + GeneralTab( TQWidget *tqparent = 0, const char *name = 0 ); enumCursorStyle cursorStyle(); enumKoDockability dockability(); @@ -64,13 +65,14 @@ public: //======================= -class ColorSettingsTab : public QWidget +class ColorSettingsTab : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ColorSettingsTab( QWidget *parent = 0, const char * name = 0 ); + ColorSettingsTab( TQWidget *tqparent = 0, const char * name = 0 ); private slots: @@ -89,9 +91,10 @@ public: class PerformanceTab : public WdgPerformanceSettings { Q_OBJECT + TQ_OBJECT public: - PerformanceTab( QWidget *parent = 0, const char *name = 0 ); + PerformanceTab( TQWidget *tqparent = 0, const char *name = 0 ); public: void setDefault(); @@ -106,9 +109,10 @@ public: class TabletSettingsTab : public WdgTabletSettings { Q_OBJECT + TQ_OBJECT public: - TabletSettingsTab( QWidget *parent = 0, const char *name = 0 ); + TabletSettingsTab( TQWidget *tqparent = 0, const char *name = 0 ); public: void setDefault(); @@ -126,9 +130,9 @@ private: class DeviceSettings { public: DeviceSettings(KisCanvasWidget::X11TabletDevice *tabletDevice, bool enabled, - Q_INT32 xAxis, Q_INT32 yAxis, Q_INT32 pressureAxis, - Q_INT32 xTiltAxis, Q_INT32 yTiltAxis, Q_INT32 wheelAxis, - Q_INT32 toolIDAxis, Q_INT32 serialNumberAxis); + TQ_INT32 xAxis, TQ_INT32 yAxis, TQ_INT32 pressureAxis, + TQ_INT32 xTiltAxis, TQ_INT32 yTiltAxis, TQ_INT32 wheelAxis, + TQ_INT32 toolIDAxis, TQ_INT32 serialNumberAxis); DeviceSettings(); void applySettings(); @@ -136,47 +140,47 @@ private: void setEnabled(bool enabled); bool enabled() const; - Q_INT32 numAxes() const; - - void setXAxis(Q_INT32 axis); - void setYAxis(Q_INT32 axis); - void setPressureAxis(Q_INT32 axis); - void setXTiltAxis(Q_INT32 axis); - void setYTiltAxis(Q_INT32 axis); - void setWheelAxis(Q_INT32 axis); - void setToolIDAxis(Q_INT32 axis); - void setSerialNumberAxis(Q_INT32 axis); + TQ_INT32 numAxes() const; + + void setXAxis(TQ_INT32 axis); + void setYAxis(TQ_INT32 axis); + void setPressureAxis(TQ_INT32 axis); + void setXTiltAxis(TQ_INT32 axis); + void setYTiltAxis(TQ_INT32 axis); + void setWheelAxis(TQ_INT32 axis); + void setToolIDAxis(TQ_INT32 axis); + void setSerialNumberAxis(TQ_INT32 axis); - Q_INT32 xAxis() const; - Q_INT32 yAxis() const; - Q_INT32 pressureAxis() const; - Q_INT32 xTiltAxis() const; - Q_INT32 yTiltAxis() const; - Q_INT32 wheelAxis() const; - Q_INT32 toolIDAxis() const; - Q_INT32 serialNumberAxis() const; + TQ_INT32 xAxis() const; + TQ_INT32 yAxis() const; + TQ_INT32 pressureAxis() const; + TQ_INT32 xTiltAxis() const; + TQ_INT32 yTiltAxis() const; + TQ_INT32 wheelAxis() const; + TQ_INT32 toolIDAxis() const; + TQ_INT32 serialNumberAxis() const; private: KisCanvasWidget::X11TabletDevice *m_tabletDevice; bool m_enabled; - Q_INT32 m_xAxis; - Q_INT32 m_yAxis; - Q_INT32 m_pressureAxis; - Q_INT32 m_xTiltAxis; - Q_INT32 m_yTiltAxis; - Q_INT32 m_wheelAxis; - Q_INT32 m_toolIDAxis; - Q_INT32 m_serialNumberAxis; + TQ_INT32 m_xAxis; + TQ_INT32 m_yAxis; + TQ_INT32 m_pressureAxis; + TQ_INT32 m_xTiltAxis; + TQ_INT32 m_yTiltAxis; + TQ_INT32 m_wheelAxis; + TQ_INT32 m_toolIDAxis; + TQ_INT32 m_serialNumberAxis; }; class TabletDeviceSettingsDialog : public KDialogBase { typedef KDialogBase super; public: - TabletDeviceSettingsDialog(const QString& deviceName, + TabletDeviceSettingsDialog(const TQString& deviceName, DeviceSettings settings, - QWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); virtual ~TabletDeviceSettingsDialog(); @@ -189,7 +193,7 @@ private: void initTabletDevices(); - QValueVector<DeviceSettings> m_deviceSettings; + TQValueVector<DeviceSettings> m_deviceSettings; #endif }; @@ -202,9 +206,10 @@ private: class DisplaySettingsTab : public WdgDisplaySettings { Q_OBJECT + TQ_OBJECT public: - DisplaySettingsTab( QWidget *parent = 0, const char *name = 0 ); + DisplaySettingsTab( TQWidget *tqparent = 0, const char *name = 0 ); public: void setDefault(); @@ -220,8 +225,9 @@ protected slots: */ class GridSettingsTab : public WdgGridSettingsBase { Q_OBJECT + TQ_OBJECT public: - GridSettingsTab(QWidget* parent); + GridSettingsTab(TQWidget* tqparent); public: void setDefault(); private slots: @@ -241,6 +247,7 @@ class GridSettingsTab : public WdgGridSettingsBase { class PreferencesDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: @@ -249,7 +256,7 @@ public: protected: - PreferencesDialog( QWidget *parent = 0, const char *name = 0 ); + PreferencesDialog( TQWidget *tqparent = 0, const char *name = 0 ); ~PreferencesDialog(); protected: diff --git a/krita/ui/kis_doc.cc b/krita/ui/kis_doc.cc index 7ae27bde..2a7d1300 100644 --- a/krita/ui/kis_doc.cc +++ b/krita/ui/kis_doc.cc @@ -19,15 +19,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// Qt -#include <qapplication.h> -#include <qdom.h> -#include <qimage.h> -#include <qpainter.h> -#include <qtl.h> -#include <qstringlist.h> -#include <qwidget.h> -#include <qpaintdevicemetrics.h> +// TQt +#include <tqapplication.h> +#include <tqdom.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqtl.h> +#include <tqstringlist.h> +#include <tqwidget.h> +#include <tqpaintdevicemetrics.h> // KDE #include <dcopobject.h> @@ -103,8 +103,8 @@ namespace { public: KisCommandImageMv(KisDoc *doc, KisUndoAdapter *adapter, - const QString& name, - const QString& oldName) : super(i18n("Rename Image"), adapter) + const TQString& name, + const TQString& oldName) : super(i18n("Rename Image"), adapter) { m_doc = doc; m_name = name; @@ -131,14 +131,14 @@ namespace { private: KisDoc *m_doc; - QString m_name; - QString m_oldName; + TQString m_name; + TQString m_oldName; }; } -KisDoc::KisDoc(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, bool singleViewMode) : - super(parentWidget, widgetName, parent, name, singleViewMode) +KisDoc::KisDoc(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, bool singleViewMode) : + super(tqparentWidget, widgetName, tqparent, name, singleViewMode) { m_undo = false; @@ -168,7 +168,7 @@ KisDoc::~KisDoc() delete m_dcop; } -QCString KisDoc::mimeType() const +TQCString KisDoc::mimeType() const { return APP_MIMETYPE; } @@ -182,14 +182,14 @@ DCOPObject *KisDoc::dcopObject() return m_dcop; } -bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) +bool KisDoc::initDoc(InitDocFlags flags, TQWidget* tqparentWidget) { if (!init()) return false; bool ok = false; - QString file; + TQString file; KoTemplateChooseDia::DialogType dlgtype; if (flags != KoDocument::InitDocFileNew) { @@ -203,7 +203,7 @@ bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) file, dlgtype, "krita_template", - parentWidget); + tqparentWidget); setUndo(false); if (ret == KoTemplateChooseDia::Template) { @@ -227,7 +227,7 @@ bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) return ok; } -void KisDoc::openExistingFile(const QString& file) +void KisDoc::openExistingFile(const TQString& file) { setUndo(false); @@ -236,7 +236,7 @@ void KisDoc::openExistingFile(const QString& file) setUndo(true); } -void KisDoc::openTemplate(const QString& file) +void KisDoc::openTemplate(const TQString& file) { setUndo(false); @@ -260,8 +260,8 @@ bool KisDoc::init() m_cmdHistory = new KoCommandHistory(actionCollection(), true); Q_CHECK_PTR(m_cmdHistory); - connect(m_cmdHistory, SIGNAL(documentRestored()), this, SLOT(slotDocumentRestored())); - connect(m_cmdHistory, SIGNAL(commandExecuted(KCommand *)), this, SLOT(slotCommandExecuted(KCommand *))); + connect(m_cmdHistory, TQT_SIGNAL(documentRestored()), this, TQT_SLOT(slotDocumentRestored())); + connect(m_cmdHistory, TQT_SIGNAL(commandExecuted(KCommand *)), this, TQT_SLOT(slotCommandExecuted(KCommand *))); setUndo(true); m_nserver = new KisNameServer(i18n("Image %1"), 1); @@ -277,13 +277,13 @@ bool KisDoc::init() return true; } -QDomDocument KisDoc::saveXML() +TQDomDocument KisDoc::saveXML() { - QDomDocument doc = createDomDocument("DOC", CURRENT_DTD_VERSION); - QDomElement root = doc.documentElement(); + TQDomDocument doc = createDomDocument("DOC", CURRENT_DTD_VERSION); + TQDomElement root = doc.documentElement(); root.setAttribute("editor", "Krita"); - root.setAttribute("depth", sizeof(Q_UINT8)); + root.setAttribute("depth", sizeof(TQ_UINT8)); root.setAttribute("syntaxVersion", "1"); root.appendChild(saveImage(doc, m_currentImage)); @@ -291,7 +291,7 @@ QDomDocument KisDoc::saveXML() return doc; } -bool KisDoc::loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* ) +bool KisDoc::loadOasis( const TQDomDocument&, KoOasisStyles&, const TQDomDocument&, KoStore* ) { //XXX: todo (and that includes defining an OASIS format for layered 2D raster data!) return false; @@ -304,11 +304,11 @@ bool KisDoc::saveOasis( KoStore*, KoXmlWriter* ) return false; } -bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) +bool KisDoc::loadXML(TQIODevice *, const TQDomDocument& doc) { - QDomElement root; - QString attr; - QDomNode node; + TQDomElement root; + TQString attr; + TQDomNode node; KisImageSP img; if (!init()) @@ -332,7 +332,7 @@ bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) for (node = root.firstChild(); !node.isNull(); node = node.nextSibling()) { if (node.isElement()) { if (node.nodeName() == "IMAGE") { - QDomElement elem = node.toElement(); + TQDomElement elem = node.toElement(); if (!(img = loadImage(elem))) return false; m_currentImage = img; @@ -347,7 +347,7 @@ bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) } bool KisDoc::loadChildren(KoStore* store) { - QPtrListIterator<KoDocumentChild> it(children()); + TQPtrListIterator<KoDocumentChild> it(tqchildren()); for( ; it.current(); ++it ) { if (!it.current()->loadDocument(store)) { return false; @@ -356,9 +356,9 @@ bool KisDoc::loadChildren(KoStore* store) { return true; } -QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) +TQDomElement KisDoc::saveImage(TQDomDocument& doc, KisImageSP img) { - QDomElement image = doc.createElement("IMAGE"); + TQDomElement image = doc.createElement("IMAGE"); Q_ASSERT(img); image.setAttribute("name", img->name()); @@ -373,7 +373,7 @@ QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) image.setAttribute("x-res", img->xRes()); image.setAttribute("y-res", img->yRes()); - Q_UINT32 count=0; + TQ_UINT32 count=0; KisSaveXmlVisitor visitor(doc, image, count, true); m_currentImage->rootLayer()->accept(visitor); @@ -381,22 +381,22 @@ QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) return image; } -KisImageSP KisDoc::loadImage(const QDomElement& element) +KisImageSP KisDoc::loadImage(const TQDomElement& element) { KisConfig cfg; - QString attr; - QDomNode node; - QDomNode child; + TQString attr; + TQDomNode node; + TQDomNode child; KisImageSP img; - QString name; - Q_INT32 width; - Q_INT32 height; - QString description; - QString profileProductName; + TQString name; + TQ_INT32 width; + TQ_INT32 height; + TQString description; + TQString profileProductName; double xres; double yres; - QString colorspacename; + TQString colorspacename; KisColorSpace * cs; if ((attr = element.attribute("mime")) == NATIVE_MIMETYPE) { @@ -447,7 +447,7 @@ KisImageSP KisDoc::loadImage(const QDomElement& element) img = new KisImage(this, width, height, cs, name); img->blockSignals(true); // Don't send out signals while we're building the image Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); img->setDescription(description); img->setResolution(xres, yres); @@ -460,10 +460,10 @@ KisImageSP KisDoc::loadImage(const QDomElement& element) return img; } -void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLayerSP parent) +void KisDoc::loadLayers(const TQDomElement& element, KisImageSP img, KisGroupLayerSP tqparent) { - QDomNode node = element.firstChild(); - QDomNode child; + TQDomNode node = element.firstChild(); + TQDomNode child; if(!node.isNull()) { @@ -477,7 +477,7 @@ void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLaye } else { img->nextLayerName(); // Make sure the nameserver is current with the number of layers. - img->addLayer(layer, parent, 0); + img->addLayer(layer, tqparent, 0); } } } @@ -485,17 +485,17 @@ void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLaye } } -KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) +KisLayerSP KisDoc::loadLayer(const TQDomElement& element, KisImageSP img) { // Nota bene: If you add new properties to layers, you should // ALWAYS define a default value in case the property is not // present in the layer definition: this helps a LOT with backward // compatibilty. - QString attr; - QString name; - Q_INT32 x; - Q_INT32 y; - Q_INT32 opacity; + TQString attr; + TQString name; + TQ_INT32 x; + TQ_INT32 y; + TQ_INT32 opacity; bool visible; bool locked; @@ -514,11 +514,11 @@ KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) if ((attr = element.attribute("opacity")).isNull()) return 0; - if ((opacity = attr.toInt()) < 0 || opacity > Q_UINT8_MAX) + if ((opacity = attr.toInt()) < 0 || opacity > TQ_UINT8_MAX) opacity = OPACITY_OPAQUE; - QString compositeOpName = element.attribute("compositeop"); + TQString compositeOpName = element.attribute("compositeop"); KisCompositeOp compositeOp; if (compositeOpName.isNull()) { @@ -562,16 +562,16 @@ KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) } -KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, - Q_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) +KisLayerSP KisDoc::loadPaintLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, + TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisPaintLayerSP layer; KisColorSpace * cs; - QString colorspacename; - QString profileProductName; + TQString colorspacename; + TQString profileProductName; if ((colorspacename = element.attribute("colorspacename")).isNull()) cs = img->colorSpace(); @@ -591,21 +591,21 @@ KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, if ((element.attribute("filename")).isNull()) m_layerFilenames[layer.data()] = name; else - m_layerFilenames[layer.data()] = QString(element.attribute("filename")); + m_layerFilenames[layer.data()] = TQString(element.attribute("filename")); - if ((attr = element.attribute("hasmask")).isNull()) + if ((attr = element.attribute("hastqmask")).isNull()) attr = "0"; if (attr == "1") { - // We add a mask, but we'll fill in the actual mask later in completeLoading with the visitor + // We add a tqmask, but we'll fill in the actual tqmask later in completeLoading with the visitor layer->createMask(); } // Load exif info - for( QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if ( !e.isNull() && e.tagName() == "ExifInfo" ) { layer->paintDevice()->exifInfo()->load(e); @@ -614,11 +614,11 @@ KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, return layer.data(); } -KisGroupLayerSP KisDoc::loadGroupLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, +KisGroupLayerSP KisDoc::loadGroupLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisGroupLayerSP layer; layer = new KisGroupLayer(img, name, opacity); @@ -635,13 +635,13 @@ KisGroupLayerSP KisDoc::loadGroupLayer(const QDomElement& element, KisImageSP im return layer; } -KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, +KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisAdjustmentLayerSP layer; - QString filtername; + TQString filtername; if ((filtername = element.attribute("filtername")).isNull()) { // XXX: Invalid adjustmentlayer! We should warn about it! @@ -671,18 +671,18 @@ KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const QDomElement& element, Kis if ((element.attribute("filename")).isNull()) m_layerFilenames[layer.data()] = name; else - m_layerFilenames[layer.data()] = QString(element.attribute("filename")); + m_layerFilenames[layer.data()] = TQString(element.attribute("filename")); return layer; } -KisPartLayerSP KisDoc::loadPartLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 /*x*/, Q_INT32 /*y*/, Q_INT32 opacity, +KisPartLayerSP KisDoc::loadPartLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 /*x*/, TQ_INT32 /*y*/, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { KisChildDoc* child = new KisChildDoc(this); - QString filename(element.attribute("filename")); - QDomElement partElement = element.namedItem("object").toElement(); + TQString filename(element.attribute("filename")); + TQDomElement partElement = element.namedItem("object").toElement(); if (partElement.isNull()) { kdWarning() << "loadPartLayer failed with partElement isNull" << endl; @@ -706,10 +706,10 @@ KisPartLayerSP KisDoc::loadPartLayer(const QDomElement& element, KisImageSP img, bool KisDoc::completeSaving(KoStore *store) { - QString uri = url().url(); - QString location; + TQString uri = url().url(); + TQString location; bool external = isStoredExtern(); - Q_INT32 totalSteps = 0; + TQ_INT32 totalSteps = 0; if (!m_currentImage) return false; @@ -719,7 +719,7 @@ bool KisDoc::completeSaving(KoStore *store) setIOSteps(totalSteps + 1); // Save the layers data - Q_UINT32 count=0; + TQ_UINT32 count=0; KisSaveVisitor visitor(m_currentImage, store, count); if(external) @@ -733,7 +733,7 @@ bool KisDoc::completeSaving(KoStore *store) // e.g. have <ANNOTATION> tags or so. KisAnnotationSP annotation = (m_currentImage)->annotation("exif"); if (annotation) { - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/exif"; if (store->open(location)) { store->write(annotation->annotation()); @@ -744,7 +744,7 @@ bool KisDoc::completeSaving(KoStore *store) annotation = m_currentImage->getProfile()->annotation(); if (annotation) { - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += m_currentImage->name() + "/annotations/icc"; if (store->open(location)) { store->write(annotation->annotation()); @@ -759,10 +759,10 @@ bool KisDoc::completeSaving(KoStore *store) bool KisDoc::completeLoading(KoStore *store) { - QString uri = url().url(); - QString location; + TQString uri = url().url(); + TQString location; bool external = isStoredExtern(); - Q_INT32 totalSteps = 0; + TQ_INT32 totalSteps = 0; totalSteps = (m_currentImage)->nlayers(); @@ -778,20 +778,20 @@ bool KisDoc::completeLoading(KoStore *store) // annotations // exif - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/exif"; if (store->hasFile(location)) { - QByteArray data; + TQByteArray data; store->open(location); data = store->read(store->size()); store->close(); (m_currentImage)->addAnnotation(new KisAnnotation("exif", "", data)); } // icc profile - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/icc"; if (store->hasFile(location)) { - QByteArray data; + TQByteArray data; store->open(location); data = store->read(store->size()); store->close(); @@ -805,7 +805,7 @@ bool KisDoc::completeLoading(KoStore *store) return true; } -QWidget* KisDoc::createCustomDocumentWidget(QWidget *parent) +TQWidget* KisDoc::createCustomDocumentWidget(TQWidget *tqparent) { KisConfig cfg; @@ -813,16 +813,16 @@ QWidget* KisDoc::createCustomDocumentWidget(QWidget *parent) int w = cfg.defImgWidth(); int h = cfg.defImgHeight(); - QSize sz = KisClipboard::instance()->clipSize(); + TQSize sz = KisClipboard::instance()->clipSize(); if (sz.isValid() && sz.width() != 0 && sz.height() != 0) { w = sz.width(); h = sz.height(); } - return new KisCustomImageWidget(parent, this, w, h, cfg.defImgResolution(), cfg.workingColorSpace(),"unnamed"); + return new KisCustomImageWidget(tqparent, this, w, h, cfg.defImgResolution(), cfg.workingColorSpace(),"unnamed"); } -KoDocument* KisDoc::hitTest(const QPoint &pos, const QWMatrix& matrix) { +KoDocument* KisDoc::hitTest(const TQPoint &pos, const TQWMatrix& matrix) { KoDocument* doc = super::hitTest(pos, matrix); if (doc && doc != this) { // We hit a child document. We will only acknowledge we hit it, if the hit child @@ -841,7 +841,7 @@ KoDocument* KisDoc::hitTest(const QPoint &pos, const QWMatrix& matrix) { return doc; } -void KisDoc::renameImage(const QString& oldName, const QString& newName) +void KisDoc::renameImage(const TQString& oldName, const TQString& newName) { (m_currentImage)->setName(newName); @@ -850,7 +850,7 @@ void KisDoc::renameImage(const QString& oldName, const QString& newName) } -KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * colorstrategy) +KisImageSP KisDoc::newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorstrategy) { if (!init()) return 0; @@ -859,7 +859,7 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisImageSP img = new KisImage(this, width, height, colorstrategy, name); Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); KisPaintLayer *layer = new KisPaintLayer(img, img->nextLayerName(), OPACITY_OPAQUE,colorstrategy); Q_CHECK_PTR(layer); @@ -868,7 +868,7 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisFillPainter painter; painter.begin(layer->paintDevice()); - painter.fillRect(0, 0, width, height, KisColor(Qt::white, cs), OPACITY_OPAQUE); + painter.fillRect(0, 0, width, height, KisColor(TQt::white, cs), OPACITY_OPAQUE); painter.end(); img->addLayer(layer, img->rootLayer(), 0); @@ -881,14 +881,14 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, return img; } -bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const QString &imgDescription, const double imgResolution) +bool KisDoc::newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const TQString &imgDescription, const double imgResolution) { if (!init()) return false; KisConfig cfg; - Q_UINT8 opacity = OPACITY_OPAQUE;//bgColor.getAlpha(); + TQ_UINT8 opacity = OPACITY_OPAQUE;//bgColor.getAlpha(); KisImageSP img; KisPaintLayer *layer; @@ -898,7 +898,7 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol img = new KisImage(this, width, height, cs, name); Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); img->setResolution(imgResolution, imgResolution); img->setDescription(imgDescription); img->setProfile(cs->getProfile()); @@ -911,7 +911,7 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol painter.fillRect(0, 0, width, height, bgColor, opacity); painter.end(); - QValueVector<KisPaintDeviceAction *> actions = KisMetaRegistry::instance() -> + TQValueVector<KisPaintDeviceAction *> actions = KisMetaRegistry::instance() -> csRegistry()->paintDeviceActionsFor(cs); for (uint i = 0; i < actions.count(); i++) actions.at(i)->act(layer->paintDevice(), img->width(), img->height()); @@ -931,21 +931,21 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol return true; } -KoView* KisDoc::createViewInstance(QWidget* parent, const char *name) +KoView* KisDoc::createViewInstance(TQWidget* tqparent, const char *name) { - KisView * v = new KisView(this, this, parent, name); + KisView * v = new KisView(this, this, tqparent, name); Q_CHECK_PTR(v); return v; } -void KisDoc::paintContent(QPainter& painter, const QRect& rc, bool transparent, double zoomX, double zoomY) +void KisDoc::paintContent(TQPainter& painter, const TQRect& rc, bool transparent, double zoomX, double zoomY) { KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); KisProfile * profile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); painter.scale(zoomX, zoomY); - QRect rect = rc & m_currentImage->bounds(); + TQRect rect = rc & m_currentImage->bounds(); KisImage::PaintFlags paintFlags; if (transparent) { paintFlags = KisImage::PAINT_SELECTION; @@ -964,12 +964,12 @@ void KisDoc::slotImageUpdated() setModified(true); } -void KisDoc::slotImageUpdated(const QRect& rect) +void KisDoc::slotImageUpdated(const TQRect& rect) { emit docUpdated(rect); } -void KisDoc::beginMacro(const QString& macroName) +void KisDoc::beginMacro(const TQString& macroName) { if (m_undo) { if (m_macroNestDepth == 0) { @@ -1002,7 +1002,7 @@ void KisDoc::endMacro() void KisDoc::setCommandHistoryListener(const KisCommandHistoryListener * l) { - // Never have more than one instance of a listener around. Qt should prove a Set class for this... + // Never have more than one instance of a listener around. TQt should prove a Set class for this... m_undoListeners.removeRef(l); m_undoListeners.append(l); } @@ -1051,22 +1051,22 @@ void KisDoc::setUndo(bool undo) } } -Q_INT32 KisDoc::undoLimit() const +TQ_INT32 KisDoc::undoLimit() const { return m_cmdHistory->undoLimit(); } -void KisDoc::setUndoLimit(Q_INT32 limit) +void KisDoc::setUndoLimit(TQ_INT32 limit) { m_cmdHistory->setUndoLimit(limit); } -Q_INT32 KisDoc::redoLimit() const +TQ_INT32 KisDoc::redoLimit() const { return m_cmdHistory->redoLimit(); } -void KisDoc::setRedoLimit(Q_INT32 limit) +void KisDoc::setRedoLimit(TQ_INT32 limit) { m_cmdHistory->setRedoLimit(limit); } @@ -1089,9 +1089,9 @@ void KisDoc::slotCommandExecuted(KCommand *command) } -void KisDoc::slotUpdate(KisImageSP, Q_UINT32 x, Q_UINT32 y, Q_UINT32 w, Q_UINT32 h) +void KisDoc::slotUpdate(KisImageSP, TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 w, TQ_UINT32 h) { - QRect rc(x, y, w, h); + TQRect rc(x, y, w, h); emit docUpdated(rc); } @@ -1101,7 +1101,7 @@ bool KisDoc::undo() const return m_undo; } -void KisDoc::setIOSteps(Q_INT32 nsteps) +void KisDoc::setIOSteps(TQ_INT32 nsteps) { m_ioProgressTotalSteps = nsteps * 100; m_ioProgressBase = 0; @@ -1118,7 +1118,7 @@ void KisDoc::IODone() emitProgress(-1); } -void KisDoc::slotIOProgress(Q_INT8 percentage) +void KisDoc::slotIOProgress(TQ_INT8 percentage) { KApplication *app = KApplication::kApplication(); @@ -1132,7 +1132,7 @@ void KisDoc::slotIOProgress(Q_INT8 percentage) emitProgress(totalPercentage); } -KisChildDoc * KisDoc::createChildDoc( const QRect & rect, KoDocument* childDoc ) +KisChildDoc * KisDoc::createChildDoc( const TQRect & rect, KoDocument* childDoc ) { KisChildDoc * ch = new KisChildDoc( this, rect, childDoc ); insertChild( ch ); diff --git a/krita/ui/kis_doc.h b/krita/ui/kis_doc.h index 5d538cd7..55cbac90 100644 --- a/krita/ui/kis_doc.h +++ b/krita/ui/kis_doc.h @@ -29,8 +29,8 @@ #include <koffice_export.h> -class QImage; -class QString; +class TQImage; +class TQString; class DCOPObject; class KCommand; @@ -50,9 +50,10 @@ class KRITACORE_EXPORT KisDoc : public KoDocument, private KisUndoAdapter { typedef KoDocument super; Q_OBJECT + TQ_OBJECT public: - KisDoc(QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false); + KisDoc(TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false); virtual ~KisDoc(); public: @@ -61,14 +62,14 @@ public: virtual bool completeLoading(KoStore *store); virtual bool completeSaving(KoStore*); virtual DCOPObject* dcopObject(); - virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0); - virtual bool loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* ); + virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0); + virtual bool loadOasis( const TQDomDocument&, KoOasisStyles&, const TQDomDocument&, KoStore* ); virtual bool saveOasis( KoStore*, KoXmlWriter* ); virtual bool loadChildren( KoStore* store); - virtual bool loadXML(QIODevice *, const QDomDocument& doc); - virtual QCString mimeType() const; - virtual QWidget* createCustomDocumentWidget(QWidget *parent); - virtual KoDocument* hitTest(const QPoint &pos, const QWMatrix& matrix = QWMatrix()); + virtual bool loadXML(TQIODevice *, const TQDomDocument& doc); + virtual TQCString mimeType() const; + virtual TQWidget* createCustomDocumentWidget(TQWidget *tqparent); + virtual KoDocument* hitTest(const TQPoint &pos, const TQWMatrix& matrix = TQWMatrix()); /** * Draw the image embedded in another KOffice document @@ -77,9 +78,9 @@ public: * by Krita because we appear to be doing our zooming * elsewhere. This may affect KOffice compatibility. */ - virtual void paintContent(QPainter& painter, const QRect& rect, bool /*transparent*/, double /*zoomX*/, double /*zoomY*/); + virtual void paintContent(TQPainter& painter, const TQRect& rect, bool /*transparent*/, double /*zoomX*/, double /*zoomY*/); - virtual QDomDocument saveXML(); + virtual TQDomDocument saveXML(); public slots: @@ -99,32 +100,32 @@ private: // Undo adapter virtual void addCommand(KCommand *cmd); virtual void setUndo(bool undo); virtual bool undo() const; - virtual void beginMacro(const QString& macroName); + virtual void beginMacro(const TQString& macroName); virtual void endMacro(); public: - Q_INT32 undoLimit() const; - void setUndoLimit(Q_INT32 limit); + TQ_INT32 undoLimit() const; + void setUndoLimit(TQ_INT32 limit); - Q_INT32 redoLimit() const; - void setRedoLimit(Q_INT32 limit); + TQ_INT32 redoLimit() const; + void setRedoLimit(TQ_INT32 limit); /** - * Create a new image that has this document as a parent and + * Create a new image that has this document as a tqparent and * replace the current image with this image. */ - bool newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const QString &imgDescription, const double imgResolution); + bool newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const TQString &imgDescription, const double imgResolution); /** - * Create a new image that has this document as a parent and + * Create a new image that has this document as a tqparent and * replace the current image with this image. */ - KisImageSP newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * colorstrategy); + KisImageSP newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorstrategy); - void renameImage(const QString& oldName, const QString& newName); + void renameImage(const TQString& oldName, const TQString& newName); /** @@ -132,7 +133,7 @@ public: * is not done with KoDocument::insertChild() because that * is protected and cannot be called from KisView. */ - KisChildDoc * createChildDoc( const QRect& rect, KoDocument* childDoc ); + KisChildDoc * createChildDoc( const TQRect& rect, KoDocument* childDoc ); /** * Makes an otherwise empty document ready for import/export @@ -150,13 +151,13 @@ public: public slots: void slotImageUpdated(); - void slotImageUpdated(const QRect& rect); + void slotImageUpdated(const TQRect& rect); void slotDocumentRestored(); void slotCommandExecuted(KCommand *command); signals: void docUpdated(); - void docUpdated(QRect rect); + void docUpdated(TQRect rect); void loadingFinished(); /* @@ -167,38 +168,38 @@ signals: protected: // Overide KoDocument - virtual KoView* createViewInstance(QWidget *parent, const char *name); + virtual KoView* createViewInstance(TQWidget *tqparent, const char *name); protected slots: // Overide KoDocument - virtual void openExistingFile(const QString& file); - virtual void openTemplate(const QString& file); + virtual void openExistingFile(const TQString& file); + virtual void openTemplate(const TQString& file); private slots: - void slotUpdate(KisImageSP img, Q_UINT32 x, Q_UINT32 y, Q_UINT32 w, Q_UINT32 h); - void slotIOProgress(Q_INT8 percentage); + void slotUpdate(KisImageSP img, TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 w, TQ_UINT32 h); + void slotIOProgress(TQ_INT8 percentage); private: - QDomElement saveImage(QDomDocument& doc, KisImageSP img); - KisImageSP loadImage(const QDomElement& elem); - void loadLayers(const QDomElement& element, KisImageSP img, KisGroupLayerSP parent); - KisLayerSP loadLayer(const QDomElement& elem, KisImageSP img); - KisLayerSP loadPaintLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, + TQDomElement saveImage(TQDomDocument& doc, KisImageSP img); + KisImageSP loadImage(const TQDomElement& elem); + void loadLayers(const TQDomElement& element, KisImageSP img, KisGroupLayerSP tqparent); + KisLayerSP loadLayer(const TQDomElement& elem, KisImageSP img); + KisLayerSP loadPaintLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); - KisGroupLayerSP loadGroupLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, + KisGroupLayerSP loadGroupLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); - KisAdjustmentLayerSP loadAdjustmentLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, + KisAdjustmentLayerSP loadAdjustmentLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); - KisPartLayerSP loadPartLayer(const QDomElement& elem, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, + KisPartLayerSP loadPartLayer(const TQDomElement& elem, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp); bool init(); - void setIOSteps(Q_INT32 nsteps); + void setIOSteps(TQ_INT32 nsteps); void IOCompletedStep(); void IODone(); @@ -206,16 +207,16 @@ private: bool m_undo; KoCommandHistory *m_cmdHistory; - QPtrList<KisCommandHistoryListener> m_undoListeners; + TQPtrList<KisCommandHistoryListener> m_undoListeners; KisImageSP m_currentImage; DCOPObject *m_dcop; KisNameServer *m_nserver; KMacroCommand *m_currentMacro; - Q_INT32 m_macroNestDepth; - Q_INT32 m_conversionDepth; + TQ_INT32 m_macroNestDepth; + TQ_INT32 m_conversionDepth; int m_ioProgressTotalSteps; int m_ioProgressBase; - QMap<KisLayerSP, QString> m_layerFilenames; // temp storage during load + TQMap<KisLayerSP, TQString> m_layerFilenames; // temp storage during load }; diff --git a/krita/ui/kis_doc_iface.cc b/krita/ui/kis_doc_iface.cc index d7db6e5d..50af9898 100644 --- a/krita/ui/kis_doc_iface.cc +++ b/krita/ui/kis_doc_iface.cc @@ -61,7 +61,7 @@ void KisDocIface::setRedoLimit(int limit) m_doc->setRedoLimit(limit); } -void KisDocIface::renameImage(const QString& oldName, const QString& newName) +void KisDocIface::renameImage(const TQString& oldName, const TQString& newName) { m_doc->renameImage(oldName,newName); } diff --git a/krita/ui/kis_doc_iface.h b/krita/ui/kis_doc_iface.h index 204d8b77..36c71a5f 100644 --- a/krita/ui/kis_doc_iface.h +++ b/krita/ui/kis_doc_iface.h @@ -23,7 +23,7 @@ #include <KoDocumentIface.h> #include <dcopref.h> -#include <qstring.h> +#include <tqstring.h> #include <kis_image_iface.h> class KisDoc; @@ -41,7 +41,7 @@ k_dcop: virtual int redoLimit() const; virtual void setRedoLimit(int limit); - virtual void renameImage(const QString& oldName, const QString& newName); + virtual void renameImage(const TQString& oldName, const TQString& newName); private: KisDoc *m_doc; diff --git a/krita/ui/kis_double_click_event.h b/krita/ui/kis_double_click_event.h index 0d6765aa..c3447602 100644 --- a/krita/ui/kis_double_click_event.h +++ b/krita/ui/kis_double_click_event.h @@ -24,7 +24,7 @@ class KisDoubleClickEvent : public KisButtonEvent { typedef KisButtonEvent super; public: KisDoubleClickEvent() {} - KisDoubleClickEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState button, Qt::ButtonState state) : super(DoubleClickEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} + KisDoubleClickEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState button, TQt::ButtonState state) : super(DoubleClickEvent, device, pos, globalPos, pressure, xTilt, yTilt, button, state) {} }; #endif // KIS_DOUBLE_CLICK_EVENT_H_ diff --git a/krita/ui/kis_double_widget.cc b/krita/ui/kis_double_widget.cc index 935df9a2..d8c90187 100644 --- a/krita/ui/kis_double_widget.cc +++ b/krita/ui/kis_double_widget.cc @@ -19,22 +19,22 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qhbox.h> -#include <qlayout.h> -#include <qslider.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqslider.h> #include <knuminput.h> #include "kis_double_widget.h" -KisDoubleWidget::KisDoubleWidget(QWidget* parent, const char* name) - : super(parent, name) +KisDoubleWidget::KisDoubleWidget(TQWidget* tqparent, const char* name) + : super(tqparent, name) { init(0, 1); } -KisDoubleWidget::KisDoubleWidget(double min, double max, QWidget* parent, const char* name) - : super(parent, name) +KisDoubleWidget::KisDoubleWidget(double min, double max, TQWidget* tqparent, const char* name) + : super(tqparent, name) { init(min, max); } @@ -46,19 +46,19 @@ KisDoubleWidget::~KisDoubleWidget() void KisDoubleWidget::init(double min, double max) { m_spinBox = new KDoubleSpinBox(min, max, 0.05, 0, 2, this, "spinbox"); - connect(m_spinBox, SIGNAL(valueChanged(double)), this, SLOT(setSliderValue(double))); + connect(m_spinBox, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(setSliderValue(double))); - m_slider = new QSlider(static_cast<int>(min * 100 + 0.5), static_cast<int>(max * 100 + 0.5), 1, 0, QSlider::Horizontal, this, "sld"); - connect(m_slider, SIGNAL(valueChanged(int)), this, SLOT(sliderValueChanged(int))); - connect(m_slider, SIGNAL(sliderPressed()), SIGNAL(sliderPressed())); - connect(m_slider, SIGNAL(sliderReleased()), SIGNAL(sliderReleased())); + m_slider = new TQSlider(static_cast<int>(min * 100 + 0.5), static_cast<int>(max * 100 + 0.5), 1, 0, TQSlider::Horizontal, this, "sld"); + connect(m_slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(sliderValueChanged(int))); + connect(m_slider, TQT_SIGNAL(sliderPressed()), TQT_SIGNAL(sliderPressed())); + connect(m_slider, TQT_SIGNAL(sliderReleased()), TQT_SIGNAL(sliderReleased())); - m_layout = new QHBoxLayout(this, 0, -1, "hbox layout"); + m_layout = new TQHBoxLayout(this, 0, -1, "hbox tqlayout"); m_layout->addWidget(m_slider); m_layout->addSpacing(5); m_layout->addWidget(m_spinBox); - m_layout->addItem(new QSpacerItem(5,1,QSizePolicy::Expanding, QSizePolicy::Minimum)); + m_layout->addItem(new TQSpacerItem(5,1,TQSizePolicy::Expanding, TQSizePolicy::Minimum)); } double KisDoubleWidget::value() const @@ -84,7 +84,7 @@ void KisDoubleWidget::setRange(double min, double max) m_slider->setRange(static_cast<int>(min * 100 + 0.5), static_cast<int>(max * 100 + 0.5)); } -void KisDoubleWidget::setTickmarks(QSlider::TickSetting tickSetting) +void KisDoubleWidget::setTickmarks(TQSlider::TickSetting tickSetting) { m_slider->setTickmarks(tickSetting); } diff --git a/krita/ui/kis_double_widget.h b/krita/ui/kis_double_widget.h index bd6043e0..34bd2230 100644 --- a/krita/ui/kis_double_widget.h +++ b/krita/ui/kis_double_widget.h @@ -22,26 +22,27 @@ #ifndef KIS_DOUBLE_WIDGET_H #define KIS_DOUBLE_WIDGET_H -#include <qwidget.h> -#include <qslider.h> +#include <tqwidget.h> +#include <tqslider.h> -class QHBoxLayout; +class TQHBoxLayout; class KDoubleSpinBox; -class KisDoubleWidget : public QWidget +class KisDoubleWidget : public TQWidget { Q_OBJECT + TQ_OBJECT - typedef QWidget super; + typedef TQWidget super; public: - KisDoubleWidget(QWidget* parent = 0, const char* name = 0); - KisDoubleWidget(double min, double max, QWidget* parent = 0, const char* name = 0); + KisDoubleWidget(TQWidget* tqparent = 0, const char* name = 0); + KisDoubleWidget(double min, double max, TQWidget* tqparent = 0, const char* name = 0); ~KisDoubleWidget(); double value() const; void setRange(double min, double max); - void setTickmarks(QSlider::TickSetting tickMarks); + void setTickmarks(TQSlider::TickSetting tickMarks); void setTickInterval(double tickInterval); double tickInterval() const; @@ -68,8 +69,8 @@ private: void init(double min, double max); protected: - QHBoxLayout* m_layout; - QSlider* m_slider; + TQHBoxLayout* m_layout; + TQSlider* m_slider; KDoubleSpinBox *m_spinBox; }; diff --git a/krita/ui/kis_event.h b/krita/ui/kis_event.h index 3d4d21bc..417a9168 100644 --- a/krita/ui/kis_event.h +++ b/krita/ui/kis_event.h @@ -18,7 +18,7 @@ #ifndef KIS_EVENT_H_ #define KIS_EVENT_H_ -#include <qevent.h> +#include <tqevent.h> #include "kis_point.h" #include "kis_input_device.h" @@ -34,7 +34,7 @@ public: }; KisEvent() : m_type(UnknownEvent), m_device(KisInputDevice::unknown()) {} - KisEvent(enumEventType type, KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState state) : m_type(type), m_device(device), m_pos(pos), m_globalPos(globalPos), m_pressure(pressure), m_xTilt(xTilt), m_yTilt(yTilt), m_state(state) {} + KisEvent(enumEventType type, KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState state) : m_type(type), m_device(device), m_pos(pos), m_globalPos(globalPos), m_pressure(pressure), m_xTilt(xTilt), m_yTilt(yTilt), m_state(state) {} enumEventType type() const { return m_type; } KisInputDevice device() const { return m_device; } @@ -45,7 +45,7 @@ public: double pressure() const { return m_pressure; } double xTilt() const { return m_xTilt; } double yTilt() const { return m_yTilt; } - Qt::ButtonState state() const { return m_state; } + TQt::ButtonState state() const { return m_state; } protected: enumEventType m_type; @@ -55,7 +55,7 @@ protected: double m_pressure; double m_xTilt; double m_yTilt; - Qt::ButtonState m_state; + TQt::ButtonState m_state; }; #endif // KIS_EVENT_H_ diff --git a/krita/ui/kis_factory.cc b/krita/ui/kis_factory.cc index 54a08da9..a4a5e2bf 100644 --- a/krita/ui/kis_factory.cc +++ b/krita/ui/kis_factory.cc @@ -20,8 +20,8 @@ #include <config.h> #include LCMS_HEADER -#include <qstringlist.h> -#include <qdir.h> +#include <tqstringlist.h> +#include <tqdir.h> #include <kdebug.h> #include <kinstance.h> @@ -50,8 +50,8 @@ KInstance* KisFactory::s_instance = 0; -KisFactory::KisFactory( QObject* parent, const char* name ) - : KoFactory( parent, name ) +KisFactory::KisFactory( TQObject* tqparent, const char* name ) + : KoFactory( tqparent, name ) { s_aboutData = newKritaAboutData(); @@ -78,14 +78,14 @@ KisFactory::~KisFactory() /** * Create the document */ -KParts::Part* KisFactory::createPartObject( QWidget *parentWidget, - const char *widgetName, QObject* parent, - const char* name, const char* classname, const QStringList & ) +KParts::Part* KisFactory::createPartObject( TQWidget *tqparentWidget, + const char *widgetName, TQObject* tqparent, + const char* name, const char* classname, const TQStringList & ) { bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 ); - KisDoc *doc = new KisDoc( parentWidget, - widgetName, parent, name, !bWantKoDocument ); + KisDoc *doc = new KisDoc( tqparentWidget, + widgetName, tqparent, name, !bWantKoDocument ); Q_CHECK_PTR(doc); if ( !bWantKoDocument ) @@ -102,7 +102,7 @@ KAboutData* KisFactory::aboutData() KInstance* KisFactory::instance() { - QString homedir = getenv("HOME"); + TQString homedir = getenv("HOME"); if ( !s_instance ) { @@ -124,24 +124,24 @@ KInstance* KisFactory::instance() s_instance->dirs()->addResourceType("kis_brushes", KStandardDirs::kde_default("data") + "krita/brushes/"); s_instance->dirs()->addResourceDir("kis_brushes", "/usr/share/create/brushes/gimp"); - s_instance->dirs()->addResourceDir("kis_brushes", QDir::homeDirPath() + QString("/.create/brushes/gimp")); + s_instance->dirs()->addResourceDir("kis_brushes", TQDir::homeDirPath() + TQString("/.create/brushes/gimp")); s_instance->dirs()->addResourceType("kis_patterns", KStandardDirs::kde_default("data") + "krita/patterns/"); s_instance->dirs()->addResourceDir("kis_patterns", "/usr/share/create/patterns/gimp"); - s_instance->dirs()->addResourceDir("kis_patterns", QDir::homeDirPath() + QString("/.create/patterns/gimp")); + s_instance->dirs()->addResourceDir("kis_patterns", TQDir::homeDirPath() + TQString("/.create/patterns/gimp")); s_instance->dirs()->addResourceType("kis_gradients", KStandardDirs::kde_default("data") + "krita/gradients/"); s_instance->dirs()->addResourceDir("kis_gradients", "/usr/share/create/gradients/gimp"); - s_instance->dirs()->addResourceDir("kis_gradients", QDir::homeDirPath() + QString("/.create/gradients/gimp")); + s_instance->dirs()->addResourceDir("kis_gradients", TQDir::homeDirPath() + TQString("/.create/gradients/gimp")); s_instance->dirs()->addResourceType("kis_profiles", KStandardDirs::kde_default("data") + "krita/profiles/"); s_instance->dirs()->addResourceDir("kis_profiles", "/usr/share/color/icc"); - s_instance->dirs()->addResourceDir("kis_profiles", QDir::homeDirPath() + QString("/.icc")); - s_instance->dirs()->addResourceDir("kis_profiles", QDir::homeDirPath() + QString("/.color/icc")); + s_instance->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.icc")); + s_instance->dirs()->addResourceDir("kis_profiles", TQDir::homeDirPath() + TQString("/.color/icc")); s_instance->dirs()->addResourceType("kis_palettes", KStandardDirs::kde_default("data") + "krita/palettes/"); s_instance->dirs()->addResourceDir("kis_palettes", "/usr/share/create/swatches"); - s_instance->dirs()->addResourceDir("kis_palettes", QDir::homeDirPath() + QString("/.create/swatches")); + s_instance->dirs()->addResourceDir("kis_palettes", TQDir::homeDirPath() + TQString("/.create/swatches")); // Tell the iconloader about share/apps/koffice/icons s_instance->iconLoader()->addAppDir("koffice"); diff --git a/krita/ui/kis_factory.h b/krita/ui/kis_factory.h index c89b7a92..d20070c5 100644 --- a/krita/ui/kis_factory.h +++ b/krita/ui/kis_factory.h @@ -21,7 +21,7 @@ #ifndef __kis_factory_h__ #define __kis_factory_h__ -#include <qptrlist.h> +#include <tqptrlist.h> #include <kparts/plugin.h> @@ -35,17 +35,18 @@ class KAboutData; class KRITACORE_EXPORT KisFactory : public KoFactory { Q_OBJECT + TQ_OBJECT public: - KisFactory( QObject* parent = 0, const char* name = 0 ); + KisFactory( TQObject* tqparent = 0, const char* name = 0 ); ~KisFactory(); - virtual KParts::Part *createPartObject(QWidget *parentWidget = 0, + virtual KParts::Part *createPartObject(TQWidget *tqparentWidget = 0, const char *widgetName = 0, - QObject *parent = 0, + TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument", - const QStringList &args = QStringList() ); + const TQStringList &args = TQStringList() ); static KAboutData *aboutData(); static KInstance *instance(); diff --git a/krita/ui/kis_filter_manager.cc b/krita/ui/kis_filter_manager.cc index 550805ca..0d59636b 100644 --- a/krita/ui/kis_filter_manager.cc +++ b/krita/ui/kis_filter_manager.cc @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qsignalmapper.h" -#include <qlayout.h> -#include <qframe.h> -#include <qcursor.h> -#include <qapplication.h> +#include "tqsignalmapper.h" +#include <tqlayout.h> +#include <tqframe.h> +#include <tqcursor.h> +#include <tqapplication.h> #include <kmessagebox.h> #include <kguiitem.h> @@ -64,9 +64,9 @@ KisFilterManager::KisFilterManager(KisView * view, KisDoc * doc) m_lastFilter = 0; m_lastWidget = 0; - m_filterMapper = new QSignalMapper(this); + m_filterMapper = new TQSignalMapper(this); - connect(m_filterMapper, SIGNAL(mapped(int)), this, SLOT(slotApplyFilter(int))); + connect(m_filterMapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotApplyFilter(int))); } @@ -94,58 +94,58 @@ void KisFilterManager::setup(KActionCollection * ac) f = KisFilterRegistry::instance()->get(*it); if (!f) break; - QString s = f->menuCategory(); - if (s == "adjust" && !m_filterActionMenus.find("adjust")) { + TQString s = f->menuCategory(); + if (s == "adjust" && !m_filterActionMenus.tqfind("adjust")) { am = new KActionMenu(i18n("Adjust"), ac, "adjust_filters"); m_filterActionMenus.insert("adjust", am); } - else if (s == "artistic" && !m_filterActionMenus.find("artistic")) { + else if (s == "artistic" && !m_filterActionMenus.tqfind("artistic")) { am = new KActionMenu(i18n("Artistic"), ac, "artistic_filters"); m_filterActionMenus.insert("artistic", am); } - else if (s == "blur" && !m_filterActionMenus.find("blur")) { + else if (s == "blur" && !m_filterActionMenus.tqfind("blur")) { am = new KActionMenu(i18n("Blur"), ac, "blur_filters"); m_filterActionMenus.insert("blur", am); } - else if (s == "colors" && !m_filterActionMenus.find("colors")) { + else if (s == "colors" && !m_filterActionMenus.tqfind("colors")) { am = new KActionMenu(i18n("Colors"), ac, "color_filters"); m_filterActionMenus.insert("colors", am); } - else if (s == "decor" && !m_filterActionMenus.find("decor")) { + else if (s == "decor" && !m_filterActionMenus.tqfind("decor")) { am = new KActionMenu(i18n("Decor"), ac, "decor_filters"); m_filterActionMenus.insert("decor", am); } - else if (s == "edge" && !m_filterActionMenus.find("edge")) { + else if (s == "edge" && !m_filterActionMenus.tqfind("edge")) { am = new KActionMenu(i18n("Edge Detection"), ac, "edge_filters"); m_filterActionMenus.insert("edge", am); } - else if (s == "emboss" && !m_filterActionMenus.find("emboss")) { + else if (s == "emboss" && !m_filterActionMenus.tqfind("emboss")) { am = new KActionMenu(i18n("Emboss"), ac, "emboss_filters"); m_filterActionMenus.insert("emboss", am); } - else if (s == "enhance" && !m_filterActionMenus.find("enhance")) { + else if (s == "enhance" && !m_filterActionMenus.tqfind("enhance")) { am = new KActionMenu(i18n("Enhance"), ac, "enhance_filters"); m_filterActionMenus.insert("enhance", am); } - else if (s == "map" && !m_filterActionMenus.find("map")) { + else if (s == "map" && !m_filterActionMenus.tqfind("map")) { am = new KActionMenu(i18n("Map"), ac, "map_filters"); m_filterActionMenus.insert("map", am); } - else if (s == "nonphotorealistic" && !m_filterActionMenus.find("nonphotorealistic")) { + else if (s == "nonphotorealistic" && !m_filterActionMenus.tqfind("nonphotorealistic")) { am = new KActionMenu(i18n("Non-photorealistic"), ac, "nonphotorealistic_filters"); m_filterActionMenus.insert("nonphotorealistic", am); } - else if (s == "other" && !m_filterActionMenus.find("other")) { + else if (s == "other" && !m_filterActionMenus.tqfind("other")) { other = new KActionMenu(i18n("Other"), ac, "misc_filters"); m_filterActionMenus.insert("other", other); } @@ -154,7 +154,7 @@ void KisFilterManager::setup(KActionCollection * ac) m_reapplyAction = new KAction(i18n("Apply Filter Again"), "Ctrl+Shift+F", - this, SLOT(slotApply()), + this, TQT_SLOT(slotApply()), ac, "filter_apply_again"); m_reapplyAction->setEnabled(false); @@ -167,11 +167,11 @@ void KisFilterManager::setup(KActionCollection * ac) if (!f) break; // Create action - KAction * a = new KAction(f->menuEntry(), 0, m_filterMapper, SLOT(map()), ac, - QString("krita_filter_%1").arg((*it) . id()).ascii()); + KAction * a = new KAction(f->menuEntry(), 0, m_filterMapper, TQT_SLOT(map()), ac, + TQString("krita_filter_%1").tqarg((*it) . id()).ascii()); // Add action to the right submenu - KActionMenu * m = m_filterActionMenus.find( f->menuCategory() ); + KActionMenu * m = m_filterActionMenus.tqfind( f->menuCategory() ); if (m) { m->insert(a); } @@ -243,19 +243,19 @@ bool KisFilterManager::apply() KisPaintDeviceSP dev = img->activeDevice(); if (!dev) return false; - QApplication::setOverrideCursor( KisCursor::waitCursor() ); + TQApplication::setOverrideCursor( KisCursor::waitCursor() ); //Apply the filter m_lastFilterConfig = m_lastFilter->configuration(m_lastWidget); - QRect r1 = dev->extent(); - QRect r2 = img->bounds(); + TQRect r1 = dev->extent(); + TQRect r2 = img->bounds(); // Filters should work only on the visible part of an image. - QRect rect = r1.intersect(r2); + TQRect rect = r1.intersect(r2); if (dev->hasSelection()) { - QRect r3 = dev->selection()->selectedExactRect(); + TQRect r3 = dev->selection()->selectedExactRect(); rect = rect.intersect(r3); } @@ -277,7 +277,7 @@ bool KisFilterManager::apply() m_reapplyAction->setText(i18n("Apply Filter Again")); m_lastFilter->disableProgress(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if (m_lastFilter->cancelRequested()) { @@ -289,7 +289,7 @@ bool KisFilterManager::apply() return false; } else { - if (dev->parentLayer()) dev->parentLayer()->setDirty(rect); + if (dev->tqparentLayer()) dev->tqparentLayer()->setDirty(rect); m_doc->setModified(true); if (img->undo() && cmd) img->undoAdapter()->addCommand(cmd); return true; @@ -320,8 +320,8 @@ void KisFilterManager::slotApplyFilter(int i) if (m_lastFilter->colorSpaceIndependence() == TO_LAB16) { if (KMessageBox::warningContinueCancel(m_view, i18n("The %1 filter will convert your %2 data to 16-bit L*a*b* and vice versa. ") - .arg(m_lastFilter->id().name()) - .arg(dev->colorSpace()->id().name()), + .tqarg(m_lastFilter->id().name()) + .tqarg(dev->colorSpace()->id().name()), i18n("Filter Will Convert Your Layer Data"), KGuiItem(i18n("Continue")), "lab16degradation") != KMessageBox::Continue) return; @@ -330,8 +330,8 @@ void KisFilterManager::slotApplyFilter(int i) else if (m_lastFilter->colorSpaceIndependence() == TO_RGBA8) { if (KMessageBox::warningContinueCancel(m_view, i18n("The %1 filter will convert your %2 data to 8-bit RGBA and vice versa. ") - .arg(m_lastFilter->id().name()) - .arg(dev->colorSpace()->id().name()), + .tqarg(m_lastFilter->id().name()) + .tqarg(dev->colorSpace()->id().name()), i18n("Filter Will Convert Your Layer Data"), KGuiItem(i18n("Continue")), "rgba8degradation") != KMessageBox::Continue) return; @@ -343,27 +343,27 @@ void KisFilterManager::slotApplyFilter(int i) // Create the config dialog m_lastDialog = new KisPreviewDialog(m_view, m_lastFilter->id().name().ascii(), true, m_lastFilter->id().name()); Q_CHECK_PTR(m_lastDialog); - m_lastWidget = m_lastFilter->createConfigurationWidget( (QWidget*)m_lastDialog->container(), dev ); + m_lastWidget = m_lastFilter->createConfigurationWidget( (TQWidget*)m_lastDialog->container(), dev ); bool accepted = true; if( m_lastWidget != 0) { - connect(m_lastWidget, SIGNAL(sigPleaseUpdatePreview()), this, SLOT(slotConfigChanged())); + connect(m_lastWidget, TQT_SIGNAL(sigPleaseUpdatePreview()), this, TQT_SLOT(slotConfigChanged())); m_lastDialog->previewWidget()->slotSetDevice( dev ); - connect(m_lastDialog->previewWidget(), SIGNAL(updated()), this, SLOT(refreshPreview())); + connect(m_lastDialog->previewWidget(), TQT_SIGNAL(updated()), this, TQT_SLOT(refreshPreview())); - QGridLayout *widgetLayout = new QGridLayout((QWidget *)m_lastDialog->container(), 1, 1); + TQGridLayout *widgetLayout = new TQGridLayout((TQWidget *)m_lastDialog->container(), 1, 1); widgetLayout->addWidget(m_lastWidget, 0 , 0); - m_lastDialog->container()->setMinimumSize(m_lastWidget->minimumSize()); + m_lastDialog->container()->setMinimumSize(m_lastWidget->tqminimumSize()); refreshPreview(); - if(m_lastDialog->exec() == QDialog::Rejected ) + if(m_lastDialog->exec() == TQDialog::Rejected ) { accepted = false; } diff --git a/krita/ui/kis_filter_manager.h b/krita/ui/kis_filter_manager.h index 69c87565..beaf66a2 100644 --- a/krita/ui/kis_filter_manager.h +++ b/krita/ui/kis_filter_manager.h @@ -19,10 +19,10 @@ #ifndef _KIS_FILTER_MANAGER_ #define _KIS_FILTER_MANAGER_ -#include "qdict.h" -#include "qobject.h" -#include "qptrlist.h" -#include "qsignalmapper.h" +#include "tqdict.h" +#include "tqobject.h" +#include "tqptrlist.h" +#include "tqsignalmapper.h" #include "kactionclasses.h" #include "kis_image.h" #include "kis_selection.h" @@ -41,13 +41,14 @@ class KisPreviewDialog; /** * Create all the filter actions for the specified view and implement re-apply filter */ -class KRITACORE_EXPORT KisFilterManager : public QObject { +class KRITACORE_EXPORT KisFilterManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisFilterManager(KisView * parent, KisDoc * doc); + KisFilterManager(KisView * tqparent, KisDoc * doc); ~KisFilterManager(); void setup(KActionCollection * ac); @@ -70,7 +71,7 @@ private: KAction * m_reapplyAction; - QPtrList<KAction> m_filterActions; + TQPtrList<KAction> m_filterActions; KisFilterConfiguration * m_lastFilterConfig; KisFilter * m_lastFilter; @@ -78,9 +79,9 @@ private: KisFilterConfigWidget * m_lastWidget; KisIDList m_filterList; // Map the actions in the signalmapper to the filters - QSignalMapper * m_filterMapper; + TQSignalMapper * m_filterMapper; - QDict<KActionMenu> m_filterActionMenus; + TQDict<KActionMenu> m_filterActionMenus; }; #endif diff --git a/krita/ui/kis_filters_listview.cc b/krita/ui/kis_filters_listview.cc index 04039a3b..d77c4a7f 100644 --- a/krita/ui/kis_filters_listview.cc +++ b/krita/ui/kis_filters_listview.cc @@ -21,10 +21,10 @@ #include "kis_filters_listview.h" -#include <qapplication.h> -#include "qtimer.h" -#include "qpainter.h" -#include "qpixmap.h" +#include <tqapplication.h> +#include "tqtimer.h" +#include "tqpainter.h" +#include "tqpixmap.h" #include <kglobalsettings.h> @@ -40,8 +40,8 @@ // ------------------------------------------------ -KisFiltersThumbnailThread::KisFiltersThumbnailThread(QIconView * parent, KisFiltersIconViewItem * iconItem, KisFilterConfiguration * config, KisFilter * filter, KisPaintDeviceSP dev, const QRect & bounds, KisProfile * profile) - : m_parent(parent) +KisFiltersThumbnailThread::KisFiltersThumbnailThread(TQIconView * tqparent, KisFiltersIconViewItem * iconItem, KisFilterConfiguration * config, KisFilter * filter, KisPaintDeviceSP dev, const TQRect & bounds, KisProfile * profile) + : m_parent(tqparent) , m_iconItem(iconItem) , m_config(config) , m_filter(filter) @@ -65,14 +65,14 @@ void KisFiltersThumbnailThread::run() m_filter->process(thumbPreview, thumbPreview, m_config, m_bounds); if (!m_canceled) { - m_pixmap = thumbPreview->convertToQImage(m_profile); + m_pixmap = thumbPreview->convertToTQImage(m_profile); - qApp->postEvent(m_parent, new KisThumbnailDoneEvent (m_iconItem, m_pixmap)); + tqApp->postEvent(m_parent, new KisThumbnailDoneEvent (m_iconItem, m_pixmap)); } } -QPixmap KisFiltersThumbnailThread::pixmap() +TQPixmap KisFiltersThumbnailThread::pixmap() { return m_pixmap; } @@ -87,15 +87,15 @@ void KisFiltersThumbnailThread::cancel() // ------------------------------------------------ -KisFiltersIconViewItem::KisFiltersIconViewItem(QIconView * parent, const QString & text, const QPixmap & icon, +KisFiltersIconViewItem::KisFiltersIconViewItem(TQIconView * tqparent, const TQString & text, const TQPixmap & icon, KisID id, KisFilter* filter, KisFilterConfiguration* filterConfig, - KisPaintDeviceSP thumb, const QRect & bounds, KisProfile * profile) - : QIconViewItem(parent, text, icon) + KisPaintDeviceSP thumb, const TQRect & bounds, KisProfile * profile) + : TQIconViewItem(tqparent, text, icon) , m_id(id) , m_filter(filter) , m_filterconfig(filterConfig) { - m_thread = new KisFiltersThumbnailThread(parent, this, filterConfig, filter, thumb, bounds, profile); + m_thread = new KisFiltersThumbnailThread(tqparent, this, filterConfig, filter, thumb, bounds, profile); } KisFiltersIconViewItem::~KisFiltersIconViewItem() @@ -106,8 +106,8 @@ KisFiltersIconViewItem::~KisFiltersIconViewItem() // ------------------------------------------------ -KisFiltersListView::KisFiltersListView(QWidget* parent, bool filterForAdjustmentLayers, const char* name) - : KIconView(parent, name) +KisFiltersListView::KisFiltersListView(TQWidget* tqparent, bool filterForAdjustmentLayers, const char* name) + : KIconView(tqparent, name) , m_original(0) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -115,8 +115,8 @@ KisFiltersListView::KisFiltersListView(QWidget* parent, bool filterForAdjustment init(); } -KisFiltersListView::KisFiltersListView(QWidget * parent, const char * name, WFlags f, bool filterForAdjustmentLayers) - : KIconView(parent, name, f) +KisFiltersListView::KisFiltersListView(TQWidget * tqparent, const char * name, WFlags f, bool filterForAdjustmentLayers) + : KIconView(tqparent, name, f) , m_original(0) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -124,8 +124,8 @@ KisFiltersListView::KisFiltersListView(QWidget * parent, const char * name, WFla init(); } -KisFiltersListView::KisFiltersListView(KisLayerSP layer, QWidget* parent, bool filterForAdjustmentLayers, const char * name) - : KIconView(parent, name) +KisFiltersListView::KisFiltersListView(KisLayerSP layer, TQWidget* tqparent, bool filterForAdjustmentLayers, const char * name) + : KIconView(tqparent, name) , m_original(0) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -139,8 +139,8 @@ KisFiltersListView::KisFiltersListView(KisLayerSP layer, QWidget* parent, bool f init(); } -KisFiltersListView::KisFiltersListView(KisPaintDeviceSP device, QWidget* parent, bool filterForAdjustmentLayers, const char * name) - : KIconView(parent, name) +KisFiltersListView::KisFiltersListView(KisPaintDeviceSP device, TQWidget* tqparent, bool filterForAdjustmentLayers, const char * name) + : KIconView(tqparent, name) , m_original(device) , m_profile(0) , m_filterForAdjustmentLayers(filterForAdjustmentLayers) @@ -153,8 +153,8 @@ void KisFiltersListView::init() { setCaption(i18n("Filters List")); setItemsMovable(false); - setSelectionMode(QIconView::Single); - setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding )); + setSelectionMode(TQIconView::Single); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding )); setMinimumWidth(160); } @@ -178,18 +178,18 @@ void KisFiltersListView::setCurrentFilter(KisID filter) void KisFiltersListView::buildPreview() { - QTime t; + TQTime t; if(m_original== 0) return; - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); t.start(); m_thumb = m_original->createThumbnailDevice(150, 150); t.start(); - QRect bounds = m_thumb->exactBounds(); - QPixmap pm(bounds.width(), bounds.height()); - QPainter gc(&pm); + TQRect bounds = m_thumb->exactBounds(); + TQPixmap pm(bounds.width(), bounds.height()); + TQPainter gc(&pm); gc.fillRect(0, 0, bounds.width(), bounds.height(), backgroundColor()); gc.end(); @@ -219,16 +219,16 @@ void KisFiltersListView::buildPreview() } } } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void KisFiltersListView::customEvent(QCustomEvent * e) +void KisFiltersListView::customEvent(TQCustomEvent * e) { KisThumbnailDoneEvent * ev = dynamic_cast<KisThumbnailDoneEvent *>(e); if (ev) { - QPixmap * p = ev->m_iconItem->pixmap(); - QImage img = ev->m_image; + TQPixmap * p = ev->m_iconItem->pixmap(); + TQImage img = ev->m_image; int x, y; if (p->width() > img.width()) @@ -240,11 +240,11 @@ void KisFiltersListView::customEvent(QCustomEvent * e) else y = 0; - QPainter gc(p); - gc.drawImage(QPoint(x,y), img); + TQPainter gc(p); + gc.drawImage(TQPoint(x,y), img); gc.end(); - //ev->m_iconItem->setPixmap(QPixmap(*p)); + //ev->m_iconItem->setPixmap(TQPixmap(*p)); arrangeItemsInGrid(); } } diff --git a/krita/ui/kis_filters_listview.h b/krita/ui/kis_filters_listview.h index 7a7e5e89..94bc9a66 100644 --- a/krita/ui/kis_filters_listview.h +++ b/krita/ui/kis_filters_listview.h @@ -21,7 +21,7 @@ #ifndef _KIS_FILTERS_LIST_VIEW_H_ #define _KIS_FILTERS_LIST_VIEW_H_ -#include <qevent.h> +#include <tqevent.h> #include <kiconview.h> @@ -39,17 +39,17 @@ class KisFiltersIconViewItem; class KisFiltersListView; class KisThreadPool; -class KisThumbnailDoneEvent : public QCustomEvent +class KisThumbnailDoneEvent : public TQCustomEvent { public: - KisThumbnailDoneEvent(KisFiltersIconViewItem * iconItem, const QImage & img) - : QCustomEvent(QEvent::User + 1969) + KisThumbnailDoneEvent(KisFiltersIconViewItem * iconItem, const TQImage & img) + : TQCustomEvent(TQEvent::User + 1969) , m_iconItem(iconItem) , m_image(img) {}; KisFiltersIconViewItem * m_iconItem; - QImage m_image; + TQImage m_image; }; @@ -58,34 +58,34 @@ class KisFiltersThumbnailThread : public KisThread { public: - KisFiltersThumbnailThread(QIconView * parent, + KisFiltersThumbnailThread(TQIconView * tqparent, KisFiltersIconViewItem * iconItem, KisFilterConfiguration * config, KisFilter * filter, - KisPaintDeviceSP dev, const QRect & bounds, + KisPaintDeviceSP dev, const TQRect & bounds, KisProfile * profile); ~KisFiltersThumbnailThread(); virtual void run(); - QPixmap pixmap(); + TQPixmap pixmap(); void cancel(); private: - QIconView * m_parent; + TQIconView * m_parent; KisFiltersIconViewItem * m_iconItem; KisFilterConfiguration * m_config; KisFilter * m_filter; KisPaintDeviceSP m_dev; - const QRect m_bounds; + const TQRect m_bounds; KisProfile * m_profile; - QImage m_pixmap; + TQImage m_pixmap; }; -class KisFiltersIconViewItem : public QIconViewItem { +class KisFiltersIconViewItem : public TQIconViewItem { public: - KisFiltersIconViewItem( QIconView * parent, const QString & text, const QPixmap & icon, + KisFiltersIconViewItem( TQIconView * tqparent, const TQString & text, const TQPixmap & icon, KisID id, KisFilter* filter, KisFilterConfiguration* filterConfig, - KisPaintDeviceSP thumb, const QRect & bounds, KisProfile * profile); + KisPaintDeviceSP thumb, const TQRect & bounds, KisProfile * profile); virtual ~KisFiltersIconViewItem(); KisID id() { return m_id; } @@ -105,12 +105,12 @@ private: class KisFiltersListView : public KIconView { public: - explicit KisFiltersListView(QWidget * parent = 0, const char * name = 0, WFlags f = 0, bool filterForAdjustmentLayers = false); - KisFiltersListView(QWidget* parent, bool filterForAdjustmentLayers = false, const char* name = 0); - KisFiltersListView(KisLayerSP layer, QWidget* parent, bool filterForAdjustmentLayers = false, const char * name = 0) KDE_DEPRECATED; - KisFiltersListView(KisPaintDeviceSP layer, QWidget* parent, bool filterForAdjustmentLayers = false, const char * name = 0); + explicit KisFiltersListView(TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0, bool filterForAdjustmentLayers = false); + KisFiltersListView(TQWidget* tqparent, bool filterForAdjustmentLayers = false, const char* name = 0); + KisFiltersListView(KisLayerSP layer, TQWidget* tqparent, bool filterForAdjustmentLayers = false, const char * name = 0) KDE_DEPRECATED; + KisFiltersListView(KisPaintDeviceSP layer, TQWidget* tqparent, bool filterForAdjustmentLayers = false, const char * name = 0); - virtual void customEvent(QCustomEvent *); + virtual void customEvent(TQCustomEvent *); private: diff --git a/krita/ui/kis_gradient_chooser.cc b/krita/ui/kis_gradient_chooser.cc index ca0bfeb0..7e416ea1 100644 --- a/krita/ui/kis_gradient_chooser.cc +++ b/krita/ui/kis_gradient_chooser.cc @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kdialogbase.h> @@ -32,24 +32,24 @@ #include "kis_gradient_chooser.h" -KisCustomGradientDialog::KisCustomGradientDialog(KisView * view, QWidget * parent, const char *name) - : KDialogBase(parent, name, false, i18n("Custom Gradient"), Close) +KisCustomGradientDialog::KisCustomGradientDialog(KisView * view, TQWidget * tqparent, const char *name) + : KDialogBase(tqparent, name, false, i18n("Custom Gradient"), Close) { m_page = new KisAutogradient(this, "autogradient", i18n("Custom Gradient")); setMainWidget(m_page); - connect(m_page, SIGNAL(activatedResource(KisResource *)), view, SLOT(gradientActivated(KisResource*))); + connect(m_page, TQT_SIGNAL(activatedResource(KisResource *)), view, TQT_SLOT(gradientActivated(KisResource*))); } -KisGradientChooser::KisGradientChooser(KisView * view, QWidget *parent, const char *name) : super(parent, name) +KisGradientChooser::KisGradientChooser(KisView * view, TQWidget *tqparent, const char *name) : super(tqparent, name) { - m_lbName = new QLabel(this); + m_lbName = new TQLabel(this); - m_customGradient = new QPushButton(i18n("Custom Gradient..."), this, "custom gradient button"); + m_customGradient = new TQPushButton(i18n("Custom Gradient..."), this, "custom gradient button"); KisCustomGradientDialog * autogradient = new KisCustomGradientDialog(view, this, "autogradient"); - connect(m_customGradient, SIGNAL(clicked()), autogradient, SLOT(show())); + connect(m_customGradient, TQT_SIGNAL(clicked()), autogradient, TQT_SLOT(show())); - QVBoxLayout *mainLayout = new QVBoxLayout(this, 2, -1, "main layout"); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 2, -1, "main tqlayout"); mainLayout->addWidget(m_lbName); mainLayout->addWidget(chooserWidget(), 10); diff --git a/krita/ui/kis_gradient_chooser.h b/krita/ui/kis_gradient_chooser.h index 5b6d7226..fc154f3c 100644 --- a/krita/ui/kis_gradient_chooser.h +++ b/krita/ui/kis_gradient_chooser.h @@ -22,17 +22,18 @@ #include "kis_itemchooser.h" -class QLabel; -class QPushButton; +class TQLabel; +class TQPushButton; class KisView; class KisCustomGradientDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KisCustomGradientDialog(KisView * view, QWidget * parent, const char *name); + KisCustomGradientDialog(KisView * view, TQWidget * tqparent, const char *name); private: @@ -43,18 +44,19 @@ private: class KisGradientChooser : public KisItemChooser { typedef KisItemChooser super; Q_OBJECT + TQ_OBJECT public: // XXX: On library redesign, remove m_view parameter here, it's just a temporary hack for the autogradient dialog! - KisGradientChooser(KisView * view, QWidget *parent = 0, const char *name = 0); + KisGradientChooser(KisView * view, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisGradientChooser(); protected: virtual void update(KoIconItem *item); private: - QLabel *m_lbName; - QPushButton * m_customGradient; + TQLabel *m_lbName; + TQPushButton * m_customGradient; }; #endif // KIS_GRADIENT_CHOOSER_H_ diff --git a/krita/ui/kis_gradient_slider_widget.cc b/krita/ui/kis_gradient_slider_widget.cc index 05e724a3..8f282ba3 100644 --- a/krita/ui/kis_gradient_slider_widget.cc +++ b/krita/ui/kis_gradient_slider_widget.cc @@ -19,7 +19,7 @@ #include "kis_gradient_slider_widget.h" -#include <qpainter.h> +#include <tqpainter.h> #include <kdebug.h> #include <kpopupmenu.h> @@ -30,8 +30,8 @@ #define MARGIN 5 #define HANDLE_SIZE 10 -KisGradientSliderWidget::KisGradientSliderWidget(QWidget *parent, const char* name, WFlags f ) - : QWidget( parent, name, f), +KisGradientSliderWidget::KisGradientSliderWidget(TQWidget *tqparent, const char* name, WFlags f ) + : TQWidget( tqparent, name, f), m_currentSegment(0), m_selectedSegment(0), m_drag(0) @@ -43,7 +43,7 @@ KisGradientSliderWidget::KisGradientSliderWidget(QWidget *parent, const char* na m_segmentMenu->insertItem(i18n("Duplicate Segment"), DUPLICATE_SEGMENT); m_segmentMenu->insertItem(i18n("Mirror Segment"), MIRROR_SEGMENT); m_segmentMenu->insertItem(i18n("Remove Segment"), REMOVE_SEGMENT); - connect( m_segmentMenu, SIGNAL( activated(int) ), SLOT( slotMenuAction(int) ) ); + connect( m_segmentMenu, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotMenuAction(int) ) ); } void KisGradientSliderWidget::setGradientResource( KisAutogradientResource* agr) @@ -53,62 +53,62 @@ void KisGradientSliderWidget::setGradientResource( KisAutogradientResource* agr) emit sigSelectedSegment( m_selectedSegment ); } -void KisGradientSliderWidget::paintEvent ( QPaintEvent* pe ) +void KisGradientSliderWidget::paintEvent ( TQPaintEvent* pe ) { - QWidget::paintEvent( pe ); - QPixmap pixmap( width(), height() ); - pixmap.fill( colorGroup().background() ); - QPainter painter( &pixmap ); - painter.setPen( Qt::black ); + TQWidget::paintEvent( pe ); + TQPixmap pixmap( width(), height() ); + pixmap.fill( tqcolorGroup().background() ); + TQPainter painter( &pixmap ); + painter.setPen( TQt::black ); painter.drawRect( MARGIN, MARGIN, width() - 2 * MARGIN, height()- 2 * MARGIN - HANDLE_SIZE ); if(m_autogradientResource) { - QImage img = m_autogradientResource->generatePreview(width()- 2* MARGIN - 2, height()- 2* MARGIN - HANDLE_SIZE - 2); - QPixmap pixmap(img.width(), img.height()); + TQImage img = m_autogradientResource->generatePreview(width()- 2* MARGIN - 2, height()- 2* MARGIN - HANDLE_SIZE - 2); + TQPixmap pixmap(img.width(), img.height()); if (!img.isNull()) { m_pixmapIO.putImage(&pixmap, 0, 0, &img); painter.drawPixmap( MARGIN + 1, MARGIN + 1, pixmap, 0, 0, pixmap.width(), pixmap.height()); } - painter.fillRect( MARGIN + 1, height()- MARGIN - HANDLE_SIZE, width() - 2 * MARGIN, HANDLE_SIZE, QBrush( Qt::white ) ); + painter.fillRect( MARGIN + 1, height()- MARGIN - HANDLE_SIZE, width() - 2 * MARGIN, HANDLE_SIZE, TQBrush( TQt::white ) ); if( m_selectedSegment ) { - QRect selection( qRound( m_selectedSegment->startOffset()*(double)(width()- 2 * MARGIN - 2) ) + 6, + TQRect selection( tqRound( m_selectedSegment->startOffset()*(double)(width()- 2 * MARGIN - 2) ) + 6, height()- HANDLE_SIZE - MARGIN, - qRound( ( m_selectedSegment->endOffset() - m_selectedSegment->startOffset() )*(double)(width()-12) ), + tqRound( ( m_selectedSegment->endOffset() - m_selectedSegment->startOffset() )*(double)(width()-12) ), HANDLE_SIZE ); - painter.fillRect( selection, QBrush( colorGroup().highlight() ) ); + painter.fillRect( selection, TQBrush( tqcolorGroup().highlight() ) ); } - QPointArray triangle(3); - QValueVector<double> handlePositions = m_autogradientResource->getHandlePositions(); + TQPointArray triangle(3); + TQValueVector<double> handlePositions = m_autogradientResource->getHandlePositions(); int position; - painter.setBrush( QBrush( Qt::black) ); + painter.setBrush( TQBrush( TQt::black) ); for (uint i = 0; i < handlePositions.count(); i++) { - position = qRound( handlePositions[i] * (double)( width()-12) ) + 6; - triangle[0] = QPoint(position, height() - HANDLE_SIZE - MARGIN ); - triangle[1] = QPoint(position + (HANDLE_SIZE / 2 - 1), height() - MARGIN ); - triangle[2] = QPoint(position - (HANDLE_SIZE / 2 - 1), height() - MARGIN ); + position = tqRound( handlePositions[i] * (double)( width()-12) ) + 6; + triangle[0] = TQPoint(position, height() - HANDLE_SIZE - MARGIN ); + triangle[1] = TQPoint(position + (HANDLE_SIZE / 2 - 1), height() - MARGIN ); + triangle[2] = TQPoint(position - (HANDLE_SIZE / 2 - 1), height() - MARGIN ); painter.drawPolygon(triangle); } - painter.setBrush( QBrush( Qt::white ) ); - QValueVector<double> middleHandlePositions = m_autogradientResource->getMiddleHandlePositions(); + painter.setBrush( TQBrush( TQt::white ) ); + TQValueVector<double> middleHandlePositions = m_autogradientResource->getMiddleHandlePositions(); for (uint i = 0; i < middleHandlePositions.count(); i++) { - position = qRound( middleHandlePositions[i] * (double)(width()-12) ) + 6; - triangle[0] = QPoint(position, height()-HANDLE_SIZE - MARGIN); - triangle[1] = QPoint(position + (HANDLE_SIZE / 2 - 2), height() - MARGIN); - triangle[2] = QPoint(position - (HANDLE_SIZE / 2 - 2), height() - MARGIN); + position = tqRound( middleHandlePositions[i] * (double)(width()-12) ) + 6; + triangle[0] = TQPoint(position, height()-HANDLE_SIZE - MARGIN); + triangle[1] = TQPoint(position + (HANDLE_SIZE / 2 - 2), height() - MARGIN); + triangle[2] = TQPoint(position - (HANDLE_SIZE / 2 - 2), height() - MARGIN); painter.drawPolygon(triangle); } } - bitBlt( this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), Qt::CopyROP); + bitBlt( this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), TQt::CopyROP); } -void KisGradientSliderWidget::mousePressEvent( QMouseEvent * e ) +void KisGradientSliderWidget::mousePressEvent( TQMouseEvent * e ) { - QWidget::mousePressEvent( e ); + TQWidget::mousePressEvent( e ); if( ( e->y() < MARGIN || e->y() > height() - MARGIN ) || ( e->x() < MARGIN || e->x() > width() - MARGIN ) || e-> button() != LeftButton ) return; double t = (double)(e->x() - MARGIN) / (double)(width() - 2 * MARGIN); @@ -117,35 +117,35 @@ void KisGradientSliderWidget::mousePressEvent( QMouseEvent * e ) if(segment != 0) { m_currentSegment = segment; - QRect leftHandle( qRound(m_currentSegment->startOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), + TQRect leftHandle( tqRound(m_currentSegment->startOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), height() - HANDLE_SIZE, HANDLE_SIZE - 1, HANDLE_SIZE); - QRect middleHandle( qRound(m_currentSegment->middleOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 -2) ), + TQRect middleHandle( tqRound(m_currentSegment->middleOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 -2) ), height() - HANDLE_SIZE - MARGIN, HANDLE_SIZE - 1, HANDLE_SIZE); - QRect rightHandle( qRound(m_currentSegment->endOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), + TQRect rightHandle( tqRound(m_currentSegment->endOffset() * (double)(width()-2*MARGIN-2)+ MARGIN - (HANDLE_SIZE/2 - 1 )), height() - HANDLE_SIZE, HANDLE_SIZE - 1, HANDLE_SIZE); // Change the activation order of the handles to avoid deadlocks if( t > 0.5 ) { - if( leftHandle.contains( e->pos() ) ) + if( leftHandle.tqcontains( e->pos() ) ) m_drag = LEFT_DRAG; - else if( middleHandle.contains( e->pos() ) ) + else if( middleHandle.tqcontains( e->pos() ) ) m_drag = MIDDLE_DRAG; - else if( rightHandle.contains( e->pos() ) ) + else if( rightHandle.tqcontains( e->pos() ) ) m_drag = RIGHT_DRAG; } else { - if( rightHandle.contains( e->pos() ) ) + if( rightHandle.tqcontains( e->pos() ) ) m_drag = RIGHT_DRAG; - else if( middleHandle.contains( e->pos() ) ) + else if( middleHandle.tqcontains( e->pos() ) ) m_drag = MIDDLE_DRAG; - else if( leftHandle.contains( e->pos() ) ) + else if( leftHandle.tqcontains( e->pos() ) ) m_drag = LEFT_DRAG; } @@ -155,18 +155,18 @@ void KisGradientSliderWidget::mousePressEvent( QMouseEvent * e ) emit sigSelectedSegment( m_selectedSegment ); } } - repaint(false); + tqrepaint(false); } -void KisGradientSliderWidget::mouseReleaseEvent ( QMouseEvent * e ) +void KisGradientSliderWidget::mouseReleaseEvent ( TQMouseEvent * e ) { - QWidget::mouseReleaseEvent( e ); + TQWidget::mouseReleaseEvent( e ); m_drag = NO_DRAG; } -void KisGradientSliderWidget::mouseMoveEvent( QMouseEvent * e ) +void KisGradientSliderWidget::mouseMoveEvent( TQMouseEvent * e ) { - QWidget::mouseMoveEvent( e ); + TQWidget::mouseMoveEvent( e ); if( ( e->y() < MARGIN || e->y() > height() - MARGIN ) || ( e->x() < MARGIN || e->x() > width() - MARGIN ) ) return; double t = (double)(e->x() - MARGIN) / (double)(width() - 2 * MARGIN); @@ -186,10 +186,10 @@ void KisGradientSliderWidget::mouseMoveEvent( QMouseEvent * e ) if ( m_drag != NO_DRAG) emit sigChangedSegment( m_currentSegment ); - repaint(false); + tqrepaint(false); } -void KisGradientSliderWidget::contextMenuEvent( QContextMenuEvent * e ) +void KisGradientSliderWidget::contextMenuEvent( TQContextMenuEvent * e ) { m_segmentMenu->setItemEnabled( REMOVE_SEGMENT, m_autogradientResource->removeSegmentPossible() ); m_segmentMenu->popup( e->globalPos()); @@ -213,7 +213,7 @@ void KisGradientSliderWidget::slotMenuAction( int id ) break; } emit sigSelectedSegment( m_selectedSegment ); - repaint(false); + tqrepaint(false); } #include "kis_gradient_slider_widget.moc" diff --git a/krita/ui/kis_gradient_slider_widget.h b/krita/ui/kis_gradient_slider_widget.h index 4bc00543..d15ac1c4 100644 --- a/krita/ui/kis_gradient_slider_widget.h +++ b/krita/ui/kis_gradient_slider_widget.h @@ -21,21 +21,22 @@ #define _KIS_WDG_GRADIENT_SLIDER_H_ #include <kpixmapio.h> -#include <qwidget.h> +#include <tqwidget.h> class KPopupMenu; class KisAutogradientResource; class KisGradientSegment; -class KisGradientSliderWidget : public QWidget +class KisGradientSliderWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KisGradientSliderWidget(QWidget *parent = 0, const char* name = 0, WFlags f = 0); + KisGradientSliderWidget(TQWidget *tqparent = 0, const char* name = 0, WFlags f = 0); public: - virtual void paintEvent ( QPaintEvent * ); + virtual void paintEvent ( TQPaintEvent * ); void setGradientResource( KisAutogradientResource* agr); KisGradientSegment* selectedSegment() { return m_selectedSegment; }; @@ -44,10 +45,10 @@ signals: void sigChangedSegment(KisGradientSegment*); protected: - virtual void mousePressEvent( QMouseEvent * e ); - virtual void mouseReleaseEvent ( QMouseEvent * e ); - virtual void mouseMoveEvent( QMouseEvent * e ); - virtual void contextMenuEvent( QContextMenuEvent * e ); + virtual void mousePressEvent( TQMouseEvent * e ); + virtual void mouseReleaseEvent ( TQMouseEvent * e ); + virtual void mouseMoveEvent( TQMouseEvent * e ); + virtual void contextMenuEvent( TQContextMenuEvent * e ); private slots: void slotMenuAction(int id); diff --git a/krita/ui/kis_grid_drawer.cpp b/krita/ui/kis_grid_drawer.cpp index 3af8a92e..cd0963ab 100644 --- a/krita/ui/kis_grid_drawer.cpp +++ b/krita/ui/kis_grid_drawer.cpp @@ -25,7 +25,7 @@ #endif #ifdef HAVE_GL -#include <qgl.h> +#include <tqgl.h> #endif #include "kis_config.h" @@ -33,29 +33,29 @@ #include "kis_perspective_grid.h" #include "kis_perspective_grid_manager.h" -Qt::PenStyle GridDrawer::gs2style(Q_UINT32 s) +Qt::PenStyle GridDrawer::gs2style(TQ_UINT32 s) { switch(s) { case 1: - return Qt::DashLine; + return TQt::DashLine; case 2: - return Qt::DotLine; + return TQt::DotLine; case 3: - return Qt::DashDotLine; + return TQt::DashDotLine; case 4: - return Qt::DashDotDotLine; + return TQt::DashDotDotLine; default: - return Qt::SolidLine; + return TQt::SolidLine; } } -void GridDrawer::drawPerspectiveGrid(KisImageSP image, const QRect& /*wr*/, const KisSubPerspectiveGrid* grid) +void GridDrawer::drawPerspectiveGrid(KisImageSP image, const TQRect& /*wr*/, const KisSubPerspectiveGrid* grid) { Q_UNUSED(image); KisConfig cfg; - QPen mainPen = QPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); - QPen subdivisionPen = QPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); + TQPen mainPen = TQPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); + TQPen subdivisionPen = TQPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); setPen(subdivisionPen ); // 1 -> top-left corner // 2 -> top-right corner @@ -80,12 +80,12 @@ void GridDrawer::drawPerspectiveGrid(KisImageSP image, const QRect& /*wr*/, cons KisPoint pol1 = *grid->topRight() + i * v12; KisPerspectiveMath::LineEquation d1 = KisPerspectiveMath::computeLineEquation( &pol1, &vertVanishingPoint ); KisPoint pol1b = KisPerspectiveMath::computeIntersection(d1,d34); - drawLine( pol1.roundQPoint(), pol1b.roundQPoint() ); + drawLine( pol1.roundTQPoint(), pol1b.roundTQPoint() ); KisPoint pol2 = *grid->bottomRight() + i * v23; KisPerspectiveMath::LineEquation d2 = KisPerspectiveMath::computeLineEquation( &pol2, &horizVanishingPoint ); KisPoint pol2b = KisPerspectiveMath::computeIntersection(d2,d41); - drawLine( pol2.roundQPoint(), pol2b.roundQPoint() ); + drawLine( pol2.roundTQPoint(), pol2b.roundTQPoint() ); } setPen(mainPen); drawLine( grid->topLeft(), grid->topRight() ); @@ -94,26 +94,26 @@ void GridDrawer::drawPerspectiveGrid(KisImageSP image, const QRect& /*wr*/, cons drawLine( grid->bottomLeft(), grid->topLeft() ); } -void GridDrawer::drawGrid(KisImageSP image, const QRect& wr) +void GridDrawer::drawGrid(KisImageSP image, const TQRect& wr) { KisConfig cfg; - Q_UINT32 offsetx = cfg.getGridOffsetX(); - Q_UINT32 offsety = cfg.getGridOffsetY(); - Q_UINT32 hspacing = cfg.getGridHSpacing(); - Q_UINT32 vspacing = cfg.getGridVSpacing(); - Q_UINT32 subdivision = cfg.getGridSubdivisions() - 1; + TQ_UINT32 offsetx = cfg.getGridOffsetX(); + TQ_UINT32 offsety = cfg.getGridOffsetY(); + TQ_UINT32 hspacing = cfg.getGridHSpacing(); + TQ_UINT32 vspacing = cfg.getGridVSpacing(); + TQ_UINT32 subdivision = cfg.getGridSubdivisions() - 1; //double ihspsub = hspacing / (double)subdivision; //double ivspsub = hspacing / (double)subdivision; - Q_INT32 imageWidth = image->width(); - Q_INT32 imageHeight = image->height(); + TQ_INT32 imageWidth = image->width(); + TQ_INT32 imageHeight = image->height(); // Draw vertical line - QPen mainPen = QPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); - QPen subdivisionPen = QPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); - Q_UINT32 i = 0; - for( Q_INT32 x = offsetx; x <= wr.right(); x +=hspacing) + TQPen mainPen = TQPen ( cfg.getGridMainColor(), 1, gs2style( cfg.getGridMainStyle() ) ); + TQPen subdivisionPen = TQPen ( cfg.getGridSubdivisionColor(), 1, gs2style( cfg.getGridSubdivisionStyle() ) ); + TQ_UINT32 i = 0; + for( TQ_INT32 x = offsetx; x <= wr.right(); x +=hspacing) { if( i == subdivision ) { @@ -132,7 +132,7 @@ void GridDrawer::drawGrid(KisImageSP image, const QRect& wr) } // Draw horizontal line i = 0; - for( Q_INT32 y = offsety; y <= wr.bottom(); y +=vspacing) + for( TQ_INT32 y = offsety; y <= wr.bottom(); y +=vspacing) { if( i == subdivision ) { @@ -163,34 +163,34 @@ OpenGLGridDrawer::~OpenGLGridDrawer() #endif } -void OpenGLGridDrawer::setPen(const QPen& pen) +void OpenGLGridDrawer::setPen(const TQPen& pen) { #ifdef HAVE_GL Qt::PenStyle penStyle = pen.style(); - if (penStyle == Qt::SolidLine) { + if (penStyle == TQt::SolidLine) { glDisable(GL_LINE_STIPPLE); } else { GLushort lineStipple; switch (penStyle) { - case Qt::NoPen: + case TQt::NoPen: lineStipple = 0; break; default: - case Qt::SolidLine: + case TQt::SolidLine: lineStipple = 0xffff; break; - case Qt::DashLine: + case TQt::DashLine: lineStipple = 0x3fff; break; - case Qt::DotLine: + case TQt::DotLine: lineStipple = 0x3333; break; - case Qt::DashDotLine: + case TQt::DashDotLine: lineStipple = 0x33ff; break; - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: lineStipple = 0x333f; break; } @@ -199,7 +199,7 @@ void OpenGLGridDrawer::setPen(const QPen& pen) glLineStipple(1, lineStipple); } - QColor penColor = pen.color(); + TQColor penColor = pen.color(); glColor3ub(penColor.red(), penColor.green(), penColor.blue()); #else @@ -207,7 +207,7 @@ void OpenGLGridDrawer::setPen(const QPen& pen) #endif } -void OpenGLGridDrawer::drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2) +void OpenGLGridDrawer::drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2) { #ifdef HAVE_GL glBegin(GL_LINES); diff --git a/krita/ui/kis_grid_drawer.h b/krita/ui/kis_grid_drawer.h index 1078883e..301f1e0a 100644 --- a/krita/ui/kis_grid_drawer.h +++ b/krita/ui/kis_grid_drawer.h @@ -23,8 +23,8 @@ #include <math.h> -#include <qobject.h> -#include <qpainter.h> +#include <tqobject.h> +#include <tqpainter.h> #include "kis_types.h" #include "kis_point.h" @@ -37,26 +37,26 @@ class GridDrawer { virtual ~GridDrawer() {} public: - void drawGrid(KisImageSP image, const QRect& wr); - void drawPerspectiveGrid(KisImageSP image, const QRect& wr, const KisSubPerspectiveGrid* grid); + void drawGrid(KisImageSP image, const TQRect& wr); + void drawPerspectiveGrid(KisImageSP image, const TQRect& wr, const KisSubPerspectiveGrid* grid); - virtual void setPen(const QPen& pen) = 0; - virtual void drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2) = 0; - inline void drawLine(const QPoint& p1, const QPoint& p2) { drawLine(p1.x(), p1.y(), p2.x(), p2.y() ); } - inline void drawLine(const KisPoint* p1, const KisPoint* p2) { drawLine( p1->roundQPoint(), p2->roundQPoint()); } + virtual void setPen(const TQPen& pen) = 0; + virtual void drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2) = 0; + inline void drawLine(const TQPoint& p1, const TQPoint& p2) { drawLine(p1.x(), p1.y(), p2.x(), p2.y() ); } + inline void drawLine(const KisPoint* p1, const KisPoint* p2) { drawLine( p1->roundTQPoint(), p2->roundTQPoint()); } private: - Qt::PenStyle gs2style(Q_UINT32 s); + Qt::PenStyle gs2style(TQ_UINT32 s); }; -class QPainterGridDrawer : public GridDrawer { +class TQPainterGridDrawer : public GridDrawer { public: - QPainterGridDrawer(QPainter *p) { m_painter = p; } + TQPainterGridDrawer(TQPainter *p) { m_painter = p; } - virtual void setPen(const QPen& pen) { m_painter->setPen(pen); } - virtual void drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2) { m_painter->drawLine(x1, y1, x2, y2); } + virtual void setPen(const TQPen& pen) { m_painter->setPen(pen); } + virtual void drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2) { m_painter->drawLine(x1, y1, x2, y2); } private: - QPainter *m_painter; + TQPainter *m_painter; }; class OpenGLGridDrawer : public GridDrawer { @@ -64,8 +64,8 @@ public: OpenGLGridDrawer(); virtual ~OpenGLGridDrawer(); - virtual void setPen(const QPen& pen); - virtual void drawLine(Q_INT32 x1, Q_INT32 y1, Q_INT32 x2, Q_INT32 y2); + virtual void setPen(const TQPen& pen); + virtual void drawLine(TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 x2, TQ_INT32 y2); }; #endif diff --git a/krita/ui/kis_grid_manager.cpp b/krita/ui/kis_grid_manager.cpp index 0bbbcd88..b659a3b5 100644 --- a/krita/ui/kis_grid_manager.cpp +++ b/krita/ui/kis_grid_manager.cpp @@ -25,10 +25,10 @@ #endif #ifdef HAVE_GL -#include <qgl.h> +#include <tqgl.h> #endif -#include <qradiobutton.h> +#include <tqradiobutton.h> #include <kaction.h> #include <kdialogbase.h> @@ -40,8 +40,8 @@ #include "kis_image.h" #include "kis_view.h" -KisGridManager::KisGridManager(KisView * parent) - : QObject(parent), m_view(parent) +KisGridManager::KisGridManager(KisView * tqparent) + : TQObject(tqparent), m_view(tqparent) { } @@ -53,17 +53,17 @@ KisGridManager::~KisGridManager() void KisGridManager::setup(KActionCollection * collection) { - m_toggleGrid = new KToggleAction(i18n("Show Grid"), "", this, SLOT(toggleGrid()), collection, "view_toggle_grid"); + m_toggleGrid = new KToggleAction(i18n("Show Grid"), "", this, TQT_SLOT(toggleGrid()), collection, "view_toggle_grid"); m_toggleGrid->setCheckedState(KGuiItem(i18n("Hide Grid"))); m_toggleGrid->setChecked(false); // Fast grid config - m_gridFastConfig1x1 = new KAction(i18n("1x1"), 0, "", this, SLOT(fastConfig1x1()), collection, "view_fast_grid_1x1"); - m_gridFastConfig2x2 = new KAction(i18n("2x2"), 0, "", this, SLOT(fastConfig2x2()), collection, "view_fast_grid_2x2"); - m_gridFastConfig5x5 = new KAction(i18n("5x5"), 0, "", this, SLOT(fastConfig5x5()), collection, "view_fast_grid_5x5"); - m_gridFastConfig10x10 = new KAction(i18n("10x10"), 0, "", this, SLOT(fastConfig10x10()), collection, "view_fast_grid_10x10"); - m_gridFastConfig20x20 = new KAction(i18n("20x20"), 0, "", this, SLOT(fastConfig20x20()), collection, "view_fast_grid_20x20"); - m_gridFastConfig40x40 = new KAction(i18n("40x40"), 0, "", this, SLOT(fastConfig40x40()), collection, "view_fast_grid_40x40"); + m_gridFastConfig1x1 = new KAction(i18n("1x1"), 0, "", this, TQT_SLOT(fastConfig1x1()), collection, "view_fast_grid_1x1"); + m_gridFastConfig2x2 = new KAction(i18n("2x2"), 0, "", this, TQT_SLOT(fastConfig2x2()), collection, "view_fast_grid_2x2"); + m_gridFastConfig5x5 = new KAction(i18n("5x5"), 0, "", this, TQT_SLOT(fastConfig5x5()), collection, "view_fast_grid_5x5"); + m_gridFastConfig10x10 = new KAction(i18n("10x10"), 0, "", this, TQT_SLOT(fastConfig10x10()), collection, "view_fast_grid_10x10"); + m_gridFastConfig20x20 = new KAction(i18n("20x20"), 0, "", this, TQT_SLOT(fastConfig20x20()), collection, "view_fast_grid_20x20"); + m_gridFastConfig40x40 = new KAction(i18n("40x40"), 0, "", this, TQT_SLOT(fastConfig40x40()), collection, "view_fast_grid_40x40"); } void KisGridManager::updateGUI() @@ -124,7 +124,7 @@ void KisGridManager::fastConfig40x40() m_view->updateCanvas(); } -void KisGridManager::drawGrid(QRect wr, QPainter *p, bool openGL) +void KisGridManager::drawGrid(TQRect wr, TQPainter *p, bool openGL) { KisImageSP image = m_view->canvasSubject()->currentImg(); @@ -139,7 +139,7 @@ void KisGridManager::drawGrid(QRect wr, QPainter *p, bool openGL) Q_ASSERT(p); if (p) { - gridDrawer = new QPainterGridDrawer(p); + gridDrawer = new TQPainterGridDrawer(p); } } diff --git a/krita/ui/kis_grid_manager.h b/krita/ui/kis_grid_manager.h index bd46b5bc..79eaffc8 100644 --- a/krita/ui/kis_grid_manager.h +++ b/krita/ui/kis_grid_manager.h @@ -21,7 +21,7 @@ #ifndef KIS_GRID_MANAGER_H #define KIS_GRID_MANAGER_H -#include <qobject.h> +#include <tqobject.h> #include "kis_types.h" @@ -30,15 +30,16 @@ class KActionCollection; class KToggleAction; class KAction; -class KisGridManager : public QObject +class KisGridManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisGridManager(KisView * parent); + KisGridManager(KisView * tqparent); ~KisGridManager(); public: void setup(KActionCollection * collection); - void drawGrid(QRect wr, QPainter *p, bool openGL = false); + void drawGrid(TQRect wr, TQPainter *p, bool openGL = false); public slots: void updateGUI(); private slots: diff --git a/krita/ui/kis_histogram_view.cc b/krita/ui/kis_histogram_view.cc index 67c30889..cc4fe59c 100644 --- a/krita/ui/kis_histogram_view.cc +++ b/krita/ui/kis_histogram_view.cc @@ -18,13 +18,13 @@ #include <math.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qbuttongroup.h> -#include <qpushbutton.h> -#include <qscrollbar.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqscrollbar.h> #include <kdebug.h> @@ -38,13 +38,13 @@ #include "kis_basic_histogram_producers.h" #include "kis_paint_device.h" -KisHistogramView::KisHistogramView(QWidget *parent, const char *name, WFlags f) - : QLabel(parent, name, f) +KisHistogramView::KisHistogramView(TQWidget *tqparent, const char *name, WFlags f) + : TQLabel(tqparent, name, f) { // This is needed until we can computationally scale it well. Until then, this is needed // And when we have it, it won't hurt to have it around setScaledContents(true); - setFrameShape(QFrame::Box); // Draw a box around ourselves + setFrameShape(TQFrame::Box); // Draw a box around ourselves } KisHistogramView::~KisHistogramView() @@ -108,7 +108,7 @@ KisHistogramProducerSP KisHistogramView::currentProducer() return m_currentProducer; } -QStringList KisHistogramView::channelStrings() +TQStringList KisHistogramView::channelStrings() { return m_channelStrings; } @@ -120,14 +120,14 @@ KisIDList KisHistogramView::listProducers() return KisIDList(); } -void KisHistogramView::setCurrentChannels(const KisID& producerID, QValueVector<KisChannelInfo *> channels) +void KisHistogramView::setCurrentChannels(const KisID& producerID, TQValueVector<KisChannelInfo *> channels) { setCurrentChannels( KisHistogramProducerFactoryRegistry::instance()->get(producerID)->generate(), channels); } -void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, QValueVector<KisChannelInfo *> channels) +void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, TQValueVector<KisChannelInfo *> channels) { m_currentProducer = producer; m_currentProducer->setView(m_from, m_width); @@ -143,7 +143,7 @@ void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, QValu return; } - QValueVector<KisChannelInfo *> producerChannels = m_currentProducer->channels(); + TQValueVector<KisChannelInfo *> producerChannels = m_currentProducer->channels(); for (uint i = 0; i < channels.count(); i++) { // Also makes sure the channel is actually in the producer's list @@ -197,7 +197,7 @@ void KisHistogramView::setActiveChannel(int channel) m_histogram->setChannel(0); // Set a default channel, just being nice } else { m_color = false; - QValueVector<KisChannelInfo *> channels = m_currentProducer->channels(); + TQValueVector<KisChannelInfo *> channels = m_currentProducer->channels(); for (uint i = 0; i < channels.count(); i++) { KisChannelInfo* channel = channels.at(i); if (channel->name() == info.channel->name()) { @@ -249,7 +249,7 @@ void KisHistogramView::addProducerChannels(KisHistogramProducerSP producer) { info.isProducer = true; info.producer = producer; // channel not used for a producer - QValueVector<KisChannelInfo *> channels = info.producer->channels(); + TQValueVector<KisChannelInfo *> channels = info.producer->channels(); int count = channels.count(); m_comboInfo.append(info); m_channelStrings.append(producer->id() . name()); @@ -257,24 +257,24 @@ void KisHistogramView::addProducerChannels(KisHistogramProducerSP producer) { info.isProducer = false; info.channel = channels.at(j); m_comboInfo.append(info); - m_channelStrings.append(QString(" ").append(info.channel->name())); + m_channelStrings.append(TQString(" ").append(info.channel->name())); } } void KisHistogramView::updateHistogram() { - Q_UINT32 height = this->height(); + TQ_UINT32 height = this->height(); int selFrom, selTo; // from - to in bins if (!m_currentProducer) { // Something's very wrong: no producer for this colorspace to update histogram with! return; } - Q_INT32 bins = m_histogram->producer()->numberOfBins(); - m_pix = QPixmap(bins, height); + TQ_INT32 bins = m_histogram->producer()->numberOfBins(); + m_pix = TQPixmap(bins, height); m_pix.fill(); - QPainter p(&m_pix); - p.setBrush(Qt::black); + TQPainter p(&m_pix); + p.setBrush(TQt::black); // Draw the box of the selection, if any if (m_histogram->hasSelection()) { @@ -289,7 +289,7 @@ void KisHistogramView::updateHistogram() selTo = 2; } - Q_INT32 i = 0; + TQ_INT32 i = 0; double highest = 0; bool blackOnBlack = false; @@ -302,16 +302,16 @@ void KisHistogramView::updateHistogram() } for (uint chan = 0; chan < m_channels.count(); chan++) { - QColor color; + TQColor color; m_histogram->setChannel(m_channelToOffset.at(chan)); if (m_color) { color = m_channels.at(chan)->color(); p.setPen(color); } else { - color = Qt::black; + color = TQt::black; } - blackOnBlack = (color == Qt::black); + blackOnBlack = (color == TQt::black); if (m_histogram->getHistogramType() == LINEAR) { double factor = (double)height / highest; @@ -319,7 +319,7 @@ void KisHistogramView::updateHistogram() // So that we get a good view even with a selection box with // black colors on background of black selection if (i >= selFrom && i < selTo && blackOnBlack) { - p.setPen(Qt::white); + p.setPen(TQt::white); } else { p.setPen(color); } @@ -330,7 +330,7 @@ void KisHistogramView::updateHistogram() for( i = 0; i < bins; ++i ) { // Same as above if (i >= selFrom && i < selTo && blackOnBlack) { - p.setPen(Qt::white); + p.setPen(TQt::white); } else { p.setPen(color); } @@ -343,11 +343,11 @@ void KisHistogramView::updateHistogram() setPixmap(m_pix); } -void KisHistogramView::mousePressEvent(QMouseEvent * e) { +void KisHistogramView::mousePressEvent(TQMouseEvent * e) { if (e->button() == Qt::RightButton) emit rightClicked(e->globalPos()); else - QLabel::mousePressEvent(e); + TQLabel::mousePressEvent(e); } diff --git a/krita/ui/kis_histogram_view.h b/krita/ui/kis_histogram_view.h index b44ee79d..6b4524a8 100644 --- a/krita/ui/kis_histogram_view.h +++ b/krita/ui/kis_histogram_view.h @@ -19,10 +19,10 @@ #ifndef _KIS_HISTOGRAM_VIEW_ #define _KIS_HISTOGRAM_VIEW_ -#include <qlabel.h> -#include <qpixmap.h> -#include <qvaluevector.h> -#include <qstringlist.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqvaluevector.h> +#include <tqstringlist.h> #include "kis_types.h" #include "kis_histogram_producer.h" @@ -45,23 +45,24 @@ class KisChannelInfo; * some functionality will disappear, like listProducers(). Setting a histogram will discard * info on the layer, and setting a layer will discard info on the histogram. **/ -class KisHistogramView : public QLabel { +class KisHistogramView : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KisHistogramView(QWidget *parent = 0, const char *name = 0, WFlags f = 0); + KisHistogramView(TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0); virtual ~KisHistogramView(); void setPaintDevice(KisPaintDeviceSP dev); void setHistogram(KisHistogramSP histogram); void setView(double from, double size); KisHistogramProducerSP currentProducer(); - QStringList channelStrings(); + TQStringList channelStrings(); /** Lists all producers currently available */ KisIDList listProducers(); /** Sets the currently displayed channels to channels of the producer with producerID as ID*/ - void setCurrentChannels(const KisID& producerID, QValueVector<KisChannelInfo *> channels); + void setCurrentChannels(const KisID& producerID, TQValueVector<KisChannelInfo *> channels); /** Be careful, producer will be modified */ - void setCurrentChannels(KisHistogramProducerSP producer, QValueVector<KisChannelInfo *> channels); + void setCurrentChannels(KisHistogramProducerSP producer, TQValueVector<KisChannelInfo *> channels); bool hasColor(); void setColor(bool set); @@ -71,10 +72,10 @@ public slots: void updateHistogram(); signals: - void rightClicked(const QPoint& pos); + void rightClicked(const TQPoint& pos); protected: - virtual void mousePressEvent(QMouseEvent * e); + virtual void mousePressEvent(TQMouseEvent * e); private: void setChannels(); @@ -86,15 +87,15 @@ private: KisChannelInfo * channel; } ComboboxInfo; - QValueVector<ComboboxInfo> m_comboInfo; - QPixmap m_pix; + TQValueVector<ComboboxInfo> m_comboInfo; + TQPixmap m_pix; KisHistogramSP m_histogram; KisColorSpace* m_cs; KisHistogramProducerSP m_currentProducer; - QValueVector<KisChannelInfo *> m_channels; + TQValueVector<KisChannelInfo *> m_channels; // Maps the channels in m_channels to a real channel offset in the producer->channels() - QValueVector<Q_INT32> m_channelToOffset; - QStringList m_channelStrings; + TQValueVector<TQ_INT32> m_channelToOffset; + TQStringList m_channelStrings; bool m_color; double m_from; double m_width; diff --git a/krita/ui/kis_icon_item.cc b/krita/ui/kis_icon_item.cc index 443416cc..339017fc 100644 --- a/krita/ui/kis_icon_item.cc +++ b/krita/ui/kis_icon_item.cc @@ -43,7 +43,7 @@ void KisIconItem::updatePixmaps() validThumb = false; if (m_resource && m_resource->valid()) { - QImage img = m_resource->img(); + TQImage img = m_resource->img(); if (img.isNull()) { m_resource->setValid(false); @@ -52,23 +52,23 @@ void KisIconItem::updatePixmaps() } if (img.width() > THUMB_SIZE || img.height() > THUMB_SIZE) { - QImage thumb = img; - Q_INT32 xsize = THUMB_SIZE; - Q_INT32 ysize = THUMB_SIZE; - Q_INT32 picW = thumb.width(); - Q_INT32 picH = thumb.height(); + TQImage thumb = img; + TQ_INT32 xsize = THUMB_SIZE; + TQ_INT32 ysize = THUMB_SIZE; + TQ_INT32 picW = thumb.width(); + TQ_INT32 picH = thumb.height(); if (picW > picH) { float yFactor = (float)((float)(float)picH / (float)picW); - ysize = (Q_INT32)(yFactor * (float)THUMB_SIZE); + ysize = (TQ_INT32)(yFactor * (float)THUMB_SIZE); if (ysize > THUMB_SIZE) ysize = THUMB_SIZE; } else if (picW < picH) { float xFactor = (float)((float)picW / (float)picH); - xsize = (Q_INT32)(xFactor * (float)THUMB_SIZE); + xsize = (TQ_INT32)(xFactor * (float)THUMB_SIZE); if (xsize > THUMB_SIZE) xsize = THUMB_SIZE; @@ -77,25 +77,25 @@ void KisIconItem::updatePixmaps() thumb = thumb.smoothScale(xsize, ysize); if (!thumb.isNull()) { - m_thumb = QPixmap(thumb); + m_thumb = TQPixmap(thumb); validThumb = !m_thumb.isNull(); } } img = img.convertDepth(32); - m_pixmap = QPixmap(img); + m_pixmap = TQPixmap(img); validPixmap = true; } } -QPixmap& KisIconItem::pixmap() const +TQPixmap& KisIconItem::pixmap() const { - return const_cast<QPixmap&>(m_pixmap); + return const_cast<TQPixmap&>(m_pixmap); } -QPixmap& KisIconItem::thumbPixmap() const +TQPixmap& KisIconItem::thumbPixmap() const { - return const_cast<QPixmap&>(m_thumb); + return const_cast<TQPixmap&>(m_thumb); } KisResource *KisIconItem::resource() const diff --git a/krita/ui/kis_icon_item.h b/krita/ui/kis_icon_item.h index 7d76f05c..9e8f1b09 100644 --- a/krita/ui/kis_icon_item.h +++ b/krita/ui/kis_icon_item.h @@ -29,8 +29,8 @@ public: KisIconItem(KisResource *resource); virtual ~KisIconItem(); - virtual QPixmap& pixmap() const; - virtual QPixmap& thumbPixmap() const; + virtual TQPixmap& pixmap() const; + virtual TQPixmap& thumbPixmap() const; KisResource *resource() const; @@ -40,8 +40,8 @@ public: private: KisResource *m_resource; - QPixmap m_pixmap; - QPixmap m_thumb; + TQPixmap m_pixmap; + TQPixmap m_thumb; }; #endif // KIS_ICON_ITEM_H_ diff --git a/krita/ui/kis_iconwidget.cc b/krita/ui/kis_iconwidget.cc index 20f8838d..3e9ce4f1 100644 --- a/krita/ui/kis_iconwidget.cc +++ b/krita/ui/kis_iconwidget.cc @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpainter.h> +#include <tqpainter.h> #include <koIconChooser.h> #include "kis_iconwidget.h" -KisIconWidget::KisIconWidget(QWidget *parent, const char *name) : super(parent, name) +KisIconWidget::KisIconWidget(TQWidget *tqparent, const char *name) : super(tqparent, name) { m_item = 0; } @@ -32,18 +32,18 @@ void KisIconWidget::slotSetItem(KoIconItem& item) update(); } -void KisIconWidget::drawButtonLabel(QPainter *p) +void KisIconWidget::drawButtonLabel(TQPainter *p) { if (m_item) { - const QPixmap& pix = m_item->pixmap(); - Q_INT32 x = 2; - Q_INT32 y = 2; - Q_INT32 pw = pix.width(); - Q_INT32 ph = pix.height(); - Q_INT32 cw = width(); - Q_INT32 ch = height(); - Q_INT32 itemWidth = 24; - Q_INT32 itemHeight = 24; + const TQPixmap& pix = m_item->pixmap(); + TQ_INT32 x = 2; + TQ_INT32 y = 2; + TQ_INT32 pw = pix.width(); + TQ_INT32 ph = pix.height(); + TQ_INT32 cw = width(); + TQ_INT32 ch = height(); + TQ_INT32 itemWidth = 24; + TQ_INT32 itemHeight = 24; if (pw < itemWidth) x = (cw - pw) / 2; @@ -53,7 +53,7 @@ void KisIconWidget::drawButtonLabel(QPainter *p) if (!m_item->hasValidThumb() || (pw <= itemWidth && ph <= itemHeight)) { p->drawPixmap(x, y, pix, 0, 0, itemWidth, itemHeight); } else { - const QPixmap& thumbpix = m_item->thumbPixmap(); + const TQPixmap& thumbpix = m_item->thumbPixmap(); x = 2; y = 2; diff --git a/krita/ui/kis_iconwidget.h b/krita/ui/kis_iconwidget.h index e595dbe2..d65cbcbd 100644 --- a/krita/ui/kis_iconwidget.h +++ b/krita/ui/kis_iconwidget.h @@ -20,26 +20,27 @@ #ifndef KIS_ICONWIDGET_H_ #define KIS_ICONWIDGET_H_ -#include <qtoolbutton.h> +#include <tqtoolbutton.h> class KoIconItem; -class KisIconWidget : public QToolButton { - typedef QToolButton super; +class KisIconWidget : public TQToolButton { + typedef TQToolButton super; Q_OBJECT + TQ_OBJECT /** * The icon widget is used in the control box where the current color and brush * are shown. */ public: - KisIconWidget(QWidget *parent = 0, const char *name = 0); + KisIconWidget(TQWidget *tqparent = 0, const char *name = 0); public slots: void slotSetItem(KoIconItem& item); protected: - virtual void drawButtonLabel(QPainter *gc); + virtual void drawButtonLabel(TQPainter *gc); private: KoIconItem *m_item; diff --git a/krita/ui/kis_import_catcher.cc b/krita/ui/kis_import_catcher.cc index 656ab969..b2d04cab 100644 --- a/krita/ui/kis_import_catcher.cc +++ b/krita/ui/kis_import_catcher.cc @@ -27,7 +27,7 @@ #include "kis_group_layer.h" KisImportCatcher::KisImportCatcher(KURL url, KisImageSP image) - : QObject() + : TQObject() , m_doc( new KisDoc() ) , m_image( image ) , m_url( url ) @@ -37,7 +37,7 @@ KisImportCatcher::KisImportCatcher(KURL url, KisImageSP image) slotLoadingFinished(); } else { - connect(m_doc, SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + connect(m_doc, TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); } } @@ -54,23 +54,23 @@ void KisImportCatcher::slotLoadingFinished() // Don't import the root if this is not a layered image (1 group layer // plus 1 other). importedImageLayer = importedImageLayer->firstChild(); - importedImageLayer->parent()->removeLayer(importedImageLayer); + importedImageLayer->tqparent()->removeLayer(importedImageLayer); } importedImageLayer->setName(m_url.prettyURL()); - KisGroupLayerSP parent = 0; + KisGroupLayerSP tqparent = 0; KisLayerSP currentActiveLayer = m_image->activeLayer(); if (currentActiveLayer) { - parent = currentActiveLayer->parent(); + tqparent = currentActiveLayer->tqparent(); } - if (parent == 0) { - parent = m_image->rootLayer(); + if (tqparent == 0) { + tqparent = m_image->rootLayer(); } - m_image->addLayer(importedImageLayer.data(), parent, currentActiveLayer); + m_image->addLayer(importedImageLayer.data(), tqparent, currentActiveLayer); } } m_doc->deleteLater(); diff --git a/krita/ui/kis_import_catcher.h b/krita/ui/kis_import_catcher.h index 8e7777ac..6f6923e1 100644 --- a/krita/ui/kis_import_catcher.h +++ b/krita/ui/kis_import_catcher.h @@ -19,7 +19,7 @@ #ifndef KIS_IMPORT_CATCHER_H_ #define KIS_IMPORT_CATCHER_H_ -#include <qobject.h> +#include <tqobject.h> #include <kurl.h> @@ -36,9 +36,10 @@ class KisDoc; * Caveat: this class calls "delete this", which means that you new * it and then never touch it again. Thanks you very much. */ -class KisImportCatcher : QObject { +class KisImportCatcher : TQObject { Q_OBJECT + TQ_OBJECT public: diff --git a/krita/ui/kis_input_device.cc b/krita/ui/kis_input_device.cc index 3f63e156..0923c727 100644 --- a/krita/ui/kis_input_device.cc +++ b/krita/ui/kis_input_device.cc @@ -21,7 +21,7 @@ #define UNKNOWN_INPUT_DEVICE_ID -1 #define FIRST_INPUT_DEVICE_ID 0 -Q_INT32 KisInputDevice::NextInputDeviceID = FIRST_INPUT_DEVICE_ID; +TQ_INT32 KisInputDevice::NextInputDeviceID = FIRST_INPUT_DEVICE_ID; KisInputDevice KisInputDevice::Mouse; KisInputDevice KisInputDevice::Stylus; @@ -29,7 +29,7 @@ KisInputDevice KisInputDevice::Eraser; KisInputDevice KisInputDevice::Puck; KisInputDevice KisInputDevice::Unknown(UNKNOWN_INPUT_DEVICE_ID); -QValueVector<KisInputDevice> KisInputDevice::InputDevices; +TQValueVector<KisInputDevice> KisInputDevice::InputDevices; KisInputDevice::KisInputDevice() { @@ -62,7 +62,7 @@ void KisInputDevice::allocateDefaultDevicesIfNeeded() } } -QValueVector<KisInputDevice> KisInputDevice::inputDevices() +TQValueVector<KisInputDevice> KisInputDevice::inputDevices() { allocateDefaultDevicesIfNeeded(); diff --git a/krita/ui/kis_input_device.h b/krita/ui/kis_input_device.h index 91c5ff4f..d85d4e3f 100644 --- a/krita/ui/kis_input_device.h +++ b/krita/ui/kis_input_device.h @@ -19,14 +19,14 @@ #ifndef KIS_INPUT_DEVICE_H_ #define KIS_INPUT_DEVICE_H_ -#include <qvaluevector.h> +#include <tqvaluevector.h> class KisInputDevice { public: KisInputDevice(); static KisInputDevice allocateInputDevice(); - static QValueVector<KisInputDevice> inputDevices(); + static TQValueVector<KisInputDevice> inputDevices(); friend inline bool operator==(const KisInputDevice&, const KisInputDevice&); friend inline bool operator!=(const KisInputDevice&, const KisInputDevice&); @@ -35,24 +35,24 @@ public: friend inline bool operator>(const KisInputDevice &, const KisInputDevice &); static KisInputDevice mouse(); // Standard mouse - static KisInputDevice stylus(); // Wacom stylus via QTabletEvent - static KisInputDevice eraser(); // Wacom eraser via QTabletEvent - static KisInputDevice puck(); // Wacom puck via QTabletEvent + static KisInputDevice stylus(); // Wacom stylus via TQTabletEvent + static KisInputDevice eraser(); // Wacom eraser via TQTabletEvent + static KisInputDevice puck(); // Wacom puck via TQTabletEvent static KisInputDevice unknown(); private: - KisInputDevice(Q_INT32 id) : m_id(id) {} + KisInputDevice(TQ_INT32 id) : m_id(id) {} - Q_INT32 id() const { return m_id; } + TQ_INT32 id() const { return m_id; } static void allocateDefaultDevicesIfNeeded(); static KisInputDevice allocateNextDevice(); private: - Q_INT32 m_id; + TQ_INT32 m_id; - static Q_INT32 NextInputDeviceID; - static QValueVector<KisInputDevice> InputDevices; + static TQ_INT32 NextInputDeviceID; + static TQValueVector<KisInputDevice> InputDevices; static KisInputDevice Mouse; static KisInputDevice Stylus; diff --git a/krita/ui/kis_int_spinbox.cc b/krita/ui/kis_int_spinbox.cc index 0d5d8c75..2512a78b 100644 --- a/krita/ui/kis_int_spinbox.cc +++ b/krita/ui/kis_int_spinbox.cc @@ -2,7 +2,7 @@ * Copyright (c) 2006 Boudewijn Rempt <boud@valdyas.org> * Copyright (c) 2006 Casper Boemann <cbr@boemann.dk> * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This library is free software; you can redistribute it and/or @@ -28,16 +28,16 @@ #include <math.h> #include <algorithm> -#include <qtimer.h> -#include <qapplication.h> -#include <qsize.h> -#include <qslider.h> -#include <qstyle.h> -#include <qlabel.h> -#include <qpopupmenu.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qvalidator.h> +#include <tqtimer.h> +#include <tqapplication.h> +#include <tqsize.h> +#include <tqslider.h> +#include <tqstyle.h> +#include <tqlabel.h> +#include <tqpopupmenu.h> +#include <tqlineedit.h> +#include <tqlayout.h> +#include <tqvalidator.h> #include <knuminput.h> #include <kglobal.h> @@ -56,19 +56,19 @@ public: KisPopupSlider *m_slider; KArrowButton *m_arrow; int m_prevValue; - QValidator *m_validator; - QTimer m_timer; + TQValidator *m_validator; + TQTimer m_timer; }; -KisIntSpinbox::KisIntSpinbox(QWidget *parent, const char *name) - : QWidget(parent, name) +KisIntSpinbox::KisIntSpinbox(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { init(0); } -KisIntSpinbox::KisIntSpinbox(const QString & /*label*/, int val, QWidget *parent, const char *name) - : QWidget(parent, name) +KisIntSpinbox::KisIntSpinbox(const TQString & /*label*/, int val, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { init(val); } @@ -76,19 +76,19 @@ KisIntSpinbox::KisIntSpinbox(const QString & /*label*/, int val, QWidget *parent void KisIntSpinbox::init(int val) { d = new KisIntSpinboxPrivate( ); - QBoxLayout * l = new QHBoxLayout( this ); + TQBoxLayout * l = new TQHBoxLayout( this ); l->insertStretch(0, 1); d->m_numinput = new KIntSpinBox(0, 100, 1, val, 10, this, "KisIntSpinbox::KIntSpinBox"); - d->m_numinput->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); + d->m_numinput->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed); d->m_numinput->setSuffix("%"); l->addWidget( d->m_numinput ); - d->m_slider = new KisPopupSlider(0, 100, 10, val, QSlider::Horizontal, this); - d->m_slider->setFrameStyle(QFrame::Panel|QFrame::Raised); + d->m_slider = new KisPopupSlider(0, 100, 10, val, TQSlider::Horizontal, this); + d->m_slider->setFrameStyle(TQFrame::Panel|TQFrame::Raised); - d->m_arrow = new KArrowButton(this, Qt::DownArrow); + d->m_arrow = new KArrowButton(this, TQt::DownArrow); d->m_arrow->setPopup(d->m_slider); d->m_arrow->setMaximumHeight( fontMetrics().height() + 4); d->m_arrow->setEnabled(true); // Why is the arrow still gray? @@ -98,14 +98,14 @@ void KisIntSpinbox::init(int val) d->m_prevValue = val; setValue(val); setFocusProxy(d->m_numinput); - layout(); + tqlayout(); - connect(d->m_numinput, SIGNAL(valueChanged(int)), SLOT(spinboxValueChanged(int))); - connect(d->m_slider, SIGNAL(valueChanged(int)), SLOT(sliderValueChanged(int))); - connect(d->m_slider, SIGNAL(aboutToShow()), SLOT(slotAboutToShow())); - connect(d->m_slider, SIGNAL(aboutToHide()), SLOT(slotAboutToHide())); + connect(d->m_numinput, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinboxValueChanged(int))); + connect(d->m_slider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderValueChanged(int))); + connect(d->m_slider, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); + connect(d->m_slider, TQT_SIGNAL(aboutToHide()), TQT_SLOT(slotAboutToHide())); - connect(&(d->m_timer), SIGNAL(timeout()), this, SLOT(slotTimeout())); + connect(&(d->m_timer), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } void KisIntSpinbox::spinboxValueChanged(int val) @@ -128,7 +128,7 @@ void KisIntSpinbox::setRange(int lower, int upper, int /*step*/) lower = kMin(upper, lower); d->m_slider->setRange(lower, upper); - layout(); + tqlayout(); } void KisIntSpinbox::setMinValue(int min) @@ -172,7 +172,7 @@ int KisIntSpinbox::value() const return d->m_numinput->value(); // From the numinput: that one isn't in steps of ten } -void KisIntSpinbox::setLabel(const QString & /*label*/) +void KisIntSpinbox::setLabel(const TQString & /*label*/) { } diff --git a/krita/ui/kis_int_spinbox.h b/krita/ui/kis_int_spinbox.h index 873a2f39..a5c4602e 100644 --- a/krita/ui/kis_int_spinbox.h +++ b/krita/ui/kis_int_spinbox.h @@ -20,40 +20,41 @@ #ifndef KIS_INT_SPINBOX_H_ #define KIS_INT_SPINBOX_H_ -#include <qwidget.h> -#include <qspinbox.h> -#include <qslider.h> -#include <qpopupmenu.h> +#include <tqwidget.h> +#include <tqspinbox.h> +#include <tqslider.h> +#include <tqpopupmenu.h> #include <knumvalidator.h> -class QLabel; -class QLineEdit; -class QLayout; -class QValidator; +class TQLabel; +class TQLineEdit; +class TQLayout; +class TQValidator; -class KisPopupSlider : public QPopupMenu { +class KisPopupSlider : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KisPopupSlider(int minValue, int maxValue, int pageStep, int value, Orientation orientation, QWidget * parent, const char * name = 0) - : QPopupMenu(parent, name) + KisPopupSlider(int minValue, int maxValue, int pageStep, int value, Qt::Orientation orientation, TQWidget * tqparent, const char * name = 0) + : TQPopupMenu(tqparent, name) { - m_slider = new QSlider(minValue, maxValue, pageStep, value, orientation, this, name); + m_slider = new TQSlider(minValue, maxValue, pageStep, value, orientation, this, name); //m_slider->setTracking(false); insertItem(m_slider); - connect(m_slider, SIGNAL(valueChanged(int)), SIGNAL(valueChanged(int))); + connect(m_slider, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(valueChanged(int))); } void setTickInterval(int i) { m_slider->setTickInterval(i); } void setRange(int minValue, int maxValue) { m_slider->setRange(minValue, maxValue); } void setValue(int val) { m_slider->setValue(val); } - void setTickmarks(QSlider::TickSetting t) { m_slider->setTickmarks(t); } + void setTickmarks(TQSlider::TickSetting t) { m_slider->setTickmarks(t); } int lineStep () const{ return m_slider->lineStep(); } int minValue () const{ return m_slider->minValue(); } int maxValue () const{ return m_slider->maxValue(); } int value () const{ return m_slider->value(); } - QSlider *m_slider; + TQSlider *m_slider; signals: void valueChanged(int); @@ -64,19 +65,20 @@ signals: * @short An input widget for integer numbers, consisting of a spinbox and * a dropdown slider. * - * KisIntSpinbox combines a QSpinBox and a dropdown QSlider + * KisIntSpinbox combines a TQSpinBox and a dropdown TQSlider * to make an easy to use control for setting some integer * parameter. * * */ -class KisIntSpinbox : public QWidget +class KisIntSpinbox : public TQWidget { Q_OBJECT - Q_PROPERTY( int value READ value WRITE setValue ) - Q_PROPERTY( int minValue READ minValue WRITE setMinValue ) - Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue ) + TQ_OBJECT + TQ_PROPERTY( int value READ value WRITE setValue ) + TQ_PROPERTY( int minValue READ minValue WRITE setMinValue ) + TQ_PROPERTY( int maxValue READ maxValue WRITE setMaxValue ) public: @@ -84,22 +86,22 @@ public: * Constructs an input control for integer values * with base 10 and initial value 0. * - * @param parent parent QWidget + * @param tqparent tqparent TQWidget * @param name internal name for this widget */ - KisIntSpinbox(QWidget *parent=0, const char *name=0); + KisIntSpinbox(TQWidget *tqparent=0, const char *name=0); /** * Constructor - * It constructs a QSpinBox that allows the input of integer numbers + * It constructs a TQSpinBox that allows the input of integer numbers * in the range of -INT_MAX to +INT_MAX. * To enforce the value being in a range, use setRange(). * * @param label the tabel (may contain &, and my be empty) * @param value initial value for the control - * @param parent parent QWidget + * @param tqparent tqparent TQWidget * @param name internal name for this widget */ - KisIntSpinbox(const QString & label, int value, QWidget* parent=0, const char *name=0); + KisIntSpinbox(const TQString & label, int value, TQWidget* tqparent=0, const char *name=0); /** * Destructor @@ -116,7 +118,7 @@ public: /** * @param min minimum value * @param max maximum value - * @param step step size for the QSlider + * @param step step size for the TQSlider */ void setRange(int min, int max, int step=1); /** @@ -144,7 +146,7 @@ public: */ void setSteps(int minor, int major); - void setLabel(const QString & label); + void setLabel(const TQString & label); public slots: /** diff --git a/krita/ui/kis_itemchooser.cc b/krita/ui/kis_itemchooser.cc index b5dc03e0..d418bd2f 100644 --- a/krita/ui/kis_itemchooser.cc +++ b/krita/ui/kis_itemchooser.cc @@ -15,7 +15,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 <qvbox.h> +#include <tqvbox.h> #include <kinstance.h> #include <klocale.h> #include <kstandarddirs.h> @@ -25,12 +25,12 @@ #include "kis_global.h" #include "kis_icon_item.h" -KisItemChooser::KisItemChooser(QWidget *parent, const char *name) : super(parent, name) +KisItemChooser::KisItemChooser(TQWidget *tqparent, const char *name) : super(tqparent, name) { -/* m_frame = new QVBox(this); - m_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken);*/ - m_chooser = new KoIconChooser(QSize(30,30), this, "icon_chooser", true); - QObject::connect(m_chooser, SIGNAL(selected(KoIconItem*)), this, SLOT(slotItemSelected(KoIconItem*))); +/* m_frame = new TQVBox(this); + m_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);*/ + m_chooser = new KoIconChooser(TQSize(30,30), this, "icon_chooser", true); + TQObject::connect(m_chooser, TQT_SIGNAL(selected(KoIconItem*)), this, TQT_SLOT(slotItemSelected(KoIconItem*))); } KisItemChooser::~KisItemChooser() @@ -66,13 +66,13 @@ void KisItemChooser::addItem(KoIconItem *item) void KisItemChooser::addItems(const vKoIconItem& items) { - QPtrListIterator<KoIconItem> itr(items); + TQPtrListIterator<KoIconItem> itr(items); for (itr.toFirst(); itr.current(); ++itr) m_chooser->addItem(itr.current()); } -QWidget *KisItemChooser::chooserWidget() const +TQWidget *KisItemChooser::chooserWidget() const { return m_chooser; } diff --git a/krita/ui/kis_itemchooser.h b/krita/ui/kis_itemchooser.h index b9eb5913..d29aa28d 100644 --- a/krita/ui/kis_itemchooser.h +++ b/krita/ui/kis_itemchooser.h @@ -18,22 +18,23 @@ #ifndef KIS_ITEM_CHOOSER_H_ #define KIS_ITEM_CHOOSER_H_ -#include <qptrlist.h> -#include <qwidget.h> +#include <tqptrlist.h> +#include <tqwidget.h> -class QHBox; +class TQHBox; class KoIconChooser; class KoIconItem; -typedef QPtrList<KoIconItem> vKoIconItem; +typedef TQPtrList<KoIconItem> vKoIconItem; -class KisItemChooser : public QWidget { - typedef QWidget super; +class KisItemChooser : public TQWidget { + typedef TQWidget super; Q_OBJECT + TQ_OBJECT public: - KisItemChooser(QWidget *parent = 0, + KisItemChooser(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisItemChooser(); @@ -50,13 +51,13 @@ signals: protected: virtual void update(KoIconItem *item) = 0; - QWidget *chooserWidget() const; + TQWidget *chooserWidget() const; private slots: void slotItemSelected(KoIconItem *item); private: - QHBox *m_frame; + TQHBox *m_frame; KoIconChooser *m_chooser; }; diff --git a/krita/ui/kis_label_cursor_pos.cc b/krita/ui/kis_label_cursor_pos.cc index 40d2b99c..984df6dd 100644 --- a/krita/ui/kis_label_cursor_pos.cc +++ b/krita/ui/kis_label_cursor_pos.cc @@ -18,22 +18,22 @@ #include "kis_label_cursor_pos.h" #include "kis_label_cursor_pos.moc" -KisLabelCursorPos::KisLabelCursorPos(QWidget *parent, const char *name, WFlags f) : super(parent, name, f) +KisLabelCursorPos::KisLabelCursorPos(TQWidget *tqparent, const char *name, WFlags f) : super(tqparent, name, f) { setText("0:0"); m_doUpdates = true; - //setMinimumSize( 200, parent->height() - 4); + //setMinimumSize( 200, tqparent->height() - 4); } KisLabelCursorPos::~KisLabelCursorPos() { } -void KisLabelCursorPos::updatePos(Q_INT32 xpos, Q_INT32 ypos) +void KisLabelCursorPos::updatePos(TQ_INT32 xpos, TQ_INT32 ypos) { if (m_doUpdates) { - QString s; + TQString s; s.sprintf("%d:%d", xpos, ypos); setText(s); @@ -48,6 +48,6 @@ void KisLabelCursorPos::enter() void KisLabelCursorPos::leave() { m_doUpdates = false; - setText(QString::null); + setText(TQString()); } diff --git a/krita/ui/kis_label_cursor_pos.h b/krita/ui/kis_label_cursor_pos.h index 3923c61d..392a0b68 100644 --- a/krita/ui/kis_label_cursor_pos.h +++ b/krita/ui/kis_label_cursor_pos.h @@ -18,24 +18,25 @@ #ifndef KIS_LABEL_CURSOR_POS_H_ #define KIS_LABEL_CURSOR_POS_H_ -#include <qlabel.h> +#include <tqlabel.h> -class KisLabelCursorPos : public QLabel { +class KisLabelCursorPos : public TQLabel { Q_OBJECT - typedef QLabel super; + TQ_OBJECT + typedef TQLabel super; public: - KisLabelCursorPos(QWidget *parent, const char *name = 0, WFlags f = 0); + KisLabelCursorPos(TQWidget *tqparent, const char *name = 0, WFlags f = 0); virtual ~KisLabelCursorPos(); public slots: - void updatePos(Q_INT32 xpos, Q_INT32 ypos); + void updatePos(TQ_INT32 xpos, TQ_INT32 ypos); void enter(); void leave(); private: bool m_doUpdates; - Q_INT32 m_ypos; + TQ_INT32 m_ypos; }; #endif // KIS_LABEL_CURSOR_POS_H_ diff --git a/krita/ui/kis_label_progress.cc b/krita/ui/kis_label_progress.cc index e08a7fcf..c04452f4 100644 --- a/krita/ui/kis_label_progress.cc +++ b/krita/ui/kis_label_progress.cc @@ -16,11 +16,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qtooltip.h> -#include <qtoolbutton.h> -#include <qcursor.h> -#include <qeventloop.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqtoolbutton.h> +#include <tqcursor.h> +#include <tqeventloop.h> #include <kdebug.h> #include <kapplication.h> @@ -32,33 +32,33 @@ #include "kis_label_progress.h" #include "kis_cursor.h" -class EscapeButton : public QToolButton { +class EscapeButton : public TQToolButton { public: - EscapeButton(QWidget * parent, const char * name) : QToolButton(parent, name) {}; + EscapeButton(TQWidget * tqparent, const char * name) : TQToolButton(tqparent, name) {}; - void keyReleaseEvent(QKeyEvent *e) + void keyReleaseEvent(TQKeyEvent *e) { - if (e->key()==Qt::Key_Escape) + if (e->key()==TQt::Key_Escape) emit clicked(); } }; -KisLabelProgress::KisLabelProgress(QWidget *parent, const char *name, WFlags f) : super(parent, name, f) +KisLabelProgress::KisLabelProgress(TQWidget *tqparent, const char *name, WFlags f) : super(tqparent, name, f) { m_subject = 0; m_modal = false; - QHBoxLayout *box = new QHBoxLayout(this); + TQHBoxLayout *box = new TQHBoxLayout(this); box->setAutoAdd(true); - QIconSet cancelIconSet = SmallIconSet("stop"); + TQIconSet cancelIconSet = SmallIconSet("stop"); m_cancelButton = new EscapeButton(this, "cancel_button"); m_cancelButton->setIconSet(cancelIconSet); - QToolTip::add(m_cancelButton, i18n("Cancel")); - connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(cancelPressed())); + TQToolTip::add(m_cancelButton, i18n("Cancel")); + connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(cancelPressed())); m_bar = new KProgress(100, this); } @@ -75,11 +75,11 @@ void KisLabelProgress::setSubject(KisProgressSubject *subject, bool modal, bool m_subject = subject; m_modal = modal; - connect(subject, SIGNAL(notifyProgress(int)), this, SLOT(update(int))); - connect(subject, SIGNAL(notifyProgressStage(const QString&, int)), this, SLOT(updateStage(const QString&, int))); - connect(subject, SIGNAL(notifyProgressDone()), this, SLOT(done())); - connect(subject, SIGNAL(notifyProgressError()), this, SLOT(error())); - connect(subject, SIGNAL(destroyed()), this, SLOT(subjectDestroyed())); + connect(subject, TQT_SIGNAL(notifyProgress(int)), this, TQT_SLOT(update(int))); + connect(subject, TQT_SIGNAL(notifyProgressStage(const TQString&, int)), this, TQT_SLOT(updateStage(const TQString&, int))); + connect(subject, TQT_SIGNAL(notifyProgressDone()), this, TQT_SLOT(done())); + connect(subject, TQT_SIGNAL(notifyProgressError()), this, TQT_SLOT(error())); + connect(subject, TQT_SIGNAL(destroyed()), this, TQT_SLOT(subjectDestroyed())); show(); @@ -102,14 +102,14 @@ void KisLabelProgress::setSubject(KisProgressSubject *subject, bool modal, bool } if (modal) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); } m_bar->setValue(0); } } -bool KisLabelProgress::event(QEvent * e) +bool KisLabelProgress::event(TQEvent * e) { if (!e) return false; @@ -139,7 +139,7 @@ bool KisLabelProgress::event(QEvent * e) subjectDestroyed(); break; default: - return QLabel::event(e); + return TQLabel::event(e); }; return true; @@ -152,7 +152,7 @@ void KisLabelProgress::reset() m_subject = 0; if (m_modal) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } m_modal = false; @@ -173,11 +173,11 @@ void KisLabelProgress::update(int percent) app->processEvents(); // The following is safer, but makes cancel impossible: - //QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | - // QEventLoop::ExcludeSocketNotifiers); + //TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | + // TQEventLoop::ExcludeSocketNotifiers); } -void KisLabelProgress::updateStage(const QString&, int percent) +void KisLabelProgress::updateStage(const TQString&, int percent) { m_bar->setValue(percent); diff --git a/krita/ui/kis_label_progress.h b/krita/ui/kis_label_progress.h index f5385121..a2c42fd9 100644 --- a/krita/ui/kis_label_progress.h +++ b/krita/ui/kis_label_progress.h @@ -19,32 +19,33 @@ #ifndef KIS_LABEL_PROGRESS_H_ #define KIS_LABEL_PROGRESS_H_ -#include <qlabel.h> -#include <qevent.h> +#include <tqlabel.h> +#include <tqevent.h> #include "kis_progress_display_interface.h" -class QToolButton; +class TQToolButton; class KProgress; -class KisLabelProgress : public QLabel, public KisProgressDisplayInterface { +class KisLabelProgress : public TQLabel, public KisProgressDisplayInterface { Q_OBJECT - typedef QLabel super; + TQ_OBJECT + typedef TQLabel super; public: - KisLabelProgress(QWidget *parent, const char *name = 0, WFlags f = 0); + KisLabelProgress(TQWidget *tqparent, const char *name = 0, WFlags f = 0); virtual ~KisLabelProgress(); public: // Implements KisProgressDisplayInterface void setSubject(KisProgressSubject *subject, bool modal, bool canCancel); - // Overrides QLabel::event() - bool event(QEvent * ev); + // Overrides TQLabel::event() + bool event(TQEvent * ev); private slots: virtual void update(int percent); - virtual void updateStage(const QString& stage, int percent); + virtual void updateStage(const TQString& stage, int percent); virtual void done(); virtual void error(); virtual void subjectDestroyed(); @@ -57,7 +58,7 @@ private: KisProgressSubject *m_subject; KProgress *m_bar; - QToolButton *m_cancelButton; + TQToolButton *m_cancelButton; bool m_modal; }; diff --git a/krita/ui/kis_label_zoom.h b/krita/ui/kis_label_zoom.h index 29588368..e7fad08a 100644 --- a/krita/ui/kis_label_zoom.h +++ b/krita/ui/kis_label_zoom.h @@ -18,13 +18,14 @@ #ifndef KIS_LABEL_ZOOM_H_ #define KIS_LABEL_ZOOM_H_ -#include <qlabel.h> +#include <tqlabel.h> -class KisLabelZoom : public QLabel { +class KisLabelZoom : public TQLabel { Q_OBJECT + TQ_OBJECT - KisLabelZoom( QWidget *parent, const char *name = 0, WFlags f = 0 ) : - QLabel( parent, name, f ) {} + KisLabelZoom( TQWidget *tqparent, const char *name = 0, WFlags f = 0 ) : + TQLabel( tqparent, name, f ) {} virtual ~KisLabelZoom() {} }; diff --git a/krita/ui/kis_layerbox.cc b/krita/ui/kis_layerbox.cc index ef30e331..37dbd27e 100644 --- a/krita/ui/kis_layerbox.cc +++ b/krita/ui/kis_layerbox.cc @@ -19,22 +19,22 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qbutton.h> -#include <qtoolbutton.h> -#include <qbrush.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qstyle.h> -#include <qtooltip.h> -#include <qwidget.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqbutton.h> +#include <tqtoolbutton.h> +#include <tqbrush.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqstyle.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <kdebug.h> #include <kglobal.h> @@ -61,26 +61,26 @@ #include "kis_layerbox.h" -KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char *name) - : super(parent, name), m_image(0) +KisLayerBox::KisLayerBox(KisCanvasSubject *subject, TQWidget *tqparent, const char *name) + : super(tqparent, name), m_image(0) { - QVBoxLayout *vbox = new QVBoxLayout(this); + TQVBoxLayout *vbox = new TQVBoxLayout(this); vbox->setAutoAdd(true); m_lst = new WdgLayerBox(this); - setMinimumSize(m_lst->minimumSizeHint()); + setMinimumSize(m_lst->tqminimumSizeHint()); - QToolTip::add(m_lst->bnAdd, i18n("Create new layer")); + TQToolTip::add(m_lst->bnAdd, i18n("Create new layer")); - QToolTip::add(m_lst->bnDelete, i18n("Remove current layer")); + TQToolTip::add(m_lst->bnDelete, i18n("Remove current layer")); - QToolTip::add(m_lst->bnRaise, i18n("Raise current layer")); + TQToolTip::add(m_lst->bnRaise, i18n("Raise current layer")); m_lst->bnRaise->setEnabled(false); m_lst->bnLower->setEnabled(false); - QToolTip::add(m_lst->bnLower, i18n("Lower current layer")); + TQToolTip::add(m_lst->bnLower, i18n("Lower current layer")); - QToolTip::add(m_lst->bnProperties, i18n("Properties for layer")); + TQToolTip::add(m_lst->bnProperties, i18n("Properties for layer")); KIconLoader il( "krita" ); @@ -95,27 +95,27 @@ KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char loadPixmap("unlocked.png", il, KIcon::SizeSmallMedium)); - connect(list()->contextMenu(), SIGNAL(aboutToShow()), SLOT(slotAboutToShow())); - connect(list(), SIGNAL(activated(LayerItem*)), - SLOT(slotLayerActivated(LayerItem*))); - connect(list(), SIGNAL(displayNameChanged(LayerItem*, const QString&)), - SLOT(slotLayerDisplayNameChanged(LayerItem*, const QString&))); - connect(list(), SIGNAL(propertyChanged(LayerItem*, const QString&, bool)), - SLOT(slotLayerPropertyChanged(LayerItem*, const QString&, bool))); - connect(list(), SIGNAL(layerMoved(LayerItem*, LayerItem*, LayerItem*)), - SLOT(slotLayerMoved(LayerItem*, LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewLayer(LayerItem*, LayerItem*)), - SLOT(slotRequestNewLayer(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewFolder(LayerItem*, LayerItem*)), - SLOT(slotRequestNewFolder(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewAdjustmentLayer(LayerItem*, LayerItem*)), - SLOT(slotRequestNewAdjustmentLayer(LayerItem*, LayerItem*))); - connect(list(), SIGNAL(requestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&)), - SLOT(slotRequestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&))); - connect(list(), SIGNAL(requestRemoveLayer(LayerItem*)), - SLOT(slotRequestRemoveLayer(LayerItem*))); - connect(list(), SIGNAL(requestLayerProperties(LayerItem*)), - SLOT(slotRequestLayerProperties(LayerItem*))); + connect(list()->contextMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); + connect(list(), TQT_SIGNAL(activated(LayerItem*)), + TQT_SLOT(slotLayerActivated(LayerItem*))); + connect(list(), TQT_SIGNAL(displayNameChanged(LayerItem*, const TQString&)), + TQT_SLOT(slotLayerDisplayNameChanged(LayerItem*, const TQString&))); + connect(list(), TQT_SIGNAL(propertyChanged(LayerItem*, const TQString&, bool)), + TQT_SLOT(slotLayerPropertyChanged(LayerItem*, const TQString&, bool))); + connect(list(), TQT_SIGNAL(layerMoved(LayerItem*, LayerItem*, LayerItem*)), + TQT_SLOT(slotLayerMoved(LayerItem*, LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewLayer(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewLayer(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewFolder(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewFolder(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewAdjustmentLayer(LayerItem*, LayerItem*)), + TQT_SLOT(slotRequestNewAdjustmentLayer(LayerItem*, LayerItem*))); + connect(list(), TQT_SIGNAL(requestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&)), + TQT_SLOT(slotRequestNewObjectLayer(LayerItem*, LayerItem*, const KoDocumentEntry&))); + connect(list(), TQT_SIGNAL(requestRemoveLayer(LayerItem*)), + TQT_SLOT(slotRequestRemoveLayer(LayerItem*))); + connect(list(), TQT_SIGNAL(requestLayerProperties(LayerItem*)), + TQT_SLOT(slotRequestLayerProperties(LayerItem*))); m_newLayerMenu = new KPopupMenu(this); m_lst->bnAdd->setPopup(m_newLayerMenu); @@ -125,22 +125,22 @@ KisLayerBox::KisLayerBox(KisCanvasSubject *subject, QWidget *parent, const char m_newLayerMenu->insertItem( SmallIconSet( "tool_filter" ), i18n( "New &Adjustment Layer..." ), ADJUSTMENT_LAYER ); m_partLayerAction = new KoPartSelectAction( i18n( "New &Object Layer" ), "gear", this ); m_partLayerAction->plug( m_newLayerMenu ); - connect(m_partLayerAction, SIGNAL(activated()), this, SLOT(slotAddMenuActivated())); - connect(m_newLayerMenu, SIGNAL(activated(int)), this, SLOT(slotAddMenuActivated(int))); + connect(m_partLayerAction, TQT_SIGNAL(activated()), this, TQT_SLOT(slotAddMenuActivated())); + connect(m_newLayerMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotAddMenuActivated(int))); - connect(m_lst->bnDelete, SIGNAL(clicked()), SLOT(slotRmClicked())); - connect(m_lst->bnRaise, SIGNAL(clicked()), SLOT(slotRaiseClicked())); - connect(m_lst->bnLower, SIGNAL(clicked()), SLOT(slotLowerClicked())); - connect(m_lst->bnProperties, SIGNAL(clicked()), SLOT(slotPropertiesClicked())); - connect(m_lst->intOpacity, SIGNAL(valueChanged(int, bool)), SIGNAL(sigOpacityChanged(int, bool))); - connect(m_lst->intOpacity, SIGNAL(finishedChanging(int, int)), SIGNAL(sigOpacityFinishedChanging(int, int))); - connect(m_lst->cmbComposite, SIGNAL(activated(const KisCompositeOp&)), SIGNAL(sigItemComposite(const KisCompositeOp&))); + connect(m_lst->bnDelete, TQT_SIGNAL(clicked()), TQT_SLOT(slotRmClicked())); + connect(m_lst->bnRaise, TQT_SIGNAL(clicked()), TQT_SLOT(slotRaiseClicked())); + connect(m_lst->bnLower, TQT_SIGNAL(clicked()), TQT_SLOT(slotLowerClicked())); + connect(m_lst->bnProperties, TQT_SIGNAL(clicked()), TQT_SLOT(slotPropertiesClicked())); + connect(m_lst->intOpacity, TQT_SIGNAL(valueChanged(int, bool)), TQT_SIGNAL(sigOpacityChanged(int, bool))); + connect(m_lst->intOpacity, TQT_SIGNAL(finishedChanging(int, int)), TQT_SIGNAL(sigOpacityFinishedChanging(int, int))); + connect(m_lst->cmbComposite, TQT_SIGNAL(activated(const KisCompositeOp&)), TQT_SIGNAL(sigItemComposite(const KisCompositeOp&))); Q_ASSERT(subject->document() != 0); if (subject->document()) { - connect(subject->document(), SIGNAL(sigCommandExecuted()), SLOT(updateThumbnails())); + connect(subject->document(), TQT_SIGNAL(sigCommandExecuted()), TQT_SLOT(updateThumbnails())); } } @@ -165,16 +165,16 @@ void KisLayerBox::setImage(KisImageSP img) if (img) { - connect(img, SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); - connect(img, SIGNAL(sigLayerAdded(KisLayerSP)), this, SLOT(slotLayerAdded(KisLayerSP))); - connect(img, SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); - connect(img, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), - this, SLOT(slotLayerPropertiesChanged(KisLayerSP))); - connect(img, SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), - this, SLOT(slotLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); - connect(img, SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, SLOT(slotLayersChanged(KisGroupLayerSP))); - connect(img, SIGNAL(sigLayerUpdated(KisLayerSP, QRect)), this, SLOT(slotLayerUpdated(KisLayerSP, QRect))); + connect(img, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), this, TQT_SLOT(slotLayerAdded(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), + this, TQT_SLOT(slotLayerPropertiesChanged(KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(slotLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP))); + connect(img, TQT_SIGNAL(sigLayersChanged(KisGroupLayerSP)), this, TQT_SLOT(slotLayersChanged(KisGroupLayerSP))); + connect(img, TQT_SIGNAL(sigLayerUpdated(KisLayerSP, TQRect)), this, TQT_SLOT(slotLayerUpdated(KisLayerSP, TQRect))); slotLayersChanged(img->rootLayer()); updateThumbnails(); } @@ -200,7 +200,7 @@ void KisLayerBox::slotLayerAdded(KisLayerSP layer) vKisLayerSP layersAdded; - if (layer->parent() == m_image->rootLayer()) + if (layer->tqparent() == m_image->rootLayer()) { KisPopulateVisitor visitor(list()); layer->accept(visitor); @@ -208,7 +208,7 @@ void KisLayerBox::slotLayerAdded(KisLayerSP layer) } else { - KisPopulateVisitor visitor(static_cast<KisLayerItem*>(list()->layer(layer->parent()->id()))); + KisPopulateVisitor visitor(static_cast<KisLayerItem*>(list()->layer(layer->tqparent()->id()))); layer->accept(visitor); layersAdded = visitor.layersAdded(); } @@ -229,17 +229,17 @@ void KisLayerBox::slotLayerRemoved(KisLayerSP layer, KisGroupLayerSP wasParent, void KisLayerBox::slotLayerMoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP) { - int parentID = layer->parent()->id(); - if (layer->parent() == m_image->rootLayer()) - parentID = -1; + int tqparentID = layer->tqparent()->id(); + if (layer->tqparent() == m_image->rootLayer()) + tqparentID = -1; int siblingID = -1; if (layer->prevSibling()) siblingID = layer->prevSibling()->id(); - list()->moveLayer(layer->id(), parentID, siblingID); + list()->moveLayer(layer->id(), tqparentID, siblingID); - markModified(layer->parent()); + markModified(layer->tqparent()); markModified(wasParent); updateUI(); } @@ -262,12 +262,12 @@ void KisLayerBox::slotLayersChanged(KisGroupLayerSP rootLayer) for (KisLayerSP layer = rootLayer->firstChild(); layer; layer = layer->nextSibling()) layer->accept(visitor); m_modified.clear(); - for (QListViewItemIterator it(list()->lastItem()); *it; --it) + for (TQListViewItemIterator it(list()->lastItem()); *it; --it) m_modified.append(static_cast<LayerItem*>(*it)->id()); updateUI(); } -void KisLayerBox::slotLayerUpdated(KisLayerSP layer, QRect) +void KisLayerBox::slotLayerUpdated(KisLayerSP layer, TQRect) { markModified(layer); } @@ -281,14 +281,14 @@ void KisLayerBox::slotLayerActivated(LayerItem* item) updateUI(); } -void KisLayerBox::slotLayerDisplayNameChanged(LayerItem* item, const QString& displayName) +void KisLayerBox::slotLayerDisplayNameChanged(LayerItem* item, const TQString& displayName) { if(KisLayerSP layer = m_image->findLayer(item->id())) layer->setName(displayName); updateUI(); } -void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const QString& name, bool on) +void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const TQString& name, bool on) { if (KisLayerSP layer = m_image->findLayer(item->id())) { @@ -302,16 +302,16 @@ void KisLayerBox::slotLayerPropertyChanged(LayerItem* item, const QString& name, void KisLayerBox::slotLayerMoved(LayerItem* item, LayerItem*, LayerItem*) { KisLayerSP layer = m_image->findLayer(item->id()); - KisGroupLayerSP parent; - if( item->parent() ) - parent = dynamic_cast<KisGroupLayer*>(m_image->findLayer(item->parent()->id()).data()); - if( !parent ) - parent = m_image->rootLayer(); + KisGroupLayerSP tqparent; + if( item->tqparent() ) + tqparent = dynamic_cast<KisGroupLayer*>(m_image->findLayer(item->tqparent()->id()).data()); + if( !tqparent ) + tqparent = m_image->rootLayer(); KisLayerSP above = 0; if (item->nextSibling()) above = m_image->findLayer(item->nextSibling()->id()); if (layer) - m_image->moveLayer(layer, parent.data(), above); + m_image->moveLayer(layer, tqparent.data(), above); updateUI(); } @@ -320,7 +320,7 @@ void KisLayerBox::slotRequestNewLayer(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -328,10 +328,10 @@ void KisLayerBox::slotRequestNewLayer(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestLayer(parent, above); + emit sigRequestLayer(tqparent, above); } void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) @@ -339,7 +339,7 @@ void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); //FIXME I hate copy-pasting like this. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -347,10 +347,10 @@ void KisLayerBox::slotRequestNewFolder(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestGroupLayer(parent, above); + emit sigRequestGroupLayer(tqparent, above); } void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) @@ -358,7 +358,7 @@ void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) KisLayer* l = m_image->rootLayer().data(); //FIXME here too. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -366,10 +366,10 @@ void KisLayerBox::slotRequestNewAdjustmentLayer(LayerItem* p, LayerItem* after) else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestAdjustmentLayer(parent, above); + emit sigRequestAdjustmentLayer(tqparent, above); } void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, const KoDocumentEntry& entry) @@ -377,7 +377,7 @@ void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, cons KisLayer* l = m_image->rootLayer().data(); //FIXME and here. if (p) l = m_image->findLayer(p->id()).data(); - KisGroupLayerSP parent = dynamic_cast<KisGroupLayer*>(l); + KisGroupLayerSP tqparent = dynamic_cast<KisGroupLayer*>(l); KisLayerSP above = 0; if (after && after->nextSibling()) @@ -385,10 +385,10 @@ void KisLayerBox::slotRequestNewObjectLayer(LayerItem* p, LayerItem* after, cons else if (after) above = 0; else if (p && p->firstChild()) - above = parent->firstChild(); + above = tqparent->firstChild(); else if (!p && m_image->rootLayer()->childCount()) above = m_image->rootLayer()->firstChild(); - emit sigRequestPartLayer(parent, above, entry); + emit sigRequestPartLayer(tqparent, above, entry); } void KisLayerBox::slotRequestRemoveLayer(LayerItem* item) @@ -410,7 +410,7 @@ void KisLayerBox::slotRequestLayerProperties(LayerItem* item) void KisLayerBox::updateUI() { m_lst->bnDelete->setEnabled(list()->activeLayer()); - m_lst->bnRaise->setEnabled(list()->activeLayer() && (list()->activeLayer()->prevSibling() || list()->activeLayer()->parent())); + m_lst->bnRaise->setEnabled(list()->activeLayer() && (list()->activeLayer()->prevSibling() || list()->activeLayer()->tqparent())); m_lst->bnLower->setEnabled(list()->activeLayer() && list()->activeLayer()->nextSibling()); m_lst->intOpacity->setEnabled(list()->activeLayer()); m_lst->cmbComposite->setEnabled(list()->activeLayer()); @@ -464,42 +464,42 @@ void KisLayerBox::slotAddMenuActivated(int type) return; KisGroupLayerSP root = m_image->rootLayer(); - KisGroupLayerSP parent; + KisGroupLayerSP tqparent; KisLayerSP above; if (KisLayerSP active = m_image->activeLayer()) { - parent = root; + tqparent = root; above = active; - if (active->parent()) - parent = active->parent(); + if (active->tqparent()) + tqparent = active->tqparent(); } else { - parent = root; + tqparent = root; above = m_image->rootLayer()->firstChild(); } switch (type) { case PAINT_LAYER: - emit sigRequestLayer(parent, above); + emit sigRequestLayer(tqparent, above); break; case GROUP_LAYER: - emit sigRequestGroupLayer(parent, above); + emit sigRequestGroupLayer(tqparent, above); break; case ADJUSTMENT_LAYER: - emit sigRequestAdjustmentLayer(parent, above); + emit sigRequestAdjustmentLayer(tqparent, above); break; case OBJECT_LAYER: - default: //goddamned Qt doesn't emit activated for default-assigned IDs, so this does nothing - emit sigRequestPartLayer(parent, above, m_partLayerAction->documentEntry()); + default: //goddamned TQt doesn't emit activated for default-assigned IDs, so this does nothing + emit sigRequestPartLayer(tqparent, above, m_partLayerAction->documentEntry()); } } void KisLayerBox::slotRmClicked() { - QValueList<int> l = list()->selectedLayerIDs(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer()->id())) + TQValueList<int> l = list()->selectedLayerIDs(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer()->id())) { l.clear(); l.append(list()->activeLayer()->id()); @@ -514,25 +514,25 @@ void KisLayerBox::slotRmClicked() void KisLayerBox::slotRaiseClicked() { - QValueList<int> l = list()->selectedLayerIDs(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer()->id())) + TQValueList<int> l = list()->selectedLayerIDs(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer()->id())) { l.clear(); l.append(list()->activeLayer()->id()); } KisLayerSP layer = m_image->findLayer(l.first()); - if( l.count() == 1 && layer == layer->parent()->firstChild() && layer->parent() != m_image->rootLayer()) + if( l.count() == 1 && layer == layer->tqparent()->firstChild() && layer->tqparent() != m_image->rootLayer()) { - if (KisGroupLayerSP grandparent = layer->parent()->parent()) - m_image->moveLayer(layer, grandparent, layer->parent().data()); + if (KisGroupLayerSP grandtqparent = layer->tqparent()->tqparent()) + m_image->moveLayer(layer, grandtqparent, layer->tqparent().data()); } else { for (int i = 0, n = l.count(); i < n; ++i) if (KisLayerSP li = m_image->findLayer(l[i])) if (li->prevSibling()) - m_image->moveLayer(li, li->parent(), li->prevSibling()); + m_image->moveLayer(li, li->tqparent(), li->prevSibling()); } if( !l.isEmpty() ) @@ -541,8 +541,8 @@ void KisLayerBox::slotRaiseClicked() void KisLayerBox::slotLowerClicked() { - QValueList<LayerItem*> l = list()->selectedLayers(); - if (l.count() < 2 && list()->activeLayer() && !l.contains(list()->activeLayer())) + TQValueList<LayerItem*> l = list()->selectedLayers(); + if (l.count() < 2 && list()->activeLayer() && !l.tqcontains(list()->activeLayer())) { l.clear(); l.append(list()->activeLayer()); @@ -551,7 +551,7 @@ void KisLayerBox::slotLowerClicked() for (int i = l.count() - 1; i >= 0; --i) if (LayerItem *layer = l[i]) if (layer->nextSibling()) - list()->moveLayer(layer, layer->parent(), layer->nextSibling()); + list()->moveLayer(layer, layer->tqparent(), layer->nextSibling()); if( !l.isEmpty() ) list()->ensureItemVisible( l.last() ); @@ -588,13 +588,13 @@ void KisLayerBox::setUpdatesAndSignalsEnabled(bool enable) } -QPixmap KisLayerBox::loadPixmap(const QString& filename, const KIconLoader& +TQPixmap KisLayerBox::loadPixmap(const TQString& filename, const KIconLoader& il, int size) { - QPixmap pixmap = il.loadIcon(filename, KIcon::NoGroup, size); + TQPixmap pixmap = il.loadIcon(filename, KIcon::NoGroup, size); if (pixmap.isNull()) - KMessageBox::error(0, i18n("Cannot find %1").arg(filename), + KMessageBox::error(0, i18n("Cannot tqfind %1").tqarg(filename), i18n("Canvas")); return pixmap; @@ -605,14 +605,14 @@ void KisLayerBox::markModified(KisLayer* layer) if( !layer ) return; - QValueList<int> v; + TQValueList<int> v; while (layer && layer != m_image->rootLayer().data()) { v.append(layer->id()); - layer = layer->parent(); + layer = layer->tqparent(); } for (int i = v.count() - 1; i >= 0; --i) - if (!m_modified.contains(v[i])) + if (!m_modified.tqcontains(v[i])) m_modified.append(v[i]); } @@ -624,19 +624,19 @@ void KisLayerBox::printKritaLayers() const root = m_image->rootLayer(); if( !root ) return; - QString s = root->name(); + TQString s = root->name(); if( dynamic_cast<KisGroupLayer*>( root ) ) - s = QString("[%1]").arg( s ); + s = TQString("[%1]").tqarg( s ); if( m_image->activeLayer().data() == root ) s.prepend("*"); - kdDebug() << (QString().fill(' ', indent) + s) << endl; + kdDebug() << (TQString().fill(' ', indent) + s) << endl; for (KisLayer* layer = root->firstChild(); layer; layer = layer->nextSibling()) { indent += 2; root = layer; printKritaLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } } @@ -652,23 +652,23 @@ void KisLayerBox::printLayerboxLayers() const root = layer; printLayerboxLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } return; } - QString s = root->displayName(); + TQString s = root->displayName(); if( root->isFolder() ) - s = QString("[%1]").arg( s ); + s = TQString("[%1]").tqarg( s ); if( list()->activeLayer() == root ) s.prepend("*"); - kdDebug() << (QString().fill(' ', indent) + s) << endl; + kdDebug() << (TQString().fill(' ', indent) + s) << endl; for (LayerItem* layer = root->firstChild(); layer; layer = layer->nextSibling()) { indent += 2; root = layer; printLayerboxLayers(); indent -= 2; - root = layer->parent(); + root = layer->tqparent(); } } diff --git a/krita/ui/kis_layerbox.h b/krita/ui/kis_layerbox.h index dab83d63..e5440e42 100644 --- a/krita/ui/kis_layerbox.h +++ b/krita/ui/kis_layerbox.h @@ -22,17 +22,17 @@ #ifndef KIS_LAYERBOX_H #define KIS_LAYERBOX_H -#include <qframe.h> +#include <tqframe.h> #include <kdebug.h> -#include <qtimer.h> +#include <tqtimer.h> #include "kis_types.h" #include "kis_colorspace.h" class WdgLayerBox; -class QButton; -class QPainter; -class QWidget; +class TQButton; +class TQPainter; +class TQWidget; class KIconLoader; class KPopupMenu; class KoDocumentEntry; @@ -41,12 +41,13 @@ class KisLayerList; class LayerItem; class KisCanvasSubject; -class KisLayerBox : public QFrame { - typedef QFrame super; +class KisLayerBox : public TQFrame { + typedef TQFrame super; Q_OBJECT + TQ_OBJECT public: - KisLayerBox(KisCanvasSubject *subject, QWidget *parent = 0, const char *name = 0); + KisLayerBox(KisCanvasSubject *subject, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisLayerBox(); void clear(); @@ -61,17 +62,17 @@ public slots: void slotLayerMoved(KisLayerSP layer, KisGroupLayerSP wasParent, KisLayerSP wasAboveThis); void slotLayerPropertiesChanged(KisLayerSP layer); void slotLayersChanged(KisGroupLayerSP rootLayer); - void slotLayerUpdated(KisLayerSP layer, QRect rc); + void slotLayerUpdated(KisLayerSP layer, TQRect rc); void slotSetCompositeOp(const KisCompositeOp& compositeOp); void slotSetOpacity(int opacity); void slotSetColorSpace(const KisColorSpace * colorSpace); signals: - void sigRequestLayer(KisGroupLayerSP parent, KisLayerSP above); - void sigRequestGroupLayer(KisGroupLayerSP parent, KisLayerSP above); - void sigRequestAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above); - void sigRequestPartLayer(KisGroupLayerSP parent, KisLayerSP above, const KoDocumentEntry& entry); + void sigRequestLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void sigRequestGroupLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void sigRequestAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void sigRequestPartLayer(KisGroupLayerSP tqparent, KisLayerSP above, const KoDocumentEntry& entry); void sigRequestLayerProperties(KisLayerSP layer); void sigOpacityChanged(int opacity, bool withSlider); @@ -84,13 +85,13 @@ private: private slots: // connect to LayerList signals void slotLayerActivated(LayerItem* layer); - void slotLayerDisplayNameChanged(LayerItem* layer, const QString& displayName); - void slotLayerPropertyChanged(LayerItem* layer, const QString& name, bool on); - void slotLayerMoved(LayerItem* layer, LayerItem* parent, LayerItem* after); - void slotRequestNewLayer(LayerItem* parent, LayerItem* after); - void slotRequestNewFolder(LayerItem* parent, LayerItem* after); - void slotRequestNewAdjustmentLayer(LayerItem* parent, LayerItem* after); - void slotRequestNewObjectLayer(LayerItem* parent, LayerItem* item, const KoDocumentEntry& entry); + void slotLayerDisplayNameChanged(LayerItem* layer, const TQString& displayName); + void slotLayerPropertyChanged(LayerItem* layer, const TQString& name, bool on); + void slotLayerMoved(LayerItem* layer, LayerItem* tqparent, LayerItem* after); + void slotRequestNewLayer(LayerItem* tqparent, LayerItem* after); + void slotRequestNewFolder(LayerItem* tqparent, LayerItem* after); + void slotRequestNewAdjustmentLayer(LayerItem* tqparent, LayerItem* after); + void slotRequestNewObjectLayer(LayerItem* tqparent, LayerItem* item, const KoDocumentEntry& entry); void slotRequestRemoveLayer(LayerItem* layer); void slotRequestLayerProperties(LayerItem* layer); @@ -105,14 +106,14 @@ private slots: private: void updateUI(); - QPixmap loadPixmap(const QString& filename, const KIconLoader& il, int size); + TQPixmap loadPixmap(const TQString& filename, const KIconLoader& il, int size); KisLayerList* list() const; void markModified(KisLayer *layer); KPopupMenu *m_newLayerMenu; KoPartSelectAction *m_partLayerAction; KisImageSP m_image; - QValueList<int> m_modified; + TQValueList<int> m_modified; WdgLayerBox *m_lst; void printKritaLayers() const; diff --git a/krita/ui/kis_layerlist.cc b/krita/ui/kis_layerlist.cc index 356d7e39..5c57c5ab 100644 --- a/krita/ui/kis_layerlist.cc +++ b/krita/ui/kis_layerlist.cc @@ -23,7 +23,7 @@ #include <klocale.h> #include <kpopupmenu.h> #include <KoPartSelectAction.h> -#include <qimage.h> +#include <tqimage.h> #include "kis_layer.h" #include "kis_paint_layer.h" @@ -35,8 +35,8 @@ #include "kis_layerlist.h" -KisLayerList::KisLayerList( QWidget *parent, const char *name ) - : super( parent, name ) +KisLayerList::KisLayerList( TQWidget *tqparent, const char *name ) + : super( tqparent, name ) { m_partLayerAction = new KoPartSelectAction( i18n( "New &Object Layer" ), "gear", this ); } @@ -75,31 +75,31 @@ void KisLayerList::constructMenu( LayerItem *layer ) void KisLayerList::menuActivated( int id, LayerItem *layer ) { - const QValueList<LayerItem*> selected = selectedLayers(); - LayerItem *parent = ( layer && layer->isFolder() ) ? layer : 0; + const TQValueList<LayerItem*> selected = selectedLayers(); + LayerItem *tqparent = ( layer && layer->isFolder() ) ? layer : 0; LayerItem *after = 0; - if( layer && !parent ) + if( layer && !tqparent ) { - parent = layer->parent(); + tqparent = layer->tqparent(); after = layer->prevSibling(); } switch( id ) { case MenuItems::NewLayer: - emit requestNewLayer( parent, after ); - emit requestNewLayer( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewLayer( tqparent, after ); + emit requestNewLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::NewFolder: - emit requestNewFolder( parent, after ); - emit requestNewFolder( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewFolder( tqparent, after ); + emit requestNewFolder( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case ADJUSTMENT_LAYER: - emit requestNewAdjustmentLayer( parent, after ); - emit requestNewAdjustmentLayer( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewAdjustmentLayer( tqparent, after ); + emit requestNewAdjustmentLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::RemoveLayer: { - QValueList<int> ids; + TQValueList<int> ids; for( int i = 0, n = selected.count(); i < n; ++i ) { ids.append( selected[i]->id() ); @@ -123,26 +123,26 @@ void KisLayerList::menuActivated( int id, LayerItem *layer ) super::menuActivated( id, layer ); else if( id != -1 ) //object layer was selected { - emit requestNewObjectLayer( parent, after, m_partLayerAction->documentEntry() ); - emit requestNewObjectLayer( parent ? parent->id() : -1, after ? after->id() : -1, m_partLayerAction->documentEntry() ); + emit requestNewObjectLayer( tqparent, after, m_partLayerAction->documentEntry() ); + emit requestNewObjectLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1, m_partLayerAction->documentEntry() ); } } } -KisLayerItem::KisLayerItem( LayerList* parent, KisLayer* layer ) +KisLayerItem::KisLayerItem( LayerList* tqparent, KisLayer* layer ) : super( layer->name(), - parent, - layer->prevSibling() ? parent->layer( layer->prevSibling()->id() ) : 0, + tqparent, + layer->prevSibling() ? tqparent->layer( layer->prevSibling()->id() ) : 0, layer->id() ) , m_layer( layer ) { init(); } -KisLayerItem::KisLayerItem( LayerItem* parent, KisLayer* layer ) +KisLayerItem::KisLayerItem( LayerItem* tqparent, KisLayer* layer ) : super( layer->name(), - parent, - layer->prevSibling() ? parent->listView()->layer( layer->prevSibling()->id() ) : 0, + tqparent, + layer->prevSibling() ? tqparent->listView()->layer( layer->prevSibling()->id() ) : 0, layer->id() ) , m_layer( layer ) { @@ -176,45 +176,45 @@ bool KisLayerItem::updatePreview() return !m_preview.isNull(); } -QString KisLayerItem::tooltip() const +TQString KisLayerItem::tooltip() const { - QString text = super::tooltip(); + TQString text = super::tooltip(); text = text.left( text.length() - 8 ); //HACK -- strip the </table> - QString row = "<tr><td>%1</td><td>%2</td></tr>"; - text += row.arg( i18n( "Opacity:" ) ).arg( "%1%" ).arg( int( float( m_layer->opacity() * 100 ) / 255 + 0.5 ) ); - text += row.arg( i18n( "Composite mode:" ) ).arg( m_layer->compositeOp().id().name() ); + TQString row = "<tr><td>%1</td><td>%2</td></tr>"; + text += row.tqarg( i18n( "Opacity:" ) ).tqarg( "%1%" ).tqarg( int( float( m_layer->opacity() * 100 ) / 255 + 0.5 ) ); + text += row.tqarg( i18n( "Composite mode:" ) ).tqarg( m_layer->compositeOp().id().name() ); if( KisPaintLayer *player = dynamic_cast<KisPaintLayer*>( m_layer ) ) { - text += row.arg( i18n( "Colorspace:" ) ).arg( player->paintDevice()->colorSpace()->id().name() ); + text += row.tqarg( i18n( "Colorspace:" ) ).tqarg( player->paintDevice()->colorSpace()->id().name() ); if( KisProfile *profile = player->paintDevice()->colorSpace()->getProfile() ) - text += row.arg( i18n( "Profile:" ) ).arg( profile->productName() ); + text += row.tqarg( i18n( "Profile:" ) ).tqarg( profile->productName() ); } if( KisAdjustmentLayer *alayer = dynamic_cast<KisAdjustmentLayer*>( m_layer ) ) - text += row.arg( i18n( "Filter: " ) ).arg( KisFilterRegistry::instance()->get( alayer->filter()->name() )->id().name() ); + text += row.tqarg( i18n( "Filter: " ) ).tqarg( KisFilterRegistry::instance()->get( alayer->filter()->name() )->id().name() ); if( KisPartLayerImpl *player = dynamic_cast<KisPartLayerImpl*>( m_layer ) ) { - QString type = player->docType(); + TQString type = player->docType(); if( type.isEmpty() ) { type = player->childDoc()->document()->instance()->aboutData()->programName(); } - text += row.arg( i18n( "Document type: " ) ).arg( type ); + text += row.tqarg( i18n( "Document type: " ) ).tqarg( type ); } text += "</table>"; return text; } -QImage KisLayerItem::tooltipPreview() const +TQImage KisLayerItem::tooltipPreview() const { - QImage img = m_layer->createThumbnail( 400, 400 ); + TQImage img = m_layer->createThumbnail( 400, 400 ); if( img.isNull() ) - return img; //so Qt doesn't complain + return img; //so TQt doesn't complain img.setAlphaBuffer( true ); const int size = kMin( 200, kMax( img.width(), img.height() ) ); - return img.smoothScale( size, size, QImage::ScaleMin ); + return img.smoothScale( size, size, TQ_ScaleMin ); } -//void KisLayerItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); +//void KisLayerItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); #include "kis_layerlist.moc" diff --git a/krita/ui/kis_layerlist.h b/krita/ui/kis_layerlist.h index e3bacdfd..f0c587dd 100644 --- a/krita/ui/kis_layerlist.h +++ b/krita/ui/kis_layerlist.h @@ -20,7 +20,7 @@ #ifndef KIS_LAYERLIST_H #define KIS_LAYERLIST_H -#include <qimage.h> +#include <tqimage.h> #include "layerlist.h" class KoPartSelectAction; @@ -30,16 +30,17 @@ class KisLayer; class KisLayerList: public LayerList { Q_OBJECT + TQ_OBJECT typedef LayerList super; signals: - void requestNewObjectLayer( LayerItem *parent, LayerItem *after, const KoDocumentEntry &entry ); - void requestNewObjectLayer( int parentID, int afterID, const KoDocumentEntry &entry ); - void requestNewAdjustmentLayer( LayerItem *parent, LayerItem *after ); - void requestNewAdjustmentLayer( int parentID, int afterID ); + void requestNewObjectLayer( LayerItem *tqparent, LayerItem *after, const KoDocumentEntry &entry ); + void requestNewObjectLayer( int tqparentID, int afterID, const KoDocumentEntry &entry ); + void requestNewAdjustmentLayer( LayerItem *tqparent, LayerItem *after ); + void requestNewAdjustmentLayer( int tqparentID, int afterID ); public: - KisLayerList( QWidget *parent = 0, const char *name = 0 ); + KisLayerList( TQWidget *tqparent = 0, const char *name = 0 ); virtual void constructMenu( LayerItem *layer ); virtual void menuActivated( int id, LayerItem *layer ); @@ -55,8 +56,8 @@ class KisLayerItem: public LayerItem typedef LayerItem super; public: - KisLayerItem( LayerList* parent, KisLayer* layer ); - KisLayerItem( LayerItem* parent, KisLayer* layer ); + KisLayerItem( LayerList* tqparent, KisLayer* layer ); + KisLayerItem( LayerItem* tqparent, KisLayer* layer ); KisLayer* layer() const; @@ -65,14 +66,14 @@ public: /// returns whether any preview was retrieved bool updatePreview(); - virtual QString tooltip() const; - virtual QImage tooltipPreview() const; + virtual TQString tooltip() const; + virtual TQImage tooltipPreview() const; - //virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + //virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); private: void init(); - QImage m_preview; + TQImage m_preview; KisLayer *m_layer; }; diff --git a/krita/ui/kis_load_visitor.h b/krita/ui/kis_load_visitor.h index ff1c1cf8..f8116be1 100644 --- a/krita/ui/kis_load_visitor.h +++ b/krita/ui/kis_load_visitor.h @@ -19,7 +19,7 @@ #ifndef KIS_LOAD_VISITOR_H_ #define KIS_LOAD_VISITOR_H_ -#include <qrect.h> +#include <tqrect.h> #include "kis_types.h" #include "kis_layer_visitor.h" #include "kis_image.h" @@ -34,7 +34,7 @@ class KisLoadVisitor : public KisLayerVisitor { public: - KisLoadVisitor(KisImageSP img, KoStore *store, QMap<KisLayerSP, QString> &layerFilenames) : + KisLoadVisitor(KisImageSP img, KoStore *store, TQMap<KisLayerSP, TQString> &layerFilenames) : KisLayerVisitor(), m_layerFilenames(layerFilenames) { @@ -44,16 +44,16 @@ public: } public: - void setExternalUri(QString &uri) + void setExternalUri(TQString &uri) { m_external = true; m_uri = uri; } virtual bool visit(KisPaintLayer *layer) - { //connect(*layer->paintDevice(), SIGNAL(ioProgress(Q_INT8)), m_img, SLOT(slotIOProgress(Q_INT8))); + { //connect(*layer->paintDevice(), TQT_SIGNAL(ioProgress(TQ_INT8)), m_img, TQT_SLOT(slotIOProgress(TQ_INT8))); - QString location = m_external ? QString::null : m_uri; + TQString location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer]; // Layer data @@ -69,11 +69,11 @@ public: } // icc profile - location = m_external ? QString::null : m_uri; + location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".icc"; if (m_store->hasFile(location)) { - QByteArray data; + TQByteArray data; m_store->open(location); data = m_store->read(m_store->size()); m_store->close(); @@ -82,22 +82,22 @@ public: new KisProfile(data)); // replace the old colorspace layer->paintDevice()->setData(layer->paintDevice()->dataManager(), cs); - QRect rc = layer->paintDevice()->extent(); + TQRect rc = layer->paintDevice()->extent(); kdDebug() << "After loading " << layer->name() << " extent is: " << rc.x() << ", " << rc.y() << ", " << rc.width() << ", " << rc.height() << endl; layer->setDirty(rc); kdDebug(DBG_AREA_FILE) << "Opened icc information, size is " << data.size() << endl; } - // mask + // tqmask if (layer->hasMask()) { // We set this in KisDoc::loadPaintLayer - KisPaintDeviceSP mask = layer->getMask(); - location = m_external ? QString::null : m_uri; - location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".mask"; + KisPaintDeviceSP tqmask = layer->getMask(); + location = m_external ? TQString() : m_uri; + location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".tqmask"; // Layer data if (m_store->open(location)) { - if (!mask->read(m_store)) { - mask->disconnect(); + if (!tqmask->read(m_store)) { + tqmask->disconnect(); m_store->close(); //IODone(); return false; @@ -138,10 +138,10 @@ public: virtual bool visit(KisAdjustmentLayer* layer) { - //connect(*layer->paintDevice(), SIGNAL(ioProgress(Q_INT8)), m_img, SLOT(slotIOProgress(Q_INT8))); + //connect(*layer->paintDevice(), TQT_SIGNAL(ioProgress(TQ_INT8)), m_img, TQT_SLOT(slotIOProgress(TQ_INT8))); // The selection -- if present. If not, we simply cannot open the dratted thing. - QString location = m_external ? QString::null : m_uri; + TQString location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".selection"; if (m_store->hasFile(location)) { m_store->open(location); @@ -157,17 +157,17 @@ public: } // filter configuration - location = m_external ? QString::null : m_uri; + location = m_external ? TQString() : m_uri; location += m_img->name() + "/layers/" + m_layerFilenames[layer] + ".filterconfig"; if (m_store->hasFile(location) && layer->filter()) { - QByteArray data; + TQByteArray data; m_store->open(location); data = m_store->read(m_store->size()); m_store->close(); if (data) { KisFilterConfiguration * kfc = layer->filter(); - kfc->fromXML(QString(data)); + kfc->fromXML(TQString(data)); } } @@ -179,8 +179,8 @@ private: KisImageSP m_img; KoStore *m_store; bool m_external; - QString m_uri; - QMap<KisLayerSP, QString> m_layerFilenames; + TQString m_uri; + TQMap<KisLayerSP, TQString> m_layerFilenames; }; #endif // KIS_LOAD_VISITOR_H_ diff --git a/krita/ui/kis_matrix_widget.ui b/krita/ui/kis_matrix_widget.ui index dda7d63c..b989df12 100644 --- a/krita/ui/kis_matrix_widget.ui +++ b/krita/ui/kis_matrix_widget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisMatrixWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisMatrixWidget</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="0" column="0"> + <widget class="TQSpinBox" row="0" column="0"> <property name="name"> <cstring>m11</cstring> </property> @@ -27,7 +27,7 @@ <number>-99</number> </property> </widget> - <widget class="QSpinBox" row="0" column="2"> + <widget class="TQSpinBox" row="0" column="2"> <property name="name"> <cstring>m13</cstring> </property> @@ -35,7 +35,7 @@ <number>-99</number> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>m12</cstring> </property> @@ -43,7 +43,7 @@ <number>-99</number> </property> </widget> - <widget class="QSpinBox" row="1" column="2"> + <widget class="TQSpinBox" row="1" column="2"> <property name="name"> <cstring>m23</cstring> </property> @@ -51,7 +51,7 @@ <number>-99</number> </property> </widget> - <widget class="QSpinBox" row="1" column="0"> + <widget class="TQSpinBox" row="1" column="0"> <property name="name"> <cstring>m21</cstring> </property> @@ -59,7 +59,7 @@ <number>-99</number> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>m22</cstring> </property> @@ -70,7 +70,7 @@ <number>1</number> </property> </widget> - <widget class="QSpinBox" row="2" column="0"> + <widget class="TQSpinBox" row="2" column="0"> <property name="name"> <cstring>m31</cstring> </property> @@ -78,7 +78,7 @@ <number>-99</number> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>m32</cstring> </property> @@ -86,7 +86,7 @@ <number>-99</number> </property> </widget> - <widget class="QSpinBox" row="2" column="2"> + <widget class="TQSpinBox" row="2" column="2"> <property name="name"> <cstring>m33</cstring> </property> @@ -104,7 +104,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -121,7 +121,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -200,11 +200,11 @@ <includes> <include location="local" impldecl="in implementation">kis_matrix_widget.ui.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>valueChanged()</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private">spinboxValueChanged()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/kis_matrix_widget.ui.h b/krita/ui/kis_matrix_widget.ui.h index a0b06224..f5217af5 100644 --- a/krita/ui/kis_matrix_widget.ui.h +++ b/krita/ui/kis_matrix_widget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/krita/ui/kis_move_event.h b/krita/ui/kis_move_event.h index 5a7b0ca9..8c99cd10 100644 --- a/krita/ui/kis_move_event.h +++ b/krita/ui/kis_move_event.h @@ -24,7 +24,7 @@ class KisMoveEvent : public KisEvent { typedef KisEvent super; public: KisMoveEvent() {} - KisMoveEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, Qt::ButtonState state) : super(MoveEvent, device, pos, globalPos, pressure, xTilt, yTilt, state) {} + KisMoveEvent(KisInputDevice device, const KisPoint& pos, const KisPoint& globalPos, double pressure, double xTilt, double yTilt, TQt::ButtonState state) : super(MoveEvent, device, pos, globalPos, pressure, xTilt, yTilt, state) {} }; #endif // KIS_MOVE_EVENT_H_ diff --git a/krita/ui/kis_multi_bool_filter_widget.cc b/krita/ui/kis_multi_bool_filter_widget.cc index d5904287..2507f1fb 100644 --- a/krita/ui/kis_multi_bool_filter_widget.cc +++ b/krita/ui/kis_multi_bool_filter_widget.cc @@ -18,13 +18,13 @@ #include "kis_multi_bool_filter_widget.h" -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> #include <klocale.h> -KisBoolWidgetParam::KisBoolWidgetParam( bool ninitvalue, QString nlabel, QString nname) : +KisBoolWidgetParam::KisBoolWidgetParam( bool ninitvalue, TQString nlabel, TQString nname) : initvalue(ninitvalue), label(nlabel), name(nname) @@ -32,26 +32,26 @@ KisBoolWidgetParam::KisBoolWidgetParam( bool ninitvalue, QString nlabel, QStrin } -KisMultiBoolFilterWidget::KisMultiBoolFilterWidget(QWidget * parent, const char * name, const char * caption, vKisBoolWidgetParam iwparam) : - KisFilterConfigWidget( parent, name ) +KisMultiBoolFilterWidget::KisMultiBoolFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisBoolWidgetParam iwparam) : + KisFilterConfigWidget( tqparent, name ) { - Q_INT32 m_nbboolWidgets = iwparam.size(); + TQ_INT32 m_nbboolWidgets = iwparam.size(); this->setCaption(caption); - QVBoxLayout *widgetLayout = new QVBoxLayout(this, m_nbboolWidgets + 1); + TQVBoxLayout *widgetLayout = new TQVBoxLayout(this, m_nbboolWidgets + 1); - m_boolWidgets = new QCheckBox*[ m_nbboolWidgets ]; + m_boolWidgets = new TQCheckBox*[ m_nbboolWidgets ]; - for( Q_INT32 i = 0; i < m_nbboolWidgets; ++i) + for( TQ_INT32 i = 0; i < m_nbboolWidgets; ++i) { - m_boolWidgets[i] = new QCheckBox( this, iwparam[i].name.ascii()); + m_boolWidgets[i] = new TQCheckBox( this, iwparam[i].name.ascii()); m_boolWidgets[i]->setChecked( iwparam[i].initvalue ); m_boolWidgets[i]->setText( iwparam[i].label ); - connect(m_boolWidgets[i], SIGNAL(toggled( bool ) ), SIGNAL(sigPleaseUpdatePreview())); + connect(m_boolWidgets[i], TQT_SIGNAL(toggled( bool ) ), TQT_SIGNAL(sigPleaseUpdatePreview())); widgetLayout->add( m_boolWidgets[i]); } -// QSpacerItem * sp = new QSpacerItem(1, 1); +// TQSpacerItem * sp = new TQSpacerItem(1, 1); widgetLayout->addStretch(); } diff --git a/krita/ui/kis_multi_bool_filter_widget.h b/krita/ui/kis_multi_bool_filter_widget.h index b9b4b2d7..0e719bee 100644 --- a/krita/ui/kis_multi_bool_filter_widget.h +++ b/krita/ui/kis_multi_bool_filter_widget.h @@ -21,7 +21,7 @@ #include <vector> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include "koffice_export.h" #include <kis_filter_config_widget.h> @@ -29,10 +29,10 @@ class KIntNumInput; struct KisBoolWidgetParam { - KRITA_EXPORT KisBoolWidgetParam( bool ninitvalue, QString label, QString name); + KRITA_EXPORT KisBoolWidgetParam( bool ninitvalue, TQString label, TQString name); bool initvalue; - QString label; - QString name; + TQString label; + TQString name; }; @@ -41,15 +41,16 @@ typedef std::vector<KisBoolWidgetParam> vKisBoolWidgetParam; class KRITA_EXPORT KisMultiBoolFilterWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisMultiBoolFilterWidget(QWidget * parent, const char * name, const char *caption, vKisBoolWidgetParam iwparam); + KisMultiBoolFilterWidget(TQWidget * tqparent, const char * name, const char *caption, vKisBoolWidgetParam iwparam); virtual void setConfiguration(KisFilterConfiguration * cfg); public: - inline Q_INT32 nbValues() { return m_nbboolWidgets; }; - inline Q_INT32 valueAt( Q_INT32 i ) { return m_boolWidgets[i]->isChecked(); }; + inline TQ_INT32 nbValues() { return m_nbboolWidgets; }; + inline TQ_INT32 valueAt( TQ_INT32 i ) { return m_boolWidgets[i]->isChecked(); }; private: - QCheckBox** m_boolWidgets; - Q_INT32 m_nbboolWidgets; + TQCheckBox** m_boolWidgets; + TQ_INT32 m_nbboolWidgets; }; #endif diff --git a/krita/ui/kis_multi_double_filter_widget.cc b/krita/ui/kis_multi_double_filter_widget.cc index 024b0368..9b5d453b 100644 --- a/krita/ui/kis_multi_double_filter_widget.cc +++ b/krita/ui/kis_multi_double_filter_widget.cc @@ -18,20 +18,20 @@ #include "kis_multi_double_filter_widget.h" -#include <qlabel.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtimer.h> #include <knuminput.h> #include <kis_filter_config_widget.h> #include <klocale.h> -KisDelayedActionDoubleInput::KisDelayedActionDoubleInput(QWidget * parent, const char * name) - : KDoubleNumInput(parent, name) +KisDelayedActionDoubleInput::KisDelayedActionDoubleInput(TQWidget * tqparent, const char * name) + : KDoubleNumInput(tqparent, name) { - m_timer = new QTimer(this, name); - connect(m_timer, SIGNAL(timeout()), SLOT(slotValueChanged())); - connect(this, SIGNAL(valueChanged( double )), SLOT(slotTimeToUpdate())); + m_timer = new TQTimer(this, name); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(slotTimeToUpdate())); } void KisDelayedActionDoubleInput::slotTimeToUpdate() @@ -49,7 +49,7 @@ void KisDelayedActionDoubleInput::cancelDelayedSignal() m_timer->stop(); } -KisDoubleWidgetParam::KisDoubleWidgetParam(double nmin, double nmax, double ninitvalue, QString nlabel, QString nname) : +KisDoubleWidgetParam::KisDoubleWidgetParam(double nmin, double nmax, double ninitvalue, TQString nlabel, TQString nname) : min(nmin), max(nmax), initvalue(ninitvalue), @@ -59,33 +59,33 @@ KisDoubleWidgetParam::KisDoubleWidgetParam(double nmin, double nmax, double nini } -KisMultiDoubleFilterWidget::KisMultiDoubleFilterWidget(QWidget * parent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam) - : KisFilterConfigWidget( parent, name ) +KisMultiDoubleFilterWidget::KisMultiDoubleFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam) + : KisFilterConfigWidget( tqparent, name ) { - Q_INT32 m_nbdoubleWidgets = dwparam.size(); + TQ_INT32 m_nbdoubleWidgets = dwparam.size(); this->setCaption(caption); - QGridLayout *widgetLayout = new QGridLayout(this, m_nbdoubleWidgets + 1, 3); + TQGridLayout *widgetLayout = new TQGridLayout(this, m_nbdoubleWidgets + 1, 3); widgetLayout->setColStretch ( 1, 1 ); m_doubleWidgets = new KisDelayedActionDoubleInput*[ m_nbdoubleWidgets ]; - for( Q_INT32 i = 0; i < m_nbdoubleWidgets; ++i) + for( TQ_INT32 i = 0; i < m_nbdoubleWidgets; ++i) { m_doubleWidgets[i] = new KisDelayedActionDoubleInput(this, dwparam[i].name.ascii()); m_doubleWidgets[i]->setRange( dwparam[i].min, dwparam[i].max ); m_doubleWidgets[i]->setValue( dwparam[i].initvalue ); m_doubleWidgets[i]->cancelDelayedSignal(); - connect(m_doubleWidgets[i], SIGNAL(valueChangedDelayed(double)), SIGNAL(sigPleaseUpdatePreview())); + connect(m_doubleWidgets[i], TQT_SIGNAL(valueChangedDelayed(double)), TQT_SIGNAL(sigPleaseUpdatePreview())); - QLabel* lbl = new QLabel(dwparam[i].label+":", this); + TQLabel* lbl = new TQLabel(dwparam[i].label+":", this); widgetLayout->addWidget( lbl, i , 0); widgetLayout->addWidget( m_doubleWidgets[i], i , 1); } - QSpacerItem * sp = new QSpacerItem(1, 1); + TQSpacerItem * sp = new TQSpacerItem(1, 1); widgetLayout->addItem(sp, m_nbdoubleWidgets, 0); } diff --git a/krita/ui/kis_multi_double_filter_widget.h b/krita/ui/kis_multi_double_filter_widget.h index bd1cf235..5351745e 100644 --- a/krita/ui/kis_multi_double_filter_widget.h +++ b/krita/ui/kis_multi_double_filter_widget.h @@ -28,10 +28,11 @@ class KisDelayedActionDoubleInput : public KDoubleNumInput { Q_OBJECT + TQ_OBJECT public: - KisDelayedActionDoubleInput(QWidget * parent, const char * name); + KisDelayedActionDoubleInput(TQWidget * tqparent, const char * name); void cancelDelayedSignal(); @@ -45,17 +46,17 @@ class KisDelayedActionDoubleInput : public KDoubleNumInput private: - QTimer * m_timer; + TQTimer * m_timer; }; struct KRITA_EXPORT KisDoubleWidgetParam { - KisDoubleWidgetParam( double nmin, double nmax, double ninitvalue, QString label, QString nname); + KisDoubleWidgetParam( double nmin, double nmax, double ninitvalue, TQString label, TQString nname); double min; double max; double initvalue; - QString label; - QString name; + TQString label; + TQString name; }; typedef std::vector<KisDoubleWidgetParam> vKisDoubleWidgetParam; @@ -63,15 +64,16 @@ typedef std::vector<KisDoubleWidgetParam> vKisDoubleWidgetParam; class KRITA_EXPORT KisMultiDoubleFilterWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisMultiDoubleFilterWidget(QWidget * parent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam); + KisMultiDoubleFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisDoubleWidgetParam dwparam); virtual void setConfiguration(KisFilterConfiguration * cfg); public: - inline Q_INT32 nbValues() { return m_nbdoubleWidgets; }; - inline double valueAt( Q_INT32 i ) { return m_doubleWidgets[i]->value(); }; + inline TQ_INT32 nbValues() { return m_nbdoubleWidgets; }; + inline double valueAt( TQ_INT32 i ) { return m_doubleWidgets[i]->value(); }; private: KisDelayedActionDoubleInput** m_doubleWidgets; - Q_INT32 m_nbdoubleWidgets; + TQ_INT32 m_nbdoubleWidgets; }; #endif diff --git a/krita/ui/kis_multi_integer_filter_widget.cc b/krita/ui/kis_multi_integer_filter_widget.cc index be50022d..07bfbe2a 100644 --- a/krita/ui/kis_multi_integer_filter_widget.cc +++ b/krita/ui/kis_multi_integer_filter_widget.cc @@ -18,19 +18,19 @@ #include "kis_multi_integer_filter_widget.h" -#include <qlabel.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtimer.h> #include <knuminput.h> #include <klocale.h> -KisDelayedActionIntegerInput::KisDelayedActionIntegerInput(QWidget * parent, const char * name) - : KIntNumInput(parent, name) +KisDelayedActionIntegerInput::KisDelayedActionIntegerInput(TQWidget * tqparent, const char * name) + : KIntNumInput(tqparent, name) { - m_timer = new QTimer(this, name); - connect(m_timer, SIGNAL(timeout()), SLOT(slotValueChanged())); - connect(this, SIGNAL(valueChanged( int )), SLOT(slotTimeToUpdate())); + m_timer = new TQTimer(this, name); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotValueChanged())); + connect(this, TQT_SIGNAL(valueChanged( int )), TQT_SLOT(slotTimeToUpdate())); } void KisDelayedActionIntegerInput::slotTimeToUpdate() @@ -48,7 +48,7 @@ void KisDelayedActionIntegerInput::cancelDelayedSignal() m_timer->stop(); } -KisIntegerWidgetParam::KisIntegerWidgetParam( Q_INT32 nmin, Q_INT32 nmax, Q_INT32 ninitvalue, QString label, QString nname) : +KisIntegerWidgetParam::KisIntegerWidgetParam( TQ_INT32 nmin, TQ_INT32 nmax, TQ_INT32 ninitvalue, TQString label, TQString nname) : min(nmin), max(nmax), initvalue(ninitvalue), @@ -57,35 +57,35 @@ KisIntegerWidgetParam::KisIntegerWidgetParam( Q_INT32 nmin, Q_INT32 nmax, Q_INT { } -KisMultiIntegerFilterWidget::KisMultiIntegerFilterWidget(QWidget * parent, +KisMultiIntegerFilterWidget::KisMultiIntegerFilterWidget(TQWidget * tqparent, const char * name, const char * caption, vKisIntegerWidgetParam iwparam) - : KisFilterConfigWidget( parent, name ) + : KisFilterConfigWidget( tqparent, name ) { m_nbintegerWidgets = iwparam.size(); this->setCaption(caption); - QGridLayout *widgetLayout = new QGridLayout(this, m_nbintegerWidgets + 1, 3); + TQGridLayout *widgetLayout = new TQGridLayout(this, m_nbintegerWidgets + 1, 3); widgetLayout->setColStretch ( 1, 1 ); m_integerWidgets = new KisDelayedActionIntegerInput*[ m_nbintegerWidgets ]; - for( Q_INT32 i = 0; i < m_nbintegerWidgets; ++i) + for( TQ_INT32 i = 0; i < m_nbintegerWidgets; ++i) { m_integerWidgets[i] = new KisDelayedActionIntegerInput( this, iwparam[i].name.ascii()); m_integerWidgets[i]->setRange( iwparam[i].min, iwparam[i].max); m_integerWidgets[i]->setValue( iwparam[i].initvalue ); m_integerWidgets[i]->cancelDelayedSignal(); - connect(m_integerWidgets[i], SIGNAL(valueChangedDelayed( int )), SIGNAL(sigPleaseUpdatePreview())); + connect(m_integerWidgets[i], TQT_SIGNAL(valueChangedDelayed( int )), TQT_SIGNAL(sigPleaseUpdatePreview())); - QLabel* lbl = new QLabel(iwparam[i].label+":", this); + TQLabel* lbl = new TQLabel(iwparam[i].label+":", this); widgetLayout->addWidget( lbl, i , 0); widgetLayout->addWidget( m_integerWidgets[i], i , 1); } - QSpacerItem * sp = new QSpacerItem(1, 1); + TQSpacerItem * sp = new TQSpacerItem(1, 1); widgetLayout->addItem(sp, m_nbintegerWidgets, 0); } diff --git a/krita/ui/kis_multi_integer_filter_widget.h b/krita/ui/kis_multi_integer_filter_widget.h index fe0ececf..a08f4cad 100644 --- a/krita/ui/kis_multi_integer_filter_widget.h +++ b/krita/ui/kis_multi_integer_filter_widget.h @@ -29,10 +29,11 @@ class KisDelayedActionIntegerInput : public KIntNumInput { Q_OBJECT + TQ_OBJECT public: - KisDelayedActionIntegerInput(QWidget * parent, const char * name); + KisDelayedActionIntegerInput(TQWidget * tqparent, const char * name); void cancelDelayedSignal(); @@ -46,17 +47,17 @@ signals: private: - QTimer * m_timer; + TQTimer * m_timer; }; struct KisIntegerWidgetParam { - KRITA_EXPORT KisIntegerWidgetParam( Q_INT32 nmin, Q_INT32 nmax, Q_INT32 ninitvalue, QString label, QString nname); - Q_INT32 min; - Q_INT32 max; - Q_INT32 initvalue; - QString label; - QString name; + KRITA_EXPORT KisIntegerWidgetParam( TQ_INT32 nmin, TQ_INT32 nmax, TQ_INT32 ninitvalue, TQString label, TQString nname); + TQ_INT32 min; + TQ_INT32 max; + TQ_INT32 initvalue; + TQString label; + TQString name; }; typedef std::vector<KisIntegerWidgetParam> vKisIntegerWidgetParam; @@ -64,17 +65,18 @@ typedef std::vector<KisIntegerWidgetParam> vKisIntegerWidgetParam; class KRITA_EXPORT KisMultiIntegerFilterWidget : public KisFilterConfigWidget { Q_OBJECT + TQ_OBJECT public: - KisMultiIntegerFilterWidget(QWidget * parent, const char * name, const char *caption, vKisIntegerWidgetParam iwparam); + KisMultiIntegerFilterWidget(TQWidget * tqparent, const char * name, const char *caption, vKisIntegerWidgetParam iwparam); virtual void setConfiguration(KisFilterConfiguration * config); public: - inline Q_INT32 nbValues() { return m_nbintegerWidgets; }; - inline Q_INT32 valueAt( Q_INT32 i ) { return m_integerWidgets[i]->value(); }; + inline TQ_INT32 nbValues() { return m_nbintegerWidgets; }; + inline TQ_INT32 valueAt( TQ_INT32 i ) { return m_integerWidgets[i]->value(); }; private: - Q_INT32 m_nbintegerWidgets; + TQ_INT32 m_nbintegerWidgets; KisDelayedActionIntegerInput** m_integerWidgets; }; diff --git a/krita/ui/kis_opengl_canvas.cc b/krita/ui/kis_opengl_canvas.cc index 0ec9ec72..d5f8dce4 100644 --- a/krita/ui/kis_opengl_canvas.cc +++ b/krita/ui/kis_opengl_canvas.cc @@ -21,13 +21,13 @@ #include "kis_opengl_canvas_painter.h" #ifdef HAVE_GL -KisOpenGLCanvasWidget::KisOpenGLCanvasWidget(QWidget *parent, const char *name, QGLWidget *sharedContextWidget) - : QGLWidget(KisOpenGLCanvasFormat, parent, name, sharedContextWidget) +KisOpenGLCanvasWidget::KisOpenGLCanvasWidget(TQWidget *tqparent, const char *name, TQGLWidget *sharedContextWidget) + : TQGLWidget(KisOpenGLCanvasFormat, tqparent, name, sharedContextWidget) { if (isSharing()) { - kdDebug(41001) << "Created QGLWidget with sharing\n"; + kdDebug(41001) << "Created TQGLWidget with sharing\n"; } else { - kdDebug(41001) << "Created QGLWidget with no sharing\n"; + kdDebug(41001) << "Created TQGLWidget with no sharing\n"; } } @@ -35,81 +35,81 @@ KisOpenGLCanvasWidget::~KisOpenGLCanvasWidget() { } -void KisOpenGLCanvasWidget::paintEvent(QPaintEvent *e) +void KisOpenGLCanvasWidget::paintEvent(TQPaintEvent *e) { - QGLWidget::paintEvent(e); + TQGLWidget::paintEvent(e); widgetGotPaintEvent(e); } -void KisOpenGLCanvasWidget::mousePressEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mousePressEvent(TQMouseEvent *e) { widgetGotMousePressEvent(e); } -void KisOpenGLCanvasWidget::mouseReleaseEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mouseReleaseEvent(TQMouseEvent *e) { widgetGotMouseReleaseEvent(e); } -void KisOpenGLCanvasWidget::mouseDoubleClickEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mouseDoubleClickEvent(TQMouseEvent *e) { widgetGotMouseDoubleClickEvent(e); } -void KisOpenGLCanvasWidget::mouseMoveEvent(QMouseEvent *e) +void KisOpenGLCanvasWidget::mouseMoveEvent(TQMouseEvent *e) { widgetGotMouseMoveEvent(e); } -void KisOpenGLCanvasWidget::tabletEvent(QTabletEvent *e) +void KisOpenGLCanvasWidget::tabletEvent(TQTabletEvent *e) { widgetGotTabletEvent(e); } -void KisOpenGLCanvasWidget::enterEvent(QEvent *e) +void KisOpenGLCanvasWidget::enterEvent(TQEvent *e) { widgetGotEnterEvent(e); } -void KisOpenGLCanvasWidget::leaveEvent(QEvent *e) +void KisOpenGLCanvasWidget::leaveEvent(TQEvent *e) { widgetGotLeaveEvent(e); } -void KisOpenGLCanvasWidget::wheelEvent(QWheelEvent *e) +void KisOpenGLCanvasWidget::wheelEvent(TQWheelEvent *e) { widgetGotWheelEvent(e); } -void KisOpenGLCanvasWidget::keyPressEvent(QKeyEvent *e) +void KisOpenGLCanvasWidget::keyPressEvent(TQKeyEvent *e) { widgetGotKeyPressEvent(e); } -void KisOpenGLCanvasWidget::keyReleaseEvent(QKeyEvent *e) +void KisOpenGLCanvasWidget::keyReleaseEvent(TQKeyEvent *e) { widgetGotKeyReleaseEvent(e); } -void KisOpenGLCanvasWidget::dragEnterEvent(QDragEnterEvent *e) +void KisOpenGLCanvasWidget::dragEnterEvent(TQDragEnterEvent *e) { widgetGotDragEnterEvent(e); } -void KisOpenGLCanvasWidget::dropEvent(QDropEvent *e) +void KisOpenGLCanvasWidget::dropEvent(TQDropEvent *e) { widgetGotDropEvent(e); } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 bool KisOpenGLCanvasWidget::x11Event(XEvent *event) { - return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(QPoint(0, 0))); + return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0))); } -#endif // Q_WS_X11 +#endif // TQ_WS_X11 KisCanvasWidgetPainter *KisOpenGLCanvasWidget::createPainter() { diff --git a/krita/ui/kis_opengl_canvas.h b/krita/ui/kis_opengl_canvas.h index 3e7231d7..79ddff09 100644 --- a/krita/ui/kis_opengl_canvas.h +++ b/krita/ui/kis_opengl_canvas.h @@ -25,21 +25,21 @@ #ifdef HAVE_GL -#include <qwidget.h> -#include <qgl.h> +#include <tqwidget.h> +#include <tqgl.h> #include "kis_global.h" #include "kis_canvas.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/Xlib.h> -#endif // Q_WS_X11 +#endif // TQ_WS_X11 -#define KisOpenGLCanvasFormat (QGL::DoubleBuffer|QGL::Rgba|QGL::DirectRendering|QGL::NoDepthBuffer) +#define KisOpenGLCanvasFormat (TQGL::DoubleBuffer|TQGL::Rgba|TQGL::DirectRendering|TQGL::NoDepthBuffer) -class KisOpenGLCanvasWidget : public virtual QGLWidget, public virtual KisCanvasWidget { +class KisOpenGLCanvasWidget : public virtual TQGLWidget, public virtual KisCanvasWidget { public: - KisOpenGLCanvasWidget(QWidget *parent, const char *name, QGLWidget *sharedContextWidget); + KisOpenGLCanvasWidget(TQWidget *tqparent, const char *name, TQGLWidget *sharedContextWidget); ~KisOpenGLCanvasWidget(); virtual KisCanvasWidgetPainter *createPainter(); @@ -49,22 +49,22 @@ public: #endif protected: - virtual void paintEvent(QPaintEvent *event); - virtual void mousePressEvent(QMouseEvent *event); - virtual void mouseReleaseEvent(QMouseEvent *event); - virtual void mouseDoubleClickEvent(QMouseEvent *event); - virtual void mouseMoveEvent(QMouseEvent *event); - virtual void tabletEvent(QTabletEvent *event); - virtual void enterEvent(QEvent *event ); - virtual void leaveEvent(QEvent *event); - virtual void wheelEvent(QWheelEvent *event); - virtual void keyPressEvent(QKeyEvent *event); - virtual void keyReleaseEvent(QKeyEvent *event); - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); -#ifdef Q_WS_X11 + virtual void paintEvent(TQPaintEvent *event); + virtual void mousePressEvent(TQMouseEvent *event); + virtual void mouseReleaseEvent(TQMouseEvent *event); + virtual void mouseDoubleClickEvent(TQMouseEvent *event); + virtual void mouseMoveEvent(TQMouseEvent *event); + virtual void tabletEvent(TQTabletEvent *event); + virtual void enterEvent(TQEvent *event ); + virtual void leaveEvent(TQEvent *event); + virtual void wheelEvent(TQWheelEvent *event); + virtual void keyPressEvent(TQKeyEvent *event); + virtual void keyReleaseEvent(TQKeyEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); +#ifdef TQ_WS_X11 bool x11Event(XEvent *event); -#endif // Q_WS_X11 +#endif // TQ_WS_X11 }; #endif // HAVE_GL diff --git a/krita/ui/kis_opengl_canvas_painter.cc b/krita/ui/kis_opengl_canvas_painter.cc index 06e38997..f40ebf53 100644 --- a/krita/ui/kis_opengl_canvas_painter.cc +++ b/krita/ui/kis_opengl_canvas_painter.cc @@ -33,7 +33,7 @@ KisOpenGLCanvasPainter::KisOpenGLCanvasPainter() { } -KisOpenGLCanvasPainter::KisOpenGLCanvasPainter(QGLWidget *widget) +KisOpenGLCanvasPainter::KisOpenGLCanvasPainter(TQGLWidget *widget) : m_active(true), m_widget(widget) { prepareForDrawing(); @@ -51,7 +51,7 @@ KisOpenGLCanvasPainter::~KisOpenGLCanvasPainter() bool KisOpenGLCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool /*unclipped*/) { - m_widget = dynamic_cast<QGLWidget *>(canvasWidget); + m_widget = dynamic_cast<TQGLWidget *>(canvasWidget); if (m_widget != 0) { prepareForDrawing(); @@ -75,7 +75,7 @@ void KisOpenGLCanvasPainter::prepareForDrawing() glMatrixMode(GL_TEXTURE); glLoadIdentity(); - m_window = QRect(0, 0, m_widget->width(), m_widget->height()); + m_window = TQRect(0, 0, m_widget->width(), m_widget->height()); m_viewport = m_window; updateViewTransformation(); @@ -91,7 +91,7 @@ void KisOpenGLCanvasPainter::updateViewTransformation() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - // We don't set the GL viewport directly from the Qt one as the GL + // We don't set the GL viewport directly from the TQt one as the GL // has a limited size. Instead we fold it into the projection matrix. glViewport(0, 0, m_widget->width(), m_widget->height()); glOrtho(0, m_widget->width(), m_widget->height(), 0, -1, 1); @@ -138,26 +138,26 @@ void KisOpenGLCanvasPainter::restore() void KisOpenGLCanvasPainter::setPenStyle(Qt::PenStyle penStyle) { - if (penStyle == Qt::SolidLine) { + if (penStyle == TQt::SolidLine) { glDisable(GL_LINE_STIPPLE); } else { GLushort lineStipple; switch (penStyle) { - case Qt::NoPen: + case TQt::NoPen: lineStipple = 0; break; default: - case Qt::DashLine: + case TQt::DashLine: lineStipple = 0x3fff; break; - case Qt::DotLine: + case TQt::DotLine: lineStipple = 0x3333; break; - case Qt::DashDotLine: + case TQt::DashDotLine: lineStipple = 0x33ff; break; - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: lineStipple = 0x333f; break; } @@ -167,31 +167,31 @@ void KisOpenGLCanvasPainter::setPenStyle(Qt::PenStyle penStyle) } } -QFontMetrics KisOpenGLCanvasPainter::fontMetrics() const +TQFontMetrics KisOpenGLCanvasPainter::fontMetrics() const { - return QFontMetrics(QFont()); + return TQFontMetrics(TQFont()); } -QFontInfo KisOpenGLCanvasPainter::fontInfo() const +TQFontInfo KisOpenGLCanvasPainter::fontInfo() const { - return QFontInfo(QFont()); + return TQFontInfo(TQFont()); } -const QFont& KisOpenGLCanvasPainter::font() const +const TQFont& KisOpenGLCanvasPainter::font() const { return m_defaultFont; } -void KisOpenGLCanvasPainter::setFont(const QFont& /*font*/) +void KisOpenGLCanvasPainter::setFont(const TQFont& /*font*/) { } -const QPen& KisOpenGLCanvasPainter::pen() const +const TQPen& KisOpenGLCanvasPainter::pen() const { return m_defaultPen; } -void KisOpenGLCanvasPainter::setPen(const QPen& pen) +void KisOpenGLCanvasPainter::setPen(const TQPen& pen) { setPenStyle(pen.style()); } @@ -201,60 +201,60 @@ void KisOpenGLCanvasPainter::setPen(Qt::PenStyle penStyle) setPenStyle(penStyle); } -void KisOpenGLCanvasPainter::setPen(const QColor& /*color*/) +void KisOpenGLCanvasPainter::setPen(const TQColor& /*color*/) { } -const QBrush& KisOpenGLCanvasPainter::brush() const +const TQBrush& KisOpenGLCanvasPainter::brush() const { return m_defaultBrush; } -void KisOpenGLCanvasPainter::setBrush(const QBrush& /*brush*/) +void KisOpenGLCanvasPainter::setBrush(const TQBrush& /*brush*/) { } -void KisOpenGLCanvasPainter::setBrush(Qt::BrushStyle /*brushStyle*/) +void KisOpenGLCanvasPainter::setBrush(TQt::BrushStyle /*brushStyle*/) { } -void KisOpenGLCanvasPainter::setBrush(const QColor& /*color*/) +void KisOpenGLCanvasPainter::setBrush(const TQColor& /*color*/) { } -QPoint KisOpenGLCanvasPainter::pos() const +TQPoint KisOpenGLCanvasPainter::pos() const { - return QPoint(); + return TQPoint(); } -const QColor& KisOpenGLCanvasPainter::backgroundColor() const +const TQColor& KisOpenGLCanvasPainter::backgroundColor() const { return m_defaultColor; } -void KisOpenGLCanvasPainter::setBackgroundColor(const QColor& /*color*/) +void KisOpenGLCanvasPainter::setBackgroundColor(const TQColor& /*color*/) { } -Qt::Qt::BGMode KisOpenGLCanvasPainter::backgroundMode() const +TQt::Qt::BGMode KisOpenGLCanvasPainter::backgroundMode() const { - return Qt::TransparentMode; + return TQt::TransparentMode; } -void KisOpenGLCanvasPainter::setBackgroundMode(Qt::Qt::BGMode /*bgMode*/) +void KisOpenGLCanvasPainter::setBackgroundMode(TQt::Qt::BGMode /*bgMode*/) { } -Qt::Qt::RasterOp KisOpenGLCanvasPainter::rasterOp() const +TQt::TQt::RasterOp KisOpenGLCanvasPainter::rasterOp() const { - return Qt::CopyROP; + return TQt::CopyROP; } -void KisOpenGLCanvasPainter::setRasterOp(Qt::RasterOp /*rasterOp*/) +void KisOpenGLCanvasPainter::setRasterOp(TQt::RasterOp /*rasterOp*/) { } -const QPoint& KisOpenGLCanvasPainter::brushOrigin() const +const TQPoint& KisOpenGLCanvasPainter::brushOrigin() const { return m_defaultBrushOrigin; } @@ -263,7 +263,7 @@ void KisOpenGLCanvasPainter::setBrushOrigin(int /*x*/, int /*y*/) { } -void KisOpenGLCanvasPainter::setBrushOrigin(const QPoint& /*origin*/) +void KisOpenGLCanvasPainter::setBrushOrigin(const TQPoint& /*origin*/) { } @@ -281,12 +281,12 @@ void KisOpenGLCanvasPainter::setViewXForm(bool /*enable*/) { } -QRect KisOpenGLCanvasPainter::window() const +TQRect KisOpenGLCanvasPainter::window() const { return m_window; } -void KisOpenGLCanvasPainter::setWindow(const QRect& r) +void KisOpenGLCanvasPainter::setWindow(const TQRect& r) { m_window = r; updateViewTransformation(); @@ -294,15 +294,15 @@ void KisOpenGLCanvasPainter::setWindow(const QRect& r) void KisOpenGLCanvasPainter::setWindow(int x, int y, int w, int h) { - setWindow(QRect(x, y, w, h)); + setWindow(TQRect(x, y, w, h)); } -QRect KisOpenGLCanvasPainter::viewport() const +TQRect KisOpenGLCanvasPainter::viewport() const { return m_viewport; } -void KisOpenGLCanvasPainter::setViewport(const QRect& r) +void KisOpenGLCanvasPainter::setViewport(const TQRect& r) { m_viewport = r; updateViewTransformation(); @@ -310,19 +310,19 @@ void KisOpenGLCanvasPainter::setViewport(const QRect& r) void KisOpenGLCanvasPainter::setViewport(int x, int y, int w, int h) { - setViewport(QRect(x, y, w, h)); + setViewport(TQRect(x, y, w, h)); } void KisOpenGLCanvasPainter::setWorldXForm(bool /*enable*/) { } -const QWMatrix& KisOpenGLCanvasPainter::worldMatrix() const +const TQWMatrix& KisOpenGLCanvasPainter::tqworldMatrix() const { return m_defaultWorldMatrix; } -void KisOpenGLCanvasPainter::setWorldMatrix(const QWMatrix& /*matrix*/, bool /*combine*/) +void KisOpenGLCanvasPainter::setWorldMatrix(const TQWMatrix& /*matrix*/, bool /*combine*/) { } @@ -366,42 +366,42 @@ double KisOpenGLCanvasPainter::translationY() const return 0; } -QPoint KisOpenGLCanvasPainter::xForm(const QPoint& point) const +TQPoint KisOpenGLCanvasPainter::xForm(const TQPoint& point) const { return point; } -QRect KisOpenGLCanvasPainter::xForm(const QRect& r) const +TQRect KisOpenGLCanvasPainter::xForm(const TQRect& r) const { return r; } -QPointArray KisOpenGLCanvasPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisOpenGLCanvasPainter::xForm(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisOpenGLCanvasPainter::xForm(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisOpenGLCanvasPainter::xForm(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } -QPoint KisOpenGLCanvasPainter::xFormDev(const QPoint& point) const +TQPoint KisOpenGLCanvasPainter::xFormDev(const TQPoint& point) const { return point; } -QRect KisOpenGLCanvasPainter::xFormDev(const QRect& r) const +TQRect KisOpenGLCanvasPainter::xFormDev(const TQRect& r) const { return r; } -QPointArray KisOpenGLCanvasPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisOpenGLCanvasPainter::xFormDev(const TQPointArray& pointArray) const { return pointArray; } -QPointArray KisOpenGLCanvasPainter::xFormDev(const QPointArray& pointArray, int /*index*/, int /*npoints*/) const +TQPointArray KisOpenGLCanvasPainter::xFormDev(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const { return pointArray; } @@ -415,20 +415,20 @@ bool KisOpenGLCanvasPainter::hasClipping() const return true; } -QRegion KisOpenGLCanvasPainter::clipRegion(QPainter::CoordinateMode /*mode*/) const +TQRegion KisOpenGLCanvasPainter::clipRegion(TQPainter::CoordinateMode /*mode*/) const { - return QRegion(); + return TQRegion(); } -void KisOpenGLCanvasPainter::setClipRect(const QRect& /*r*/, QPainter::CoordinateMode /*mode*/) +void KisOpenGLCanvasPainter::setClipRect(const TQRect& /*r*/, TQPainter::CoordinateMode /*mode*/) { } -void KisOpenGLCanvasPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, QPainter::CoordinateMode /*mode*/) +void KisOpenGLCanvasPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, TQPainter::CoordinateMode /*mode*/) { } -void KisOpenGLCanvasPainter::setClipRegion(const QRegion& /*rgn*/, QPainter::CoordinateMode /*mode*/) +void KisOpenGLCanvasPainter::setClipRegion(const TQRegion& /*rgn*/, TQPainter::CoordinateMode /*mode*/) { } @@ -439,12 +439,12 @@ void KisOpenGLCanvasPainter::drawPoint(int x, int y) glEnd(); } -void KisOpenGLCanvasPainter::drawPoint(const QPoint& point) +void KisOpenGLCanvasPainter::drawPoint(const TQPoint& point) { drawPoint(point.x(), point.y()); } -void KisOpenGLCanvasPainter::drawPoints(const QPointArray& pointArray, int index, int npoints) +void KisOpenGLCanvasPainter::drawPoints(const TQPointArray& pointArray, int index, int npoints) { int firstPointIndex = index; @@ -469,7 +469,7 @@ void KisOpenGLCanvasPainter::drawPoints(const QPointArray& pointArray, int index glBegin(GL_POINTS); for (int pointIndex = firstPointIndex; pointIndex <= lastPointIndex; pointIndex++) { - QPoint point = pointArray.point(pointIndex); + TQPoint point = pointArray.point(pointIndex); glVertex2i(point.x(), point.y()); } @@ -480,7 +480,7 @@ void KisOpenGLCanvasPainter::moveTo(int /*x*/, int /*y*/) { } -void KisOpenGLCanvasPainter::moveTo(const QPoint& /*point*/) +void KisOpenGLCanvasPainter::moveTo(const TQPoint& /*point*/) { } @@ -488,7 +488,7 @@ void KisOpenGLCanvasPainter::lineTo(int /*x*/, int /*y*/) { } -void KisOpenGLCanvasPainter::lineTo(const QPoint& /*point*/) +void KisOpenGLCanvasPainter::lineTo(const TQPoint& /*point*/) { } @@ -500,7 +500,7 @@ void KisOpenGLCanvasPainter::drawLine(int x1, int y1, int x2, int y2) glEnd(); } -void KisOpenGLCanvasPainter::drawLine(const QPoint& start, const QPoint& end) +void KisOpenGLCanvasPainter::drawLine(const TQPoint& start, const TQPoint& end) { drawLine(start.x(), start.y(), end.x(), end.y()); } @@ -524,7 +524,7 @@ void KisOpenGLCanvasPainter::drawRect(int x, int y, int w, int h) glEnd(); } -void KisOpenGLCanvasPainter::drawRect(const QRect& r) +void KisOpenGLCanvasPainter::drawRect(const TQRect& r) { drawRect(r.x(), r.y(), r.width(), r.height()); } @@ -533,15 +533,15 @@ void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, i { } -void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QColor& /*bgColor*/) +void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQColor& /*bgColor*/) { } -void KisOpenGLCanvasPainter::drawWinFocusRect(const QRect& /*r*/) +void KisOpenGLCanvasPainter::drawWinFocusRect(const TQRect& /*r*/) { } -void KisOpenGLCanvasPainter::drawWinFocusRect(const QRect& /*r*/, const QColor& /*bgColor*/) +void KisOpenGLCanvasPainter::drawWinFocusRect(const TQRect& /*r*/, const TQColor& /*bgColor*/) { } @@ -564,7 +564,7 @@ void KisOpenGLCanvasPainter::drawRoundRect(int x, int y, int w, int h, int /*xRn glEnd(); } -void KisOpenGLCanvasPainter::drawRoundRect(const QRect& r, int /*xRnd*/, int /*yRnd*/) +void KisOpenGLCanvasPainter::drawRoundRect(const TQRect& r, int /*xRnd*/, int /*yRnd*/) { drawRoundRect(r.x(), r.y(), r.width(), r.height()); } @@ -573,22 +573,22 @@ void KisOpenGLCanvasPainter::drawRoundRect(const QRect& r, int /*xRnd*/, int /*y // { // } // -// void KisOpenGLCanvasPainter::drawRoundRect(const QRect& /*r*/, int /*xRnd*/, int /*yRnd*/) +// void KisOpenGLCanvasPainter::drawRoundRect(const TQRect& /*r*/, int /*xRnd*/, int /*yRnd*/) // { // } void KisOpenGLCanvasPainter::drawEllipse(int x, int y, int w, int h) { - QRect r(x, y, w, h); + TQRect r(x, y, w, h); r = r.normalize(); - QPointArray points; + TQPointArray points; points.makeEllipse(r.x(), r.y(), r.width(), r.height()); drawPoints(points); } -void KisOpenGLCanvasPainter::drawEllipse(const QRect& r) +void KisOpenGLCanvasPainter::drawEllipse(const TQRect& r) { drawEllipse(r.x(), r.y(), r.width(), r.height()); } @@ -597,7 +597,7 @@ void KisOpenGLCanvasPainter::drawArc(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisOpenGLCanvasPainter::drawArc(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisOpenGLCanvasPainter::drawArc(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -605,7 +605,7 @@ void KisOpenGLCanvasPainter::drawPie(int /*x*/, int /*y*/, int /*w*/, int /*h*/, { } -void KisOpenGLCanvasPainter::drawPie(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisOpenGLCanvasPainter::drawPie(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } @@ -613,15 +613,15 @@ void KisOpenGLCanvasPainter::drawChord(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisOpenGLCanvasPainter::drawChord(const QRect& /*r*/, int /*a*/, int /*alen*/) +void KisOpenGLCanvasPainter::drawChord(const TQRect& /*r*/, int /*a*/, int /*alen*/) { } -void KisOpenGLCanvasPainter::drawLineSegments(const QPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) +void KisOpenGLCanvasPainter::drawLineSegments(const TQPointArray& /*pointArray*/, int /*index*/, int /*nlines*/) { } -void KisOpenGLCanvasPainter::drawPolyline(const QPointArray& pointArray, int index, int npoints) +void KisOpenGLCanvasPainter::drawPolyline(const TQPointArray& pointArray, int index, int npoints) { int firstPointIndex = index; @@ -650,24 +650,24 @@ void KisOpenGLCanvasPainter::drawPolyline(const QPointArray& pointArray, int ind glBegin(GL_LINES); for (int pointIndex = firstPointIndex; pointIndex <= lastPointIndex; pointIndex++) { - QPoint point = pointArray.point(pointIndex); + TQPoint point = pointArray.point(pointIndex); glVertex2i(point.x(), point.y()); } glEnd(); } -void KisOpenGLCanvasPainter::drawPolygon(const QPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) +void KisOpenGLCanvasPainter::drawPolygon(const TQPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/) { } -void KisOpenGLCanvasPainter::drawConvexPolygon(const QPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) +void KisOpenGLCanvasPainter::drawConvexPolygon(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/) { } -QPoint midpoint (const QPoint& P1, const QPoint& P2) +TQPoint midpoint (const TQPoint& P1, const TQPoint& P2) { - QPoint temp; + TQPoint temp; temp.setX((P1.x()+P2.x())/2); temp.setY((P1.y()+P2.y())/2); return temp; @@ -675,16 +675,16 @@ QPoint midpoint (const QPoint& P1, const QPoint& P2) #define MAX_LEVEL 5 -void recursiveCurve (const QPoint& P1, const QPoint& P2, const QPoint& P3, - const QPoint& P4, int level, QValueList<QPoint>& dest) +void recursiveCurve (const TQPoint& P1, const TQPoint& P2, const TQPoint& P3, + const TQPoint& P4, int level, TQValueList<TQPoint>& dest) { if (level > MAX_LEVEL) { dest.append(midpoint(P1,P4)); return; } - QPoint L1, L2, L3, L4; - QPoint H, R1, R2, R3, R4; + TQPoint L1, L2, L3, L4; + TQPoint H, R1, R2, R3, R4; L1 = P1; L2 = midpoint(P1, P2); @@ -699,10 +699,10 @@ void recursiveCurve (const QPoint& P1, const QPoint& P2, const QPoint& P3, recursiveCurve(R1, R2, R3, R4, level + 1, dest); } -void KisOpenGLCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int index) +void KisOpenGLCanvasPainter::drawCubicBezier(const TQPointArray& pointArray, int index) { - QPoint P1, P2, P3, P4; - QValueList<QPoint> dest; + TQPoint P1, P2, P3, P4; + TQValueList<TQPoint> dest; P1 = pointArray[index++]; P2 = pointArray[index++]; P3 = pointArray[index++]; @@ -713,8 +713,8 @@ void KisOpenGLCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int glBegin(GL_LINE_STRIP); glVertex2i(P1.x(), P1.y()); - for (QValueList<QPoint>::iterator it = dest.begin(); it != dest.end(); it++) { - QPoint point = (*it); + for (TQValueList<TQPoint>::iterator it = dest.begin(); it != dest.end(); it++) { + TQPoint point = (*it); glVertex2i(point.x(), point.y()); } glVertex2i(P4.x(), P4.y()); @@ -722,57 +722,57 @@ void KisOpenGLCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int glEnd(); } -void KisOpenGLCanvasPainter::drawPixmap(int /*x*/, int /*y*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) +void KisOpenGLCanvasPainter::drawPixmap(int /*x*/, int /*y*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/) { } -void KisOpenGLCanvasPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/, const QRect& /*sr*/) +void KisOpenGLCanvasPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/, const TQRect& /*sr*/) { } -void KisOpenGLCanvasPainter::drawPixmap(const QPoint& /*point*/, const QPixmap& /*pixmap*/) +void KisOpenGLCanvasPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/) { } -void KisOpenGLCanvasPainter::drawPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisOpenGLCanvasPainter::drawPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisOpenGLCanvasPainter::drawImage(int /*x*/, int /*y*/, const QImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) +void KisOpenGLCanvasPainter::drawImage(int /*x*/, int /*y*/, const TQImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/) { } -void KisOpenGLCanvasPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, const QRect& /*sr*/, int /*conversionFlags*/) +void KisOpenGLCanvasPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, const TQRect& /*sr*/, int /*conversionFlags*/) { } -void KisOpenGLCanvasPainter::drawImage(const QPoint& /*point*/, const QImage& /*image*/, int /*conversion_flags*/) +void KisOpenGLCanvasPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, int /*conversion_flags*/) { } -void KisOpenGLCanvasPainter::drawImage(const QRect& /*r*/, const QImage& /*image*/) +void KisOpenGLCanvasPainter::drawImage(const TQRect& /*r*/, const TQImage& /*image*/) { } -void KisOpenGLCanvasPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const QPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) +void KisOpenGLCanvasPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/) { } -void KisOpenGLCanvasPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/, const QPoint& /*point*/) +void KisOpenGLCanvasPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/, const TQPoint& /*point*/) { } -void KisOpenGLCanvasPainter::drawTiledPixmap(const QRect& /*r*/, const QPixmap& /*pixmap*/) +void KisOpenGLCanvasPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/) { } -void KisOpenGLCanvasPainter::fillRect(int x, int y, int w, int h, const QBrush& /*brush*/) +void KisOpenGLCanvasPainter::fillRect(int x, int y, int w, int h, const TQBrush& /*brush*/) { // XXX: Set brush glRecti(x, y, x + w, y + h); } -void KisOpenGLCanvasPainter::fillRect(const QRect& r, const QBrush& brush) +void KisOpenGLCanvasPainter::fillRect(const TQRect& r, const TQBrush& brush) { fillRect(r.x(), r.y(), r.width(), r.height(), brush); } @@ -781,50 +781,50 @@ void KisOpenGLCanvasPainter::eraseRect(int /*x*/, int /*y*/, int /*w*/, int /*h* { } -void KisOpenGLCanvasPainter::eraseRect(const QRect& /*r*/) +void KisOpenGLCanvasPainter::eraseRect(const TQRect& /*r*/) { } -void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(const QPoint& /*point*/, const QString& /*text*/, int /*pos*/, int /*len*/, QPainter::TextDirection /*dir*/) +void KisOpenGLCanvasPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/) { } -void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisOpenGLCanvasPainter::drawText(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QRect */*br*/, QTextParag **/*intern*/) +void KisOpenGLCanvasPainter::drawText(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/) { } -void KisOpenGLCanvasPainter::drawTextItem(int /*x*/, int /*y*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisOpenGLCanvasPainter::tqdrawTextItem(int /*x*/, int /*y*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -void KisOpenGLCanvasPainter::drawTextItem(const QPoint& /*p*/, const QTextItem& /*ti*/, int /*textflags*/) +void KisOpenGLCanvasPainter::tqdrawTextItem(const TQPoint& /*p*/, const TQTextItem& /*ti*/, int /*textflags*/) { } -QRect KisOpenGLCanvasPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisOpenGLCanvasPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } -QRect KisOpenGLCanvasPainter::boundingRect(const QRect& /*r*/, int /*flags*/, const QString& /*text*/, int /*len*/, QTextParag **/*intern*/) +TQRect KisOpenGLCanvasPainter::boundingRect(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/) { - return QRect(); + return TQRect(); } int KisOpenGLCanvasPainter::tabStops() const diff --git a/krita/ui/kis_opengl_canvas_painter.h b/krita/ui/kis_opengl_canvas_painter.h index 7f129947..47983ce2 100644 --- a/krita/ui/kis_opengl_canvas_painter.h +++ b/krita/ui/kis_opengl_canvas_painter.h @@ -25,9 +25,9 @@ #ifdef HAVE_GL -#include <qwidget.h> -#include <qgl.h> -#include <qpainter.h> +#include <tqwidget.h> +#include <tqgl.h> +#include <tqpainter.h> #include "kis_global.h" #include "kis_canvas_painter.h" @@ -35,7 +35,7 @@ class KisOpenGLCanvasPainter : public KisCanvasWidgetPainter { public: KisOpenGLCanvasPainter(); - KisOpenGLCanvasPainter(QGLWidget *widget); + KisOpenGLCanvasPainter(TQGLWidget *widget); virtual ~KisOpenGLCanvasPainter(); @@ -48,45 +48,45 @@ public: virtual void save(); virtual void restore(); - virtual QFontMetrics fontMetrics() const; - virtual QFontInfo fontInfo() const; + virtual TQFontMetrics fontMetrics() const; + virtual TQFontInfo fontInfo() const; - virtual const QFont& font() const; - virtual void setFont(const QFont&); - virtual const QPen& pen() const; - virtual void setPen(const QPen&); + virtual const TQFont& font() const; + virtual void setFont(const TQFont&); + virtual const TQPen& pen() const; + virtual void setPen(const TQPen&); virtual void setPen(Qt::PenStyle); - virtual void setPen(const QColor&); - virtual const QBrush&brush() const; - virtual void setBrush(const QBrush&); - virtual void setBrush(Qt::BrushStyle); - virtual void setBrush(const QColor&); - virtual QPoint pos() const; - - virtual const QColor& backgroundColor() const; - virtual void setBackgroundColor(const QColor&); + virtual void setPen(const TQColor&); + virtual const TQBrush&brush() const; + virtual void setBrush(const TQBrush&); + virtual void setBrush(TQt::BrushStyle); + virtual void setBrush(const TQColor&); + virtual TQPoint pos() const; + + virtual const TQColor& backgroundColor() const; + virtual void setBackgroundColor(const TQColor&); virtual Qt::BGMode backgroundMode() const; virtual void setBackgroundMode(Qt::BGMode); - virtual Qt::RasterOp rasterOp() const; - virtual void setRasterOp(Qt::RasterOp); - virtual const QPoint& brushOrigin() const; + virtual TQt::RasterOp rasterOp() const; + virtual void setRasterOp(TQt::RasterOp); + virtual const TQPoint& brushOrigin() const; virtual void setBrushOrigin(int x, int y); - virtual void setBrushOrigin(const QPoint&); + virtual void setBrushOrigin(const TQPoint&); virtual bool hasViewXForm() const; virtual bool hasWorldXForm() const; virtual void setViewXForm(bool); - virtual QRect window() const; - virtual void setWindow(const QRect&); + virtual TQRect window() const; + virtual void setWindow(const TQRect&); virtual void setWindow(int x, int y, int w, int h); - virtual QRect viewport() const; - virtual void setViewport(const QRect&); + virtual TQRect viewport() const; + virtual void setViewport(const TQRect&); virtual void setViewport(int x, int y, int w, int h); virtual void setWorldXForm(bool); - virtual const QWMatrix&worldMatrix() const; - virtual void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + virtual const TQWMatrix&tqworldMatrix() const; + virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void saveWorldMatrix(); virtual void restoreWorldMatrix(); @@ -100,86 +100,86 @@ public: virtual double translationX() const; virtual double translationY() const; - virtual QPoint xForm(const QPoint&) const; - virtual QRect xForm(const QRect&) const; - virtual QPointArray xForm(const QPointArray&) const; - virtual QPointArray xForm(const QPointArray&, int index, int npoints) const; - virtual QPoint xFormDev(const QPoint&) const; - virtual QRect xFormDev(const QRect&) const; - virtual QPointArray xFormDev(const QPointArray&) const; - virtual QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + virtual TQPoint xForm(const TQPoint&) const; + virtual TQRect xForm(const TQRect&) const; + virtual TQPointArray xForm(const TQPointArray&) const; + virtual TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + virtual TQPoint xFormDev(const TQPoint&) const; + virtual TQRect xFormDev(const TQRect&) const; + virtual TQPointArray xFormDev(const TQPointArray&) const; + virtual TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; virtual void setClipping(bool); virtual bool hasClipping() const; - virtual QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - virtual void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + virtual TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + virtual void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); virtual void drawPoint(int x, int y); - virtual void drawPoint(const QPoint&); - virtual void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + virtual void drawPoint(const TQPoint&); + virtual void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); virtual void moveTo(int x, int y); - virtual void moveTo(const QPoint&); + virtual void moveTo(const TQPoint&); virtual void lineTo(int x, int y); - virtual void lineTo(const QPoint&); + virtual void lineTo(const TQPoint&); virtual void drawLine(int x1, int y1, int x2, int y2); - virtual void drawLine(const QPoint&, const QPoint&); + virtual void drawLine(const TQPoint&, const TQPoint&); virtual void drawRect(int x, int y, int w, int h); - virtual void drawRect(const QRect&); + virtual void drawRect(const TQRect&); virtual void drawWinFocusRect(int x, int y, int w, int h); - virtual void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - virtual void drawWinFocusRect(const QRect&); - virtual void drawWinFocusRect(const QRect&, const QColor&bgColor); + virtual void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + virtual void drawWinFocusRect(const TQRect&); + virtual void drawWinFocusRect(const TQRect&, const TQColor&bgColor); virtual void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - virtual void drawRoundRect(const QRect&, int = 25, int = 25); + virtual void drawRoundRect(const TQRect&, int = 25, int = 25); virtual void drawEllipse(int x, int y, int w, int h); - virtual void drawEllipse(const QRect&); + virtual void drawEllipse(const TQRect&); virtual void drawArc(int x, int y, int w, int h, int a, int alen); - virtual void drawArc(const QRect&, int a, int alen); + virtual void drawArc(const TQRect&, int a, int alen); virtual void drawPie(int x, int y, int w, int h, int a, int alen); - virtual void drawPie(const QRect&, int a, int alen); + virtual void drawPie(const TQRect&, int a, int alen); virtual void drawChord(int x, int y, int w, int h, int a, int alen); - virtual void drawChord(const QRect&, int a, int alen); - virtual void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - virtual void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - virtual void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - virtual void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - virtual void drawCubicBezier(const QPointArray&, int index=0); - virtual void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - virtual void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - virtual void drawPixmap(const QPoint&, const QPixmap&); - virtual void drawPixmap(const QRect&, const QPixmap&); - virtual void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - virtual void drawImage(const QRect&, const QImage&); - virtual void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - virtual void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - virtual void drawTiledPixmap(const QRect&, const QPixmap&); - //virtual void drawPicture(const QPicture&); - //virtual void drawPicture(int x, int y, const QPicture&); - //virtual void drawPicture(const QPoint&, const QPicture&); - - virtual void fillRect(int x, int y, int w, int h, const QBrush&); - virtual void fillRect(const QRect&, const QBrush&); + virtual void drawChord(const TQRect&, int a, int alen); + virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawCubicBezier(const TQPointArray&, int index=0); + virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + virtual void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + virtual void drawPixmap(const TQPoint&, const TQPixmap&); + virtual void drawPixmap(const TQRect&, const TQPixmap&); + virtual void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + virtual void drawImage(const TQRect&, const TQImage&); + virtual void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&); + //virtual void drawPicture(const TQPicture&); + //virtual void drawPicture(int x, int y, const TQPicture&); + //virtual void drawPicture(const TQPoint&, const TQPicture&); + + virtual void fillRect(int x, int y, int w, int h, const TQBrush&); + virtual void fillRect(const TQRect&, const TQBrush&); virtual void eraseRect(int x, int y, int w, int h); - virtual void eraseRect(const QRect&); + virtual void eraseRect(const TQRect&); - virtual void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - virtual void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + virtual void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + virtual void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - virtual void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - virtual void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - virtual QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - virtual QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + virtual TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + virtual TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); virtual int tabStops() const; virtual void setTabStops(int); @@ -192,18 +192,18 @@ protected: void setPenStyle(Qt::PenStyle penStyle); protected: - QFont m_defaultFont; - QPen m_defaultPen; - QBrush m_defaultBrush; - QColor m_defaultColor; - QPoint m_defaultBrushOrigin; - QWMatrix m_defaultWorldMatrix; - QRect m_window; - QRect m_viewport; + TQFont m_defaultFont; + TQPen m_defaultPen; + TQBrush m_defaultBrush; + TQColor m_defaultColor; + TQPoint m_defaultBrushOrigin; + TQWMatrix m_defaultWorldMatrix; + TQRect m_window; + TQRect m_viewport; bool m_active; protected: - QGLWidget *m_widget; + TQGLWidget *m_widget; }; #endif // HAVE_GL diff --git a/krita/ui/kis_opengl_image_context.cc b/krita/ui/kis_opengl_image_context.cc index f3ad4341..f60b7965 100644 --- a/krita/ui/kis_opengl_image_context.cc +++ b/krita/ui/kis_opengl_image_context.cc @@ -37,7 +37,7 @@ using namespace std; -QGLWidget *KisOpenGLImageContext::SharedContextWidget = 0; +TQGLWidget *KisOpenGLImageContext::SharedContextWidget = 0; int KisOpenGLImageContext::SharedContextWidgetRefCount = 0; KisOpenGLImageContext::ImageContextMap KisOpenGLImageContext::imageContextMap; @@ -78,7 +78,7 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit if (SharedContextWidget == 0) { kdDebug(41001) << "Creating shared context widget\n"; - SharedContextWidget = new QGLWidget(KisOpenGLCanvasFormat); + SharedContextWidget = new TQGLWidget(KisOpenGLCanvasFormat); } ++SharedContextWidgetRefCount; @@ -93,15 +93,15 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size); - m_imageTextureTileWidth = QMIN(PREFERRED_IMAGE_TEXTURE_WIDTH, max_texture_size); - m_imageTextureTileHeight = QMIN(PREFERRED_IMAGE_TEXTURE_HEIGHT, max_texture_size); + m_imageTextureTileWidth = TQMIN(PREFERRED_IMAGE_TEXTURE_WIDTH, max_texture_size); + m_imageTextureTileHeight = TQMIN(PREFERRED_IMAGE_TEXTURE_HEIGHT, max_texture_size); createImageTextureTiles(); - connect(m_image, SIGNAL(sigImageUpdated(QRect)), - SLOT(slotImageUpdated(QRect))); - connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), - SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), + TQT_SLOT(slotImageUpdated(TQRect))); + connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), + TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); updateImageTextureTiles(m_image->bounds()); } @@ -109,7 +109,7 @@ KisOpenGLImageContext::KisOpenGLImageContext(KisImageSP image, KisProfile *monit KisOpenGLImageContextSP KisOpenGLImageContext::getImageContext(KisImageSP image, KisProfile *monitorProfile) { if (imageCanShareImageContext(image)) { - ImageContextMap::iterator it = imageContextMap.find(image); + ImageContextMap::iterator it = imageContextMap.tqfind(image); if (it != imageContextMap.end()) { @@ -144,16 +144,16 @@ bool KisOpenGLImageContext::imageCanShareImageContext(KisImageSP image) } } -QGLWidget *KisOpenGLImageContext::sharedContextWidget() const +TQGLWidget *KisOpenGLImageContext::sharedContextWidget() const { return SharedContextWidget; } -void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect) +void KisOpenGLImageContext::updateImageTextureTiles(const TQRect& rect) { //kdDebug() << "updateImageTextureTiles " << rect << endl; - QRect updateRect = rect & m_image->bounds(); + TQRect updateRect = rect & m_image->bounds(); if (!updateRect.isEmpty()) { @@ -167,10 +167,10 @@ void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect) for (int column = firstColumn; column <= lastColumn; column++) { for (int row = firstRow; row <= lastRow; row++) { - QRect tileRect(column * m_imageTextureTileWidth, row * m_imageTextureTileHeight, + TQRect tileRect(column * m_imageTextureTileWidth, row * m_imageTextureTileHeight, m_imageTextureTileWidth, m_imageTextureTileHeight); - QRect tileUpdateRect = tileRect & updateRect; + TQRect tileUpdateRect = tileRect & updateRect; glBindTexture(GL_TEXTURE_2D, imageTextureTile(tileRect.x(), tileRect.y())); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -180,7 +180,7 @@ void KisOpenGLImageContext::updateImageTextureTiles(const QRect& rect) glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - QImage tileUpdateImage = m_image->convertToQImage(tileUpdateRect.left(), tileUpdateRect.top(), + TQImage tileUpdateImage = m_image->convertToTQImage(tileUpdateRect.left(), tileUpdateRect.top(), tileUpdateRect.right(), tileUpdateRect.bottom(), m_monitorProfile, m_exposure); @@ -254,7 +254,7 @@ void KisOpenGLImageContext::generateBackgroundTexture() glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - QImage backgroundImage = m_image->background()->patternTile(); + TQImage backgroundImage = m_image->background()->patternTile(); // XXX: temp. Q_ASSERT(backgroundImage.width() == BACKGROUND_TEXTURE_WIDTH); @@ -279,9 +279,9 @@ int KisOpenGLImageContext::imageTextureTileIndex(int x, int y) const GLuint KisOpenGLImageContext::imageTextureTile(int pixelX, int pixelY) const { - Q_INT32 textureTileIndex = imageTextureTileIndex(pixelX, pixelY); + TQ_INT32 textureTileIndex = imageTextureTileIndex(pixelX, pixelY); - textureTileIndex = CLAMP(textureTileIndex, 0, ((Q_INT32)m_imageTextureTiles.count()) - 1); + textureTileIndex = CLAMP(textureTileIndex, 0, ((TQ_INT32)m_imageTextureTiles.count()) - 1); return m_imageTextureTiles[textureTileIndex]; } @@ -312,7 +312,7 @@ void KisOpenGLImageContext::createImageTextureTiles() //XXX: will be float/half with shaders #define RGBA_BYTES_PER_PIXEL 4 - QByteArray emptyTilePixelData(m_imageTextureTileWidth * m_imageTextureTileHeight * RGBA_BYTES_PER_PIXEL); + TQByteArray emptyTilePixelData(m_imageTextureTileWidth * m_imageTextureTileHeight * RGBA_BYTES_PER_PIXEL); emptyTilePixelData.fill(0); for (int tileIndex = 0; tileIndex < numImageTextureTiles; ++tileIndex) { @@ -339,7 +339,7 @@ void KisOpenGLImageContext::destroyImageTextureTiles() } } -void KisOpenGLImageContext::update(const QRect& imageRect) +void KisOpenGLImageContext::update(const TQRect& imageRect) { updateImageTextureTiles(imageRect); } @@ -349,15 +349,15 @@ void KisOpenGLImageContext::setSelectionDisplayEnabled(bool enable) m_displaySelection = enable; } -void KisOpenGLImageContext::slotImageUpdated(QRect rc) +void KisOpenGLImageContext::slotImageUpdated(TQRect rc) { - QRect r = rc & m_image->bounds(); + TQRect r = rc & m_image->bounds(); updateImageTextureTiles(r); emit sigImageUpdated(r); } -void KisOpenGLImageContext::slotImageSizeChanged(Q_INT32 w, Q_INT32 h) +void KisOpenGLImageContext::slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h) { createImageTextureTiles(); updateImageTextureTiles(m_image->bounds()); diff --git a/krita/ui/kis_opengl_image_context.h b/krita/ui/kis_opengl_image_context.h index d1ba6278..03833cd2 100644 --- a/krita/ui/kis_opengl_image_context.h +++ b/krita/ui/kis_opengl_image_context.h @@ -26,23 +26,24 @@ #include <map> -#include <qgl.h> -#include <qobject.h> -#include <qvaluevector.h> +#include <tqgl.h> +#include <tqobject.h> +#include <tqvaluevector.h> #include <koffice_export.h> #include "kis_types.h" -class QRegion; +class TQRegion; class KisOpenGLImageContext; typedef KSharedPtr<KisOpenGLImageContext> KisOpenGLImageContextSP; class KisColorSpace; -class KRITACORE_EXPORT KisOpenGLImageContext : public QObject , public KShared { +class KRITACORE_EXPORT KisOpenGLImageContext : public TQObject , public KShared { Q_OBJECT + TQ_OBJECT public: static KisOpenGLImageContextSP getImageContext(KisImageSP image, KisProfile *monitorProfile); @@ -53,8 +54,8 @@ public: public: // In order to use the image textures, the caller must pass // the sharedContextWidget() as the shareWidget argument to the - // QGLWidget constructor. - QGLWidget *sharedContextWidget() const; + // TQGLWidget constructor. + TQGLWidget *sharedContextWidget() const; void setMonitorProfile(KisProfile *profile); void setHDRExposure(float exposure); @@ -82,7 +83,7 @@ public: * * @param imageRect The rectangle to update in image coordinates. */ - void update(const QRect& imageRect); + void update(const TQRect& imageRect); signals: /** @@ -97,7 +98,7 @@ signals: * * @param rc The rect that has been recomposited. */ - void sigImageUpdated(QRect rc); + void sigImageUpdated(TQRect rc); /** * Emitted whenever the image size changes. @@ -105,7 +106,7 @@ signals: * @param width New image width * @param height New image height */ - void sigSizeChanged(Q_INT32 width, Q_INT32 height); + void sigSizeChanged(TQ_INT32 width, TQ_INT32 height); protected: KisOpenGLImageContext(KisImageSP image, KisProfile *monitorProfile); @@ -114,14 +115,14 @@ protected: void createImageTextureTiles(); void destroyImageTextureTiles(); int imageTextureTileIndex(int x, int y) const; - void updateImageTextureTiles(const QRect& rect); + void updateImageTextureTiles(const TQRect& rect); static KisColorSpace* textureColorSpaceForImageColorSpace(KisColorSpace *imageColorSpace); static bool imageCanShareImageContext(KisImageSP image); protected slots: - void slotImageUpdated(QRect r); - void slotImageSizeChanged(Q_INT32 w, Q_INT32 h); + void slotImageUpdated(TQRect r); + void slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h); private: KisImageSP m_image; @@ -134,15 +135,15 @@ private: static const int PREFERRED_IMAGE_TEXTURE_WIDTH = 256; static const int PREFERRED_IMAGE_TEXTURE_HEIGHT = 256; - QValueVector<GLuint> m_imageTextureTiles; + TQValueVector<GLuint> m_imageTextureTiles; int m_imageTextureTileWidth; int m_imageTextureTileHeight; int m_numImageTextureTileColumns; // We create a single OpenGL context and share it between all views - // in the process. Apparently with some OpenGL implementations, only + // in the process. Aptqparently with some OpenGL implementations, only // one context will be hardware accelerated. - static QGLWidget *SharedContextWidget; + static TQGLWidget *SharedContextWidget; static int SharedContextWidgetRefCount; typedef std::map<KisImageSP, KisOpenGLImageContext*> ImageContextMap; diff --git a/krita/ui/kis_paintop_box.cc b/krita/ui/kis_paintop_box.cc index 3479075d..b29077fd 100644 --- a/krita/ui/kis_paintop_box.cc +++ b/krita/ui/kis_paintop_box.cc @@ -17,12 +17,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qwidget.h> -#include <qstring.h> -#include <qvaluelist.h> -#include <qpixmap.h> -#include <qlayout.h> -#include <qtooltip.h> +#include <tqwidget.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqpixmap.h> +#include <tqlayout.h> +#include <tqtooltip.h> #include <klocale.h> #include <kactioncollection.h> @@ -43,8 +43,8 @@ #include "kis_paintop_box.h" -KisPaintopBox::KisPaintopBox (KisView * view, QWidget *parent, const char * name) - : super (parent, name), +KisPaintopBox::KisPaintopBox (KisView * view, TQWidget *tqparent, const char * name) + : super (tqparent, name), m_canvasController(view->getCanvasController()) { #if KDE_VERSION >= KDE_MAKE_VERSION(3,3,90) @@ -55,17 +55,17 @@ KisPaintopBox::KisPaintopBox (KisView * view, QWidget *parent, const char * name setCaption(i18n("Painter's Toolchest")); m_optionWidget = 0; - m_paintops = new QValueList<KisID>(); - m_displayedOps = new QValueList<KisID>(); + m_paintops = new TQValueList<KisID>(); + m_displayedOps = new TQValueList<KisID>(); - m_cmbPaintops = new QComboBox(this, "KisPaintopBox::m_cmbPaintops"); + m_cmbPaintops = new TQComboBox(this, "KisPaintopBox::m_cmbPaintops"); m_cmbPaintops->setMinimumWidth(150); - QToolTip::add(m_cmbPaintops, i18n("Styles of painting for the painting tools")); - m_layout = new QHBoxLayout(this, 1, 1); + TQToolTip::add(m_cmbPaintops, i18n("Styles of painting for the painting tools")); + m_layout = new TQHBoxLayout(this, 1, 1); m_layout->addWidget(m_cmbPaintops); - connect(this, SIGNAL(selected(const KisID &, const KisPaintOpSettings *)), view, SLOT(paintopActivated(const KisID &, const KisPaintOpSettings *))); - connect(m_cmbPaintops, SIGNAL(activated(int)), this, SLOT(slotItemSelected(int))); + connect(this, TQT_SIGNAL(selected(const KisID &, const KisPaintOpSettings *)), view, TQT_SLOT(paintopActivated(const KisID &, const KisPaintOpSettings *))); + connect(m_cmbPaintops, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotItemSelected(int))); // XXX: Let's see... Are all paintops loaded and ready? KisIDList keys = KisPaintOpRegistry::instance()->listKeys(); @@ -74,10 +74,10 @@ KisPaintopBox::KisPaintopBox (KisView * view, QWidget *parent, const char * name addItem(*it); } - connect(view, SIGNAL(currentColorSpaceChanged(KisColorSpace*)), - this, SLOT(colorSpaceChanged(KisColorSpace*))); - connect(view, SIGNAL(sigInputDeviceChanged(const KisInputDevice&)), - this, SLOT(slotInputDeviceChanged(const KisInputDevice&))); + connect(view, TQT_SIGNAL(currentColorSpaceChanged(KisColorSpace*)), + this, TQT_SLOT(colorSpaceChanged(KisColorSpace*))); + connect(view, TQT_SIGNAL(sigInputDeviceChanged(const KisInputDevice&)), + this, TQT_SLOT(slotInputDeviceChanged(const KisInputDevice&))); setCurrentPaintop(defaultPaintop(m_canvasController->currentInputDevice())); } @@ -88,7 +88,7 @@ KisPaintopBox::~KisPaintopBox() delete m_displayedOps; } -void KisPaintopBox::addItem(const KisID & paintop, const QString & /*category*/) +void KisPaintopBox::addItem(const KisID & paintop, const TQString & /*category*/) { m_paintops->append(paintop); } @@ -106,16 +106,16 @@ void KisPaintopBox::slotItemSelected(int index) void KisPaintopBox::colorSpaceChanged(KisColorSpace *cs) { - QValueList<KisID>::iterator it = m_paintops->begin(); - QValueList<KisID>::iterator end = m_paintops->end(); + TQValueList<KisID>::iterator it = m_paintops->begin(); + TQValueList<KisID>::iterator end = m_paintops->end(); m_displayedOps->clear(); m_cmbPaintops->clear(); for ( ; it != end; ++it ) { if (KisPaintOpRegistry::instance()->userVisible(*it, cs)) { - QPixmap pm = paintopPixmap(*it); + TQPixmap pm = paintopPixmap(*it); if (pm.isNull()) { - QPixmap p = QPixmap( 16, 16 ); + TQPixmap p = TQPixmap( 16, 16 ); p.fill(); m_cmbPaintops->insertItem(p, (*it).name()); } @@ -138,23 +138,23 @@ void KisPaintopBox::colorSpaceChanged(KisColorSpace *cs) slotItemSelected( index ); } -QPixmap KisPaintopBox::paintopPixmap(const KisID & paintop) +TQPixmap KisPaintopBox::paintopPixmap(const KisID & paintop) { - QString pixmapName = KisPaintOpRegistry::instance()->pixmap(paintop); + TQString pixmapName = KisPaintOpRegistry::instance()->pixmap(paintop); if (pixmapName.isEmpty()) { - return QPixmap(); + return TQPixmap(); } - QString fname = KisFactory::instance()->dirs()->findResource("kis_images", pixmapName); + TQString fname = KisFactory::instance()->dirs()->findResource("kis_images", pixmapName); - return QPixmap(fname); + return TQPixmap(fname); } void KisPaintopBox::slotInputDeviceChanged(const KisInputDevice & inputDevice) { KisID paintop; - InputDevicePaintopMap::iterator it = m_currentID.find(inputDevice); + InputDevicePaintopMap::iterator it = m_currentID.tqfind(inputDevice); if (it == m_currentID.end()) { paintop = defaultPaintop(inputDevice); @@ -180,7 +180,7 @@ void KisPaintopBox::updateOptionWidget() if (m_optionWidget != 0) { m_layout->remove(m_optionWidget); m_optionWidget->hide(); - m_layout->invalidate(); + m_layout->tqinvalidate(); } const KisPaintOpSettings *settings = paintopSettings(currentPaintop(), m_canvasController->currentInputDevice()); @@ -220,13 +220,13 @@ KisID KisPaintopBox::defaultPaintop(const KisInputDevice& inputDevice) const KisPaintOpSettings *KisPaintopBox::paintopSettings(const KisID & paintop, const KisInputDevice & inputDevice) { - QValueVector<KisPaintOpSettings *> settingsArray; - InputDevicePaintopSettingsMap::iterator it = m_inputDevicePaintopSettings.find(inputDevice); + TQValueVector<KisPaintOpSettings *> settingsArray; + InputDevicePaintopSettingsMap::iterator it = m_inputDevicePaintopSettings.tqfind(inputDevice); if (it == m_inputDevicePaintopSettings.end()) { // Create settings for each paintop. - for (QValueList<KisID>::const_iterator pit = m_paintops->begin(); pit != m_paintops->end(); ++pit) { + for (TQValueList<KisID>::const_iterator pit = m_paintops->begin(); pit != m_paintops->end(); ++pit) { KisPaintOpSettings *settings = KisPaintOpRegistry::instance()->settings(*pit, this, inputDevice); settingsArray.append(settings); if (settings && settings->widget()) { diff --git a/krita/ui/kis_paintop_box.h b/krita/ui/kis_paintop_box.h index da158194..38b88ddb 100644 --- a/krita/ui/kis_paintop_box.h +++ b/krita/ui/kis_paintop_box.h @@ -23,13 +23,13 @@ #include <map> -#include <qwidget.h> -#include <qcombobox.h> -#include <qvaluelist.h> +#include <tqwidget.h> +#include <tqcombobox.h> +#include <tqvaluelist.h> #include "kis_input_device.h" -class QString; +class TQString; class KWidgetAction; class KisView; @@ -47,14 +47,15 @@ class KisColorSpace; * * XXX: instead of text, use pretty pictures. */ -class KisPaintopBox : public QWidget { +class KisPaintopBox : public TQWidget { Q_OBJECT + TQ_OBJECT - typedef QWidget super; + typedef TQWidget super; public: - KisPaintopBox (KisView * view, QWidget * parent, const char * name = 0); + KisPaintopBox (KisView * view, TQWidget * tqparent, const char * name = 0); ~KisPaintopBox(); @@ -65,7 +66,7 @@ signals: private slots: - void addItem(const KisID & paintop, const QString & category = ""); + void addItem(const KisID & paintop, const TQString & category = ""); private slots: @@ -74,7 +75,7 @@ private slots: void slotInputDeviceChanged(const KisInputDevice & inputDevice); private: - QPixmap paintopPixmap(const KisID & paintop); + TQPixmap paintopPixmap(const KisID & paintop); void updateOptionWidget(); const KisID & currentPaintop(); void setCurrentPaintop(const KisID & paintop); @@ -83,17 +84,17 @@ private: private: KisCanvasController *m_canvasController; - QComboBox * m_cmbPaintops; - QHBoxLayout * m_layout; - QWidget * m_optionWidget; + TQComboBox * m_cmbPaintops; + TQHBoxLayout * m_layout; + TQWidget * m_optionWidget; - QValueList<KisID> * m_paintops; - QValueList<KisID> * m_displayedOps; + TQValueList<KisID> * m_paintops; + TQValueList<KisID> * m_displayedOps; typedef std::map<KisInputDevice, KisID> InputDevicePaintopMap; InputDevicePaintopMap m_currentID; - typedef std::map<KisInputDevice, QValueVector<KisPaintOpSettings *> > InputDevicePaintopSettingsMap; + typedef std::map<KisInputDevice, TQValueVector<KisPaintOpSettings *> > InputDevicePaintopSettingsMap; InputDevicePaintopSettingsMap m_inputDevicePaintopSettings; }; diff --git a/krita/ui/kis_palette_view.cc b/krita/ui/kis_palette_view.cc index 2fe3f6e9..dfc75eb4 100644 --- a/krita/ui/kis_palette_view.cc +++ b/krita/ui/kis_palette_view.cc @@ -22,20 +22,20 @@ #include <stdio.h> #include <stdlib.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdrawutil.h> -#include <qevent.h> -#include <qfile.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qvalidator.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qtimer.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdrawutil.h> +#include <tqevent.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqvalidator.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqtimer.h> #include <kapplication.h> #include <kconfig.h> @@ -62,23 +62,23 @@ #include "kis_resource.h" #include "kis_palette.h" -KisPaletteView::KisPaletteView(QWidget *parent, const char* name, int minWidth, int cols) - : QScrollView( parent, name ), mMinWidth(minWidth), mCols(cols) +KisPaletteView::KisPaletteView(TQWidget *tqparent, const char* name, int minWidth, int cols) + : TQScrollView( tqparent, name ), mMinWidth(minWidth), mCols(cols) { m_cells = 0; m_currentPalette = 0; - QSize cellSize = QSize( mMinWidth, 50); + TQSize cellSize = TQSize( mMinWidth, 50); - setHScrollBarMode(QScrollView::AlwaysOff); - setVScrollBarMode(QScrollView::AlwaysOn); + setHScrollBarMode(TQScrollView::AlwaysOff); + setVScrollBarMode(TQScrollView::AlwaysOn); - QSize minSize = QSize(verticalScrollBar()->width(), 0); - minSize += QSize(frameWidth(), 0); - minSize += QSize(cellSize); + TQSize minSize = TQSize(verticalScrollBar()->width(), 0); + minSize += TQSize(frameWidth(), 0); + minSize += TQSize(cellSize); setMinimumSize(minSize); - setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored)); } KisPaletteView::~KisPaletteView() @@ -105,20 +105,20 @@ void KisPaletteView::setPalette(KisPalette* palette) m_cells->setShading(false); m_cells->setAcceptDrags(false); - QSize cellSize = QSize( mMinWidth, mMinWidth * rows / mCols); + TQSize cellSize = TQSize( mMinWidth, mMinWidth * rows / mCols); m_cells->setFixedSize( cellSize ); for( int i = 0; i < m_currentPalette->nColors(); i++) { - QColor c = m_currentPalette->getColor(i).color; + TQColor c = m_currentPalette->getColor(i).color; m_cells->setColor( i, c ); } - connect(m_cells, SIGNAL(colorSelected(int)), - SLOT(slotColorCellSelected(int))); + connect(m_cells, TQT_SIGNAL(colorSelected(int)), + TQT_SLOT(slotColorCellSelected(int))); - connect(m_cells, SIGNAL(colorDoubleClicked(int)), - SLOT(slotColorCellDoubleClicked(int)) ); + connect(m_cells, TQT_SIGNAL(colorDoubleClicked(int)), + TQT_SLOT(slotColorCellDoubleClicked(int)) ); addChild( m_cells ); m_cells->show(); diff --git a/krita/ui/kis_palette_view.h b/krita/ui/kis_palette_view.h index 8812acdb..79b3e0b0 100644 --- a/krita/ui/kis_palette_view.h +++ b/krita/ui/kis_palette_view.h @@ -20,7 +20,7 @@ #ifndef __KIS_PALETTE_VIEW_H__ #define __KIS_PALETTE_VIEW_H__ -#include <qscrollview.h> +#include <tqscrollview.h> #include "kis_palette.h" class KListBox; @@ -32,11 +32,12 @@ class KisColor; /** * A scrolling view that lists a single KisPalette */ -class KisPaletteView : public QScrollView +class KisPaletteView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - KisPaletteView(QWidget *parent, const char* name = 0, int minWidth=210, int cols = 16); + KisPaletteView(TQWidget *tqparent, const char* name = 0, int minWidth=210, int cols = 16); virtual ~KisPaletteView(); KisPalette* palette() const; @@ -48,8 +49,8 @@ public slots: signals: void colorSelected(const KisColor &); - void colorSelected(const QColor &); - void colorDoubleClicked(const KisColor &, const QString &); + void colorSelected(const TQColor &); + void colorDoubleClicked(const KisColor &, const TQString &); protected slots: void slotColorCellSelected( int ); diff --git a/krita/ui/kis_palette_widget.cc b/krita/ui/kis_palette_widget.cc index 507ccc15..a8305337 100644 --- a/krita/ui/kis_palette_widget.cc +++ b/krita/ui/kis_palette_widget.cc @@ -19,20 +19,20 @@ #include <stdio.h> #include <stdlib.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdrawutil.h> -#include <qevent.h> -#include <qfile.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qvalidator.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qtimer.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdrawutil.h> +#include <tqevent.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqvalidator.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqtimer.h> #include <kapplication.h> #include <kconfig.h> @@ -60,39 +60,39 @@ #include "kis_palette.h" #include "kis_palette_view.h" -KisPaletteWidget::KisPaletteWidget( QWidget *parent, int minWidth, int cols) - : QWidget( parent ), mMinWidth(minWidth), mCols(cols) +KisPaletteWidget::KisPaletteWidget( TQWidget *tqparent, int minWidth, int cols) + : TQWidget( tqparent ), mMinWidth(minWidth), mCols(cols) { init = false; m_currentPalette = 0; - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *tqlayout = new TQVBoxLayout( this ); - combo = new QComboBox( false, this ); - combo->setFocusPolicy( QWidget::ClickFocus ); - layout->addWidget(combo); + combo = new TQComboBox( false, this ); + combo->setFocusPolicy( TQ_ClickFocus ); + tqlayout->addWidget(combo); m_view = new KisPaletteView(this, 0, minWidth, cols); - layout->addWidget( m_view ); - - //setFixedSize(sizeHint()); - - connect(combo, SIGNAL(activated(const QString &)), - this, SLOT(slotSetPalette(const QString &))); - connect(m_view, SIGNAL(colorSelected(const KisColor &)), - this, SIGNAL(colorSelected(const KisColor &))); - connect(m_view, SIGNAL(colorSelected(const QColor &)), - this, SIGNAL(colorSelected(const QColor &))); - connect(m_view, SIGNAL(colorDoubleClicked(const KisColor &, const QString &)), - this, SIGNAL(colorDoubleClicked(const KisColor &, const QString &))); + tqlayout->addWidget( m_view ); + + //setFixedSize(tqsizeHint()); + + connect(combo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotSetPalette(const TQString &))); + connect(m_view, TQT_SIGNAL(colorSelected(const KisColor &)), + this, TQT_SIGNAL(colorSelected(const KisColor &))); + connect(m_view, TQT_SIGNAL(colorSelected(const TQColor &)), + this, TQT_SIGNAL(colorSelected(const TQColor &))); + connect(m_view, TQT_SIGNAL(colorDoubleClicked(const KisColor &, const TQString &)), + this, TQT_SIGNAL(colorDoubleClicked(const KisColor &, const TQString &))); } KisPaletteWidget::~KisPaletteWidget() { } -QString KisPaletteWidget::palette() const +TQString KisPaletteWidget::palette() const { return combo->currentText(); } @@ -107,16 +107,16 @@ QString KisPaletteWidget::palette() const // set the palette and then use the information to emit a signal with the // new color setting. It is only used by the combobox widget. // -void KisPaletteWidget::slotSetPalette( const QString &_paletteName ) +void KisPaletteWidget::slotSetPalette( const TQString &_paletteName ) { setPalette( _paletteName ); m_view->slotColorCellSelected(0); // FIXME: We need to save the current value!! } -void KisPaletteWidget::setPalette( const QString &_paletteName ) +void KisPaletteWidget::setPalette( const TQString &_paletteName ) { - QString paletteName( _paletteName); + TQString paletteName( _paletteName); m_currentPalette = m_namedPaletteMap[paletteName]; diff --git a/krita/ui/kis_palette_widget.h b/krita/ui/kis_palette_widget.h index bdfa8cdf..6323b0a7 100644 --- a/krita/ui/kis_palette_widget.h +++ b/krita/ui/kis_palette_widget.h @@ -19,11 +19,11 @@ #ifndef __KIS_PALETTE_WIDGET_H__ #define __KIS_PALETTE_WIDGET_H__ -#include <qdict.h> +#include <tqdict.h> #include "kis_palette_view.h" -class QComboBox; -class QLineEdit; +class TQComboBox; +class TQLineEdit; class KListBox; class KisPalette; class KisResource; @@ -36,26 +36,27 @@ class KisColor; * @author was Waldo Bastian <bastian@kde.org> -- much has changed, though, * to work with KisPalettes and the resource server. */ -class KisPaletteWidget : public QWidget +class KisPaletteWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KisPaletteWidget( QWidget *parent, int minWidth=210, int cols = 16); + KisPaletteWidget( TQWidget *tqparent, int minWidth=210, int cols = 16); virtual ~KisPaletteWidget(); - QString palette() const; + TQString palette() const; KisPaletteEntry currentEntry() const { return m_view->currentEntry(); } public slots: - void setPalette(const QString &paletteName); + void setPalette(const TQString &paletteName); signals: void colorSelected(const KisColor &); - void colorSelected(const QColor&); - void colorDoubleClicked( const KisColor &, const QString &); + void colorSelected(const TQColor&); + void colorDoubleClicked( const KisColor &, const TQString &); protected slots: - void slotSetPalette( const QString &_paletteName ); + void slotSetPalette( const TQString &_paletteName ); public slots: // Called by the resource server whenever a palette is loaded. @@ -66,10 +67,10 @@ protected: protected: KisPaletteView* m_view; - QDict<KisPalette> m_namedPaletteMap; + TQDict<KisPalette> m_namedPaletteMap; KisPalette * m_currentPalette; - QComboBox *combo; - QScrollView *sv; + TQComboBox *combo; + TQScrollView *sv; int mMinWidth; int mCols; bool init; diff --git a/krita/ui/kis_part_layer.cc b/krita/ui/kis_part_layer.cc index f34f6ebc..233841e3 100644 --- a/krita/ui/kis_part_layer.cc +++ b/krita/ui/kis_part_layer.cc @@ -16,10 +16,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "qpaintdevice.h" -#include "qpixmap.h" -#include "qimage.h" -#include "qpainter.h" +#include "tqpaintdevice.h" +#include "tqpixmap.h" +#include "tqimage.h" +#include "tqpainter.h" #include <klocale.h> @@ -37,7 +37,7 @@ #include "kis_paint_device.h" #include <kis_meta_registry.h> -KisChildDoc::KisChildDoc ( KisDoc * kisDoc, const QRect & rect, KoDocument * childDoc ) +KisChildDoc::KisChildDoc ( KisDoc * kisDoc, const TQRect & rect, KoDocument * childDoc ) : KoDocumentChild( kisDoc, childDoc, rect ) , m_doc(kisDoc) , m_partLayer(0) @@ -54,7 +54,7 @@ KisChildDoc::KisChildDoc ( KisDoc * kisDoc ) KisChildDoc::~KisChildDoc () { // XXX doesn't this get deleted by itself or by anything else? Certainly looks so - // (otherwise I get a double deletion of a QObject, and krita crashes) + // (otherwise I get a double deletion of a TQObject, and krita crashes) //delete m_doc; } @@ -80,33 +80,33 @@ void KisPartLayerImpl::childActivated(KoDocumentChild* child) { // Clear the image, so that if we move the part while activated, no ghosts show up if (!m_activated && child == m_doc) { - QRect rect = extent(); + TQRect rect = extent(); m_activated = true; setDirty(rect); - QPtrList<KoView> views = child->parentDocument()->views(); + TQPtrList<KoView> views = child->tqparentDocument()->views(); Q_ASSERT(views.count()); // XXX iterate over views - connect(views.at(0), SIGNAL(activated(bool)), - this, SLOT(childDeactivated(bool))); + connect(views.at(0), TQT_SIGNAL(activated(bool)), + this, TQT_SLOT(childDeactivated(bool))); } } // Called when another layer is made inactive void KisPartLayerImpl::childDeactivated(bool activated) { - // We probably changed, notify the image that it needs to repaint where we currently updated - // We use the original geometry + // We probably changed, notify the image that it needs to tqrepaint where we currently updated + // We use the original tqgeometry if (m_activated && !activated /* no clue, but debugging suggests it is false here */) { - QPtrList<KoView> views = m_doc->parentDocument()->views(); + TQPtrList<KoView> views = m_doc->tqparentDocument()->views(); Q_ASSERT(views.count()); - views.at(0)->disconnect(SIGNAL(activated(bool))); + views.at(0)->disconnect(TQT_SIGNAL(activated(bool))); m_activated = false; - setDirty(m_doc->geometry()); + setDirty(m_doc->tqgeometry()); } } -void KisPartLayerImpl::setX(Q_INT32 x) { - QRect rect = m_doc->geometry(); +void KisPartLayerImpl::setX(TQ_INT32 x) { + TQRect rect = m_doc->tqgeometry(); // KisPaintDevice::move moves to absolute coordinates, not relative. Work around that here, // since the part is not necesarily started at (0,0) @@ -114,8 +114,8 @@ void KisPartLayerImpl::setX(Q_INT32 x) { m_doc->setGeometry(rect); } -void KisPartLayerImpl::setY(Q_INT32 y) { - QRect rect = m_doc->geometry(); +void KisPartLayerImpl::setY(TQ_INT32 y) { + TQRect rect = m_doc->tqgeometry(); // KisPaintDevice::move moves to absolute coordinates, not relative. Work around that here, // since the part is not necesarily started at (0,0) @@ -123,14 +123,14 @@ void KisPartLayerImpl::setY(Q_INT32 y) { m_doc->setGeometry(rect); } -void KisPartLayerImpl::paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) { +void KisPartLayerImpl::paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { uchar *j = img.bits(); - QRect rect = m_doc->geometry(); + TQRect rect = m_doc->tqgeometry(); for (int y2 = y; y2 < h + y; ++y2) { for (int x2 = x; x2 < w + x; ++x2) { - if (!rect.contains(x2, y2)) { - Q_UINT8 g = (*(j + 0) + *(j + 1 ) + *(j + 2 )) / 9; + if (!rect.tqcontains(x2, y2)) { + TQ_UINT8 g = (*(j + 0) + *(j + 1 ) + *(j + 2 )) / 9; *(j+0) = 165+g; *(j+1) = 128+g; *(j+2) = 128+g; @@ -141,31 +141,31 @@ void KisPartLayerImpl::paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 } -KisPaintDeviceSP KisPartLayerImpl::prepareProjection(KisPaintDeviceSP projection, const QRect& r) +KisPaintDeviceSP KisPartLayerImpl::prepareProjection(KisPaintDeviceSP projection, const TQRect& r) { if (!m_doc || !m_doc->document() || m_activated) return 0; m_cache->clear(); - QRect intersection(r.intersect(exactBounds())); + TQRect intersection(r.intersect(exactBounds())); if (intersection.isEmpty()) return m_cache; // XXX: have a look at the comments and see if they still truthfully represent the code :/ // We know the embedded part's size through the ChildDoc // We move it to (0,0), since that is what we will start painting from in paintEverything. - QRect embedRect(intersection); + TQRect embedRect(intersection); embedRect.moveBy(- exactBounds().x(), - exactBounds().y()); - QRect paintRect(exactBounds()); + TQRect paintRect(exactBounds()); paintRect.moveBy(- exactBounds().x(), - exactBounds().y()); - QPixmap pm1(projection->convertToQImage(0 /*srgb XXX*/, + TQPixmap pm1(projection->convertToTQImage(0 /*srgb XXX*/, intersection.x(), intersection.y(), intersection.width(), intersection.height())); - QPixmap pm2(extent().width(), extent().height()); + TQPixmap pm2(extent().width(), extent().height()); copyBlt(&pm2, embedRect.x(), embedRect.y(), &pm1, 0, 0, embedRect.width(), embedRect.height()); - QPainter painter(&pm2); + TQPainter painter(&pm2); painter.setClipRect(embedRect); // KWord's KWPartFrameSet::drawFrameContents has some interesting remarks concerning @@ -177,32 +177,32 @@ KisPaintDeviceSP KisPartLayerImpl::prepareProjection(KisPaintDeviceSP projection copyBlt(&pm1, 0, 0, &pm2, embedRect.x(), embedRect.y(), embedRect.width(), embedRect.height()); - QImage qimg = pm1.convertToImage(); + TQImage qimg = pm1.convertToImage(); //assume the part is sRGB for now, and that "" is sRGB // And we need to paint offsetted - m_cache->convertFromQImage(qimg, "", intersection.left(), intersection.top()); + m_cache->convertFromTQImage(qimg, "", intersection.left(), intersection.top()); return m_cache; } -QImage KisPartLayerImpl::createThumbnail(Q_INT32 w, Q_INT32 h) { - QRect bounds(exactBounds()); - QPixmap pm(w, h); - QPainter painter(&pm); +TQImage KisPartLayerImpl::createThumbnail(TQ_INT32 w, TQ_INT32 h) { + TQRect bounds(exactBounds()); + TQPixmap pm(w, h); + TQPainter painter(&pm); - painter.fillRect(0, 0, w, h, Qt::white); + painter.fillRect(0, 0, w, h, TQt::white); painter.scale(w / bounds.width(), h / bounds.height()); m_doc->document()->paintEverything(painter, bounds); - QImage qimg = pm.convertToImage(); + TQImage qimg = pm.convertToImage(); return qimg; } -bool KisPartLayerImpl::saveToXML(QDomDocument doc, QDomElement elem) +bool KisPartLayerImpl::saveToXML(TQDomDocument doc, TQDomElement elem) { - QDomElement embeddedElement = doc.createElement("layer"); + TQDomElement embeddedElement = doc.createElement("layer"); embeddedElement.setAttribute("name", name()); // x and y are loaded from the rect element in the embedded object tag @@ -216,7 +216,7 @@ bool KisPartLayerImpl::saveToXML(QDomDocument doc, QDomElement elem) embeddedElement.setAttribute("layertype", "partlayer"); elem.appendChild(embeddedElement); - QDomElement objectElem = childDoc()->save(doc); + TQDomElement objectElem = childDoc()->save(doc); embeddedElement.appendChild(objectElem); return true; @@ -240,10 +240,10 @@ bool KisConnectPartLayerVisitor::visit(KisGroupLayer *layer) { bool KisConnectPartLayerVisitor::visit(KisPartLayer *layer) { if (m_connect) { - QObject::connect(m_view, SIGNAL(childActivated(KoDocumentChild*)), - layer, SLOT(childActivated(KoDocumentChild*))); + TQObject::connect(m_view, TQT_SIGNAL(childActivated(KoDocumentChild*)), + layer, TQT_SLOT(childActivated(KoDocumentChild*))); } else { - QObject::disconnect(m_view, SIGNAL(childActivated(KoDocumentChild*)), layer, 0 ); + TQObject::disconnect(m_view, TQT_SIGNAL(childActivated(KoDocumentChild*)), layer, 0 ); } return true; diff --git a/krita/ui/kis_part_layer.h b/krita/ui/kis_part_layer.h index efe57c28..8980daea 100644 --- a/krita/ui/kis_part_layer.h +++ b/krita/ui/kis_part_layer.h @@ -18,7 +18,7 @@ #ifndef _KIS_PART_LAYER_ #define _KIS_PART_LAYER_ -#include <qrect.h> +#include <tqrect.h> #include <KoDocument.h> #include <KoDocumentChild.h> @@ -41,12 +41,12 @@ class KisChildDoc : public KoDocumentChild { public: - KisChildDoc ( KisDoc * kisDoc, const QRect& rect, KoDocument * childDoc ); + KisChildDoc ( KisDoc * kisDoc, const TQRect& rect, KoDocument * childDoc ); KisChildDoc ( KisDoc * kisDdoc ); virtual ~KisChildDoc(); - KisDoc * parent() const { return m_doc; } + KisDoc * tqparent() const { return m_doc; } void setPartLayer (KisPartLayerSP layer) { m_partLayer = layer; } @@ -73,6 +73,7 @@ protected: */ class KisPartLayerImpl : public KisPartLayer { Q_OBJECT + TQ_OBJECT typedef KisPartLayer super; public: KisPartLayerImpl(KisImageSP img, KisChildDoc * doc); @@ -89,30 +90,30 @@ public: /// Returns the childDoc so that we can access the doc from other places, if need be (KisDoc) virtual KisChildDoc* childDoc() const { return m_doc; } - void setDocType(const QString& type) { m_docType = type; } - QString docType() const { return m_docType; } + void setDocType(const TQString& type) { m_docType = type; } + TQString docType() const { return m_docType; } - virtual void setX(Q_INT32 x); - virtual void setY(Q_INT32 y); - virtual Q_INT32 x() const { return m_doc->geometry() . x(); } - virtual Q_INT32 y() const { return m_doc->geometry() . y(); } //m_paintLayer->y(); } - virtual QRect extent() const { return m_doc->geometry(); } - virtual QRect exactBounds() const { return m_doc->geometry(); } + virtual void setX(TQ_INT32 x); + virtual void setY(TQ_INT32 y); + virtual TQ_INT32 x() const { return m_doc->tqgeometry() . x(); } + virtual TQ_INT32 y() const { return m_doc->tqgeometry() . y(); } //m_paintLayer->y(); } + virtual TQRect extent() const { return m_doc->tqgeometry(); } + virtual TQRect exactBounds() const { return m_doc->tqgeometry(); } - virtual QImage createThumbnail(Q_INT32 w, Q_INT32 h); + virtual TQImage createThumbnail(TQ_INT32 w, TQ_INT32 h); virtual bool accept(KisLayerVisitor& visitor) { return visitor.visit(this); } - virtual KisPaintDeviceSP prepareProjection(KisPaintDeviceSP projection, const QRect& r); + virtual KisPaintDeviceSP prepareProjection(KisPaintDeviceSP projection, const TQRect& r); - virtual void paintSelection(QImage &img, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); + virtual void paintSelection(TQImage &img, TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); - virtual bool saveToXML(QDomDocument doc, QDomElement elem); + virtual bool saveToXML(TQDomDocument doc, TQDomElement elem); private slots: /// Repaints our device with the data from the embedded part - //void repaint(); + //void tqrepaint(); /// When we activate the embedding, we clear ourselves void childActivated(KoDocumentChild* child); void childDeactivated(bool activated); @@ -123,7 +124,7 @@ private: KisPaintDeviceSP m_cache; KoFrame * m_frame; // The widget that holds the editable view of the embedded part KisChildDoc * m_doc; // The sub-document - QString m_docType; + TQString m_docType; bool m_activated; }; diff --git a/krita/ui/kis_part_layer_handler.cc b/krita/ui/kis_part_layer_handler.cc index 787de872..f062e4a1 100644 --- a/krita/ui/kis_part_layer_handler.cc +++ b/krita/ui/kis_part_layer_handler.cc @@ -19,8 +19,8 @@ #include "kis_canvas.h" #include <fixx11h.h> // kis_canvas.h does X11 stuff -#include <qpainter.h> -#include <qcursor.h> +#include <tqpainter.h> +#include <tqcursor.h> #include "kis_cursor.h" #include "kis_canvas_painter.h" @@ -31,8 +31,8 @@ #include "kis_part_layer_handler.h" KisPartLayerHandler::KisPartLayerHandler(KisView* view, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above) - : m_parent(parent), m_above(above), m_view(view), m_entry(entry) { + KisGroupLayerSP tqparent, KisLayerSP above) + : m_parent(tqparent), m_above(above), m_view(view), m_entry(entry) { m_started = false; view->getCanvasController()->setCanvasCursor( KisCursor::selectCursor() ); } @@ -51,20 +51,20 @@ void KisPartLayerHandler::gotMoveEvent(KisMoveEvent* event) { painter.setRasterOp( NotROP ); // erase old lines - QRect r(m_start, m_end); + TQRect r(m_start, m_end); r = r.normalize(); if (!r.isEmpty()) painter.drawRect(r); - m_end = event->pos().roundQPoint(); - r = QRect(m_start, m_end).normalize(); + m_end = event->pos().roundTQPoint(); + r = TQRect(m_start, m_end).normalize(); painter.drawRect(r); painter.end(); } void KisPartLayerHandler::gotButtonPressEvent(KisButtonPressEvent* event) { - m_start = event->pos().roundQPoint(); + m_start = event->pos().roundTQPoint(); m_end = m_start; m_started = true; } @@ -75,15 +75,15 @@ void KisPartLayerHandler::gotButtonReleaseEvent(KisButtonReleaseEvent* event) { return; } - m_end = event->pos().roundQPoint(); + m_end = event->pos().roundTQPoint(); - QRect r(m_start, m_end); + TQRect r(m_start, m_end); m_view->insertPart(r.normalize(), m_entry, m_parent, m_above); // We will get deleted by the view through the above } -void KisPartLayerHandler::gotKeyPressEvent(QKeyEvent* event) { +void KisPartLayerHandler::gotKeyPressEvent(TQKeyEvent* event) { if (event->key() == Key_Escape) { done(); } else { diff --git a/krita/ui/kis_part_layer_handler.h b/krita/ui/kis_part_layer_handler.h index 7b6d3f0b..746b23d9 100644 --- a/krita/ui/kis_part_layer_handler.h +++ b/krita/ui/kis_part_layer_handler.h @@ -18,23 +18,24 @@ #ifndef KIS_PART_LAYER_HANDLER_ #define KIS_PART_LAYER_HANDLER_ -#include <qobject.h> +#include <tqobject.h> #include <KoQueryTrader.h> // KoDocumentEntry #include "kis_types.h" #include "kis_doc.h" #include "kis_view.h" -class QKeyEvent; +class TQKeyEvent; -class KisPartLayerHandler : public QObject { +class KisPartLayerHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: KisPartLayerHandler(KisView* view, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above); + KisGroupLayerSP tqparent, KisLayerSP above); signals: void sigGotMoveEvent(KisMoveEvent* event); - void sigGotKeyPressEvent(QKeyEvent* event); + void sigGotKeyPressEvent(TQKeyEvent* event); void handlerDone(); protected slots: @@ -42,15 +43,15 @@ protected slots: void gotMoveEvent(KisMoveEvent* event); void gotButtonPressEvent(KisButtonPressEvent* event); void gotButtonReleaseEvent(KisButtonReleaseEvent* event); - void gotKeyPressEvent(QKeyEvent* event); + void gotKeyPressEvent(TQKeyEvent* event); protected: void done(); KisGroupLayerSP m_parent; KisLayerSP m_above; KisView* m_view; KoDocumentEntry m_entry; - QPoint m_start; - QPoint m_end; + TQPoint m_start; + TQPoint m_end; bool m_started; }; diff --git a/krita/ui/kis_pattern_chooser.cc b/krita/ui/kis_pattern_chooser.cc index 8a9d08b0..f19200bf 100644 --- a/krita/ui/kis_pattern_chooser.cc +++ b/krita/ui/kis_pattern_chooser.cc @@ -15,8 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klocale.h> #include <koIconChooser.h> @@ -26,11 +26,11 @@ #include "kis_icon_item.h" #include "kis_pattern.h" -KisPatternChooser::KisPatternChooser(QWidget *parent, const char *name) : super(parent, name) +KisPatternChooser::KisPatternChooser(TQWidget *tqparent, const char *name) : super(tqparent, name) { - m_lbName = new QLabel(this); + m_lbName = new TQLabel(this); - QVBoxLayout *mainLayout = new QVBoxLayout(this, 2, -1, "main layout"); + TQVBoxLayout *mainLayout = new TQVBoxLayout(this, 2, -1, "main tqlayout"); mainLayout->addWidget(m_lbName); mainLayout->addWidget(chooserWidget(), 10); @@ -47,7 +47,7 @@ void KisPatternChooser::update(KoIconItem *item) if (item) { KisPattern *pattern = static_cast<KisPattern *>(kisItem->resource()); - QString text = QString("%1 (%2 x %3)").arg(pattern->name()).arg(pattern->width()).arg(pattern->height()); + TQString text = TQString("%1 (%2 x %3)").tqarg(pattern->name()).tqarg(pattern->width()).tqarg(pattern->height()); m_lbName->setText(text); } diff --git a/krita/ui/kis_pattern_chooser.h b/krita/ui/kis_pattern_chooser.h index 76514f71..b7a61080 100644 --- a/krita/ui/kis_pattern_chooser.h +++ b/krita/ui/kis_pattern_chooser.h @@ -20,21 +20,22 @@ #include "kis_itemchooser.h" -class QLabel; +class TQLabel; class KisPatternChooser : public KisItemChooser { typedef KisItemChooser super; Q_OBJECT + TQ_OBJECT public: - KisPatternChooser(QWidget *parent = 0, const char *name = 0); + KisPatternChooser(TQWidget *tqparent = 0, const char *name = 0); virtual ~KisPatternChooser(); protected: virtual void update(KoIconItem *item); private: - QLabel *m_lbName; + TQLabel *m_lbName; }; #endif // KIS_PATTERN_CHOOSER_H_ diff --git a/krita/ui/kis_perspective_grid_manager.cpp b/krita/ui/kis_perspective_grid_manager.cpp index 13c5cb13..8935eb7f 100644 --- a/krita/ui/kis_perspective_grid_manager.cpp +++ b/krita/ui/kis_perspective_grid_manager.cpp @@ -29,10 +29,10 @@ #include "kis_perspective_grid.h" #include "kis_view.h" -KisPerspectiveGridManager::KisPerspectiveGridManager(KisView * parent) - : QObject() +KisPerspectiveGridManager::KisPerspectiveGridManager(KisView * tqparent) + : TQObject() , m_toggleEdition(false) - , m_view(parent) + , m_view(tqparent) { } @@ -57,10 +57,10 @@ void KisPerspectiveGridManager::updateGUI() void KisPerspectiveGridManager::setup(KActionCollection * collection) { kdDebug() << "KisPerspectiveGridManager::setup(KActionCollection * collection)" << endl; - m_toggleGrid = new KToggleAction(i18n("Show Perspective Grid"), "", this, SLOT(toggleGrid()), collection, "view_toggle_perspective_grid"); + m_toggleGrid = new KToggleAction(i18n("Show Perspective Grid"), "", this, TQT_SLOT(toggleGrid()), collection, "view_toggle_perspective_grid"); m_toggleGrid->setCheckedState(KGuiItem(i18n("Hide Perspective Grid"))); m_toggleGrid->setChecked(false); - m_gridClear = new KAction(i18n("Clear Perspective Grid"), 0, "", this, SLOT(clearPerspectiveGrid()), collection, "view_clear_perspective_grid"); + m_gridClear = new KAction(i18n("Clear Perspective Grid"), 0, "", this, TQT_SLOT(clearPerspectiveGrid()), collection, "view_clear_perspective_grid"); } void KisPerspectiveGridManager::setGridVisible(bool t) @@ -125,7 +125,7 @@ void KisPerspectiveGridManager::stopEdition() m_view->updateCanvas(); } -void KisPerspectiveGridManager::drawGrid(QRect wr, QPainter *p, bool openGL ) +void KisPerspectiveGridManager::drawGrid(TQRect wr, TQPainter *p, bool openGL ) { KisImageSP image = m_view->canvasSubject()->currentImg(); @@ -141,13 +141,13 @@ void KisPerspectiveGridManager::drawGrid(QRect wr, QPainter *p, bool openGL ) Q_ASSERT(p); if (p) { - gridDrawer = new QPainterGridDrawer(p); + gridDrawer = new TQPainterGridDrawer(p); } } Q_ASSERT(gridDrawer != 0); - for( QValueList<KisSubPerspectiveGrid*>::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) + for( TQValueList<KisSubPerspectiveGrid*>::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) { gridDrawer->drawPerspectiveGrid(image, wr, *it ); } diff --git a/krita/ui/kis_perspective_grid_manager.h b/krita/ui/kis_perspective_grid_manager.h index a23abef3..55c7d836 100644 --- a/krita/ui/kis_perspective_grid_manager.h +++ b/krita/ui/kis_perspective_grid_manager.h @@ -21,21 +21,22 @@ #ifndef KIS_PERSPECTIVE_GRID_MANAGER_H #define KIS_PERSPECTIVE_GRID_MANAGER_H -#include <qobject.h> +#include <tqobject.h> class KAction; class KActionCollection; class KToggleAction; class KisView; -class KisPerspectiveGridManager : public QObject +class KisPerspectiveGridManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisPerspectiveGridManager(KisView * parent); + KisPerspectiveGridManager(KisView * tqparent); ~KisPerspectiveGridManager(); void setup(KActionCollection * collection); - void drawGrid(QRect wr, QPainter *p, bool openGL = false); + void drawGrid(TQRect wr, TQPainter *p, bool openGL = false); void startEdition(); void stopEdition(); void setGridVisible(bool t); diff --git a/krita/ui/kis_populate_visitor.h b/krita/ui/kis_populate_visitor.h index ee43e825..d228137a 100644 --- a/krita/ui/kis_populate_visitor.h +++ b/krita/ui/kis_populate_visitor.h @@ -41,9 +41,9 @@ class KisPopulateVisitor: public KisLayerVisitor , m_parent(0) { } - KisPopulateVisitor(KisLayerItem* parent) - : m_widget(parent->listView()) - , m_parent(parent) + KisPopulateVisitor(KisLayerItem* tqparent) + : m_widget(tqparent->listView()) + , m_parent(tqparent) { } virtual bool visit(KisPaintLayer* layer) diff --git a/krita/ui/kis_previewdialog.cc b/krita/ui/kis_previewdialog.cc index 6b746776..53005142 100644 --- a/krita/ui/kis_previewdialog.cc +++ b/krita/ui/kis_previewdialog.cc @@ -17,25 +17,25 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qframe.h> -#include <qhbox.h> -#include <qgroupbox.h> -#include <qlayout.h> +#include <tqframe.h> +#include <tqhbox.h> +#include <tqgroupbox.h> +#include <tqlayout.h> #include "kis_previewwidget.h" #include "kis_previewdialog.h" -KisPreviewDialog::KisPreviewDialog( QWidget * parent, const char * name, bool modal, const QString &caption) - : super (parent, name, modal, caption, Ok | Cancel, Ok) +KisPreviewDialog::KisPreviewDialog( TQWidget * tqparent, const char * name, bool modal, const TQString &caption) + : super (tqparent, name, modal, caption, Ok | Cancel, Ok) { - QHBox* layout = new QHBox(this); - layout->setSpacing( 6 ); + TQHBox* tqlayout = new TQHBox(this); + tqlayout->setSpacing( 6 ); - m_containerFrame = new QFrame( layout, "container" ); + m_containerFrame = new TQFrame( tqlayout, "container" ); - m_preview = new KisPreviewWidget( layout, "previewWidget" ); + m_preview = new KisPreviewWidget( tqlayout, "previewWidget" ); - setMainWidget(layout); + setMainWidget(tqlayout); } KisPreviewDialog::~KisPreviewDialog() diff --git a/krita/ui/kis_previewdialog.h b/krita/ui/kis_previewdialog.h index ef46b066..7cbaa1cd 100644 --- a/krita/ui/kis_previewdialog.h +++ b/krita/ui/kis_previewdialog.h @@ -24,21 +24,22 @@ #include <kdialogbase.h> class KisPreviewWidget; -class QFrame; +class TQFrame; class KisPreviewDialog: public KDialogBase { typedef KDialogBase super; Q_OBJECT + TQ_OBJECT public: - KisPreviewDialog( QWidget* parent = 0, const char* name = 0, bool modal = false, const QString &caption=QString::null); + KisPreviewDialog( TQWidget* tqparent = 0, const char* name = 0, bool modal = false, const TQString &caption=TQString()); ~KisPreviewDialog(); KisPreviewWidget* previewWidget() { return m_preview; } - QFrame* container() { return m_containerFrame; } + TQFrame* container() { return m_containerFrame; } private: KisPreviewWidget* m_preview; - QFrame* m_containerFrame; + TQFrame* m_containerFrame; }; #endif diff --git a/krita/ui/kis_previewwidget.cc b/krita/ui/kis_previewwidget.cc index 363302f7..a8e2a78e 100644 --- a/krita/ui/kis_previewwidget.cc +++ b/krita/ui/kis_previewwidget.cc @@ -21,18 +21,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qpainter.h> -#include <qpoint.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qapplication.h> -#include <qcolor.h> -#include <qgroupbox.h> -#include <qcursor.h> -#include <qtimer.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqpainter.h> +#include <tqpoint.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqapplication.h> +#include <tqcolor.h> +#include <tqgroupbox.h> +#include <tqcursor.h> +#include <tqtimer.h> #include <kdebug.h> #include <kiconloader.h> @@ -65,8 +65,8 @@ static const int ZOOM_PAUSE = 100; static const int FILTER_PAUSE = 500; static const double ZOOM_FACTOR = 1.1; -KisPreviewWidget::KisPreviewWidget( QWidget* parent, const char* name ) - : PreviewWidgetBase( parent, name ) +KisPreviewWidget::KisPreviewWidget( TQWidget* tqparent, const char* name ) + : PreviewWidgetBase( tqparent, name ) , m_autoupdate(true) , m_previewIsDisplayed(true) , m_scaledOriginal() @@ -80,42 +80,42 @@ KisPreviewWidget::KisPreviewWidget( QWidget* parent, const char* name ) , m_zoom(-1.0) , m_profile(NULL) , m_progress( 0 ) - , m_zoomTimer(new QTimer(this)) - , m_filterTimer(new QTimer(this)) + , m_zoomTimer(new TQTimer(this)) + , m_filterTimer(new TQTimer(this)) , m_firstFilter(true) , m_firstZoom(true) { btnZoomIn->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag+", KIcon::MainToolbar, 16 )); - connect(btnZoomIn, SIGNAL(clicked()), this, SLOT(zoomIn())); + connect(btnZoomIn, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomIn())); btnZoomOut->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag-", KIcon::MainToolbar, 16 )); - connect(btnZoomOut, SIGNAL(clicked()), this, SLOT(zoomOut())); + connect(btnZoomOut, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOut())); btnUpdate->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "reload", KIcon::MainToolbar, 16 )); - connect(btnUpdate, SIGNAL(clicked()), this, SLOT(forceUpdate())); + connect(btnUpdate, TQT_SIGNAL(clicked()), this, TQT_SLOT(forceUpdate())); - connect(radioBtnPreview, SIGNAL(toggled(bool)), this, SLOT(setPreviewDisplayed(bool))); + connect(radioBtnPreview, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setPreviewDisplayed(bool))); - connect(checkBoxAutoUpdate, SIGNAL(toggled(bool)), this, SLOT(slotSetAutoUpdate(bool))); + connect(checkBoxAutoUpdate, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetAutoUpdate(bool))); btnZoomOneToOne->setIconSet(KGlobal::instance()->iconLoader()->loadIconSet( "viewmag1", KIcon::MainToolbar, 16 )); - connect(btnZoomOneToOne, SIGNAL(clicked()), this, SLOT(zoomOneToOne())); + connect(btnZoomOneToOne, TQT_SIGNAL(clicked()), this, TQT_SLOT(zoomOneToOne())); m_progress = new KisLabelProgress(frmProgress); m_progress->setMaximumHeight(fontMetrics().height() ); - QVBoxLayout *vbox = new QVBoxLayout( frmProgress ); + TQVBoxLayout *vbox = new TQVBoxLayout( frmProgress ); vbox->addWidget(m_progress); m_progress->hide(); - connect(m_zoomTimer, SIGNAL(timeout()), this, SLOT(updateZoom())); - connect(m_filterTimer, SIGNAL(timeout()), this, SLOT(runFilterHelper())); + connect(m_zoomTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateZoom())); + connect(m_filterTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(runFilterHelper())); /* kToolBar1->insertLineSeparator(); kToolBar1->insertButton("reload",2, true, i18n("Update")); - connect(kToolBar1->getButton(2),SIGNAL(clicked()),this,SLOT(forceUpdate())); + connect(kToolBar1->getButton(2),TQT_SIGNAL(clicked()),this,TQT_SLOT(forceUpdate())); kToolBar1->insertButton("",3, true, i18n("Auto Update")); - connect(kToolBar1->getButton(3),SIGNAL(clicked()),this,SLOT(toggleAutoUpdate())); + connect(kToolBar1->getButton(3),TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleAutoUpdate())); kToolBar1->insertButton("",4, true, i18n("Switch")); - connect(kToolBar1->getButton(4),SIGNAL(clicked()),this,SLOT(toggleImageDisplayed()));*/ + connect(kToolBar1->getButton(4),TQT_SIGNAL(clicked()),this,TQT_SLOT(toggleImageDisplayed()));*/ // these currently don't yet work, reenable when they do work :) (TZ-12-2005) // TODO reenable these // kToolBar1->insertButton("",5, true, i18n("Popup Original and Preview")); @@ -143,10 +143,10 @@ void KisPreviewWidget::slotSetDevice(KisPaintDeviceSP dev) m_filterZoom = 1.0; KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); m_profile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); - QRect r = dev->exactBounds(); + TQRect r = dev->exactBounds(); m_groupBox->setTitle(i18n("Preview: ") + dev->name()); m_previewIsDisplayed = true; @@ -157,44 +157,44 @@ void KisPreviewWidget::slotSetDevice(KisPaintDeviceSP dev) void KisPreviewWidget::updateZoom() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); if(m_previewIsDisplayed) { if(m_dirtyPreview) { - QSize r = m_previewDevice->extent().size(); + TQSize r = m_previewDevice->extent().size(); int w = r.width(), h = r.height(); int sw = int(ceil(m_zoom * w / m_filterZoom)); int sh = int(ceil(m_zoom * h / m_filterZoom)); m_dirtyPreview = false; - m_scaledPreview = m_previewDevice->convertToQImage(m_profile, 0, 0, w, h); - m_scaledPreview = m_scaledPreview.scale(sw,sh, QImage::ScaleMax); // Use scale instead of smoothScale for speed up + m_scaledPreview = m_previewDevice->convertToTQImage(m_profile, 0, 0, w, h); + m_scaledPreview = m_scaledPreview.scale(sw,sh, TQ_ScaleMax); // Use scale instead of smoothScale for speed up } m_preview->setImage(m_scaledPreview); } else { if(m_dirtyOriginal) { - QSize r = m_origDevice->extent().size(); + TQSize r = m_origDevice->extent().size(); int w = r.width(), h = r.height(); int sw = int(ceil(m_zoom * w)); int sh = int(ceil(m_zoom * h)); m_dirtyOriginal = false; - m_scaledOriginal = m_origDevice->convertToQImage(m_profile, 0, 0, w, h); - m_scaledOriginal = m_scaledOriginal.scale(sw,sh, QImage::ScaleMax); // Use scale instead of smoothScale for speed up + m_scaledOriginal = m_origDevice->convertToTQImage(m_profile, 0, 0, w, h); + m_scaledOriginal = m_scaledOriginal.scale(sw,sh, TQ_ScaleMax); // Use scale instead of smoothScale for speed up } m_preview->setImage(m_scaledOriginal); } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void KisPreviewWidget::slotSetAutoUpdate(bool set) { m_autoupdate = set; } -void KisPreviewWidget::wheelEvent(QWheelEvent * e) +void KisPreviewWidget::wheelEvent(TQWheelEvent * e) { if (e->delta() > 0) { zoomIn(); @@ -264,7 +264,7 @@ void KisPreviewWidget::zoomOneToOne() { } static inline void cropDevice(KisPaintDevice * device, const double & zoom) { - QRect r = device->exactBounds(); + TQRect r = device->exactBounds(); r.setX(int(zoom * r.x()) ); r.setY(int(zoom * r.y()) ); r.setWidth(int(zoom * r.width()) ); @@ -333,9 +333,9 @@ void KisPreviewWidget::runFilterHelper() { if (m_origDevice->image()) { m_scaledImage = new KisImage(*m_origDevice->image()); - if(!m_origDevice->parentLayer()) return; - QString layerName = m_origDevice->parentLayer()->name(); - KisPaintLayerSP pl = ::qt_cast<KisPaintLayer*>(m_scaledImage->findLayer(layerName)); + if(!m_origDevice->tqparentLayer()) return; + TQString layerName = m_origDevice->tqparentLayer()->name(); + KisPaintLayerSP pl = ::tqqt_cast<KisPaintLayer*>(m_scaledImage->findLayer(layerName)); if(!pl) return; scaledDevice = pl->paintDevice(); @@ -356,7 +356,7 @@ void KisPreviewWidget::runFilterHelper() { 0.0, 0.0, 0.0, 0, 0, NULL, &strategy); tw.run(); scaledDevice->setSelection(select); - select->setParentLayer(scaledDevice->parentLayer()); + select->setParentLayer(scaledDevice->tqparentLayer()); } // Crop by the zoom value instead of cropping by rectangle. It gives better results diff --git a/krita/ui/kis_previewwidget.h b/krita/ui/kis_previewwidget.h index f3b38e98..e507ea60 100644 --- a/krita/ui/kis_previewwidget.h +++ b/krita/ui/kis_previewwidget.h @@ -23,18 +23,18 @@ #ifndef __kis_previewwidget_h__ #define __kis_previewwidget_h__ -#include <qimage.h> -#include <qevent.h> +#include <tqimage.h> +#include <tqevent.h> #include "kis_types.h" #include "kis_previewwidgetbase.h" -class QWidget; +class TQWidget; class KisProfile; class KisFilter; class KisFilterConfiguration; -class QTimer; +class TQTimer; class KisLabelProgress; /** @@ -48,16 +48,17 @@ class KisLabelProgress; class KisPreviewWidget : public PreviewWidgetBase { Q_OBJECT + TQ_OBJECT public: /** Constructs the widget */ - KisPreviewWidget( QWidget* parent = 0, const char* name = 0 ); + KisPreviewWidget( TQWidget* tqparent = 0, const char* name = 0 ); virtual ~KisPreviewWidget(); /** returns if the preview is automatically updated */ bool getAutoUpdate() const; - void wheelEvent(QWheelEvent * e); + void wheelEvent(TQWheelEvent * e); /** Instructs the KisPreviewWidget to eventually update the preview. * KisPreviewWidget delays the actual running of the filter for 500ms @@ -114,23 +115,23 @@ private: bool m_autoupdate; /// Flag indicating that the widget should auto update whenever a setting is changed bool m_previewIsDisplayed; /// Flag indicating whether the filtered or original image is displayed - QImage m_scaledOriginal; /// QImage copy of the original image + TQImage m_scaledOriginal; /// TQImage copy of the original image bool m_dirtyOriginal; /// flag indicating that the original image is dirty KisPaintDeviceSP m_origDevice; /// Pointer to the original image - QImage m_scaledPreview; /// QImage copy of the filtered image + TQImage m_scaledPreview; /// TQImage copy of the filtered image bool m_dirtyPreview; /// flag indicating that the preview image is dirty KisPaintDeviceSP m_previewDevice; /// Pointer to the preview image KisImageSP m_scaledImage; /// Scaled image copied from the original double m_filterZoom; /// Zoom amount when the filtering occurred double m_zoom; /// Current zoom amount - KisProfile * m_profile; /// the color profile to use when converting to QImage + KisProfile * m_profile; /// the color profile to use when converting to TQImage KisLabelProgress *m_progress; /// Progress bar of the preview. - QTimer * m_zoomTimer; /// Timer used to update the view whenever the zoom changes - QTimer * m_filterTimer; /// Timer used to update the view whenever the filter changes + TQTimer * m_zoomTimer; /// Timer used to update the view whenever the zoom changes + TQTimer * m_filterTimer; /// Timer used to update the view whenever the filter changes KisFilter * m_filter; /// Filter used KisFilterConfiguration * m_config; /// Configuration used bool m_firstFilter; /// Flag to determine if we should delay the first filter or not diff --git a/krita/ui/kis_previewwidgetbase.ui b/krita/ui/kis_previewwidgetbase.ui index f50fba6a..6ee64019 100644 --- a/krita/ui/kis_previewwidgetbase.ui +++ b/krita/ui/kis_previewwidgetbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>PreviewWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PreviewWidgetBase</cstring> </property> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -33,7 +33,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_groupBox</cstring> </property> @@ -56,13 +56,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>150</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>1000</width> <height>1000</height> @@ -71,15 +71,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -93,7 +93,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioBtnPreview</cstring> </property> @@ -107,7 +107,7 @@ <string>Preview modified layer</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioBtnOriginal</cstring> </property> @@ -120,17 +120,17 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -194,7 +194,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkBoxAutoUpdate</cstring> </property> @@ -210,7 +210,7 @@ </widget> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frmProgress</cstring> </property> @@ -260,7 +260,7 @@ <data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>imageviewer.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/krita/ui/kis_qpaintdevice_canvas.cc b/krita/ui/kis_qpaintdevice_canvas.cc index 675b7138..da1132e6 100644 --- a/krita/ui/kis_qpaintdevice_canvas.cc +++ b/krita/ui/kis_qpaintdevice_canvas.cc @@ -23,96 +23,96 @@ #include "kis_qpaintdevice_canvas_painter.h" #include <kdebug.h> -KisQPaintDeviceCanvasWidget::KisQPaintDeviceCanvasWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KisTQPaintDeviceCanvasWidget::KisTQPaintDeviceCanvasWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { } -KisQPaintDeviceCanvasWidget::~KisQPaintDeviceCanvasWidget() +KisTQPaintDeviceCanvasWidget::~KisTQPaintDeviceCanvasWidget() { } -void KisQPaintDeviceCanvasWidget::paintEvent(QPaintEvent *e) +void KisTQPaintDeviceCanvasWidget::paintEvent(TQPaintEvent *e) { widgetGotPaintEvent(e); } -void KisQPaintDeviceCanvasWidget::mousePressEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mousePressEvent(TQMouseEvent *e) { widgetGotMousePressEvent(e); } -void KisQPaintDeviceCanvasWidget::mouseReleaseEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mouseReleaseEvent(TQMouseEvent *e) { widgetGotMouseReleaseEvent(e); } -void KisQPaintDeviceCanvasWidget::mouseDoubleClickEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mouseDoubleClickEvent(TQMouseEvent *e) { widgetGotMouseDoubleClickEvent(e); } -void KisQPaintDeviceCanvasWidget::mouseMoveEvent(QMouseEvent *e) +void KisTQPaintDeviceCanvasWidget::mouseMoveEvent(TQMouseEvent *e) { widgetGotMouseMoveEvent(e); } -void KisQPaintDeviceCanvasWidget::tabletEvent(QTabletEvent *e) +void KisTQPaintDeviceCanvasWidget::tabletEvent(TQTabletEvent *e) { widgetGotTabletEvent(e); } -void KisQPaintDeviceCanvasWidget::enterEvent(QEvent *e) +void KisTQPaintDeviceCanvasWidget::enterEvent(TQEvent *e) { widgetGotEnterEvent(e); } -void KisQPaintDeviceCanvasWidget::leaveEvent(QEvent *e) +void KisTQPaintDeviceCanvasWidget::leaveEvent(TQEvent *e) { widgetGotLeaveEvent(e); } -void KisQPaintDeviceCanvasWidget::wheelEvent(QWheelEvent *e) +void KisTQPaintDeviceCanvasWidget::wheelEvent(TQWheelEvent *e) { widgetGotWheelEvent(e); } -void KisQPaintDeviceCanvasWidget::keyPressEvent(QKeyEvent *e) +void KisTQPaintDeviceCanvasWidget::keyPressEvent(TQKeyEvent *e) { widgetGotKeyPressEvent(e); } -void KisQPaintDeviceCanvasWidget::keyReleaseEvent(QKeyEvent *e) +void KisTQPaintDeviceCanvasWidget::keyReleaseEvent(TQKeyEvent *e) { widgetGotKeyReleaseEvent(e); } -void KisQPaintDeviceCanvasWidget::dragEnterEvent(QDragEnterEvent *e) +void KisTQPaintDeviceCanvasWidget::dragEnterEvent(TQDragEnterEvent *e) { widgetGotDragEnterEvent(e); } -void KisQPaintDeviceCanvasWidget::dropEvent(QDropEvent *e) +void KisTQPaintDeviceCanvasWidget::dropEvent(TQDropEvent *e) { widgetGotDropEvent(e); } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 -bool KisQPaintDeviceCanvasWidget::x11Event(XEvent *event) +bool KisTQPaintDeviceCanvasWidget::x11Event(XEvent *event) { - return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(QPoint(0, 0))); + return KisCanvasWidget::x11Event(event, x11Display(), winId(), mapToGlobal(TQPoint(0, 0))); } -#endif // Q_WS_X11 +#endif // TQ_WS_X11 -KisCanvasWidgetPainter *KisQPaintDeviceCanvasWidget::createPainter() +KisCanvasWidgetPainter *KisTQPaintDeviceCanvasWidget::createPainter() { - return new KisQPaintDeviceCanvasPainter(this); + return new KisTQPaintDeviceCanvasPainter(this); } #if defined(EXTENDED_X11_TABLET_SUPPORT) -void KisQPaintDeviceCanvasWidget::selectTabletDeviceEvents() +void KisTQPaintDeviceCanvasWidget::selectTabletDeviceEvents() { KisCanvasWidget::selectTabletDeviceEvents(this); } diff --git a/krita/ui/kis_qpaintdevice_canvas.h b/krita/ui/kis_qpaintdevice_canvas.h index 1046337a..a74e2650 100644 --- a/krita/ui/kis_qpaintdevice_canvas.h +++ b/krita/ui/kis_qpaintdevice_canvas.h @@ -17,26 +17,26 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_QPAINTDEVICE_CANVAS_H_ -#define KIS_QPAINTDEVICE_CANVAS_H_ +#ifndef KIS_TQPAINTDEVICE_CANVAS_H_ +#define KIS_TQPAINTDEVICE_CANVAS_H_ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> #include "kis_global.h" #include "kis_canvas.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/Xlib.h> -#endif // Q_WS_X11 +#endif // TQ_WS_X11 -class KisQPaintDeviceCanvasWidget : public virtual QWidget, public virtual KisCanvasWidget { +class KisTQPaintDeviceCanvasWidget : public virtual TQWidget, public virtual KisCanvasWidget { public: - KisQPaintDeviceCanvasWidget(QWidget *parent = 0, const char *name = 0); - ~KisQPaintDeviceCanvasWidget(); + KisTQPaintDeviceCanvasWidget(TQWidget *tqparent = 0, const char *name = 0); + ~KisTQPaintDeviceCanvasWidget(); virtual KisCanvasWidgetPainter *createPainter(); @@ -45,23 +45,23 @@ public: #endif protected: - virtual void paintEvent(QPaintEvent *event); - virtual void mousePressEvent(QMouseEvent *event); - virtual void mouseReleaseEvent(QMouseEvent *event); - virtual void mouseDoubleClickEvent(QMouseEvent *event); - virtual void mouseMoveEvent(QMouseEvent *event); - virtual void tabletEvent(QTabletEvent *event); - virtual void enterEvent(QEvent *event ); - virtual void leaveEvent(QEvent *event); - virtual void wheelEvent(QWheelEvent *event); - virtual void keyPressEvent(QKeyEvent *event); - virtual void keyReleaseEvent(QKeyEvent *event); - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); -#ifdef Q_WS_X11 + virtual void paintEvent(TQPaintEvent *event); + virtual void mousePressEvent(TQMouseEvent *event); + virtual void mouseReleaseEvent(TQMouseEvent *event); + virtual void mouseDoubleClickEvent(TQMouseEvent *event); + virtual void mouseMoveEvent(TQMouseEvent *event); + virtual void tabletEvent(TQTabletEvent *event); + virtual void enterEvent(TQEvent *event ); + virtual void leaveEvent(TQEvent *event); + virtual void wheelEvent(TQWheelEvent *event); + virtual void keyPressEvent(TQKeyEvent *event); + virtual void keyReleaseEvent(TQKeyEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); +#ifdef TQ_WS_X11 bool x11Event(XEvent *event); -#endif // Q_WS_X11 +#endif // TQ_WS_X11 }; -#endif // KIS_QPAINTDEVICE_CANVAS_H_ +#endif // KIS_TQPAINTDEVICE_CANVAS_H_ diff --git a/krita/ui/kis_qpaintdevice_canvas_painter.cc b/krita/ui/kis_qpaintdevice_canvas_painter.cc index eb68117d..e8a8e696 100644 --- a/krita/ui/kis_qpaintdevice_canvas_painter.cc +++ b/krita/ui/kis_qpaintdevice_canvas_painter.cc @@ -20,22 +20,22 @@ #include "kis_canvas_painter.h" #include "kis_qpaintdevice_canvas_painter.h" -KisQPaintDeviceCanvasPainter::KisQPaintDeviceCanvasPainter() +KisTQPaintDeviceCanvasPainter::KisTQPaintDeviceCanvasPainter() { } -KisQPaintDeviceCanvasPainter::KisQPaintDeviceCanvasPainter(const QPaintDevice *paintDevice) +KisTQPaintDeviceCanvasPainter::KisTQPaintDeviceCanvasPainter(const TQPaintDevice *paintDevice) : m_painter(paintDevice) { } -KisQPaintDeviceCanvasPainter::~KisQPaintDeviceCanvasPainter() +KisTQPaintDeviceCanvasPainter::~KisTQPaintDeviceCanvasPainter() { } -bool KisQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool unclipped) +bool KisTQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool unclipped) { - QWidget *widget = dynamic_cast<QWidget *>(canvasWidget); + TQWidget *widget = dynamic_cast<TQWidget *>(canvasWidget); if (widget != 0) { return m_painter.begin(widget, unclipped); @@ -44,602 +44,602 @@ bool KisQPaintDeviceCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool unc } } -bool KisQPaintDeviceCanvasPainter::begin(const QPaintDevice* paintDevice, bool unclipped) +bool KisTQPaintDeviceCanvasPainter::begin(const TQPaintDevice* paintDevice, bool unclipped) { return m_painter.begin(paintDevice, unclipped); } -bool KisQPaintDeviceCanvasPainter::end() +bool KisTQPaintDeviceCanvasPainter::end() { return m_painter.end(); } -void KisQPaintDeviceCanvasPainter::save() +void KisTQPaintDeviceCanvasPainter::save() { m_painter.save(); } -void KisQPaintDeviceCanvasPainter::restore() +void KisTQPaintDeviceCanvasPainter::restore() { m_painter.restore(); } -QFontMetrics KisQPaintDeviceCanvasPainter::fontMetrics() const +TQFontMetrics KisTQPaintDeviceCanvasPainter::fontMetrics() const { return m_painter.fontMetrics(); } -QFontInfo KisQPaintDeviceCanvasPainter::fontInfo() const +TQFontInfo KisTQPaintDeviceCanvasPainter::fontInfo() const { return m_painter.fontInfo(); } -const QFont& KisQPaintDeviceCanvasPainter::font() const +const TQFont& KisTQPaintDeviceCanvasPainter::font() const { return m_painter.font(); } -void KisQPaintDeviceCanvasPainter::setFont(const QFont& font) +void KisTQPaintDeviceCanvasPainter::setFont(const TQFont& font) { m_painter.setFont(font); } -const QPen& KisQPaintDeviceCanvasPainter::pen() const +const TQPen& KisTQPaintDeviceCanvasPainter::pen() const { return m_painter.pen(); } -void KisQPaintDeviceCanvasPainter::setPen(const QPen& pen) +void KisTQPaintDeviceCanvasPainter::setPen(const TQPen& pen) { m_painter.setPen(pen); } -void KisQPaintDeviceCanvasPainter::setPen(Qt::PenStyle penStyle) +void KisTQPaintDeviceCanvasPainter::setPen(Qt::PenStyle penStyle) { m_painter.setPen(penStyle); } -void KisQPaintDeviceCanvasPainter::setPen(const QColor& color) +void KisTQPaintDeviceCanvasPainter::setPen(const TQColor& color) { m_painter.setPen(color);; } -const QBrush& KisQPaintDeviceCanvasPainter::brush() const +const TQBrush& KisTQPaintDeviceCanvasPainter::brush() const { return m_painter.brush(); } -void KisQPaintDeviceCanvasPainter::setBrush(const QBrush& brush) +void KisTQPaintDeviceCanvasPainter::setBrush(const TQBrush& brush) { m_painter.setBrush(brush); } -void KisQPaintDeviceCanvasPainter::setBrush(Qt::BrushStyle brushStyle) +void KisTQPaintDeviceCanvasPainter::setBrush(TQt::BrushStyle brushStyle) { m_painter.setBrush(brushStyle); } -void KisQPaintDeviceCanvasPainter::setBrush(const QColor& color) +void KisTQPaintDeviceCanvasPainter::setBrush(const TQColor& color) { m_painter.setBrush(color); } -QPoint KisQPaintDeviceCanvasPainter::pos() const +TQPoint KisTQPaintDeviceCanvasPainter::pos() const { return m_painter.pos(); } -const QColor& KisQPaintDeviceCanvasPainter::backgroundColor() const +const TQColor& KisTQPaintDeviceCanvasPainter::backgroundColor() const { return m_painter.backgroundColor(); } -void KisQPaintDeviceCanvasPainter::setBackgroundColor(const QColor& color) +void KisTQPaintDeviceCanvasPainter::setBackgroundColor(const TQColor& color) { m_painter.setBackgroundColor(color); } -Qt::Qt::BGMode KisQPaintDeviceCanvasPainter::backgroundMode() const +TQt::Qt::BGMode KisTQPaintDeviceCanvasPainter::backgroundMode() const { return m_painter.backgroundMode(); } -void KisQPaintDeviceCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) +void KisTQPaintDeviceCanvasPainter::setBackgroundMode(Qt::BGMode bgMode) { m_painter.setBackgroundMode(bgMode); } -Qt::RasterOp KisQPaintDeviceCanvasPainter::rasterOp() const +TQt::RasterOp KisTQPaintDeviceCanvasPainter::rasterOp() const { return m_painter.rasterOp(); } -void KisQPaintDeviceCanvasPainter::setRasterOp(Qt::RasterOp rasterOp) +void KisTQPaintDeviceCanvasPainter::setRasterOp(TQt::RasterOp rasterOp) { m_painter.setRasterOp(rasterOp); } -const QPoint& KisQPaintDeviceCanvasPainter::brushOrigin() const +const TQPoint& KisTQPaintDeviceCanvasPainter::brushOrigin() const { return m_painter.brushOrigin(); } -void KisQPaintDeviceCanvasPainter::setBrushOrigin(int x, int y) +void KisTQPaintDeviceCanvasPainter::setBrushOrigin(int x, int y) { m_painter.setBrushOrigin(x, y); } -void KisQPaintDeviceCanvasPainter::setBrushOrigin(const QPoint& origin) +void KisTQPaintDeviceCanvasPainter::setBrushOrigin(const TQPoint& origin) { m_painter.setBrushOrigin(origin); } -bool KisQPaintDeviceCanvasPainter::hasViewXForm() const +bool KisTQPaintDeviceCanvasPainter::hasViewXForm() const { return m_painter.hasViewXForm(); } -bool KisQPaintDeviceCanvasPainter::hasWorldXForm() const +bool KisTQPaintDeviceCanvasPainter::hasWorldXForm() const { return m_painter.hasWorldXForm(); } -void KisQPaintDeviceCanvasPainter::setViewXForm(bool enable) +void KisTQPaintDeviceCanvasPainter::setViewXForm(bool enable) { m_painter.setViewXForm(enable); } -QRect KisQPaintDeviceCanvasPainter::window() const +TQRect KisTQPaintDeviceCanvasPainter::window() const { return m_painter.window(); } -void KisQPaintDeviceCanvasPainter::setWindow(const QRect& r) +void KisTQPaintDeviceCanvasPainter::setWindow(const TQRect& r) { m_painter.setWindow(r); } -void KisQPaintDeviceCanvasPainter::setWindow(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::setWindow(int x, int y, int w, int h) { m_painter.setWindow(x, y, w, h); } -QRect KisQPaintDeviceCanvasPainter::viewport() const +TQRect KisTQPaintDeviceCanvasPainter::viewport() const { return m_painter.viewport(); } -void KisQPaintDeviceCanvasPainter::setViewport(const QRect& r) +void KisTQPaintDeviceCanvasPainter::setViewport(const TQRect& r) { m_painter.setViewport(r); } -void KisQPaintDeviceCanvasPainter::setViewport(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::setViewport(int x, int y, int w, int h) { m_painter.setViewport(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::setWorldXForm(bool enable) +void KisTQPaintDeviceCanvasPainter::setWorldXForm(bool enable) { m_painter.setWorldXForm(enable); } -const QWMatrix& KisQPaintDeviceCanvasPainter::worldMatrix() const +const TQWMatrix& KisTQPaintDeviceCanvasPainter::tqworldMatrix() const { - return m_painter.worldMatrix(); + return m_painter.tqworldMatrix(); } -void KisQPaintDeviceCanvasPainter::setWorldMatrix(const QWMatrix& matrix, bool combine) +void KisTQPaintDeviceCanvasPainter::setWorldMatrix(const TQWMatrix& matrix, bool combine) { m_painter.setWorldMatrix(matrix, combine); } -void KisQPaintDeviceCanvasPainter::saveWorldMatrix() +void KisTQPaintDeviceCanvasPainter::saveWorldMatrix() { m_painter.saveWorldMatrix(); } -void KisQPaintDeviceCanvasPainter::restoreWorldMatrix() +void KisTQPaintDeviceCanvasPainter::restoreWorldMatrix() { m_painter.restoreWorldMatrix(); } -void KisQPaintDeviceCanvasPainter::scale(double sx, double sy) +void KisTQPaintDeviceCanvasPainter::scale(double sx, double sy) { m_painter.scale(sx, sy); } -void KisQPaintDeviceCanvasPainter::shear(double sh, double sv) +void KisTQPaintDeviceCanvasPainter::shear(double sh, double sv) { m_painter.shear(sh, sv); } -void KisQPaintDeviceCanvasPainter::rotate(double a) +void KisTQPaintDeviceCanvasPainter::rotate(double a) { m_painter.rotate(a); } -void KisQPaintDeviceCanvasPainter::translate(double dx, double dy) +void KisTQPaintDeviceCanvasPainter::translate(double dx, double dy) { m_painter.translate(dx, dy); } -void KisQPaintDeviceCanvasPainter::resetXForm() +void KisTQPaintDeviceCanvasPainter::resetXForm() { m_painter.resetXForm(); } -double KisQPaintDeviceCanvasPainter::translationX() const +double KisTQPaintDeviceCanvasPainter::translationX() const { return m_painter.translationX(); } -double KisQPaintDeviceCanvasPainter::translationY() const +double KisTQPaintDeviceCanvasPainter::translationY() const { return m_painter.translationY(); } -QPoint KisQPaintDeviceCanvasPainter::xForm(const QPoint& point) const +TQPoint KisTQPaintDeviceCanvasPainter::xForm(const TQPoint& point) const { return m_painter.xForm(point); } -QRect KisQPaintDeviceCanvasPainter::xForm(const QRect& r) const +TQRect KisTQPaintDeviceCanvasPainter::xForm(const TQRect& r) const { return m_painter.xForm(r); } -QPointArray KisQPaintDeviceCanvasPainter::xForm(const QPointArray& pointArray) const +TQPointArray KisTQPaintDeviceCanvasPainter::xForm(const TQPointArray& pointArray) const { return m_painter.xForm(pointArray); } -QPointArray KisQPaintDeviceCanvasPainter::xForm(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisTQPaintDeviceCanvasPainter::xForm(const TQPointArray& pointArray, int index, int npoints) const { return m_painter.xForm(pointArray, index, npoints); } -QPoint KisQPaintDeviceCanvasPainter::xFormDev(const QPoint& point) const +TQPoint KisTQPaintDeviceCanvasPainter::xFormDev(const TQPoint& point) const { return m_painter.xFormDev(point); } -QRect KisQPaintDeviceCanvasPainter::xFormDev(const QRect& r) const +TQRect KisTQPaintDeviceCanvasPainter::xFormDev(const TQRect& r) const { return m_painter.xFormDev(r); } -QPointArray KisQPaintDeviceCanvasPainter::xFormDev(const QPointArray& pointArray) const +TQPointArray KisTQPaintDeviceCanvasPainter::xFormDev(const TQPointArray& pointArray) const { return m_painter.xFormDev(pointArray); } -QPointArray KisQPaintDeviceCanvasPainter::xFormDev(const QPointArray& pointArray, int index, int npoints) const +TQPointArray KisTQPaintDeviceCanvasPainter::xFormDev(const TQPointArray& pointArray, int index, int npoints) const { return m_painter.xFormDev(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::setClipping(bool enable) +void KisTQPaintDeviceCanvasPainter::setClipping(bool enable) { m_painter.setClipping(enable); } -bool KisQPaintDeviceCanvasPainter::hasClipping() const +bool KisTQPaintDeviceCanvasPainter::hasClipping() const { return m_painter.hasClipping(); } -QRegion KisQPaintDeviceCanvasPainter::clipRegion(QPainter::CoordinateMode mode) const +TQRegion KisTQPaintDeviceCanvasPainter::clipRegion(TQPainter::CoordinateMode mode) const { return m_painter.clipRegion(mode); } -void KisQPaintDeviceCanvasPainter::setClipRect(const QRect& r, QPainter::CoordinateMode mode) +void KisTQPaintDeviceCanvasPainter::setClipRect(const TQRect& r, TQPainter::CoordinateMode mode) { m_painter.setClipRect(r, mode); } -void KisQPaintDeviceCanvasPainter::setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode mode) +void KisTQPaintDeviceCanvasPainter::setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode mode) { m_painter.setClipRect(x, y, w, h, mode); } -void KisQPaintDeviceCanvasPainter::setClipRegion(const QRegion& rgn, QPainter::CoordinateMode mode) +void KisTQPaintDeviceCanvasPainter::setClipRegion(const TQRegion& rgn, TQPainter::CoordinateMode mode) { m_painter.setClipRegion(rgn, mode); } -void KisQPaintDeviceCanvasPainter::drawPoint(int x, int y) +void KisTQPaintDeviceCanvasPainter::drawPoint(int x, int y) { m_painter.drawPoint(x, y); } -void KisQPaintDeviceCanvasPainter::drawPoint(const QPoint& point) +void KisTQPaintDeviceCanvasPainter::drawPoint(const TQPoint& point) { m_painter.drawPoint(point); } -void KisQPaintDeviceCanvasPainter::drawPoints(const QPointArray& pointArray, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawPoints(const TQPointArray& pointArray, int index, int npoints) { m_painter.drawPoints(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::moveTo(int x, int y) +void KisTQPaintDeviceCanvasPainter::moveTo(int x, int y) { m_painter.moveTo(x, y); } -void KisQPaintDeviceCanvasPainter::moveTo(const QPoint& point) +void KisTQPaintDeviceCanvasPainter::moveTo(const TQPoint& point) { m_painter.moveTo(point); } -void KisQPaintDeviceCanvasPainter::lineTo(int x, int y) +void KisTQPaintDeviceCanvasPainter::lineTo(int x, int y) { m_painter.lineTo(x, y); } -void KisQPaintDeviceCanvasPainter::lineTo(const QPoint& point) +void KisTQPaintDeviceCanvasPainter::lineTo(const TQPoint& point) { m_painter.lineTo(point); } -void KisQPaintDeviceCanvasPainter::drawLine(int x1, int y1, int x2, int y2) +void KisTQPaintDeviceCanvasPainter::drawLine(int x1, int y1, int x2, int y2) { m_painter.drawLine(x1, y1, x2, y2); } -void KisQPaintDeviceCanvasPainter::drawLine(const QPoint& start, const QPoint& end) +void KisTQPaintDeviceCanvasPainter::drawLine(const TQPoint& start, const TQPoint& end) { m_painter.drawLine(start, end); } -void KisQPaintDeviceCanvasPainter::drawRect(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::drawRect(int x, int y, int w, int h) { m_painter.drawRect(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::drawRect(const QRect& r) +void KisTQPaintDeviceCanvasPainter::drawRect(const TQRect& r) { m_painter.drawRect(r); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h) { m_painter.drawWinFocusRect(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const QColor& bgColor) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(int x, int y, int w, int h, const TQColor& bgColor) { m_painter.drawWinFocusRect(x, y, w, h, bgColor); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(const QRect& r) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(const TQRect& r) { m_painter.drawWinFocusRect(r); } -void KisQPaintDeviceCanvasPainter::drawWinFocusRect(const QRect& r, const QColor& bgColor) +void KisTQPaintDeviceCanvasPainter::drawWinFocusRect(const TQRect& r, const TQColor& bgColor) { m_painter.drawWinFocusRect(r, bgColor); } -void KisQPaintDeviceCanvasPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int yRnd) +void KisTQPaintDeviceCanvasPainter::drawRoundRect(int x, int y, int w, int h, int xRnd, int yRnd) { m_painter.drawRoundRect(x, y, w, h, xRnd, yRnd); } -void KisQPaintDeviceCanvasPainter::drawRoundRect(const QRect& r, int xRnd, int yRnd) +void KisTQPaintDeviceCanvasPainter::drawRoundRect(const TQRect& r, int xRnd, int yRnd) { m_painter.drawRoundRect(r, xRnd, yRnd); } -void KisQPaintDeviceCanvasPainter::drawEllipse(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::drawEllipse(int x, int y, int w, int h) { m_painter.drawEllipse(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::drawEllipse(const QRect& r) +void KisTQPaintDeviceCanvasPainter::drawEllipse(const TQRect& r) { m_painter.drawEllipse(r); } -void KisQPaintDeviceCanvasPainter::drawArc(int x, int y, int w, int h, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawArc(int x, int y, int w, int h, int a, int alen) { m_painter.drawArc(x, y, w, h, a, alen); } -void KisQPaintDeviceCanvasPainter::drawArc(const QRect& r, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawArc(const TQRect& r, int a, int alen) { m_painter.drawArc(r, a, alen); } -void KisQPaintDeviceCanvasPainter::drawPie(int x, int y, int w, int h, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawPie(int x, int y, int w, int h, int a, int alen) { m_painter.drawPie(x, y, w, h, a, alen); } -void KisQPaintDeviceCanvasPainter::drawPie(const QRect& r, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawPie(const TQRect& r, int a, int alen) { m_painter.drawPie(r, a, alen); } -void KisQPaintDeviceCanvasPainter::drawChord(int x, int y, int w, int h, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawChord(int x, int y, int w, int h, int a, int alen) { m_painter.drawChord(x, y, w, h, a, alen); } -void KisQPaintDeviceCanvasPainter::drawChord(const QRect& r, int a, int alen) +void KisTQPaintDeviceCanvasPainter::drawChord(const TQRect& r, int a, int alen) { m_painter.drawChord(r, a, alen); } -void KisQPaintDeviceCanvasPainter::drawLineSegments(const QPointArray& pointArray, int index, int nlines) +void KisTQPaintDeviceCanvasPainter::drawLineSegments(const TQPointArray& pointArray, int index, int nlines) { m_painter.drawLineSegments(pointArray, index, nlines); } -void KisQPaintDeviceCanvasPainter::drawPolyline(const QPointArray& pointArray, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawPolyline(const TQPointArray& pointArray, int index, int npoints) { m_painter.drawPolyline(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::drawPolygon(const QPointArray& pointArray, bool winding, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawPolygon(const TQPointArray& pointArray, bool winding, int index, int npoints) { m_painter.drawPolygon(pointArray, winding, index, npoints); } -void KisQPaintDeviceCanvasPainter::drawConvexPolygon(const QPointArray& pointArray, int index, int npoints) +void KisTQPaintDeviceCanvasPainter::drawConvexPolygon(const TQPointArray& pointArray, int index, int npoints) { m_painter.drawConvexPolygon(pointArray, index, npoints); } -void KisQPaintDeviceCanvasPainter::drawCubicBezier(const QPointArray& pointArray, int index) +void KisTQPaintDeviceCanvasPainter::drawCubicBezier(const TQPointArray& pointArray, int index) { m_painter.drawCubicBezier(pointArray, index); } -void KisQPaintDeviceCanvasPainter::drawPixmap(int x, int y, const QPixmap& pixmap, int sx, int sy, int sw, int sh) +void KisTQPaintDeviceCanvasPainter::drawPixmap(int x, int y, const TQPixmap& pixmap, int sx, int sy, int sw, int sh) { m_painter.drawPixmap(x, y, pixmap, sx, sy, sw, sh); } -void KisQPaintDeviceCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap, const QRect& sr) +void KisTQPaintDeviceCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap, const TQRect& sr) { m_painter.drawPixmap(point, pixmap, sr); } -void KisQPaintDeviceCanvasPainter::drawPixmap(const QPoint& point, const QPixmap& pixmap) +void KisTQPaintDeviceCanvasPainter::drawPixmap(const TQPoint& point, const TQPixmap& pixmap) { m_painter.drawPixmap(point, pixmap); } -void KisQPaintDeviceCanvasPainter::drawPixmap(const QRect& r, const QPixmap& pixmap) +void KisTQPaintDeviceCanvasPainter::drawPixmap(const TQRect& r, const TQPixmap& pixmap) { m_painter.drawPixmap(r, pixmap); } -void KisQPaintDeviceCanvasPainter::drawImage(int x, int y, const QImage& image, int sx, int sy, int sw, int sh, int conversionFlags) +void KisTQPaintDeviceCanvasPainter::drawImage(int x, int y, const TQImage& image, int sx, int sy, int sw, int sh, int conversionFlags) { m_painter.drawImage(x, y, image, sx, sy, sw, sh, conversionFlags); } -void KisQPaintDeviceCanvasPainter::drawImage(const QPoint& point, const QImage& image, const QRect& sr, int conversionFlags) +void KisTQPaintDeviceCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, const TQRect& sr, int conversionFlags) { m_painter.drawImage(point, image, sr, conversionFlags); } -void KisQPaintDeviceCanvasPainter::drawImage(const QPoint& point, const QImage& image, int conversion_flags) +void KisTQPaintDeviceCanvasPainter::drawImage(const TQPoint& point, const TQImage& image, int conversion_flags) { m_painter.drawImage(point, image, conversion_flags); } -void KisQPaintDeviceCanvasPainter::drawImage(const QRect& r, const QImage& image) +void KisTQPaintDeviceCanvasPainter::drawImage(const TQRect& r, const TQImage& image) { m_painter.drawImage(r, image); } -void KisQPaintDeviceCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const QPixmap& pixmap, int sx, int sy) +void KisTQPaintDeviceCanvasPainter::drawTiledPixmap(int x, int y, int w, int h, const TQPixmap& pixmap, int sx, int sy) { m_painter.drawTiledPixmap(x, y, w, h, pixmap, sx, sy); } -void KisQPaintDeviceCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap, const QPoint& point) +void KisTQPaintDeviceCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap, const TQPoint& point) { m_painter.drawTiledPixmap(r, pixmap, point); } -void KisQPaintDeviceCanvasPainter::drawTiledPixmap(const QRect& r, const QPixmap& pixmap) +void KisTQPaintDeviceCanvasPainter::drawTiledPixmap(const TQRect& r, const TQPixmap& pixmap) { m_painter.drawTiledPixmap(r, pixmap); } -void KisQPaintDeviceCanvasPainter::fillRect(int x, int y, int w, int h, const QBrush& brush) +void KisTQPaintDeviceCanvasPainter::fillRect(int x, int y, int w, int h, const TQBrush& brush) { m_painter.fillRect(x, y, w, h, brush); } -void KisQPaintDeviceCanvasPainter::fillRect(const QRect& r, const QBrush& brush) +void KisTQPaintDeviceCanvasPainter::fillRect(const TQRect& r, const TQBrush& brush) { m_painter.fillRect(r, brush); } -void KisQPaintDeviceCanvasPainter::eraseRect(int x, int y, int w, int h) +void KisTQPaintDeviceCanvasPainter::eraseRect(int x, int y, int w, int h) { m_painter.eraseRect(x, y, w, h); } -void KisQPaintDeviceCanvasPainter::eraseRect(const QRect& r) +void KisTQPaintDeviceCanvasPainter::eraseRect(const TQRect& r) { m_painter.eraseRect(r); } -void KisQPaintDeviceCanvasPainter::drawText(int x, int y, const QString& text, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(int x, int y, const TQString& text, int len, TQPainter::TextDirection dir) { m_painter.drawText(x, y, text, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(const QPoint& point, const QString& text, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(const TQPoint& point, const TQString& text, int len, TQPainter::TextDirection dir) { m_painter.drawText(point, text, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(int x, int y, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(int x, int y, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { m_painter.drawText(x, y, text, pos, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(const QPoint& point, const QString& text, int pos, int len, QPainter::TextDirection dir) +void KisTQPaintDeviceCanvasPainter::drawText(const TQPoint& point, const TQString& text, int pos, int len, TQPainter::TextDirection dir) { m_painter.drawText(point, text, pos, len, dir); } -void KisQPaintDeviceCanvasPainter::drawText(int x, int y, int w, int h, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisTQPaintDeviceCanvasPainter::drawText(int x, int y, int w, int h, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { m_painter.drawText(x, y, w, h, flags, text, len, br, intern); } -void KisQPaintDeviceCanvasPainter::drawText(const QRect& r, int flags, const QString& text, int len, QRect *br, QTextParag **intern) +void KisTQPaintDeviceCanvasPainter::drawText(const TQRect& r, int flags, const TQString& text, int len, TQRect *br, TQTextParag **intern) { m_painter.drawText(r, flags, text, len, br, intern); } -void KisQPaintDeviceCanvasPainter::drawTextItem(int x, int y, const QTextItem& ti, int textflags) +void KisTQPaintDeviceCanvasPainter::tqdrawTextItem(int x, int y, const TQTextItem& ti, int textflags) { - m_painter.drawTextItem(x, y, ti, textflags); + m_painter.tqdrawTextItem(x, y, ti, textflags); } -void KisQPaintDeviceCanvasPainter::drawTextItem(const QPoint& p, const QTextItem& ti, int textflags) +void KisTQPaintDeviceCanvasPainter::tqdrawTextItem(const TQPoint& p, const TQTextItem& ti, int textflags) { - m_painter.drawTextItem(p, ti, textflags); + m_painter.tqdrawTextItem(p, ti, textflags); } -QRect KisQPaintDeviceCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisTQPaintDeviceCanvasPainter::boundingRect(int x, int y, int w, int h, int flags, const TQString& text, int len, TQTextParag **intern) { return m_painter.boundingRect(x, y, w, h, flags, text, len, intern); } -QRect KisQPaintDeviceCanvasPainter::boundingRect(const QRect& r, int flags, const QString& text, int len, QTextParag **intern) +TQRect KisTQPaintDeviceCanvasPainter::boundingRect(const TQRect& r, int flags, const TQString& text, int len, TQTextParag **intern) { return m_painter.boundingRect(r, flags, text, len, intern); } -int KisQPaintDeviceCanvasPainter::tabStops() const +int KisTQPaintDeviceCanvasPainter::tabStops() const { return m_painter.tabStops(); } -void KisQPaintDeviceCanvasPainter::setTabStops(int ts) +void KisTQPaintDeviceCanvasPainter::setTabStops(int ts) { m_painter.setTabStops(ts); } -int *KisQPaintDeviceCanvasPainter::tabArray() const +int *KisTQPaintDeviceCanvasPainter::tabArray() const { return m_painter.tabArray(); } -void KisQPaintDeviceCanvasPainter::setTabArray(int *ts) +void KisTQPaintDeviceCanvasPainter::setTabArray(int *ts) { m_painter.setTabArray(ts); } diff --git a/krita/ui/kis_qpaintdevice_canvas_painter.h b/krita/ui/kis_qpaintdevice_canvas_painter.h index ddc306f1..0dca7322 100644 --- a/krita/ui/kis_qpaintdevice_canvas_painter.h +++ b/krita/ui/kis_qpaintdevice_canvas_painter.h @@ -16,26 +16,26 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef KIS_QPAINTDEVICE_CANVAS_PAINTER_H_ -#define KIS_QPAINTDEVICE_CANVAS_PAINTER_H_ +#ifndef KIS_TQPAINTDEVICE_CANVAS_PAINTER_H_ +#define KIS_TQPAINTDEVICE_CANVAS_PAINTER_H_ #ifdef HAVE_CONFIG_H #include <config.h> #endif -#include <qwidget.h> -#include <qpainter.h> +#include <tqwidget.h> +#include <tqpainter.h> #include "kis_global.h" #include "kis_canvas_painter.h" -class KisQPaintDeviceCanvasPainter : public KisCanvasWidgetPainter { +class KisTQPaintDeviceCanvasPainter : public KisCanvasWidgetPainter { public: - KisQPaintDeviceCanvasPainter(); - KisQPaintDeviceCanvasPainter(const QPaintDevice *paintDevice); - virtual ~KisQPaintDeviceCanvasPainter(); + KisTQPaintDeviceCanvasPainter(); + KisTQPaintDeviceCanvasPainter(const TQPaintDevice *paintDevice); + virtual ~KisTQPaintDeviceCanvasPainter(); - bool begin(const QPaintDevice* paintDevice, bool unclipped = false); + bool begin(const TQPaintDevice* paintDevice, bool unclipped = false); virtual bool begin(KisCanvasWidget *canvasWidget, bool unclipped = false); virtual bool end(); @@ -43,45 +43,45 @@ public: virtual void save(); virtual void restore(); - virtual QFontMetrics fontMetrics() const; - virtual QFontInfo fontInfo() const; + virtual TQFontMetrics fontMetrics() const; + virtual TQFontInfo fontInfo() const; - virtual const QFont& font() const; - virtual void setFont(const QFont&); - virtual const QPen& pen() const; - virtual void setPen(const QPen&); + virtual const TQFont& font() const; + virtual void setFont(const TQFont&); + virtual const TQPen& pen() const; + virtual void setPen(const TQPen&); virtual void setPen(Qt::PenStyle); - virtual void setPen(const QColor&); - virtual const QBrush&brush() const; - virtual void setBrush(const QBrush&); - virtual void setBrush(Qt::BrushStyle); - virtual void setBrush(const QColor&); - virtual QPoint pos() const; - - virtual const QColor&backgroundColor() const; - virtual void setBackgroundColor(const QColor&); + virtual void setPen(const TQColor&); + virtual const TQBrush&brush() const; + virtual void setBrush(const TQBrush&); + virtual void setBrush(TQt::BrushStyle); + virtual void setBrush(const TQColor&); + virtual TQPoint pos() const; + + virtual const TQColor&backgroundColor() const; + virtual void setBackgroundColor(const TQColor&); virtual Qt::BGMode backgroundMode() const; virtual void setBackgroundMode(Qt::BGMode); - virtual Qt::RasterOp rasterOp() const; - virtual void setRasterOp(Qt::RasterOp); - virtual const QPoint&brushOrigin() const; + virtual TQt::RasterOp rasterOp() const; + virtual void setRasterOp(TQt::RasterOp); + virtual const TQPoint&brushOrigin() const; virtual void setBrushOrigin(int x, int y); - virtual void setBrushOrigin(const QPoint&); + virtual void setBrushOrigin(const TQPoint&); virtual bool hasViewXForm() const; virtual bool hasWorldXForm() const; virtual void setViewXForm(bool); - virtual QRect window() const; - virtual void setWindow(const QRect&); + virtual TQRect window() const; + virtual void setWindow(const TQRect&); virtual void setWindow(int x, int y, int w, int h); - virtual QRect viewport() const; - virtual void setViewport(const QRect&); + virtual TQRect viewport() const; + virtual void setViewport(const TQRect&); virtual void setViewport(int x, int y, int w, int h); virtual void setWorldXForm(bool); - virtual const QWMatrix&worldMatrix() const; - virtual void setWorldMatrix(const QWMatrix&, bool combine=FALSE); + virtual const TQWMatrix&tqworldMatrix() const; + virtual void setWorldMatrix(const TQWMatrix&, bool combine=FALSE); virtual void saveWorldMatrix(); virtual void restoreWorldMatrix(); @@ -95,86 +95,86 @@ public: virtual double translationX() const; virtual double translationY() const; - virtual QPoint xForm(const QPoint&) const; - virtual QRect xForm(const QRect&) const; - virtual QPointArray xForm(const QPointArray&) const; - virtual QPointArray xForm(const QPointArray&, int index, int npoints) const; - virtual QPoint xFormDev(const QPoint&) const; - virtual QRect xFormDev(const QRect&) const; - virtual QPointArray xFormDev(const QPointArray&) const; - virtual QPointArray xFormDev(const QPointArray&, int index, int npoints) const; + virtual TQPoint xForm(const TQPoint&) const; + virtual TQRect xForm(const TQRect&) const; + virtual TQPointArray xForm(const TQPointArray&) const; + virtual TQPointArray xForm(const TQPointArray&, int index, int npoints) const; + virtual TQPoint xFormDev(const TQPoint&) const; + virtual TQRect xFormDev(const TQRect&) const; + virtual TQPointArray xFormDev(const TQPointArray&) const; + virtual TQPointArray xFormDev(const TQPointArray&, int index, int npoints) const; virtual void setClipping(bool); virtual bool hasClipping() const; - virtual QRegion clipRegion(QPainter::CoordinateMode = QPainter::CoordDevice) const; - virtual void setClipRect(const QRect&, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRect(int x, int y, int w, int h, QPainter::CoordinateMode = QPainter::CoordDevice); - virtual void setClipRegion(const QRegion&, QPainter::CoordinateMode = QPainter::CoordDevice); + virtual TQRegion clipRegion(TQPainter::CoordinateMode = TQPainter::CoordDevice) const; + virtual void setClipRect(const TQRect&, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRect(int x, int y, int w, int h, TQPainter::CoordinateMode = TQPainter::CoordDevice); + virtual void setClipRegion(const TQRegion&, TQPainter::CoordinateMode = TQPainter::CoordDevice); virtual void drawPoint(int x, int y); - virtual void drawPoint(const QPoint&); - virtual void drawPoints(const QPointArray& a, int index=0, int npoints=-1); + virtual void drawPoint(const TQPoint&); + virtual void drawPoints(const TQPointArray& a, int index=0, int npoints=-1); virtual void moveTo(int x, int y); - virtual void moveTo(const QPoint&); + virtual void moveTo(const TQPoint&); virtual void lineTo(int x, int y); - virtual void lineTo(const QPoint&); + virtual void lineTo(const TQPoint&); virtual void drawLine(int x1, int y1, int x2, int y2); - virtual void drawLine(const QPoint&, const QPoint&); + virtual void drawLine(const TQPoint&, const TQPoint&); virtual void drawRect(int x, int y, int w, int h); - virtual void drawRect(const QRect&); + virtual void drawRect(const TQRect&); virtual void drawWinFocusRect(int x, int y, int w, int h); - virtual void drawWinFocusRect(int x, int y, int w, int h, const QColor&bgColor); - virtual void drawWinFocusRect(const QRect&); - virtual void drawWinFocusRect(const QRect&, const QColor&bgColor); + virtual void drawWinFocusRect(int x, int y, int w, int h, const TQColor&bgColor); + virtual void drawWinFocusRect(const TQRect&); + virtual void drawWinFocusRect(const TQRect&, const TQColor&bgColor); virtual void drawRoundRect(int x, int y, int w, int h, int = 25, int = 25); - virtual void drawRoundRect(const QRect&, int = 25, int = 25); + virtual void drawRoundRect(const TQRect&, int = 25, int = 25); virtual void drawEllipse(int x, int y, int w, int h); - virtual void drawEllipse(const QRect&); + virtual void drawEllipse(const TQRect&); virtual void drawArc(int x, int y, int w, int h, int a, int alen); - virtual void drawArc(const QRect&, int a, int alen); + virtual void drawArc(const TQRect&, int a, int alen); virtual void drawPie(int x, int y, int w, int h, int a, int alen); - virtual void drawPie(const QRect&, int a, int alen); + virtual void drawPie(const TQRect&, int a, int alen); virtual void drawChord(int x, int y, int w, int h, int a, int alen); - virtual void drawChord(const QRect&, int a, int alen); - virtual void drawLineSegments(const QPointArray&, int index=0, int nlines=-1); - virtual void drawPolyline(const QPointArray&, int index=0, int npoints=-1); - virtual void drawPolygon(const QPointArray&, bool winding=FALSE, int index=0, int npoints=-1); - virtual void drawConvexPolygon(const QPointArray&, int index=0, int npoints=-1); - virtual void drawCubicBezier(const QPointArray&, int index=0); - virtual void drawPixmap(int x, int y, const QPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); - virtual void drawPixmap(const QPoint&, const QPixmap&, const QRect&sr); - virtual void drawPixmap(const QPoint&, const QPixmap&); - virtual void drawPixmap(const QRect&, const QPixmap&); - virtual void drawImage(int x, int y, const QImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, const QRect&sr, int conversionFlags = 0); - virtual void drawImage(const QPoint&, const QImage&, int conversion_flags = 0); - virtual void drawImage(const QRect&, const QImage&); - virtual void drawTiledPixmap(int x, int y, int w, int h, const QPixmap&, int sx=0, int sy=0); - virtual void drawTiledPixmap(const QRect&, const QPixmap&, const QPoint&); - virtual void drawTiledPixmap(const QRect&, const QPixmap&); - //virtual void drawPicture(const QPicture&); - //virtual void drawPicture(int x, int y, const QPicture&); - //virtual void drawPicture(const QPoint&, const QPicture&); - - virtual void fillRect(int x, int y, int w, int h, const QBrush&); - virtual void fillRect(const QRect&, const QBrush&); + virtual void drawChord(const TQRect&, int a, int alen); + virtual void drawLineSegments(const TQPointArray&, int index=0, int nlines=-1); + virtual void drawPolyline(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawPolygon(const TQPointArray&, bool winding=FALSE, int index=0, int npoints=-1); + virtual void drawConvexPolygon(const TQPointArray&, int index=0, int npoints=-1); + virtual void drawCubicBezier(const TQPointArray&, int index=0); + virtual void drawPixmap(int x, int y, const TQPixmap&, int sx=0, int sy=0, int sw=-1, int sh=-1); + virtual void drawPixmap(const TQPoint&, const TQPixmap&, const TQRect&sr); + virtual void drawPixmap(const TQPoint&, const TQPixmap&); + virtual void drawPixmap(const TQRect&, const TQPixmap&); + virtual void drawImage(int x, int y, const TQImage&, int sx = 0, int sy = 0, int sw = -1, int sh = -1, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, const TQRect&sr, int conversionFlags = 0); + virtual void drawImage(const TQPoint&, const TQImage&, int conversion_flags = 0); + virtual void drawImage(const TQRect&, const TQImage&); + virtual void drawTiledPixmap(int x, int y, int w, int h, const TQPixmap&, int sx=0, int sy=0); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&, const TQPoint&); + virtual void drawTiledPixmap(const TQRect&, const TQPixmap&); + //virtual void drawPicture(const TQPicture&); + //virtual void drawPicture(int x, int y, const TQPicture&); + //virtual void drawPicture(const TQPoint&, const TQPicture&); + + virtual void fillRect(int x, int y, int w, int h, const TQBrush&); + virtual void fillRect(const TQRect&, const TQBrush&); virtual void eraseRect(int x, int y, int w, int h); - virtual void eraseRect(const QRect&); + virtual void eraseRect(const TQRect&); - virtual void drawText(int x, int y, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&, const QString&, int len = -1, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&, const TQString&, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); - virtual void drawText(const QPoint&p, const QString&, int pos, int len, QPainter::TextDirection dir = QPainter::Auto); + virtual void drawText(int x, int y, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); + virtual void drawText(const TQPoint&p, const TQString&, int pos, int len, TQPainter::TextDirection dir = TQPainter::Auto); - virtual void drawText(int x, int y, int w, int h, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); - virtual void drawText(const QRect&, int flags, const QString&, int len = -1, QRect *br=0, QTextParag **intern=0); + virtual void drawText(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); + virtual void drawText(const TQRect&, int flags, const TQString&, int len = -1, TQRect *br=0, TQTextParag **intern=0); - virtual void drawTextItem(int x, int y, const QTextItem&ti, int textflags = 0); - virtual void drawTextItem(const QPoint& p, const QTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(int x, int y, const TQTextItem&ti, int textflags = 0); + virtual void tqdrawTextItem(const TQPoint& p, const TQTextItem&ti, int textflags = 0); - virtual QRect boundingRect(int x, int y, int w, int h, int flags, const QString&, int len = -1, QTextParag **intern=0); - virtual QRect boundingRect(const QRect&, int flags, const QString&, int len = -1, QTextParag **intern=0); + virtual TQRect boundingRect(int x, int y, int w, int h, int flags, const TQString&, int len = -1, TQTextParag **intern=0); + virtual TQRect boundingRect(const TQRect&, int flags, const TQString&, int len = -1, TQTextParag **intern=0); virtual int tabStops() const; virtual void setTabStops(int); @@ -182,8 +182,8 @@ public: virtual void setTabArray(int *); protected: - QPainter m_painter; + TQPainter m_painter; }; -#endif // KIS_QPAINTDEVICE_CANVAS_PAINTER_H_ +#endif // KIS_TQPAINTDEVICE_CANVAS_PAINTER_H_ diff --git a/krita/ui/kis_resource_mediator.cc b/krita/ui/kis_resource_mediator.cc index e4040cd2..204a1033 100644 --- a/krita/ui/kis_resource_mediator.cc +++ b/krita/ui/kis_resource_mediator.cc @@ -26,13 +26,13 @@ #include "kis_resource_mediator.h" KisResourceMediator::KisResourceMediator(KisItemChooser *chooser, - QObject *parent, - const char *name) : super(parent, name), m_chooser(chooser) + TQObject *tqparent, + const char *name) : super(tqparent, name), m_chooser(chooser) { Q_ASSERT(chooser); m_activeItem = 0; - connect(m_chooser, SIGNAL(selected(KoIconItem*)), SLOT(setActiveItem(KoIconItem*))); + connect(m_chooser, TQT_SIGNAL(selected(KoIconItem*)), TQT_SLOT(setActiveItem(KoIconItem*))); } KisResourceMediator::~KisResourceMediator() @@ -42,14 +42,14 @@ KisResourceMediator::~KisResourceMediator() void KisResourceMediator::connectServer(KisResourceServerBase* rServer) { // Add the initially loaded items - QValueList<KisResource*> resources = rServer->resources(); - QValueList<KisResource*>::iterator it; + TQValueList<KisResource*> resources = rServer->resources(); + TQValueList<KisResource*>::iterator it; for ( it = resources.begin(); it != resources.end(); ++it ) rServerAddedResource( *it ); // And connect to the server permanently, so that we may recieve updates afterwards - connect(rServer, SIGNAL(resourceAdded(KisResource*)), - this, SLOT(rServerAddedResource(KisResource*))); + connect(rServer, TQT_SIGNAL(resourceAdded(KisResource*)), + this, TQT_SLOT(rServerAddedResource(KisResource*))); } KisResource *KisResourceMediator::currentResource() const @@ -64,7 +64,7 @@ KisResource *KisResourceMediator::currentResource() const KisIconItem *KisResourceMediator::itemFor(KisResource *r) const { - if(m_items.contains(r)) + if(m_items.tqcontains(r)) { return m_items[r]; } @@ -83,7 +83,7 @@ KisResource *KisResourceMediator::resourceFor(KisIconItem *item) const return item ? item->resource() : 0; } -QWidget *KisResourceMediator::chooserWidget() const +TQWidget *KisResourceMediator::chooserWidget() const { return m_chooser; } diff --git a/krita/ui/kis_resource_mediator.h b/krita/ui/kis_resource_mediator.h index 55623a6e..b224d25c 100644 --- a/krita/ui/kis_resource_mediator.h +++ b/krita/ui/kis_resource_mediator.h @@ -18,9 +18,9 @@ #ifndef KIS_RESOURCE_MEDIATOR_H_ #define KIS_RESOURCE_MEDIATOR_H_ -#include <qobject.h> -#include <qmap.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqwidget.h> class KoIconItem; class KisItemChooser; @@ -34,13 +34,14 @@ class KisResourceServerBase; * For every view, a new resource mediator is created for every * resource type. */ -class KisResourceMediator : public QObject { +class KisResourceMediator : public TQObject { Q_OBJECT - typedef QObject super; + TQ_OBJECT + typedef TQObject super; public: KisResourceMediator(KisItemChooser *chooser, - QObject *parent = 0, + TQObject *tqparent = 0, const char *name = 0); virtual ~KisResourceMediator(); @@ -50,7 +51,7 @@ public: KisIconItem *itemFor(KisResource *r) const; KisResource *resourceFor(KoIconItem *item) const; KisResource *resourceFor(KisIconItem *item) const; - QWidget *chooserWidget() const; + TQWidget *chooserWidget() const; public slots: @@ -64,7 +65,7 @@ private slots: private: KisItemChooser *m_chooser; - QMap<KisResource*, KisIconItem*> m_items; + TQMap<KisResource*, KisIconItem*> m_items; KoIconItem *m_activeItem; }; diff --git a/krita/ui/kis_resourceserver.cc b/krita/ui/kis_resourceserver.cc index c72f9b80..d464e1bc 100644 --- a/krita/ui/kis_resourceserver.cc +++ b/krita/ui/kis_resourceserver.cc @@ -19,10 +19,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qfileinfo.h> -#include <qstringlist.h> -#include <qthread.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> +#include <tqthread.h> +#include <tqdir.h> #include <kdebug.h> #include <kglobal.h> @@ -40,7 +40,7 @@ #include "kis_palette.h" #include <kogradientmanager.h> -KisResourceServerBase::KisResourceServerBase(QString type) +KisResourceServerBase::KisResourceServerBase(TQString type) : m_type(type), m_loaded(false) { } @@ -49,22 +49,22 @@ KisResourceServerBase::~KisResourceServerBase() { } -void KisResourceServerBase::loadResources(QStringList filenames) +void KisResourceServerBase::loadResources(TQStringList filenames) { - QStringList uniqueFiles; + TQStringList uniqueFiles; while( !filenames.empty() ) { - QString front = *filenames.begin(); + TQString front = *filenames.begin(); filenames.pop_front(); - QString fname = QFileInfo(front).fileName(); + TQString fname = TQFileInfo(front).fileName(); //ebug() << "Loading " << fname << "\n"; // XXX: Don't load resources with the same filename. Actually, we should look inside // the resource to find out whether they are really the same, but for now this // will prevent the same brush etc. showing up twice. - if (uniqueFiles.empty() || uniqueFiles.find(fname) == uniqueFiles.end()) { + if (uniqueFiles.empty() || uniqueFiles.tqfind(fname) == uniqueFiles.end()) { uniqueFiles.append(fname); KisResource *resource; resource = createResource(front); @@ -82,10 +82,10 @@ void KisResourceServerBase::loadResources(QStringList filenames) m_loaded = true; } -QValueList<KisResource*> KisResourceServerBase::resources() +TQValueList<KisResource*> KisResourceServerBase::resources() { if(!m_loaded) { - return QValueList<KisResource*>(); + return TQValueList<KisResource*>(); } return m_resources; @@ -103,12 +103,12 @@ void KisResourceServerBase::addResource(KisResource* resource) } -class ResourceLoaderThread : public QThread { +class ResourceLoaderThread : public TQThread { public: - ResourceLoaderThread(KisResourceServerBase * server, QStringList files) - : QThread() + ResourceLoaderThread(KisResourceServerBase * server, TQStringList files) + : TQThread() , m_server(server) , m_fileNames( files ) { @@ -123,18 +123,18 @@ public: private: KisResourceServerBase * m_server; - QStringList m_fileNames; + TQStringList m_fileNames; }; -QStringList getFileNames( QString extensions, QString type ) +TQStringList getFileNames( TQString extensions, TQString type ) { - QStringList extensionList = QStringList::split(":", extensions); - QStringList fileNames; + TQStringList extensionList = TQStringList::split(":", extensions); + TQStringList fileNames; - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = extensionList.begin(); it != extensionList.end(); ++it ) { - QString s = (*it); + TQString s = (*it); fileNames += KisFactory::instance()->dirs()->findAllResources(type.ascii(), (*it)); } return fileNames; diff --git a/krita/ui/kis_resourceserver.h b/krita/ui/kis_resourceserver.h index aa15f72e..ab3de04e 100644 --- a/krita/ui/kis_resourceserver.h +++ b/krita/ui/kis_resourceserver.h @@ -22,34 +22,35 @@ #ifndef KIS_RESOURCESERVER_H_ #define KIS_RESOURCESERVER_H_ -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include "kis_generic_registry.h" class KisResource; -class KisResourceServerBase : public QObject { +class KisResourceServerBase : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisResourceServerBase(QString type); + KisResourceServerBase(TQString type); virtual ~KisResourceServerBase(); - void loadResources(QStringList filenames); + void loadResources(TQStringList filenames); /// Adds an already loaded resource to the server void addResource(KisResource* resource); - QValueList<KisResource*> resources(); - QString type() { return m_type; }; + TQValueList<KisResource*> resources(); + TQString type() { return m_type; }; signals: void resourceAdded(KisResource*); protected: - virtual KisResource* createResource( QString filename ) = 0; + virtual KisResource* createResource( TQString filename ) = 0; private: - QValueList<KisResource*> m_resources; - QString m_type; + TQValueList<KisResource*> m_resources; + TQString m_type; bool m_loaded; @@ -60,11 +61,11 @@ template <class T> class KisResourceServer : public KisResourceServerBase { typedef KisResourceServerBase super; public: - KisResourceServer(QString type) :super( type ) {} + KisResourceServer(TQString type) :super( type ) {} virtual ~KisResourceServer(){} private: - KisResource* createResource( QString filename ){return new T(filename);} + KisResource* createResource( TQString filename ){return new T(filename);} }; diff --git a/krita/ui/kis_ruler.cc b/krita/ui/kis_ruler.cc index 1da94b15..6b0eea80 100644 --- a/krita/ui/kis_ruler.cc +++ b/krita/ui/kis_ruler.cc @@ -17,8 +17,8 @@ * 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 <qstyle.h> +#include <tqpainter.h> +#include <tqstyle.h> #include "kdebug.h" @@ -40,7 +40,7 @@ const char *KisRuler::m_nums[] = { "XX XXXXXX XXX XXX XXXXXX XXX XXXX XXXXX XXXXX XXXX XXX" }; -KisRuler::KisRuler(Qt::Orientation o, QWidget *parent, const char *name) : super(parent, name, WRepaintNoErase | WResizeNoErase), m_pixmapNums(m_nums) +KisRuler::KisRuler(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 @@ KisRuler::~KisRuler() delete m_pixmapBuffer; } -void KisRuler::initMarker(Q_INT32 w, Q_INT32 h) +void KisRuler::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 KisRuler::initMarker(Q_INT32 w, Q_INT32 h) void KisRuler::recalculateSize() { - Q_INT32 w; - Q_INT32 h; + TQ_INT32 w; + TQ_INT32 h; if (m_pixmapBuffer) { delete m_pixmapBuffer; @@ -97,7 +97,7 @@ void KisRuler::recalculateSize() h = height(); } - m_pixmapBuffer = new QPixmap(w, h); + m_pixmapBuffer = new TQPixmap(w, h); Q_CHECK_PTR(m_pixmapBuffer); drawRuler(); @@ -126,12 +126,12 @@ void KisRuler::setZoom(double zoom) update(); } -void KisRuler::updatePointer(Q_INT32 x, Q_INT32 y) +void KisRuler::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 KisRuler::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 KisRuler::updatePointer(Q_INT32 x, Q_INT32 y) } } -void KisRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos) +void KisRuler::updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos) { if (m_orientation == Qt::Horizontal) m_firstVisible = xpos; @@ -161,10 +161,10 @@ void KisRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos) updatePointer(m_currentPosition, m_currentPosition); } -void KisRuler::paintEvent(QPaintEvent *e) +void KisRuler::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); @@ -173,19 +173,19 @@ void KisRuler::paintEvent(QPaintEvent *e) void KisRuler::drawRuler() { - QPainter p; - QString buf; - Q_INT32 st1 = 0; - Q_INT32 st2 = 0; - Q_INT32 st3 = 0; - Q_INT32 st4 = 0; + TQPainter p; + TQString buf; + TQ_INT32 st1 = 0; + TQ_INT32 st2 = 0; + TQ_INT32 st3 = 0; + TQ_INT32 st4 = 0; if (!m_pixmapBuffer) return; p.begin(m_pixmapBuffer); - p.setPen(colorGroup().text()); - p.setBackgroundColor(colorGroup().base()); + p.setPen(tqcolorGroup().text()); + p.setBackgroundColor(tqcolorGroup().base()); p.eraseRect(0, 0, m_pixmapBuffer->width(), m_pixmapBuffer->height()); switch (m_unit) { @@ -214,7 +214,7 @@ void KisRuler::drawRuler() bool s4 = KoUnit::fromUserValue(st4, m_unit) * m_zoom > 3.0; float cx = KoUnit::fromUserValue(100, m_unit) / m_zoom; - Q_INT32 step = qRound(cx); + TQ_INT32 step = tqRound(cx); if (step < 5) { step = 1; @@ -248,12 +248,12 @@ void KisRuler::drawRuler() step = 100000; } - Q_INT32 start = (Q_INT32)(KoUnit::fromUserValue(m_firstVisible, m_unit) / m_zoom); - Q_INT32 pos = 0; + TQ_INT32 start = (TQ_INT32)(KoUnit::fromUserValue(m_firstVisible, m_unit) / m_zoom); + TQ_INT32 pos = 0; if (m_orientation == Qt::Horizontal) { 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_THICKNESS - 9, pos, RULER_THICKNESS); @@ -268,7 +268,7 @@ void KisRuler::drawRuler() p.drawLine(pos, RULER_THICKNESS - 5, pos, RULER_THICKNESS); if (start % step == 0) { - buf.setNum(QABS(start)); + buf.setNum(TQABS(start)); drawNums(&p, pos, 4, buf, true); } @@ -276,7 +276,7 @@ void KisRuler::drawRuler() } while (pos < m_pixmapBuffer->width()); } else { 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(RULER_THICKNESS - 9, pos, RULER_THICKNESS, pos); @@ -291,7 +291,7 @@ void KisRuler::drawRuler() p.drawLine(RULER_THICKNESS - 5, pos, RULER_THICKNESS, pos); if (start % step == 0) { - buf.setNum(QABS(start)); + buf.setNum(TQABS(start)); drawNums(&p, 4, pos, buf, false); } @@ -302,19 +302,19 @@ void KisRuler::drawRuler() p.end(); } -void KisRuler::resizeEvent(QResizeEvent *) +void KisRuler::resizeEvent(TQResizeEvent *) { recalculateSize(); } -void KisRuler::styleChange(QStyle& oldStyle) +void KisRuler::styleChange(TQStyle& oldStyle) { Q_UNUSED(oldStyle); updateGeometry(); drawRuler(); } -void KisRuler::paletteChange(const QPalette& oldPalette) +void KisRuler::paletteChange(const TQPalette& oldPalette) { Q_UNUSED(oldPalette); drawRuler(); @@ -344,15 +344,15 @@ void KisRuler::hide() super::hide(); } -void KisRuler::drawNums(QPainter *p, Q_INT32 x, Q_INT32 y, QString& num, bool orientationHoriz) +void KisRuler::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/krita/ui/kis_ruler.h b/krita/ui/kis_ruler.h index 51153912..e93f2783 100644 --- a/krita/ui/kis_ruler.h +++ b/krita/ui/kis_ruler.h @@ -20,8 +20,8 @@ #ifndef KIS_RULER_H_ #define KIS_RULER_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 @@ -30,14 +30,15 @@ #define RULER_THICKNESS 20 -class QPainter; +class TQPainter; -class KisRuler : public QFrame { +class KisRuler : public TQFrame { Q_OBJECT - typedef QFrame super; + TQ_OBJECT + typedef TQFrame super; public: - KisRuler(Qt::Orientation, QWidget *parent = 0, const char *name = 0); + KisRuler(Qt::Orientation, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisRuler(); public: @@ -45,31 +46,31 @@ 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(); protected: - virtual void paintEvent(QPaintEvent *e); - virtual void resizeEvent(QResizeEvent *e); - virtual void styleChange(QStyle& oldStyle); - virtual void paletteChange(const QPalette& oldPalette); + virtual void paintEvent(TQPaintEvent *e); + virtual void resizeEvent(TQResizeEvent *e); + virtual void styleChange(TQStyle& oldStyle); + virtual void paletteChange(const TQPalette& oldPalette); 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/krita/ui/kis_save_visitor.h b/krita/ui/kis_save_visitor.h index ceb07eb7..ce668a53 100644 --- a/krita/ui/kis_save_visitor.h +++ b/krita/ui/kis_save_visitor.h @@ -19,7 +19,7 @@ #ifndef KIS_SAVE_VISITOR_H_ #define KIS_SAVE_VISITOR_H_ -#include <qrect.h> +#include <tqrect.h> #include "kis_types.h" #include "kis_layer_visitor.h" #include "kis_image.h" @@ -29,7 +29,7 @@ class KisSaveVisitor : public KisLayerVisitor { public: - KisSaveVisitor(KisImageSP img, KoStore *store, Q_UINT32 &count) : + KisSaveVisitor(KisImageSP img, KoStore *store, TQ_UINT32 &count) : KisLayerVisitor(), m_count(count) { @@ -39,7 +39,7 @@ public: } public: - void setExternalUri(QString &uri) + void setExternalUri(TQString &uri) { m_external = true; m_uri = uri; @@ -47,10 +47,10 @@ public: virtual bool visit(KisPaintLayer *layer) { - //connect(*layer->paintDevice(), SIGNAL(ioProgress(Q_INT8)), m_img, SLOT(slotIOProgress(Q_INT8))); + //connect(*layer->paintDevice(), TQT_SIGNAL(ioProgress(TQ_INT8)), m_img, TQT_SLOT(slotIOProgress(TQ_INT8))); - QString location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count); + TQString location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count); // Layer data if (m_store->open(location)) { @@ -69,8 +69,8 @@ public: if (annotation) { // save layer profile - location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".icc"; + location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".icc"; if (m_store->open(location)) { m_store->write(annotation->annotation()); @@ -80,16 +80,16 @@ public: } if (layer->hasMask()) { - KisPaintDeviceSP mask = layer->getMask(); + KisPaintDeviceSP tqmask = layer->getMask(); - if (mask) { + if (tqmask) { // save layer profile - location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".mask"; + location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".tqmask"; if (m_store->open(location)) { - if (!mask->write(m_store)) { - mask->disconnect(); + if (!tqmask->write(m_store)) { + tqmask->disconnect(); m_store->close(); return false; } @@ -129,8 +129,8 @@ public: { if (layer->selection()) { - QString location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".selection"; + TQString location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".selection"; // Layer data if (m_store->open(location)) { @@ -145,13 +145,13 @@ public: } if (layer->filter()) { - QString location = m_external ? QString::null : m_uri; - location = m_external ? QString::null : m_uri; - location += m_img->name() + QString("/layers/layer%1").arg(m_count) + ".filterconfig"; + TQString location = m_external ? TQString() : m_uri; + location = m_external ? TQString() : m_uri; + location += m_img->name() + TQString("/layers/layer%1").tqarg(m_count) + ".filterconfig"; if (m_store->open(location)) { - QString s = layer->filter()->toString(); - m_store->write(s.utf8(), qstrlen(s.utf8())); + TQString s = layer->filter()->toString(); + m_store->write(s.utf8(), tqstrlen(s.utf8())); m_store->close(); } } @@ -163,8 +163,8 @@ private: KisImageSP m_img; KoStore *m_store; bool m_external; - QString m_uri; - Q_UINT32 &m_count; + TQString m_uri; + TQ_UINT32 &m_count; }; #endif // KIS_SAVE_VISITOR_H_ diff --git a/krita/ui/kis_savexml_visitor.h b/krita/ui/kis_savexml_visitor.h index f45466cd..52c0dc80 100644 --- a/krita/ui/kis_savexml_visitor.h +++ b/krita/ui/kis_savexml_visitor.h @@ -19,7 +19,7 @@ #ifndef KIS_SAVEXML_VISITOR_H_ #define KIS_SAVEXML_VISITOR_H_ -#include <qrect.h> +#include <tqrect.h> #include "kis_adjustment_layer.h" #include "kis_exif_info.h" @@ -32,7 +32,7 @@ class KisSaveXmlVisitor : public KisLayerVisitor { public: - KisSaveXmlVisitor(QDomDocument doc, QDomElement element, Q_UINT32 &count, bool root=false) : + KisSaveXmlVisitor(TQDomDocument doc, TQDomElement element, TQ_UINT32 &count, bool root=false) : KisLayerVisitor(), m_doc(doc), m_count(count), @@ -44,7 +44,7 @@ public: public: virtual bool visit(KisPaintLayer *layer) { - QDomElement layerElement = m_doc.createElement("layer"); + TQDomElement layerElement = m_doc.createElement("layer"); layerElement.setAttribute("name", layer->name()); layerElement.setAttribute("x", layer->x()); @@ -54,14 +54,14 @@ public: layerElement.setAttribute("visible", layer->visible()); layerElement.setAttribute("locked", layer->locked()); layerElement.setAttribute("layertype", "paintlayer"); - layerElement.setAttribute("filename", QString("layer%1").arg(m_count)); + layerElement.setAttribute("filename", TQString("layer%1").tqarg(m_count)); layerElement.setAttribute("colorspacename", layer->paintDevice()->colorSpace()->id().id()); - layerElement.setAttribute("hasmask", layer->hasMask()); + layerElement.setAttribute("hastqmask", layer->hasMask()); m_elem.appendChild(layerElement); if(layer->paintDevice()->hasExifInfo()) { - QDomElement exifElmt = layer->paintDevice()->exifInfo()->save(m_doc); + TQDomElement exifElmt = layer->paintDevice()->exifInfo()->save(m_doc); layerElement.appendChild(exifElmt); } m_count++; @@ -70,7 +70,7 @@ public: virtual bool visit(KisGroupLayer *layer) { - QDomElement layerElement; + TQDomElement layerElement; if(m_root) // if this is the root we fake so not to save it layerElement = m_elem; @@ -90,7 +90,7 @@ public: m_elem.appendChild(layerElement); } - QDomElement elem = m_doc.createElement("LAYERS"); + TQDomElement elem = m_doc.createElement("LAYERS"); layerElement.appendChild(elem); @@ -114,7 +114,7 @@ public: virtual bool visit(KisAdjustmentLayer* layer) { - QDomElement layerElement = m_doc.createElement("layer"); + TQDomElement layerElement = m_doc.createElement("layer"); layerElement.setAttribute("name", layer->name()); layerElement.setAttribute("filtername", layer->filter()->name()); @@ -124,7 +124,7 @@ public: layerElement.setAttribute("visible", layer->visible()); layerElement.setAttribute("locked", layer->locked()); layerElement.setAttribute("layertype", "adjustmentlayer"); - layerElement.setAttribute("filename", QString("layer%1").arg(m_count)); + layerElement.setAttribute("filename", TQString("layer%1").tqarg(m_count)); layerElement.setAttribute("x", layer->x()); layerElement.setAttribute("y", layer->y()); m_elem.appendChild(layerElement); @@ -134,9 +134,9 @@ public: } private: - QDomDocument m_doc; - QDomElement m_elem; - Q_UINT32 &m_count; + TQDomDocument m_doc; + TQDomElement m_elem; + TQ_UINT32 &m_count; bool m_root; }; diff --git a/krita/ui/kis_selection_manager.cc b/krita/ui/kis_selection_manager.cc index d97fca0c..3caba5e7 100644 --- a/krita/ui/kis_selection_manager.cc +++ b/krita/ui/kis_selection_manager.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qobject.h> -#include <qapplication.h> -#include <qclipboard.h> -#include <qcolor.h> -#include <qcursor.h> +#include <tqobject.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqcolor.h> +#include <tqcursor.h> #include <kdebug.h> #include <kaction.h> @@ -60,8 +60,8 @@ #include "kis_fill_painter.h" #include "kis_canvas.h" -KisSelectionManager::KisSelectionManager(KisView * parent, KisDoc * doc) - : m_parent(parent), +KisSelectionManager::KisSelectionManager(KisView * tqparent, KisDoc * doc) + : m_parent(tqparent), m_doc(doc), m_copy(0), m_cut(0), @@ -102,142 +102,142 @@ void KisSelectionManager::setup(KActionCollection * collection) // XXX: setup shortcuts! m_cut = KStdAction::cut(this, - SLOT(cut()), + TQT_SLOT(cut()), collection, "cut"); m_copy = KStdAction::copy(this, - SLOT(copy()), + TQT_SLOT(copy()), collection, "copy"); m_paste = KStdAction::paste(this, - SLOT(paste()), + TQT_SLOT(paste()), collection, "paste"); m_pasteNew = new KAction(i18n("Paste into &New Image"), 0, 0, - this, SLOT(pasteNew()), + this, TQT_SLOT(pasteNew()), collection, "paste_new"); m_selectAll = KStdAction::selectAll(this, - SLOT(selectAll()), + TQT_SLOT(selectAll()), collection, "select_all"); m_deselect = KStdAction::deselect(this, - SLOT(deselect()), + TQT_SLOT(deselect()), collection, "deselect"); m_clear = KStdAction::clear(this, - SLOT(clear()), + TQT_SLOT(clear()), collection, "clear"); m_reselect = new KAction(i18n("&Reselect"), 0, "Ctrl+Shift+D", - this, SLOT(reselect()), + this, TQT_SLOT(reselect()), collection, "reselect"); m_invert = new KAction(i18n("&Invert"), 0, "Ctrl+I", - this, SLOT(invert()), + this, TQT_SLOT(invert()), collection, "invert"); m_toNewLayer = new KAction(i18n("Copy Selection to New Layer"), 0, "Ctrl+J", - this, SLOT(copySelectionToNewLayer()), + this, TQT_SLOT(copySelectionToNewLayer()), collection, "copy_selection_to_new_layer"); m_cutToNewLayer = new KAction(i18n("Cut Selection to New Layer"), 0, "Ctrl+Shift+J", - this, SLOT(cutToNewLayer()), + this, TQT_SLOT(cutToNewLayer()), collection, "cut_selection_to_new_layer"); m_feather = new KAction(i18n("Feather"), 0, "Ctrl+Alt+D", - this, SLOT(feather()), + this, TQT_SLOT(feather()), collection, "feather"); m_fillForegroundColor = new KAction(i18n("Fill with Foreground Color"), "Alt+backspace", this, - SLOT(fillForegroundColor()), + TQT_SLOT(fillForegroundColor()), collection, "fill_selection_foreground_color"); m_fillBackgroundColor = new KAction(i18n("Fill with Background Color"), "backspace", this, - SLOT(fillBackgroundColor()), + TQT_SLOT(fillBackgroundColor()), collection, "fill_selection_background_color"); m_fillPattern = new KAction(i18n("Fill with Pattern"), 0, this, - SLOT(fillPattern()), + TQT_SLOT(fillPattern()), collection, "fill_selection_pattern"); - m_toggleDisplaySelection = new KToggleAction(i18n("Display Selection"), "Ctrl+h", this, SLOT(toggleDisplaySelection()), collection, "toggle_display_selection"); + m_toggleDisplaySelection = new KToggleAction(i18n("Display Selection"), "Ctrl+h", this, TQT_SLOT(toggleDisplaySelection()), collection, "toggle_display_selection"); m_toggleDisplaySelection->setCheckedState(KGuiItem(i18n("Hide Selection"))); m_toggleDisplaySelection->setChecked(true); m_border = new KAction(i18n("Border..."), 0, 0, - this, SLOT(border()), + this, TQT_SLOT(border()), collection, "border"); m_expand = new KAction(i18n("Expand..."), 0, 0, - this, SLOT(expand()), + this, TQT_SLOT(expand()), collection, "expand"); m_smooth = new KAction(i18n("Smooth..."), 0, 0, - this, SLOT(smooth()), + this, TQT_SLOT(smooth()), collection, "smooth"); m_contract = new KAction(i18n("Contract..."), 0, 0, - this, SLOT(contract()), + this, TQT_SLOT(contract()), collection, "contract"); m_similar = new KAction(i18n("Similar"), 0, 0, - this, SLOT(similar()), + this, TQT_SLOT(similar()), collection, "similar"); m_transform = new KAction(i18n("Transform..."), 0, 0, - this, SLOT(transform()), + this, TQT_SLOT(transform()), collection, "transform_selection"); // m_load // = new KAction(i18n("Load..."), // 0, 0, -// this, SLOT(load()), +// this, TQT_SLOT(load()), // collection, "load_selection"); // // // m_save // = new KAction(i18n("Save As..."), // 0, 0, -// this, SLOT(save()), +// this, TQT_SLOT(save()), // collection, "save_selection"); - QClipboard *cb = QApplication::clipboard(); - connect(cb, SIGNAL(dataChanged()), SLOT(clipboardDataChanged())); + TQClipboard *cb = TQApplication::tqclipboard(); + connect(cb, TQT_SIGNAL(dataChanged()), TQT_SLOT(clipboardDataChanged())); } void KisSelectionManager::clipboardDataChanged() @@ -258,7 +258,7 @@ void KisSelectionManager::updateGUI() Q_ASSERT(m_clipboard); if (m_parent == 0) { - // "Eek, no parent! + // "Eek, no tqparent! return; } @@ -378,7 +378,7 @@ void KisSelectionManager::copy() KisSelectionSP selection = dev->selection(); - QRect r = selection->selectedExactRect(); + TQRect r = selection->selectedExactRect(); KisPaintDeviceSP clip = new KisPaintDevice(dev->colorSpace(), "clip"); Q_CHECK_PTR(clip); @@ -393,9 +393,9 @@ void KisSelectionManager::copy() gc.bitBlt(0, 0, COMPOSITE_COPY, dev, r.x(), r.y(), r.width(), r.height()); gc.end(); - // Apply selection mask. + // Apply selection tqmask. - for (Q_INT32 y = 0; y < r.height(); y++) { + for (TQ_INT32 y = 0; y < r.height(); y++) { KisHLineIteratorPixel layerIt = clip->createHLineIterator(0, y, r.width(), true); KisHLineIteratorPixel selectionIt = selection->createHLineIterator(r.x(), r.y() + y, r.width(), false); @@ -422,11 +422,11 @@ KisLayerSP KisSelectionManager::paste() KisPaintDeviceSP clip = m_clipboard->clip(); if (clip) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintLayer *layer = new KisPaintLayer(img, img->nextLayerName() + i18n("(pasted)"), OPACITY_OPAQUE); Q_CHECK_PTR(layer); - QRect r = clip->exactBounds(); + TQRect r = clip->exactBounds(); KisPainter gc; gc.begin(layer->paintDevice()); gc.bitBlt(0, 0, COMPOSITE_COPY, clip, r.x(), r.y(), r.width(), r.height()); @@ -434,24 +434,24 @@ KisLayerSP KisSelectionManager::paste() //figure out where to position the clip KisCanvasController *cc = m_parent->getCanvasController(); - QPoint center = cc->viewToWindow(QPoint(cc->kiscanvas()->width()/2, cc->kiscanvas()->height()/2)); - QPoint bottomright = cc->viewToWindow(QPoint(cc->kiscanvas()->width(), cc->kiscanvas()->height())); + TQPoint center = cc->viewToWindow(TQPoint(cc->kiscanvas()->width()/2, cc->kiscanvas()->height()/2)); + TQPoint bottomright = cc->viewToWindow(TQPoint(cc->kiscanvas()->width(), cc->kiscanvas()->height())); if(bottomright.x() > img->width()) center.setX(img->width()/2); if(bottomright.y() > img->height()) center.setY(img->height()/2); - center -= QPoint(r.width()/2, r.height()/2); + center -= TQPoint(r.width()/2, r.height()/2); layer->setX(center.x()); layer->setY(center.y()); /*XXX CBR have an idea of asking the user if he is about to paste a clip ion another cs than that of the image if that is what he want rather than silently converting if (clip->colorSpace != img ->colorSpace()) - if (dlg->exec() == QDialog::Accepted) + if (dlg->exec() == TQDialog::Accepted) layer->convertTo(img->colorSpace()); */ - QApplication::restoreOverrideCursor(); - if(img->addLayer(layer, img->activeLayer()->parent(), img->activeLayer())) + TQApplication::restoreOverrideCursor(); + if(img->addLayer(layer, img->activeLayer()->tqparent(), img->activeLayer())) { return layer; } else { @@ -466,13 +466,13 @@ void KisSelectionManager::pasteNew() KisPaintDeviceSP clip = m_clipboard->clip(); if (!clip) return; - QRect r = clip->exactBounds(); + TQRect r = clip->exactBounds(); if (r.width() < 1 && r.height() < 1) { // Don't paste empty clips return; } - const QCString mimetype = KoDocument::readNativeFormatMimeType(); + const TQCString mimetype = KoDocument::readNativeFormatMimeType(); KoDocumentEntry entry = KoDocumentEntry::queryByMimeType( mimetype ); KisDoc * doc = (KisDoc*) entry.createDoc(); @@ -573,7 +573,7 @@ void KisSelectionManager::clear() if (img->undo()) img->undoAdapter()->addCommand(t); } -void KisSelectionManager::fill(const KisColor& color, bool fillWithPattern, const QString& transactionText) +void KisSelectionManager::fill(const KisColor& color, bool fillWithPattern, const TQString& transactionText) { KisImageSP img = m_parent->currentImg(); if (!img) return; @@ -729,7 +729,7 @@ void KisSelectionManager::feather() k->height = 3; k->factor = 16; k->offset = 0; - k->data = new Q_INT32[9]; + k->data = new TQ_INT32[9]; k->data[0] = 1; k->data[1] = 2; k->data[2] = 1; @@ -740,10 +740,10 @@ void KisSelectionManager::feather() k->data[7] = 2; k->data[8] = 1; - QRect rect = selection->selectedRect(); + TQRect rect = selection->selectedRect(); // Make sure we've got enough space around the edges. - rect = QRect(rect.x() - 3, rect.y() - 3, rect.width() + 6, rect.height() + 6); - rect &= QRect(0, 0, img->width(), img->height()); + rect = TQRect(rect.x() - 3, rect.y() - 3, rect.width() + 6, rect.height() + 6); + rect &= TQRect(0, 0, img->width(), img->height()); painter.applyMatrix(k, rect.x(), rect.y(), rect.width(), rect.height(), BORDER_AVOID, KisChannelInfo::FLAG_ALPHA); painter.end(); @@ -777,7 +777,7 @@ void KisSelectionManager::save() {} #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) -void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) +void KisSelectionManager::grow (TQ_INT32 xradius, TQ_INT32 yradius) { KisImageSP img = m_parent->currentImg(); if (!img) return; @@ -789,14 +789,14 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); /* Any bugs in this fuction are probably also in thin_region Blame all bugs in this function on jaycox@gimp.org */ - Q_UINT8 **buf; // caches the region's pixel data - Q_UINT8 **max; // caches the largest values for each column + TQ_UINT8 **buf; // caches the region's pixel data + TQ_UINT8 **max; // caches the largest values for each column if (xradius <= 0 || yradius <= 0) return; @@ -808,14 +808,14 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) Q_CHECK_PTR(t); } - max = new Q_UINT8* [layerSize.width() + 2 * xradius]; - buf = new Q_UINT8* [yradius + 1]; - for (Q_INT32 i = 0; i < yradius + 1; i++) + max = new TQ_UINT8* [layerSize.width() + 2 * xradius]; + buf = new TQ_UINT8* [yradius + 1]; + for (TQ_INT32 i = 0; i < yradius + 1; i++) { - buf[i] = new Q_UINT8[layerSize.width()]; + buf[i] = new TQ_UINT8[layerSize.width()]; } - Q_UINT8* buffer = new Q_UINT8[ ( layerSize.width() + 2 * xradius ) * ( yradius + 1 ) ]; - for (Q_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) + TQ_UINT8* buffer = new TQ_UINT8[ ( layerSize.width() + 2 * xradius ) * ( yradius + 1 ) ]; + for (TQ_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) { if (i < xradius) max[i] = buffer; @@ -824,16 +824,16 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) else max[i] = &buffer[(yradius + 1) * (layerSize.width() + xradius - 1)]; - for (Q_INT32 j = 0; j < xradius + 1; j++) + for (TQ_INT32 j = 0; j < xradius + 1; j++) max[i][j] = 0; } /* offset the max pointer by xradius so the range of the array is [-xradius] to [region->w + xradius] */ max += xradius; - Q_UINT8* out = new Q_UINT8[ layerSize.width() ]; // holds the new scan line we are computing + TQ_UINT8* out = new TQ_UINT8[ layerSize.width() ]; // holds the new scan line we are computing - Q_INT32* circ = new Q_INT32[ 2 * xradius + 1 ]; // holds the y coords of the filter's mask + TQ_INT32* circ = new TQ_INT32[ 2 * xradius + 1 ]; // holds the y coords of the filter's tqmask computeBorder (circ, xradius, yradius); /* offset the circ pointer by xradius so the range of the array @@ -841,39 +841,39 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) circ += xradius; memset (buf[0], 0, layerSize.width()); - for (Q_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image + for (TQ_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image { selection->readBytes(buf[i + 1], layerSize.x(), layerSize.y() + i, layerSize.width(), 1); } - for (Q_INT32 x = 0; x < layerSize.width() ; x++) // set up max for top of image + for (TQ_INT32 x = 0; x < layerSize.width() ; x++) // set up max for top of image { max[x][0] = 0; // buf[0][x] is always 0 max[x][1] = buf[1][x]; // MAX (buf[1][x], max[x][0]) always = buf[1][x] - for (Q_INT32 j = 2; j < yradius + 1; j++) + for (TQ_INT32 j = 2; j < yradius + 1; j++) { max[x][j] = MAX(buf[j][x], max[x][j-1]); } } - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { rotatePointers (buf, yradius + 1); if (y < layerSize.height() - (yradius)) selection->readBytes(buf[yradius], layerSize.x(), layerSize.y() + y + yradius, layerSize.width(), 1); else memset (buf[yradius], 0, layerSize.width()); - for (Q_INT32 x = 0; x < layerSize.width(); x++) /* update max array */ + for (TQ_INT32 x = 0; x < layerSize.width(); x++) /* update max array */ { - for (Q_INT32 i = yradius; i > 0; i--) + for (TQ_INT32 i = yradius; i > 0; i--) { max[x][i] = MAX (MAX (max[x][i - 1], buf[i - 1][x]), buf[i][x]); } max[x][0] = buf[0][x]; } - Q_INT32 last_max = max[0][circ[-1]]; - Q_INT32 last_index = 1; - for (Q_INT32 x = 0; x < layerSize.width(); x++) /* render scan line */ + TQ_INT32 last_max = max[0][circ[-1]]; + TQ_INT32 last_index = 1; + for (TQ_INT32 x = 0; x < layerSize.width(); x++) /* render scan line */ { last_index--; if (last_index >= 0) @@ -883,7 +883,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) else { last_max = 0; - for (Q_INT32 i = xradius; i >= 0; i--) + for (TQ_INT32 i = xradius; i >= 0; i--) if (last_max < max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -896,7 +896,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) { last_index = xradius; last_max = max[x + xradius][circ[xradius]]; - for (Q_INT32 i = xradius - 1; i >= -xradius; i--) + for (TQ_INT32 i = xradius - 1; i >= -xradius; i--) if (last_max < max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -914,7 +914,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) delete[] circ; delete[] buffer; delete[] max; - for (Q_INT32 i = 0; i < yradius + 1; i++) + for (TQ_INT32 i = 0; i < yradius + 1; i++) delete[] buf[i]; delete[] buf; delete[] out; @@ -927,7 +927,7 @@ void KisSelectionManager::grow (Q_INT32 xradius, Q_INT32 yradius) } } -void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lock) +void KisSelectionManager::shrink (TQ_INT32 xradius, TQ_INT32 yradius, bool edge_lock) { KisImageSP img = m_parent->currentImg(); @@ -940,7 +940,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); /* pretty much the same as fatten_region only different blame all bugs in this function on jaycox@gimp.org @@ -949,29 +949,29 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo we are passed are identical to the edge pixels. If edge_lock is false, we assume that pixels outside the region are 0 */ - Q_UINT8 **buf; // caches the the region's pixels - Q_UINT8 **max; // caches the smallest values for each column - Q_INT32 last_max, last_index; + TQ_UINT8 **buf; // caches the the region's pixels + TQ_UINT8 **max; // caches the smallest values for each column + TQ_INT32 last_max, last_index; if (xradius <= 0 || yradius <= 0) return; - max = new Q_UINT8* [layerSize.width() + 2 * xradius]; - buf = new Q_UINT8* [yradius + 1]; - for (Q_INT32 i = 0; i < yradius + 1; i++) + max = new TQ_UINT8* [layerSize.width() + 2 * xradius]; + buf = new TQ_UINT8* [yradius + 1]; + for (TQ_INT32 i = 0; i < yradius + 1; i++) { - buf[i] = new Q_UINT8[layerSize.width()]; + buf[i] = new TQ_UINT8[layerSize.width()]; } - Q_INT32 buffer_size = (layerSize.width() + 2 * xradius + 1) * (yradius + 1); - Q_UINT8* buffer = new Q_UINT8[buffer_size]; + TQ_INT32 buffer_size = (layerSize.width() + 2 * xradius + 1) * (yradius + 1); + TQ_UINT8* buffer = new TQ_UINT8[buffer_size]; if (edge_lock) memset(buffer, 255, buffer_size); else memset(buffer, 0, buffer_size); - for (Q_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) + for (TQ_INT32 i = 0; i < layerSize.width() + 2 * xradius; i++) { if (i < xradius) if (edge_lock) @@ -987,21 +987,21 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo max[i] = &buffer[(yradius + 1) * (layerSize.width() + xradius)]; } if (!edge_lock) - for (Q_INT32 j = 0 ; j < xradius + 1; j++) max[0][j] = 0; + for (TQ_INT32 j = 0 ; j < xradius + 1; j++) max[0][j] = 0; // offset the max pointer by xradius so the range of the array is [-xradius] to [region->w + xradius] max += xradius; - Q_UINT8* out = new Q_UINT8[layerSize.width()]; // holds the new scan line we are computing + TQ_UINT8* out = new TQ_UINT8[layerSize.width()]; // holds the new scan line we are computing - Q_INT32* circ = new Q_INT32[2 * xradius + 1]; // holds the y coords of the filter's mask + TQ_INT32* circ = new TQ_INT32[2 * xradius + 1]; // holds the y coords of the filter's tqmask computeBorder (circ, xradius, yradius); // offset the circ pointer by xradius so the range of the array is [-xradius] to [xradius] circ += xradius; - for (Q_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image + for (TQ_INT32 i = 0; i < yradius && i < layerSize.height(); i++) // load top of image selection->readBytes(buf[i + 1], layerSize.x(), layerSize.y() + i, layerSize.width(), 1); if (edge_lock) @@ -1010,14 +1010,14 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo memset (buf[0], 0, layerSize.width()); - for (Q_INT32 x = 0; x < layerSize.width(); x++) // set up max for top of image + for (TQ_INT32 x = 0; x < layerSize.width(); x++) // set up max for top of image { max[x][0] = buf[0][x]; - for (Q_INT32 j = 1; j < yradius + 1; j++) + for (TQ_INT32 j = 1; j < yradius + 1; j++) max[x][j] = MIN(buf[j][x], max[x][j-1]); } - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { rotatePointers (buf, yradius + 1); if (y < layerSize.height() - yradius) @@ -1027,9 +1027,9 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo else memset (buf[yradius], 0, layerSize.width()); - for (Q_INT32 x = 0 ; x < layerSize.width(); x++) // update max array + for (TQ_INT32 x = 0 ; x < layerSize.width(); x++) // update max array { - for (Q_INT32 i = yradius; i > 0; i--) + for (TQ_INT32 i = yradius; i > 0; i--) { max[x][i] = MIN (MIN (max[x][i - 1], buf[i - 1][x]), buf[i][x]); } @@ -1038,7 +1038,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo last_max = max[0][circ[-1]]; last_index = 0; - for (Q_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line + for (TQ_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line { last_index--; if (last_index >= 0) @@ -1048,7 +1048,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo else { last_max = 255; - for (Q_INT32 i = xradius; i >= 0; i--) + for (TQ_INT32 i = xradius; i >= 0; i--) if (last_max > max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -1061,7 +1061,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo { last_index = xradius; last_max = max[x + xradius][circ[xradius]]; - for (Q_INT32 i = xradius - 1; i >= -xradius; i--) + for (TQ_INT32 i = xradius - 1; i >= -xradius; i--) if (last_max > max[x + i][circ[i]]) { last_max = max[x + i][circ[i]]; @@ -1081,7 +1081,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo delete[] circ; delete[] buffer; delete[] max; - for (Q_INT32 i = 0; i < yradius + 1; i++) + for (TQ_INT32 i = 0; i < yradius + 1; i++) delete buf[i]; delete[] buf; delete[] out; @@ -1090,7 +1090,7 @@ void KisSelectionManager::shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lo dev->emitSelectionChanged(); } -//Simple convolution filter to smooth a mask (1bpp) +//Simple convolution filter to smooth a tqmask (1bpp) void KisSelectionManager::smooth() { @@ -1104,15 +1104,15 @@ void KisSelectionManager::smooth() KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); - Q_UINT8 *buf[3]; + TQ_UINT8 *buf[3]; - Q_INT32 width = layerSize.width(); + TQ_INT32 width = layerSize.width(); - for (Q_INT32 i = 0; i < 3; i++) buf[i] = new Q_UINT8[width + 2]; + for (TQ_INT32 i = 0; i < 3; i++) buf[i] = new TQ_UINT8[width + 2]; - Q_UINT8* out = new Q_UINT8[width]; + TQ_UINT8* out = new TQ_UINT8[width]; // load top of image selection->readBytes(buf[0] + 1, layerSize.x(), layerSize.y(), width, 1); @@ -1122,7 +1122,7 @@ void KisSelectionManager::smooth() memcpy (buf[1], buf[0], width + 2); - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { if (y + 1 < layerSize.height()) { @@ -1136,9 +1136,9 @@ void KisSelectionManager::smooth() memcpy (buf[2], buf[1], width + 2); } - for (Q_INT32 x = 0 ; x < width; x++) + for (TQ_INT32 x = 0 ; x < width; x++) { - Q_INT32 value = (buf[0][x] + buf[0][x+1] + buf[0][x+2] + + TQ_INT32 value = (buf[0][x] + buf[0][x+1] + buf[0][x+2] + buf[1][x] + buf[2][x+1] + buf[1][x+2] + buf[2][x] + buf[1][x+1] + buf[2][x+2]); @@ -1150,7 +1150,7 @@ void KisSelectionManager::smooth() rotatePointers (buf, 3); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] buf[i]; delete[] out; @@ -1159,7 +1159,7 @@ void KisSelectionManager::smooth() dev->emitSelectionChanged(); } -// Erode (radius 1 pixel) a mask (1bpp) +// Erode (radius 1 pixel) a tqmask (1bpp) void KisSelectionManager::erode() { @@ -1173,17 +1173,17 @@ void KisSelectionManager::erode() KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); - Q_UINT8* buf[3]; + TQ_UINT8* buf[3]; - Q_INT32 width = layerSize.width(); + TQ_INT32 width = layerSize.width(); - for (Q_INT32 i = 0; i < 3; i++) - buf[i] = new Q_UINT8[width + 2]; + for (TQ_INT32 i = 0; i < 3; i++) + buf[i] = new TQ_UINT8[width + 2]; - Q_UINT8* out = new Q_UINT8[width]; + TQ_UINT8* out = new TQ_UINT8[width]; // load top of image selection->readBytes(buf[0] + 1, layerSize.x(), layerSize.y(), width, 1); @@ -1193,7 +1193,7 @@ void KisSelectionManager::erode() memcpy (buf[1], buf[0], width + 2); - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { if (y + 1 < layerSize.height()) { @@ -1207,9 +1207,9 @@ void KisSelectionManager::erode() memcpy (buf[2], buf[1], width + 2); } - for (Q_INT32 x = 0 ; x < width; x++) + for (TQ_INT32 x = 0 ; x < width; x++) { - Q_INT32 min = 255; + TQ_INT32 min = 255; if (buf[0][x+1] < min) min = buf[0][x+1]; if (buf[1][x] < min) min = buf[1][x]; @@ -1225,7 +1225,7 @@ void KisSelectionManager::erode() rotatePointers (buf, 3); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] buf[i]; delete[] out; @@ -1234,7 +1234,7 @@ void KisSelectionManager::erode() dev->emitSelectionChanged(); } -// dilate (radius 1 pixel) a mask (1bpp) +// dilate (radius 1 pixel) a tqmask (1bpp) void KisSelectionManager::dilate() { @@ -1248,16 +1248,16 @@ void KisSelectionManager::dilate() KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); - Q_UINT8* buf[3]; + TQ_UINT8* buf[3]; - Q_INT32 width = layerSize.width(); + TQ_INT32 width = layerSize.width(); - for (Q_INT32 i = 0; i < 3; i++) - buf[i] = new Q_UINT8[width + 2]; + for (TQ_INT32 i = 0; i < 3; i++) + buf[i] = new TQ_UINT8[width + 2]; - Q_UINT8* out = new Q_UINT8[width]; + TQ_UINT8* out = new TQ_UINT8[width]; // load top of image selection->readBytes(buf[0] + 1, layerSize.x(), layerSize.y(), width, 1); @@ -1267,7 +1267,7 @@ void KisSelectionManager::dilate() memcpy (buf[1], buf[0], width + 2); - for (Q_INT32 y = 0; y < layerSize.height(); y++) + for (TQ_INT32 y = 0; y < layerSize.height(); y++) { if (y + 1 < layerSize.height()) { @@ -1281,9 +1281,9 @@ void KisSelectionManager::dilate() memcpy (buf[2], buf[1], width + 2); } - for (Q_INT32 x = 0 ; x < width; x++) + for (TQ_INT32 x = 0 ; x < width; x++) { - Q_INT32 max = 0; + TQ_INT32 max = 0; if (buf[0][x+1] > max) max = buf[0][x+1]; if (buf[1][x] > max) max = buf[1][x]; @@ -1299,7 +1299,7 @@ void KisSelectionManager::dilate() rotatePointers (buf, 3); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] buf[i]; delete[] out; @@ -1308,7 +1308,7 @@ void KisSelectionManager::dilate() dev->emitSelectionChanged(); } -void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) +void KisSelectionManager::border(TQ_INT32 xradius, TQ_INT32 yradius) { KisImageSP img = m_parent->currentImg(); if (!img) return; @@ -1320,24 +1320,24 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) KisSelectionSP selection = dev->selection(); //determine the layerSize - QRect layerSize = dev->exactBounds(); + TQRect layerSize = dev->exactBounds(); /* This function has no bugs, but if you imagine some you can blame them on jaycox@gimp.org */ - Q_UINT8 *buf[3]; - Q_UINT8 **density; - Q_UINT8 **transition; + TQ_UINT8 *buf[3]; + TQ_UINT8 **density; + TQ_UINT8 **transition; if (xradius == 1 && yradius == 1) // optimize this case specifically { - Q_UINT8* source[3]; + TQ_UINT8* source[3]; - for (Q_INT32 i = 0; i < 3; i++) - source[i] = new Q_UINT8[layerSize.width()]; + for (TQ_INT32 i = 0; i < 3; i++) + source[i] = new TQ_UINT8[layerSize.width()]; - Q_UINT8* transition = new Q_UINT8[layerSize.width()]; + TQ_UINT8* transition = new TQ_UINT8[layerSize.width()]; selection->readBytes(source[0], layerSize.x(), layerSize.y(), layerSize.width(), 1); memcpy (source[1], source[0], layerSize.width()); @@ -1349,7 +1349,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) computeTransition (transition, source, layerSize.width()); selection->writeBytes(transition, layerSize.x(), layerSize.y(), layerSize.width(), 1); - for (Q_INT32 y = 1; y < layerSize.height(); y++) + for (TQ_INT32 y = 1; y < layerSize.height(); y++) { rotatePointers (source, 3); if (y + 1 < layerSize.height()) @@ -1360,41 +1360,41 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) selection->writeBytes(transition, layerSize.x(), layerSize.y() + y, layerSize.width(), 1); } - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete[] source[i]; delete[] transition; return; } - Q_INT32* max = new Q_INT32[layerSize.width() + 2 * xradius]; - for (Q_INT32 i = 0; i < (layerSize.width() + 2 * xradius); i++) + TQ_INT32* max = new TQ_INT32[layerSize.width() + 2 * xradius]; + for (TQ_INT32 i = 0; i < (layerSize.width() + 2 * xradius); i++) max[i] = yradius + 2; max += xradius; - for (Q_INT32 i = 0; i < 3; i++) - buf[i] = new Q_UINT8[layerSize.width()]; + for (TQ_INT32 i = 0; i < 3; i++) + buf[i] = new TQ_UINT8[layerSize.width()]; - transition = new Q_UINT8*[yradius + 1]; - for (Q_INT32 i = 0; i < yradius + 1; i++) + transition = new TQ_UINT8*[yradius + 1]; + for (TQ_INT32 i = 0; i < yradius + 1; i++) { - transition[i] = new Q_UINT8[layerSize.width() + 2 * xradius]; + transition[i] = new TQ_UINT8[layerSize.width() + 2 * xradius]; memset(transition[i], 0, layerSize.width() + 2 * xradius); transition[i] += xradius; } - Q_UINT8* out = new Q_UINT8[layerSize.width()]; - density = new Q_UINT8*[2 * xradius + 1]; + TQ_UINT8* out = new TQ_UINT8[layerSize.width()]; + density = new TQ_UINT8*[2 * xradius + 1]; density += xradius; - for (Q_INT32 x = 0; x < (xradius + 1); x++) // allocate density[][] + for (TQ_INT32 x = 0; x < (xradius + 1); x++) // allocate density[][] { - density[ x] = new Q_UINT8[2 * yradius + 1]; + density[ x] = new TQ_UINT8[2 * yradius + 1]; density[ x] += yradius; density[-x] = density[x]; } - for (Q_INT32 x = 0; x < (xradius + 1); x++) // compute density[][] + for (TQ_INT32 x = 0; x < (xradius + 1); x++) // compute density[][] { double tmpx, tmpy, dist; - Q_UINT8 a; + TQ_UINT8 a; if (x > 0) tmpx = x - 0.5; @@ -1403,7 +1403,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) else tmpx = 0.0; - for (Q_INT32 y = 0; y < (yradius + 1); y++) + for (TQ_INT32 y = 0; y < (yradius + 1); y++) { if (y > 0) tmpy = y - 0.5; @@ -1414,7 +1414,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) dist = ((tmpy * tmpy) / (yradius * yradius) + (tmpx * tmpx) / (xradius * xradius)); if (dist < 1.0) - a = 255 * (Q_UINT8)(1.0 - sqrt (dist)); + a = 255 * (TQ_UINT8)(1.0 - sqrt (dist)); else a = 0; density[ x][ y] = a; @@ -1431,23 +1431,23 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) memcpy (buf[2], buf[1], layerSize.width()); computeTransition (transition[1], buf, layerSize.width()); - for (Q_INT32 y = 1; y < yradius && y + 1 < layerSize.height(); y++) // set up top of image + for (TQ_INT32 y = 1; y < yradius && y + 1 < layerSize.height(); y++) // set up top of image { rotatePointers (buf, 3); selection->readBytes(buf[2], layerSize.x(), layerSize.y() + y + 1, layerSize.width(), 1); computeTransition (transition[y + 1], buf, layerSize.width()); } - for (Q_INT32 x = 0; x < layerSize.width(); x++) // set up max[] for top of image + for (TQ_INT32 x = 0; x < layerSize.width(); x++) // set up max[] for top of image { max[x] = -(yradius + 7); - for (Q_INT32 j = 1; j < yradius + 1; j++) + for (TQ_INT32 j = 1; j < yradius + 1; j++) if (transition[j][x]) { max[x] = j; break; } } - for (Q_INT32 y = 0; y < layerSize.height(); y++) // main calculation loop + for (TQ_INT32 y = 0; y < layerSize.height(); y++) // main calculation loop { rotatePointers (buf, 3); rotatePointers (transition, yradius + 1); @@ -1459,7 +1459,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) else memcpy (transition[yradius], transition[yradius - 1], layerSize.width()); - for (Q_INT32 x = 0; x < layerSize.width(); x++) // update max array + for (TQ_INT32 x = 0; x < layerSize.width(); x++) // update max array { if (max[x] < 1) { @@ -1483,15 +1483,15 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) if (max[x] < -yradius - 1) max[x] = -yradius - 1; } - Q_UINT8 last_max = max[0][density[-1]]; - Q_INT32 last_index = 1; - for (Q_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line + TQ_UINT8 last_max = max[0][density[-1]]; + TQ_INT32 last_index = 1; + for (TQ_INT32 x = 0 ; x < layerSize.width(); x++) // render scan line { last_index--; if (last_index >= 0) { last_max = 0; - for (Q_INT32 i = xradius; i >= 0; i--) + for (TQ_INT32 i = xradius; i >= 0; i--) if (max[x + i] <= yradius && max[x + i] >= -yradius && density[i][max[x+i]] > last_max) { last_max = density[i][max[x + i]]; @@ -1502,7 +1502,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) else { last_max = 0; - for (Q_INT32 i = xradius; i >= -xradius; i--) + for (TQ_INT32 i = xradius; i >= -xradius; i--) if (max[x + i] <= yradius && max[x + i] >= -yradius && density[i][max[x + i]] > last_max) { last_max = density[i][max[x + i]]; @@ -1512,7 +1512,7 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) } if (last_max == 0) { - Q_INT32 i; + TQ_INT32 i; for (i = x + 1; i < layerSize.width(); i++) { if (max[i] >= -yradius) @@ -1531,20 +1531,20 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) } delete [] out; - for (Q_INT32 i = 0; i < 3; i++) + for (TQ_INT32 i = 0; i < 3; i++) delete buf[i]; max -= xradius; delete[] max; - for (Q_INT32 i = 0; i < yradius + 1; i++) + for (TQ_INT32 i = 0; i < yradius + 1; i++) { transition[i] -= xradius; delete transition[i]; } delete[] transition; - for (Q_INT32 i = 0; i < xradius + 1 ; i++) + for (TQ_INT32 i = 0; i < xradius + 1 ; i++) { density[i] -= yradius; delete density[i]; @@ -1558,11 +1558,11 @@ void KisSelectionManager::border(Q_INT32 xradius, Q_INT32 yradius) #define RINT(x) floor ((x) + 0.5) -void KisSelectionManager::computeBorder (Q_INT32 *circ, Q_INT32 xradius, Q_INT32 yradius) +void KisSelectionManager::computeBorder (TQ_INT32 *circ, TQ_INT32 xradius, TQ_INT32 yradius) { Q_ASSERT(xradius != 0); - Q_INT32 i; - Q_INT32 diameter = xradius * 2 + 1; + TQ_INT32 i; + TQ_INT32 diameter = xradius * 2 + 1; double tmp; for (i = 0; i < diameter; i++) @@ -1574,14 +1574,14 @@ void KisSelectionManager::computeBorder (Q_INT32 *circ, Q_INT32 xradius, Q_INT else tmp = 0.0; - circ[i] = (Q_INT32) RINT (yradius / (double) xradius * sqrt (xradius * xradius - tmp * tmp)); + circ[i] = (TQ_INT32) RINT (yradius / (double) xradius * sqrt (xradius * xradius - tmp * tmp)); } } -void KisSelectionManager::rotatePointers (Q_UINT8 **p, Q_UINT32 n) +void KisSelectionManager::rotatePointers (TQ_UINT8 **p, TQ_UINT32 n) { - Q_UINT32 i; - Q_UINT8 *tmp; + TQ_UINT32 i; + TQ_UINT8 *tmp; tmp = p[0]; @@ -1590,9 +1590,9 @@ void KisSelectionManager::rotatePointers (Q_UINT8 **p, Q_UINT32 n) p[i] = tmp; } -void KisSelectionManager::computeTransition (Q_UINT8* transition, Q_UINT8** buf, Q_INT32 width) +void KisSelectionManager::computeTransition (TQ_UINT8* transition, TQ_UINT8** buf, TQ_INT32 width) { - Q_INT32 x = 0; + TQ_INT32 x = 0; if (width == 1) { @@ -1613,7 +1613,7 @@ void KisSelectionManager::computeTransition (Q_UINT8* transition, Q_UINT8** buf, } else transition[x] = 0; - for (Q_INT32 x = 1; x < width - 1; x++) + for (TQ_INT32 x = 1; x < width - 1; x++) { if (buf[1][x] >= 128) { diff --git a/krita/ui/kis_selection_manager.h b/krita/ui/kis_selection_manager.h index 7e18a0d9..fb33218e 100644 --- a/krita/ui/kis_selection_manager.h +++ b/krita/ui/kis_selection_manager.h @@ -18,8 +18,8 @@ #ifndef KIS_SELECTION_MANAGER_ #define KIS_SELECTION_MANAGER_ -#include "qobject.h" -#include "qptrlist.h" +#include "tqobject.h" +#include "tqptrlist.h" #include "kis_image.h" #include <koffice_export.h> @@ -33,13 +33,14 @@ class KisClipboard; * The selection manager is responsible selections * and the clipboard. */ -class KRITACORE_EXPORT KisSelectionManager : public QObject { +class KRITACORE_EXPORT KisSelectionManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - KisSelectionManager(KisView * parent, KisDoc * doc); + KisSelectionManager(KisView * tqparent, KisDoc * doc); virtual ~KisSelectionManager(); void setup(KActionCollection * collection); @@ -84,20 +85,20 @@ public slots: void toggleDisplaySelection(); public: - void grow (Q_INT32 xradius, Q_INT32 yradius); - void shrink (Q_INT32 xradius, Q_INT32 yradius, bool edge_lock); - void border(Q_INT32 xradius, Q_INT32 yradius); + void grow (TQ_INT32 xradius, TQ_INT32 yradius); + void shrink (TQ_INT32 xradius, TQ_INT32 yradius, bool edge_lock); + void border(TQ_INT32 xradius, TQ_INT32 yradius); // the following functions are needed for the siox tool // they might be also usefull on its own void erode(); void dilate(); private: - void fill(const KisColor& color, bool fillWithPattern, const QString& transactionText); + void fill(const KisColor& color, bool fillWithPattern, const TQString& transactionText); - void computeBorder (Q_INT32 *circ, Q_INT32 xradius, Q_INT32 yradius); - inline void rotatePointers (Q_UINT8 **p, Q_UINT32 n); - void computeTransition (Q_UINT8* transition, Q_UINT8** buf, Q_INT32 width); + void computeBorder (TQ_INT32 *circ, TQ_INT32 xradius, TQ_INT32 yradius); + inline void rotatePointers (TQ_UINT8 **p, TQ_UINT32 n); + void computeTransition (TQ_UINT8* transition, TQ_UINT8** buf, TQ_INT32 width); KisView * m_parent; KisDoc * m_doc; @@ -129,7 +130,7 @@ private: KAction *m_fillPattern; KToggleAction *m_toggleDisplaySelection; - QPtrList<KAction> m_pluginActions; + TQPtrList<KAction> m_pluginActions; }; diff --git a/krita/ui/kis_selection_options.cc b/krita/ui/kis_selection_options.cc index 7d8e62cb..f94ff17f 100644 --- a/krita/ui/kis_selection_options.cc +++ b/krita/ui/kis_selection_options.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qwidget.h> -#include <qradiobutton.h> -#include <qcombobox.h> +#include <tqwidget.h> +#include <tqradiobutton.h> +#include <tqcombobox.h> #include <kcolorbtn.h> -#include <qlayout.h> +#include <tqlayout.h> #include "kis_canvas_controller.h" #include "kis_canvas_subject.h" @@ -32,17 +32,17 @@ #include "kis_selection.h" #include "kis_paint_device.h" -KisSelectionOptions::KisSelectionOptions(QWidget *parent, KisCanvasSubject * subject) - : super(parent), +KisSelectionOptions::KisSelectionOptions(TQWidget *tqparent, KisCanvasSubject * subject) + : super(tqparent), m_subject(subject) { m_page = new WdgSelectionOptions(this); Q_CHECK_PTR(m_page); - QVBoxLayout * l = new QVBoxLayout(this); + TQVBoxLayout * l = new TQVBoxLayout(this); l->addWidget(m_page); - connect(m_page->cmbAction, SIGNAL(activated(int)), this, SIGNAL(actionChanged(int))); + connect(m_page->cmbAction, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(actionChanged(int))); } KisSelectionOptions::~KisSelectionOptions() diff --git a/krita/ui/kis_selection_options.h b/krita/ui/kis_selection_options.h index 7b613410..e8168d04 100644 --- a/krita/ui/kis_selection_options.h +++ b/krita/ui/kis_selection_options.h @@ -19,7 +19,7 @@ #ifndef __KIS_SELECTION_OPTIONS_H__ #define __KIS_SELECTION_OPTIONS_H__ -#include <qwidget.h> +#include <tqwidget.h> #include "koffice_export.h" @@ -28,15 +28,16 @@ class WdgSelectionOptions; /** */ -class KRITAUI_EXPORT KisSelectionOptions : public QWidget +class KRITAUI_EXPORT KisSelectionOptions : public TQWidget { Q_OBJECT + TQ_OBJECT - typedef QWidget super; + typedef TQWidget super; public: - KisSelectionOptions( QWidget *parent, KisCanvasSubject * subject); + KisSelectionOptions( TQWidget *tqparent, KisCanvasSubject * subject); virtual ~KisSelectionOptions(); int action(); diff --git a/krita/ui/kis_text_brush.cc b/krita/ui/kis_text_brush.cc index 6285e503..ef376373 100644 --- a/krita/ui/kis_text_brush.cc +++ b/krita/ui/kis_text_brush.cc @@ -16,11 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <kfontdialog.h> @@ -29,27 +29,27 @@ void KisTextBrushResource::updateBrush() { - QFontMetrics metric(m_font); + TQFontMetrics metric(m_font); int w = metric.width(m_txt); int h = metric.height(); - QPixmap px(w,h); - QPainter p; + TQPixmap px(w,h); + TQPainter p; p.begin(&px); p.setFont( m_font ); - p.fillRect(0,0, w, h, Qt::white); - p.setPen(Qt::black); + p.fillRect(0,0, w, h, TQt::white); + p.setPen(TQt::black); p.drawText(0, metric.ascent(), m_txt ); p.end(); setImage(px.convertToImage ()); } -KisTextBrush::KisTextBrush(QWidget *parent, const char* name, const QString& caption) - : KisWdgTextBrush(parent, name), +KisTextBrush::KisTextBrush(TQWidget *tqparent, const char* name, const TQString& caption) + : KisWdgTextBrush(tqparent, name), m_textBrushResource(new KisTextBrushResource()) { setCaption(caption); - connect((QObject*)lineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(rebuildTextBrush())); - connect((QObject*)bnFont, SIGNAL(clicked()), this, SLOT(getFont())); + connect((TQObject*)lineEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(rebuildTextBrush())); + connect((TQObject*)bnFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(getFont())); m_font = font(); rebuildTextBrush(); } @@ -57,13 +57,13 @@ KisTextBrush::KisTextBrush(QWidget *parent, const char* name, const QString& cap void KisTextBrush::getFont() { - KFontDialog::getFont( m_font, false/*, QWidget* parent! */ ); + KFontDialog::getFont( m_font, false/*, TQWidget* tqparent! */ ); rebuildTextBrush(); } void KisTextBrush::rebuildTextBrush() { - lblFont->setText(QString(m_font.family() + ", %1").arg(m_font.pointSize())); + lblFont->setText(TQString(m_font.family() + ", %1").tqarg(m_font.pointSize())); lblFont->setFont(m_font); m_textBrushResource->setFont(m_font); m_textBrushResource->setText(lineEdit->text()); diff --git a/krita/ui/kis_text_brush.h b/krita/ui/kis_text_brush.h index c1cb07c6..3c8835de 100644 --- a/krita/ui/kis_text_brush.h +++ b/krita/ui/kis_text_brush.h @@ -29,7 +29,7 @@ class KisTextBrushResource : public KisBrush { setBrushType(MASK); } - KisTextBrushResource(const QString& txt, const QFont& font) : KisBrush("") + KisTextBrushResource(const TQString& txt, const TQFont& font) : KisBrush("") { setFont(font); setText(txt); @@ -38,19 +38,20 @@ class KisTextBrushResource : public KisBrush }; public: virtual bool load() { return false; }; - void setText(const QString& txt) { m_txt = txt; }; - void setFont(const QFont& font) { m_font = font; }; + void setText(const TQString& txt) { m_txt = txt; }; + void setFont(const TQFont& font) { m_font = font; }; void updateBrush(); private: - QFont m_font; - QString m_txt; + TQFont m_font; + TQString m_txt; }; class KisTextBrush : public KisWdgTextBrush { Q_OBJECT + TQ_OBJECT public: - KisTextBrush(QWidget *parent, const char* name, const QString& caption); + KisTextBrush(TQWidget *tqparent, const char* name, const TQString& caption); signals: void activatedResource(KisResource *r); @@ -61,7 +62,7 @@ private slots: private: KisTextBrushResource* m_textBrushResource; - QFont m_font; + TQFont m_font; }; diff --git a/krita/ui/kis_tool.cc b/krita/ui/kis_tool.cc index 7ea39e3c..5aee554b 100644 --- a/krita/ui/kis_tool.cc +++ b/krita/ui/kis_tool.cc @@ -16,10 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> #include <kaction.h> -#include <qlabel.h> +#include <tqlabel.h> #include <klocale.h> #include <kdebug.h> @@ -31,11 +31,11 @@ class KisTool::KisToolPrivate { public: - QString uiname; - QLabel * optionWidget; + TQString uiname; + TQLabel * optionWidget; }; -KisTool::KisTool(const QString & name) +KisTool::KisTool(const TQString & name) { m_action = 0; m_ownAction = false; @@ -53,16 +53,16 @@ KisTool::~KisTool() delete d; } -QWidget* KisTool::createOptionWidget(QWidget* parent) +TQWidget* KisTool::createOptionWidget(TQWidget* tqparent) { - d->optionWidget = new QLabel(i18n("No options for %1.").arg(d->uiname), parent); + d->optionWidget = new TQLabel(i18n("No options for %1.").tqarg(d->uiname), tqparent); d->optionWidget->setCaption(d->uiname); - d->optionWidget->setAlignment(Qt::AlignCenter); + d->optionWidget->tqsetAlignment(TQt::AlignCenter); return d->optionWidget; } -QWidget* KisTool::optionWidget() +TQWidget* KisTool::optionWidget() { return d->optionWidget; } diff --git a/krita/ui/kis_tool.h b/krita/ui/kis_tool.h index 570ec343..c8f2d349 100644 --- a/krita/ui/kis_tool.h +++ b/krita/ui/kis_tool.h @@ -20,8 +20,8 @@ #ifndef KIS_TOOL_H_ #define KIS_TOOL_H_ -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include <ksharedptr.h> #include <kaction.h> @@ -29,11 +29,11 @@ #include "kis_shared_ptr_vector.h" #include "kis_canvas_observer.h" -class QCursor; -class QEvent; -class QKeyEvent; -class QRect; -class QWidget; +class TQCursor; +class TQEvent; +class TQKeyEvent; +class TQRect; +class TQWidget; class KActionCollection; class KRadioAction; class KDialog; @@ -47,7 +47,7 @@ class KisMoveEvent; class KisCanvasPainter; enum enumToolType { - TOOL_SHAPE = 0, // Geometric shapes like ellipses and lines + TOOL_SHAPE = 0, // Geometric tqshapes like ellipses and lines TOOL_FREEHAND = 1, // Freehand drawing tools TOOL_TRANSFORM = 2, // Tools that transform the layer TOOL_FILL = 3, // Tools that fill parts of the canvas @@ -56,19 +56,20 @@ enum enumToolType { }; -const Q_UINT8 NUMBER_OF_TOOLTYPES = 6; +const TQ_UINT8 NUMBER_OF_TOOLTYPES = 6; -class KisTool : public QObject, public KisCanvasObserver, public KShared { +class KisTool : public TQObject, public KisCanvasObserver, public KShared { Q_OBJECT + TQ_OBJECT public: - KisTool(const QString & name); + KisTool(const TQString & name); virtual ~KisTool(); public: virtual void paint(KisCanvasPainter& gc) = 0; - virtual void paint(KisCanvasPainter& gc, const QRect& rc) = 0; + virtual void paint(KisCanvasPainter& gc, const TQRect& rc) = 0; /** * This function is called after the creation of a tool to create the KAction corresponding @@ -85,20 +86,20 @@ public: virtual void move(KisMoveEvent *e) = 0; virtual void buttonRelease(KisButtonReleaseEvent *e) = 0; virtual void doubleClick(KisDoubleClickEvent *e) = 0; - virtual void keyPress(QKeyEvent *e) = 0; - virtual void keyRelease(QKeyEvent *e) = 0; + virtual void keyPress(TQKeyEvent *e) = 0; + virtual void keyRelease(TQKeyEvent *e) = 0; - virtual QCursor cursor() = 0; - virtual void setCursor(const QCursor& cursor) = 0; + virtual TQCursor cursor() = 0; + virtual void setCursor(const TQCursor& cursor) = 0; /** * This function is called to create the configuration widget of the tool. - * @param parent the parent of the widget + * @param tqparent the tqparent of the widget */ - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); /** * @return the current configuration widget. */ - virtual QWidget* optionWidget(); + virtual TQWidget* optionWidget(); KRadioAction *action() const { return m_action; } /** @@ -108,10 +109,10 @@ public: virtual bool wantsAutoScroll() const { return true; } // Methods for integration with karbon-style toolbox - virtual Q_UINT32 priority() { return 0; } + virtual TQ_UINT32 priority() { return 0; } virtual enumToolType toolType() { return TOOL_FREEHAND; } - virtual QString icon() { return m_action->icon(); } - virtual QString quickHelp() const { return ""; } + virtual TQString icon() { return m_action->icon(); } + virtual TQString quickHelp() const { return ""; } public slots: /** diff --git a/krita/ui/kis_tool_dummy.cc b/krita/ui/kis_tool_dummy.cc index 8cb12695..d8ac04e5 100644 --- a/krita/ui/kis_tool_dummy.cc +++ b/krita/ui/kis_tool_dummy.cc @@ -16,10 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> #include <kaction.h> -#include <qlabel.h> +#include <tqlabel.h> #include <kaction.h> #include <klocale.h> @@ -39,7 +39,7 @@ KisToolDummy::KisToolDummy() m_subject = 0; m_dragging = false; m_optionWidget = 0; - setCursor(QCursor::forbiddenCursor); + setCursor(TQCursor::forbiddenCursor); } KisToolDummy::~KisToolDummy() @@ -87,22 +87,22 @@ void KisToolDummy::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Dummy"), "tool_dummy", Qt::SHIFT+Qt::Key_H, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Dummy"), "tool_dummy", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT(activate()), collection, name()); m_action->setExclusiveGroup("tools"); m_ownAction = true; } } -QWidget* KisToolDummy::createOptionWidget(QWidget* parent) +TQWidget* KisToolDummy::createOptionWidget(TQWidget* tqparent) { - m_optionWidget = new QLabel(i18n("Layer is locked or invisible."), parent); + m_optionWidget = new TQLabel(i18n("Layer is locked or invisible."), tqparent); m_optionWidget->setCaption(i18n("No Active Tool")); - m_optionWidget->setAlignment(Qt::AlignCenter); + m_optionWidget->tqsetAlignment(TQt::AlignCenter); return m_optionWidget; } -QWidget* KisToolDummy::optionWidget() +TQWidget* KisToolDummy::optionWidget() { return m_optionWidget; } diff --git a/krita/ui/kis_tool_dummy.h b/krita/ui/kis_tool_dummy.h index 3eb57ac4..d10850e8 100644 --- a/krita/ui/kis_tool_dummy.h +++ b/krita/ui/kis_tool_dummy.h @@ -25,7 +25,7 @@ #include "kis_point.h" -class QLabel; +class TQLabel; class KisCanvasSubject; /** @@ -40,6 +40,7 @@ class KRITATOOL_EXPORT KisToolDummy : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolDummy(); @@ -52,15 +53,15 @@ public: virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); private: - QLabel * m_optionWidget; + TQLabel * m_optionWidget; KisCanvasSubject *m_subject; KisPoint m_dragPos; - Q_INT32 m_origScrollX; - Q_INT32 m_origScrollY; + TQ_INT32 m_origScrollX; + TQ_INT32 m_origScrollY; bool m_dragging; }; diff --git a/krita/ui/kis_tool_freehand.cc b/krita/ui/kis_tool_freehand.cc index 0909ad9b..d0d1e0fa 100644 --- a/krita/ui/kis_tool_freehand.cc +++ b/krita/ui/kis_tool_freehand.cc @@ -18,11 +18,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qevent.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qrect.h> +#include <tqevent.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqrect.h> #include <kdebug.h> #include <kaction.h> @@ -47,7 +47,7 @@ #include "kis_boundary_painter.h" #include "kis_brush.h" -KisToolFreehand::KisToolFreehand(QString transactionText) +KisToolFreehand::KisToolFreehand(TQString transactionText) : super(transactionText), m_dragDist ( 0 ), m_transactionText(transactionText), @@ -79,7 +79,7 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) if (!m_currentImage || !m_currentImage->activeDevice()) return; - if (e->button() == QMouseEvent::LeftButton) { + if (e->button() == TQMouseEvent::LeftButton) { m_currentImage->activeDevice()->lock( true ); kdDebug() << ">>>>>>>>>>>>>>>>>>>Locking paint device\n"; @@ -87,7 +87,7 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) // People complain that they can't start brush strokes outside of the image boundaries. // This makes sense, especially when combined with BUG:132759, so commenting out the // next line makes sense. - //if (!m_currentImage->bounds().contains(e->pos().floorQPoint())) return; + //if (!m_currentImage->bounds().tqcontains(e->pos().floorTQPoint())) return; initPaint(e); paintAt(e->pos(), e->pressure(), e->xTilt(), e->yTilt()); @@ -97,11 +97,11 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) m_prevXTilt = e->xTilt(); m_prevYTilt = e->yTilt(); - QRect r = m_painter->dirtyRect(); + TQRect r = m_painter->dirtyRect(); if ( r.isValid() ) { m_dirtyRect = r; - r = QRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization + r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization if (!m_paintOnSelection) { m_currentImage->activeLayer()->setDirty(r); } @@ -116,7 +116,7 @@ void KisToolFreehand::buttonPress(KisButtonPressEvent *e) void KisToolFreehand::buttonRelease(KisButtonReleaseEvent* e) { - if (e->button() == QMouseEvent::LeftButton && m_mode == PAINT) { + if (e->button() == TQMouseEvent::LeftButton && m_mode == PAINT) { endPaint(); m_currentImage->activeDevice()->lock( false ); kdDebug() << ">>>>>>>>>>>>>>>>>>>UNLocking paint device\n"; @@ -136,7 +136,7 @@ void KisToolFreehand::move(KisMoveEvent *e) m_prevXTilt = e->xTilt(); m_prevYTilt = e->yTilt(); - QRect r = m_painter->dirtyRect(); + TQRect r = m_painter->dirtyRect(); if (r.isValid()) { m_dirtyRect |= r; @@ -146,7 +146,7 @@ void KisToolFreehand::move(KisMoveEvent *e) } else { // Just update the canvas - r = QRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization + r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //needed to update selectionvisualization m_target->setDirty(r); m_subject->canvasController()->updateCanvas( r ); } @@ -182,12 +182,12 @@ void KisToolFreehand::initPaint(KisEvent *) // projection). KisLayer* l = layer->layer(); KisPaintLayer* pl = dynamic_cast<KisPaintLayer*>(l); - if (l->parent() && (l->parent()->parent() == 0) - && (l->parent()->childCount() == 1) - && l->parent()->paintLayerInducesProjectionOptimization(pl)) { - // If there's a mask, device could've been the mask. The induce function + if (l->tqparent() && (l->tqparent()->tqparent() == 0) + && (l->tqparent()->childCount() == 1) + && l->tqparent()->paintLayerInducesProjectionOptimization(pl)) { + // If there's a tqmask, device could've been the tqmask. The induce function // should catch this, but better safe than sorry - l->parent()->resetProjection(pl->paintDevice()); + l->tqparent()->resetProjection(pl->paintDevice()); } m_target = new KisPaintDevice(m_currentImage->activeLayer(), @@ -255,9 +255,9 @@ void KisToolFreehand::endPaint() m_dirtyRect.width(), m_dirtyRect.height()); KisLayerSupportsIndirectPainting* layer = - dynamic_cast<KisLayerSupportsIndirectPainting*>(m_source->parentLayer()); + dynamic_cast<KisLayerSupportsIndirectPainting*>(m_source->tqparentLayer()); layer->setTemporaryTarget(0); - m_source->parentLayer()->setDirty(m_dirtyRect); + m_source->tqparentLayer()->setDirty(m_dirtyRect); if (m_currentImage->undo()) { m_currentImage->undoAdapter()->addCommand(painter.endTransaction()); @@ -309,7 +309,7 @@ void KisToolFreehand::paintOutline(const KisPoint& point) { KisCanvasController *controller = m_subject->canvasController(); - if (currentImage() && !currentImage()->bounds().contains(point.floorQPoint())) { + if (currentImage() && !currentImage()->bounds().tqcontains(point.floorTQPoint())) { if (m_paintedOutline) { controller->kiscanvas()->update(); m_paintedOutline = false; @@ -318,20 +318,20 @@ void KisToolFreehand::paintOutline(const KisPoint& point) { } KisCanvas *canvas = controller->kiscanvas(); - canvas->repaint(); + canvas->tqrepaint(); KisBrush *brush = m_subject->currentBrush(); // There may not be a brush present, and we shouldn't crash in that case if (brush) { KisCanvasPainter gc(canvas); - QPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); KisPoint hotSpot = brush->hotSpot(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.setViewport(0, 0, static_cast<Q_INT32>(canvas->width() * m_subject->zoomFactor()), - static_cast<Q_INT32>(canvas->height() * m_subject->zoomFactor())); + gc.setViewport(0, 0, static_cast<TQ_INT32>(canvas->width() * m_subject->zoomFactor()), + static_cast<TQ_INT32>(canvas->height() * m_subject->zoomFactor())); gc.translate((- controller->horzValue()) / m_subject->zoomFactor(), (- controller->vertValue()) / m_subject->zoomFactor()); @@ -339,7 +339,7 @@ void KisToolFreehand::paintOutline(const KisPoint& point) { if (m_subject->currentPaintop().id() == "pen") { // Pen paints on whole pixels only. - topLeft = topLeft.roundQPoint(); + topLeft = topLeft.roundTQPoint(); } gc.translate(topLeft.x(), topLeft.y()); diff --git a/krita/ui/kis_tool_freehand.h b/krita/ui/kis_tool_freehand.h index 1d29a9b7..5480ab1e 100644 --- a/krita/ui/kis_tool_freehand.h +++ b/krita/ui/kis_tool_freehand.h @@ -34,10 +34,11 @@ class KisPaintLayer; class KRITACORE_EXPORT KisToolFreehand : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: - KisToolFreehand(const QString transactionText); + KisToolFreehand(const TQString transactionText); virtual ~KisToolFreehand(); virtual void update(KisCanvasSubject *subject); @@ -87,7 +88,7 @@ protected: KisLayerSP m_tempLayer; KisPaintDeviceSP m_source; - QString m_transactionText; + TQString m_transactionText; enumBrushMode m_mode; KisPainter *m_painter; diff --git a/krita/ui/kis_tool_manager.cc b/krita/ui/kis_tool_manager.cc index 66390740..21143472 100644 --- a/krita/ui/kis_tool_manager.cc +++ b/krita/ui/kis_tool_manager.cc @@ -32,8 +32,8 @@ #include "kis_input_device.h" -KisToolManager::KisToolManager(KisCanvasSubject * parent, KisCanvasController * controller) - : m_subject(parent), +KisToolManager::KisToolManager(KisCanvasSubject * tqparent, KisCanvasController * controller) + : m_subject(tqparent), m_controller(controller) { m_toolBox = 0; @@ -65,9 +65,9 @@ void KisToolManager::setUp(KoToolBox * toolbox, KoPaletteManager * paletteManage if (!m_dummyTool) m_dummyTool = KisToolDummyFactory().createTool(actionCollection); - QValueVector<KisInputDevice> inputDevices = KisInputDevice::inputDevices(); + TQValueVector<KisInputDevice> inputDevices = KisInputDevice::inputDevices(); - for (Q_UINT32 inputDevice = 0; inputDevice < inputDevices.count(); inputDevice++) { + for (TQ_UINT32 inputDevice = 0; inputDevice < inputDevices.count(); inputDevice++) { m_inputDeviceToolSetMap[inputDevices[inputDevice]] = KisToolRegistry::instance()->createTools(actionCollection, m_subject); } @@ -126,7 +126,7 @@ void KisToolManager::updateGUI() { Q_ASSERT(m_subject); if (m_subject == 0) { - // "Eek, no parent! + // "Eek, no tqparent! return; } @@ -194,7 +194,7 @@ void KisToolManager::setCurrentTool(KisTool *tool) if (!tool->optionWidget()) { tool->createOptionWidget(0); } - QWidget * w = tool->optionWidget(); + TQWidget * w = tool->optionWidget(); if (w) m_paletteManager->addWidget(w, krita::TOOL_OPTION_WIDGET, krita::CONTROL_PALETTE ); @@ -216,14 +216,14 @@ void KisToolManager::setCurrentTool(KisTool *tool) } -void KisToolManager::setCurrentTool( const QString & toolName ) +void KisToolManager::setCurrentTool( const TQString & toolName ) { setCurrentTool(findTool(toolName)); } KisTool * KisToolManager::currentTool() const { - InputDeviceToolMap::const_iterator it = m_inputDeviceToolMap.find(m_controller->currentInputDevice()); + InputDeviceToolMap::const_iterator it = m_inputDeviceToolMap.tqfind(m_controller->currentInputDevice()); if (it != m_inputDeviceToolMap.end()) { return (*it).second; @@ -235,14 +235,14 @@ KisTool * KisToolManager::currentTool() const void KisToolManager::setToolForInputDevice(KisInputDevice oldDevice, KisInputDevice newDevice) { - InputDeviceToolSetMap::iterator vit = m_inputDeviceToolSetMap.find(oldDevice); + InputDeviceToolSetMap::iterator vit = m_inputDeviceToolSetMap.tqfind(oldDevice); if (vit != m_inputDeviceToolSetMap.end()) { vKisTool& oldTools = (*vit).second; for (vKisTool::iterator it = oldTools.begin(); it != oldTools.end(); ++it) { KisTool *tool = *it; KAction *toolAction = tool->action(); - toolAction->disconnect(SIGNAL(activated()), tool, SLOT(activate())); + toolAction->disconnect(TQT_SIGNAL(activated()), tool, TQT_SLOT(activate())); } } KisTool *oldTool = currentTool(); @@ -253,7 +253,7 @@ void KisToolManager::setToolForInputDevice(KisInputDevice oldDevice, KisInputDev } - vit = m_inputDeviceToolSetMap.find(newDevice); + vit = m_inputDeviceToolSetMap.tqfind(newDevice); Q_ASSERT(vit != m_inputDeviceToolSetMap.end()); @@ -262,7 +262,7 @@ void KisToolManager::setToolForInputDevice(KisInputDevice oldDevice, KisInputDev for (vKisTool::iterator it = tools.begin(); it != tools.end(); ++it) { KisTool *tool = *it; KAction *toolAction = tool->action(); - connect(toolAction, SIGNAL(activated()), tool, SLOT(activate())); + connect(toolAction, TQT_SIGNAL(activated()), tool, TQT_SLOT(activate())); } } @@ -274,7 +274,7 @@ void KisToolManager::activateCurrentTool() } } -KisTool * KisToolManager::findTool(const QString &toolName, KisInputDevice inputDevice) const +KisTool * KisToolManager::findTool(const TQString &toolName, KisInputDevice inputDevice) const { if (inputDevice == KisInputDevice::unknown()) { inputDevice = m_controller->currentInputDevice(); @@ -282,7 +282,7 @@ KisTool * KisToolManager::findTool(const QString &toolName, KisInputDevice input KisTool *tool = 0; - InputDeviceToolSetMap::const_iterator vit = m_inputDeviceToolSetMap.find(inputDevice); + InputDeviceToolSetMap::const_iterator vit = m_inputDeviceToolSetMap.tqfind(inputDevice); Q_ASSERT(vit != m_inputDeviceToolSetMap.end()); diff --git a/krita/ui/kis_tool_manager.h b/krita/ui/kis_tool_manager.h index d56b16f9..8f04f680 100644 --- a/krita/ui/kis_tool_manager.h +++ b/krita/ui/kis_tool_manager.h @@ -20,7 +20,7 @@ #include <map> -#include <qobject.h> +#include <tqobject.h> #include "kis_tool_controller.h" #include "kis_global.h" @@ -40,13 +40,14 @@ class KoToolBox; * This class manages the activation and deactivation of tools for * each input device. */ -class KisToolManager : public QObject, public KisToolControllerInterface { +class KisToolManager : public TQObject, public KisToolControllerInterface { Q_OBJECT + TQ_OBJECT public: - KisToolManager(KisCanvasSubject * parent, KisCanvasController * controller); + KisToolManager(KisCanvasSubject * tqparent, KisCanvasController * controller); ~KisToolManager(); public: @@ -59,13 +60,13 @@ public: void updateGUI(); virtual void setCurrentTool(KisTool *tool); - virtual void setCurrentTool(const QString & toolName); + virtual void setCurrentTool(const TQString & toolName); virtual KisTool *currentTool() const; void setToolForInputDevice(KisInputDevice oldDevice, KisInputDevice newDevice); - KisTool *findTool(const QString &toolName, KisInputDevice inputDevice = KisInputDevice::unknown()) const; + KisTool *findTool(const TQString &toolName, KisInputDevice inputDevice = KisInputDevice::unknown()) const; void activateCurrentTool(); diff --git a/krita/ui/kis_tool_non_paint.cc b/krita/ui/kis_tool_non_paint.cc index efba4950..4adccc60 100644 --- a/krita/ui/kis_tool_non_paint.cc +++ b/krita/ui/kis_tool_non_paint.cc @@ -25,7 +25,7 @@ #include "kis_tool_controller.h" #include "kis_tool_non_paint.h" -KisToolNonPaint::KisToolNonPaint(const QString & UIName) +KisToolNonPaint::KisToolNonPaint(const TQString & UIName) : super(UIName) { m_subject = 0; @@ -44,7 +44,7 @@ void KisToolNonPaint::paint(KisCanvasPainter&) { } -void KisToolNonPaint::paint(KisCanvasPainter&, const QRect&) +void KisToolNonPaint::paint(KisCanvasPainter&, const TQRect&) { } @@ -68,20 +68,20 @@ void KisToolNonPaint::doubleClick(KisDoubleClickEvent *) { } -void KisToolNonPaint::keyPress(QKeyEvent *) +void KisToolNonPaint::keyPress(TQKeyEvent *) { } -void KisToolNonPaint::keyRelease(QKeyEvent *) +void KisToolNonPaint::keyRelease(TQKeyEvent *) { } -QCursor KisToolNonPaint::cursor() +TQCursor KisToolNonPaint::cursor() { return m_cursor; } -void KisToolNonPaint::setCursor(const QCursor& cursor) +void KisToolNonPaint::setCursor(const TQCursor& cursor) { m_cursor = cursor; diff --git a/krita/ui/kis_tool_non_paint.h b/krita/ui/kis_tool_non_paint.h index 21726627..0b618109 100644 --- a/krita/ui/kis_tool_non_paint.h +++ b/krita/ui/kis_tool_non_paint.h @@ -19,19 +19,19 @@ #ifndef KIS_TOOL_NON_PAINT_H_ #define KIS_TOOL_NON_PAINT_H_ -#include <qcursor.h> -#include <qcolor.h> -#include <qwidget.h> +#include <tqcursor.h> +#include <tqcolor.h> +#include <tqwidget.h> #include "kis_global.h" #include "kis_types.h" #include "kis_tool.h" #include <koffice_export.h> -class QEvent; -class QKeyEvent; -class QPaintEvent; -class QRect; +class TQEvent; +class TQKeyEvent; +class TQPaintEvent; +class TQRect; class KDialog; class KisCanvasSubject; @@ -39,10 +39,11 @@ class KisCanvasSubject; class KRITACORE_EXPORT KisToolNonPaint : public KisTool { Q_OBJECT + TQ_OBJECT typedef KisTool super; public: - KisToolNonPaint(const QString & UIName); + KisToolNonPaint(const TQString & UIName); virtual ~KisToolNonPaint(); // CanvasObserver @@ -52,17 +53,17 @@ public: // KisTool public: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); virtual void doubleClick(KisDoubleClickEvent *e); - virtual void keyPress(QKeyEvent *e); - virtual void keyRelease(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); + virtual void keyRelease(TQKeyEvent *e); - virtual QCursor cursor(); - virtual void setCursor(const QCursor& cursor); + virtual TQCursor cursor(); + virtual void setCursor(const TQCursor& cursor); virtual enumToolType toolType() { return TOOL_VIEW; } @@ -77,7 +78,7 @@ protected: KisCanvasSubject *m_subject; private: - QCursor m_cursor; + TQCursor m_cursor; }; #endif // KIS_TOOL_NON_PAINT_H_ diff --git a/krita/ui/kis_tool_paint.cc b/krita/ui/kis_tool_paint.cc index 25129a82..d8d19f36 100644 --- a/krita/ui/kis_tool_paint.cc +++ b/krita/ui/kis_tool_paint.cc @@ -16,13 +16,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qwidget.h> -#include <qrect.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> +#include <tqwidget.h> +#include <tqrect.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> #include <kdebug.h> #include <klocale.h> @@ -42,7 +42,7 @@ #include "kis_tool_controller.h" #include "kis_tool_paint.h" -KisToolPaint::KisToolPaint(const QString& UIName) +KisToolPaint::KisToolPaint(const TQString& UIName) : super(UIName) { m_subject = 0; @@ -75,7 +75,7 @@ void KisToolPaint::paint(KisCanvasPainter&) { } -void KisToolPaint::paint(KisCanvasPainter&, const QRect&) +void KisToolPaint::paint(KisCanvasPainter&, const TQRect&) { } @@ -107,34 +107,34 @@ void KisToolPaint::doubleClick(KisDoubleClickEvent *) { } -void KisToolPaint::keyPress(QKeyEvent *) +void KisToolPaint::keyPress(TQKeyEvent *) { } -void KisToolPaint::keyRelease(QKeyEvent *) +void KisToolPaint::keyRelease(TQKeyEvent *) { } -QWidget* KisToolPaint::createOptionWidget(QWidget* parent) +TQWidget* KisToolPaint::createOptionWidget(TQWidget* tqparent) { - m_optionWidget = new QWidget(parent); + m_optionWidget = new TQWidget(tqparent); m_optionWidget->setCaption(m_UIName); - m_lbOpacity = new QLabel(i18n("Opacity:"), m_optionWidget); + m_lbOpacity = new TQLabel(i18n("Opacity:"), m_optionWidget); m_slOpacity = new KisIntSpinbox( m_optionWidget, "int_m_optionwidget"); m_slOpacity->setRange( 0, 100); m_slOpacity->setValue(m_opacity / OPACITY_OPAQUE * 100); - connect(m_slOpacity, SIGNAL(valueChanged(int)), this, SLOT(slotSetOpacity(int))); + connect(m_slOpacity, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetOpacity(int))); - m_lbComposite = new QLabel(i18n("Mode:"), m_optionWidget); + m_lbComposite = new TQLabel(i18n("Mode:"), m_optionWidget); m_cmbComposite = new KisCmbComposite(m_optionWidget); - connect(m_cmbComposite, SIGNAL(activated(const KisCompositeOp&)), this, SLOT(slotSetCompositeMode(const KisCompositeOp&))); + connect(m_cmbComposite, TQT_SIGNAL(activated(const KisCompositeOp&)), this, TQT_SLOT(slotSetCompositeMode(const KisCompositeOp&))); - QVBoxLayout* verticalLayout = new QVBoxLayout(m_optionWidget); + TQVBoxLayout* verticalLayout = new TQVBoxLayout(m_optionWidget); verticalLayout->setMargin(0); verticalLayout->setSpacing(3); - m_optionWidgetLayout = new QGridLayout(verticalLayout, 2, 3, 6); + m_optionWidgetLayout = new TQGridLayout(verticalLayout, 2, 3, 6); m_optionWidgetLayout->addWidget(m_lbOpacity, 0, 0); m_optionWidgetLayout->addWidget(m_slOpacity, 0, 1); @@ -142,34 +142,34 @@ QWidget* KisToolPaint::createOptionWidget(QWidget* parent) m_optionWidgetLayout->addWidget(m_lbComposite, 1, 0); m_optionWidgetLayout->addWidget(m_cmbComposite, 1, 1); - verticalLayout->addItem(new QSpacerItem(0,0,QSizePolicy::Fixed,QSizePolicy::Expanding)); + verticalLayout->addItem(new TQSpacerItem(0,0,TQSizePolicy::Fixed,TQSizePolicy::Expanding)); if (!quickHelp().isEmpty()) { - QPushButton* push = new QPushButton(SmallIconSet( "help" ), "", m_optionWidget); - connect(push, SIGNAL(clicked()), this, SLOT(slotPopupQuickHelp())); + TQPushButton* push = new TQPushButton(SmallIconSet( "help" ), "", m_optionWidget); + connect(push, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPopupQuickHelp())); - QHBoxLayout* hLayout = new QHBoxLayout(m_optionWidget); + TQHBoxLayout* hLayout = new TQHBoxLayout(m_optionWidget); hLayout->addWidget(push); - hLayout->addItem(new QSpacerItem(0,0,QSizePolicy::Expanding,QSizePolicy::Fixed)); + hLayout->addItem(new TQSpacerItem(0,0,TQSizePolicy::Expanding,TQSizePolicy::Fixed)); verticalLayout->addLayout(hLayout); } return m_optionWidget; } -QWidget* KisToolPaint::optionWidget() +TQWidget* KisToolPaint::optionWidget() { return m_optionWidget; } -void KisToolPaint::addOptionWidgetLayout(QLayout *layout) +void KisToolPaint::addOptionWidgetLayout(TQLayout *tqlayout) { Q_ASSERT(m_optionWidget != 0); Q_ASSERT(m_optionWidgetLayout != 0); int rowCount = m_optionWidgetLayout->numRows(); - m_optionWidgetLayout->addMultiCellLayout(layout, rowCount, rowCount, 0, 1); + m_optionWidgetLayout->addMultiCellLayout(tqlayout, rowCount, rowCount, 0, 1); } -void KisToolPaint::addOptionWidgetOption(QWidget *control, QWidget *label) +void KisToolPaint::addOptionWidgetOption(TQWidget *control, TQWidget *label) { Q_ASSERT(m_optionWidget != 0); Q_ASSERT(m_optionWidgetLayout != 0); @@ -192,12 +192,12 @@ void KisToolPaint::slotSetCompositeMode(const KisCompositeOp& compositeOp) m_compositeOp = compositeOp; } -QCursor KisToolPaint::cursor() +TQCursor KisToolPaint::cursor() { return m_cursor; } -void KisToolPaint::setCursor(const QCursor& cursor) +void KisToolPaint::setCursor(const TQCursor& cursor) { m_cursor = cursor; @@ -244,7 +244,7 @@ void KisToolPaint::updateCompositeOpComboBox() KisCompositeOpList compositeOps = device->colorSpace()->userVisiblecompositeOps(); m_cmbComposite->setCompositeOpList(compositeOps); - if (compositeOps.find(m_compositeOp) == compositeOps.end()) { + if (compositeOps.tqfind(m_compositeOp) == compositeOps.end()) { m_compositeOp = COMPOSITE_OVER; } m_cmbComposite->setCurrentItem(m_compositeOp); @@ -254,7 +254,7 @@ void KisToolPaint::updateCompositeOpComboBox() } void KisToolPaint::slotPopupQuickHelp() { - QWhatsThis::display(quickHelp()); + TQWhatsThis::display(quickHelp()); } #include "kis_tool_paint.moc" diff --git a/krita/ui/kis_tool_paint.h b/krita/ui/kis_tool_paint.h index 9aae6516..6e1406b5 100644 --- a/krita/ui/kis_tool_paint.h +++ b/krita/ui/kis_tool_paint.h @@ -19,24 +19,24 @@ #ifndef KIS_TOOL_PAINT_H_ #define KIS_TOOL_PAINT_H_ -#include <qcursor.h> -#include <qlayout.h> +#include <tqcursor.h> +#include <tqlayout.h> #include <koffice_export.h> #include "kis_tool.h" #include "kis_composite_op.h" -class QCheckBox; -class QEvent; -class QKeyEvent; -class QComboBox; -class QPaintEvent; -class QRect; -class QGridLayout; +class TQCheckBox; +class TQEvent; +class TQKeyEvent; +class TQComboBox; +class TQPaintEvent; +class TQRect; +class TQGridLayout; class KDialog; class KisCanvasSubject; -class QLabel; +class TQLabel; class KisCmbComposite; class KisIntSpinbox; @@ -51,30 +51,31 @@ enum enumBrushMode { class KRITACORE_EXPORT KisToolPaint : public KisTool { Q_OBJECT + TQ_OBJECT typedef KisTool super; public: - KisToolPaint(const QString& UIName); + KisToolPaint(const TQString& UIName); virtual ~KisToolPaint(); public: virtual void update(KisCanvasSubject *subject); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); virtual void doubleClick(KisDoubleClickEvent *e); - virtual void keyPress(QKeyEvent *e); - virtual void keyRelease(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); + virtual void keyRelease(TQKeyEvent *e); - virtual QCursor cursor(); - virtual void setCursor(const QCursor& cursor); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); - virtual void addOptionWidgetOption(QWidget *control, QWidget *label = 0); + virtual TQCursor cursor(); + virtual void setCursor(const TQCursor& cursor); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); + virtual void addOptionWidgetOption(TQWidget *control, TQWidget *label = 0); public slots: virtual void activate(); @@ -87,30 +88,30 @@ public slots: protected: void notifyModified() const; - // Add the tool-specific layout to the default option widget's layout. - void addOptionWidgetLayout(QLayout *layout); + // Add the tool-specific tqlayout to the default option widget's tqlayout. + void addOptionWidgetLayout(TQLayout *tqlayout); private: void updateCompositeOpComboBox(); protected: KisCanvasSubject *m_subject; - QRect m_dirtyRect; - Q_UINT8 m_opacity; + TQRect m_dirtyRect; + TQ_UINT8 m_opacity; KisCompositeOp m_compositeOp; bool m_paintOutline; private: - QString m_UIName; + TQString m_UIName; - QCursor m_cursor; + TQCursor m_cursor; - QWidget *m_optionWidget; - QGridLayout *m_optionWidgetLayout; + TQWidget *m_optionWidget; + TQGridLayout *m_optionWidgetLayout; - QLabel *m_lbOpacity; + TQLabel *m_lbOpacity; KisIntSpinbox *m_slOpacity; - QLabel *m_lbComposite; + TQLabel *m_lbComposite; KisCmbComposite *m_cmbComposite; }; diff --git a/krita/ui/kis_tool_registry.cc b/krita/ui/kis_tool_registry.cc index 5e5e17d4..0878c106 100644 --- a/krita/ui/kis_tool_registry.cc +++ b/krita/ui/kis_tool_registry.cc @@ -37,8 +37,8 @@ KisToolRegistry *KisToolRegistry::m_singleton = 0; KisToolRegistry::KisToolRegistry() { // Load all modules: color models, paintops, filters - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/Tool"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/Tool"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); KTrader::OfferList::ConstIterator iter; @@ -48,7 +48,7 @@ KisToolRegistry::KisToolRegistry() KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, TQStringList(), &errCode); if ( plugin ) kdDebug(DBG_AREA_PLUGINS) << "found plugin " << service->property("Name").toString() << "\n"; else { diff --git a/krita/ui/kis_tool_registry.h b/krita/ui/kis_tool_registry.h index 2fef3d1e..5fd32b93 100644 --- a/krita/ui/kis_tool_registry.h +++ b/krita/ui/kis_tool_registry.h @@ -19,7 +19,7 @@ #ifndef KIS_TOOL_REGISTRY_H_ #define KIS_TOOL_REGISTRY_H_ -#include <qobject.h> +#include <tqobject.h> #include "kis_tool_types.h" #include "kis_generic_registry.h" @@ -27,7 +27,7 @@ class KActionCollection; class KisCanvasSubject; -class QStringList; +class TQStringList; /** * A registry, similar to the tool and colormodel registry @@ -35,9 +35,10 @@ class QStringList; * in contrast to the paintop and colormodel registries, creates * a vector containing instances of all registered tools. */ -class KRITACORE_EXPORT KisToolRegistry : public QObject, public KisGenericRegistry<KisToolFactorySP>{ +class KRITACORE_EXPORT KisToolRegistry : public TQObject, public KisGenericRegistry<KisToolFactorySP>{ Q_OBJECT + TQ_OBJECT public: virtual ~KisToolRegistry(); diff --git a/krita/ui/kis_tool_shape.cc b/krita/ui/kis_tool_shape.cc index 06c854a7..db510b8f 100644 --- a/krita/ui/kis_tool_shape.cc +++ b/krita/ui/kis_tool_shape.cc @@ -16,20 +16,20 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> #include <kdebug.h> #include <klocale.h> #include "kis_tool_shape.h" -#include "wdgshapeoptions.h" +#include "wdgtqshapeoptions.h" -KisToolShape::KisToolShape(const QString& UIName) : super(UIName) +KisToolShape::KisToolShape(const TQString& UIName) : super(UIName) { - m_shapeOptionsWidget = 0; + m_tqshapeOptionsWidget = 0; m_optionLayout = 0; } @@ -37,31 +37,31 @@ KisToolShape::~KisToolShape() { } -QWidget* KisToolShape::createOptionWidget(QWidget* parent) +TQWidget* KisToolShape::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); - m_shapeOptionsWidget = new WdgGeometryOptions(0); - Q_CHECK_PTR(m_shapeOptionsWidget); + m_tqshapeOptionsWidget = new WdgGeometryOptions(0); + Q_CHECK_PTR(m_tqshapeOptionsWidget); - m_optionLayout = new QGridLayout(widget, 2, 1); + m_optionLayout = new TQGridLayout(widget, 2, 1); // super::addOptionWidgetLayout(m_optionLayout); - m_shapeOptionsWidget->cmbFill->reparent(widget, QPoint(0,0), true); - m_shapeOptionsWidget->textLabel3->reparent(widget, QPoint(0,0), true); - addOptionWidgetOption(m_shapeOptionsWidget->cmbFill, m_shapeOptionsWidget->textLabel3); + m_tqshapeOptionsWidget->cmbFill->reparent(widget, TQPoint(0,0), true); + m_tqshapeOptionsWidget->textLabel3->reparent(widget, TQPoint(0,0), true); + addOptionWidgetOption(m_tqshapeOptionsWidget->cmbFill, m_tqshapeOptionsWidget->textLabel3); return widget; } KisPainter::FillStyle KisToolShape::fillStyle(void) { - if (m_shapeOptionsWidget) { - return static_cast<KisPainter::FillStyle>(m_shapeOptionsWidget->cmbFill->currentItem()); + if (m_tqshapeOptionsWidget) { + return static_cast<KisPainter::FillStyle>(m_tqshapeOptionsWidget->cmbFill->currentItem()); } else { return KisPainter::FillStyleNone; } } -#include "kis_tool_shape.moc" +#include "kis_tool_tqshape.moc" diff --git a/krita/ui/kis_tool_shape.h b/krita/ui/kis_tool_shape.h index b6c1b2db..2c0a9500 100644 --- a/krita/ui/kis_tool_shape.h +++ b/krita/ui/kis_tool_shape.h @@ -24,28 +24,29 @@ #include "kis_tool_paint.h" #include "kis_painter.h" -class QGridLayout; +class TQGridLayout; class WdgGeometryOptions; class KRITACORE_EXPORT KisToolShape : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: - KisToolShape(const QString& UIName); + KisToolShape(const TQString& UIName); virtual ~KisToolShape(); virtual enumToolType toolType() { return TOOL_SHAPE; } protected: - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); KisPainter::FillStyle fillStyle(); private: - QGridLayout *m_optionLayout; - WdgGeometryOptions *m_shapeOptionsWidget; + TQGridLayout *m_optionLayout; + WdgGeometryOptions *m_tqshapeOptionsWidget; }; #endif // KIS_TOOL_SHAPE_H_ diff --git a/krita/ui/kis_view.cc b/krita/ui/kis_view.cc index 4bd4a2b1..3220c07e 100644 --- a/krita/ui/kis_view.cc +++ b/krita/ui/kis_view.cc @@ -25,21 +25,21 @@ #include <algorithm> #include <cmath> -// Qt -#include <qapplication.h> -#include <qbutton.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpainter.h> -#include <qscrollbar.h> -#include <qspinbox.h> -#include <qdockarea.h> -#include <qstringlist.h> -#include <qstyle.h> -#include <qpopupmenu.h> -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qobjectlist.h> +// TQt +#include <tqapplication.h> +#include <tqbutton.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpainter.h> +#include <tqscrollbar.h> +#include <tqspinbox.h> +#include <tqdockarea.h> +#include <tqstringlist.h> +#include <tqstyle.h> +#include <tqpopupmenu.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqobjectlist.h> // KDE #include <kis_meta_registry.h> @@ -168,8 +168,8 @@ // sent to a receiver if it does not accept the tablet event. #define MOUSE_CHANGE_EVENT_DELAY 100 -KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const char *name) - : super(doc, parent, name) +KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *tqparent, const char *name) + : super(doc, tqparent, name) , KXMLGUIBuilder( shell() ) , m_panning( false ) , m_oldTool( 0 ) @@ -239,25 +239,25 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch Q_ASSERT(doc); Q_ASSERT(adapter); - Q_ASSERT(parent); + Q_ASSERT(tqparent); KisConfig cfg; m_currentColorChooserDisplay = KisID("BLA"); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); // Must come before input devices are referenced as this detects them. -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KisCanvasWidget::initX11Support(); #endif // Install event filter before we create any child widgets so they can see // the tablet events. - qApp->installEventFilter(this); + tqApp->installEventFilter(this); m_tabletEventTimer.start(); m_inputDevice = KisInputDevice::mouse(); - connect(&m_initialZoomTimer, SIGNAL(timeout()), SLOT(slotInitialZoomTimeout())); + connect(&m_initialZoomTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotInitialZoomTimeout())); m_paletteManager = new KoPaletteManager(this, actionCollection(), "Krita palette manager"); if (cfg.fixDockerWidth()) m_paletteManager->setFixedWidth( 360 ); @@ -275,8 +275,8 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch // This needs to be set before the dockers are created. m_image = m_doc->currentImage(); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - m_fg = KisColor(Qt::black, cs); - m_bg = KisColor(Qt::white, cs); + m_fg = KisColor(TQt::black, cs); + m_bg = KisColor(TQt::white, cs); createDockers(); @@ -288,7 +288,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch else setXMLFile("krita.rc"); - KStdAction::keyBindings( mainWindow()->guiFactory(), SLOT( configureShortcuts() ), actionCollection() ); + KStdAction::keyBindings( mainWindow()->guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() ); createLayerBox(); @@ -302,7 +302,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch dcopObject(); - connect(this, SIGNAL(autoScroll(const QPoint &)), SLOT(slotAutoScroll(const QPoint &))); + connect(this, TQT_SIGNAL(autoScroll(const TQPoint &)), TQT_SLOT(slotAutoScroll(const TQPoint &))); setMouseTracking(true); @@ -313,8 +313,8 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch m_brushesAndStuffToolBar = new KisControlFrame(mainWindow(), this); // Load all plugins - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/ViewPlugin"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/ViewPlugin"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); KTrader::OfferList::ConstIterator iter; for(iter = offers.begin(); iter != offers.end(); ++iter) @@ -322,7 +322,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, TQStringList(), &errCode); if ( plugin ) { kdDebug(41006) << "found plugin " << service->property("Name").toString() << "\n"; insertChildClient(plugin); @@ -340,7 +340,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch { slotLoadingFinished(); } else { - connect(doc, SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + connect(doc, TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); } setFocus(); @@ -360,27 +360,27 @@ KisView::~KisView() } -static Qt::Dock stringToDock( const QString& attrPosition ) +static TQt::Dock stringToDock( const TQString& attrPosition ) { KToolBar::Dock dock = KToolBar::DockTop; if ( !attrPosition.isEmpty() ) { if ( attrPosition == "top" ) - dock = Qt::DockTop; + dock = TQt::DockTop; else if ( attrPosition == "left" ) - dock = Qt::DockLeft; + dock = TQt::DockLeft; else if ( attrPosition == "right" ) - dock = Qt::DockRight; + dock = TQt::DockRight; else if ( attrPosition == "bottom" ) - dock = Qt::DockBottom; + dock = TQt::DockBottom; else if ( attrPosition == "floating" ) - dock = Qt::DockTornOff; + dock = TQt::DockTornOff; else if ( attrPosition == "flat" ) - dock = Qt::DockMinimized; + dock = TQt::DockMinimized; } return dock; } -QWidget * KisView::createContainer( QWidget *parent, int index, const QDomElement &element, int &id ) +TQWidget * KisView::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ) { if( element.attribute( "name" ) == "ToolBox" ) { @@ -394,11 +394,11 @@ QWidget * KisView::createContainer( QWidget *parent, int index, const QDomElemen mainWindow()->moveDockWindow( m_toolBox, dock, false, 0, 0 ); } - return KXMLGUIBuilder::createContainer( parent, index, element, id ); + return KXMLGUIBuilder::createContainer( tqparent, index, element, id ); } -void KisView::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id ) +void KisView::removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id ) { Q_ASSERT(container); @@ -408,7 +408,7 @@ void KisView::removeContainer( QWidget *container, QWidget *parent, QDomElement m_toolManager->youAintGotNoToolBox(); } else { - KXMLGUIBuilder::removeContainer( container, parent, element, id ); + KXMLGUIBuilder::removeContainer( container, tqparent, element, id ); } } @@ -426,20 +426,20 @@ void KisView::createLayerBox() m_layerBox = new KisLayerBox(this); m_layerBox->setCaption(i18n("Layers")); - connect(m_layerBox, SIGNAL(sigRequestLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestGroupLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addGroupLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestAdjustmentLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addAdjustmentLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&)), - this, SLOT(addPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&))); - connect(m_layerBox, SIGNAL(sigRequestLayerProperties(KisLayerSP)), - this, SLOT(showLayerProperties(KisLayerSP))); - connect(m_layerBox, SIGNAL(sigOpacityChanged(int, bool)), this, SLOT(layerOpacity(int, bool))); - connect(m_layerBox, SIGNAL(sigOpacityFinishedChanging(int, int)), - this, SLOT(layerOpacityFinishedChanging(int, int))); - connect(m_layerBox, SIGNAL(sigItemComposite(const KisCompositeOp&)), this, SLOT(layerCompositeOp(const KisCompositeOp&))); + connect(m_layerBox, TQT_SIGNAL(sigRequestLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestGroupLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addGroupLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestAdjustmentLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addAdjustmentLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&)), + this, TQT_SLOT(addPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&))); + connect(m_layerBox, TQT_SIGNAL(sigRequestLayerProperties(KisLayerSP)), + this, TQT_SLOT(showLayerProperties(KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigOpacityChanged(int, bool)), this, TQT_SLOT(layerOpacity(int, bool))); + connect(m_layerBox, TQT_SIGNAL(sigOpacityFinishedChanging(int, int)), + this, TQT_SLOT(layerOpacityFinishedChanging(int, int))); + connect(m_layerBox, TQT_SIGNAL(sigItemComposite(const KisCompositeOp&)), this, TQT_SLOT(layerCompositeOp(const KisCompositeOp&))); paletteManager()->addWidget(m_layerBox, "layerbox", krita::LAYERBOX, 0); @@ -458,18 +458,18 @@ void KisView::setupScrollBars() { m_scrollX = 0; m_scrollY = 0; - m_vScroll = new QScrollBar(QScrollBar::Vertical, this); + m_vScroll = new TQScrollBar(TQScrollBar::Vertical, this); Q_CHECK_PTR(m_vScroll); - m_hScroll = new QScrollBar(QScrollBar::Horizontal, this); + m_hScroll = new TQScrollBar(TQScrollBar::Horizontal, this); Q_CHECK_PTR(m_hScroll); m_vScroll->setGeometry(width() - 16, 20, 16, height() - 36); m_hScroll->setGeometry(20, height() - 16, width() - 36, 16); m_hScroll->setValue(0); m_vScroll->setValue(0); - QObject::connect(m_vScroll, SIGNAL(valueChanged(int)), this, SLOT(scrollV(int))); - QObject::connect(m_hScroll, SIGNAL(valueChanged(int)), this, SLOT(scrollH(int))); + TQObject::connect(m_vScroll, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(scrollV(int))); + TQObject::connect(m_hScroll, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(scrollH(int))); } void KisView::setupRulers() @@ -494,11 +494,11 @@ void KisView::setupRulers() void KisView::updateStatusBarZoomLabel () { if (zoom() < 1 - EPSILON) { - m_statusBarZoomLabel->setText(i18n("Zoom %1%").arg(zoom() * 100, 0, 'g', 4)); + m_statusBarZoomLabel->setText(i18n("Zoom %1%").tqarg(zoom() * 100, 0, 'g', 4)); } else { - m_statusBarZoomLabel->setText(i18n("Zoom %1%").arg(zoom() * 100, 0, 'f', 0)); + m_statusBarZoomLabel->setText(i18n("Zoom %1%").tqarg(zoom() * 100, 0, 'f', 0)); } - m_statusBarZoomLabel->setMaximumWidth(m_statusBarZoomLabel->fontMetrics().width(i18n("Zoom %1%").arg("0.8888 "))); + m_statusBarZoomLabel->setMaximumWidth(m_statusBarZoomLabel->fontMetrics().width(i18n("Zoom %1%").tqarg("0.8888 "))); } void KisView::updateStatusBarSelectionLabel() @@ -512,8 +512,8 @@ void KisView::updateStatusBarSelectionLabel() KisPaintDeviceSP dev = img->activeDevice(); if (dev) { if (dev->hasSelection()) { - QRect r = dev->selection()->selectedExactRect(); - m_statusBarSelectionLabel->setText( i18n("Selection Active: x = %1 y = %2 width = %3 height = %4").arg(r.x()).arg(r.y()).arg( r.width()).arg( r.height())); + TQRect r = dev->selection()->selectedExactRect(); + m_statusBarSelectionLabel->setText( i18n("Selection Active: x = %1 y = %2 width = %3 height = %4").tqarg(r.x()).tqarg(r.y()).tqarg( r.width()).tqarg( r.height())); return; } } @@ -555,7 +555,7 @@ void KisView::resetMonitorProfile() if (m_monitorProfile == 0) { KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); m_monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); } @@ -566,7 +566,7 @@ void KisView::setupStatusBar() KStatusBar *sb = statusBar(); if (sb) { - m_statusBarZoomLabel = new QLabel(sb); + m_statusBarZoomLabel = new TQLabel(sb); addStatusBarItem(m_statusBarZoomLabel,1); updateStatusBarZoomLabel(); @@ -601,112 +601,112 @@ void KisView::setupActions() m_fullScreen = KStdAction::fullScreen( NULL, NULL, actionCollection(), this ); - connect( m_fullScreen, SIGNAL( toggled( bool )), this, SLOT( slotUpdateFullScreen( bool ))); + connect( m_fullScreen, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( slotUpdateFullScreen( bool ))); - m_imgProperties = new KAction(i18n("Image Properties"), 0, this, SLOT(slotImageProperties()), actionCollection(), "img_properties"); + m_imgProperties = new KAction(i18n("Image Properties"), 0, this, TQT_SLOT(slotImageProperties()), actionCollection(), "img_properties"); m_imgScan = 0; // How the hell do I get a KAction to the scan plug-in?!? - m_imgResizeToLayer = new KAction(i18n("Resize Image to Size of Current Layer"), 0, this, SLOT(imgResizeToActiveLayer()), actionCollection(), "resizeimgtolayer"); + m_imgResizeToLayer = new KAction(i18n("Resize Image to Size of Current Layer"), 0, this, TQT_SLOT(imgResizeToActiveLayer()), actionCollection(), "resizeimgtolayer"); // view actions - m_zoomIn = KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection(), "zoom_in"); - m_zoomOut = KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection(), "zoom_out"); - m_actualPixels = new KAction(i18n("Actual Pixels"), "Ctrl+0", this, SLOT(slotActualPixels()), actionCollection(), "actual_pixels"); - m_actualSize = KStdAction::actualSize(this, SLOT(slotActualSize()), actionCollection(), "actual_size"); + m_zoomIn = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection(), "zoom_in"); + m_zoomOut = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection(), "zoom_out"); + m_actualPixels = new KAction(i18n("Actual Pixels"), "Ctrl+0", this, TQT_SLOT(slotActualPixels()), actionCollection(), "actual_pixels"); + m_actualSize = KStdAction::actualSize(this, TQT_SLOT(slotActualSize()), actionCollection(), "actual_size"); m_actualSize->setEnabled(false); - m_fitToCanvas = KStdAction::fitToPage(this, SLOT(slotFitToCanvas()), actionCollection(), "fit_to_canvas"); + m_fitToCanvas = KStdAction::fitToPage(this, TQT_SLOT(slotFitToCanvas()), actionCollection(), "fit_to_canvas"); // layer actions - m_layerAdd = new KAction(i18n("&Add..."), "Ctrl+Shift+N", this, SLOT(layerAdd()), actionCollection(), "insert_layer"); + m_layerAdd = new KAction(i18n("&Add..."), "Ctrl+Shift+N", this, TQT_SLOT(layerAdd()), actionCollection(), "insert_layer"); m_actionPartLayer = new KoPartSelectAction( i18n( "&Object Layer" ), "frame_query", - this, SLOT( addPartLayer() ), + this, TQT_SLOT( addPartLayer() ), actionCollection(), "insert_part_layer" ); m_actionAdjustmentLayer = new KAction( i18n( "&Adjustment Layer" ), 0, - this, SLOT( addAdjustmentLayer() ), + this, TQT_SLOT( addAdjustmentLayer() ), actionCollection(), "insert_adjustment_layer" ); - m_layerRm = new KAction(i18n("&Remove"), 0, this, SLOT(layerRemove()), actionCollection(), "remove_layer"); - m_layerDup = new KAction(i18n("Duplicate"), 0, this, SLOT(layerDuplicate()), actionCollection(), "duplicate_layer"); - m_layerHide = new KToggleAction(i18n("&Hide"), 0, this, SLOT(layerToggleVisible()), actionCollection(), "hide_layer"); + m_layerRm = new KAction(i18n("&Remove"), 0, this, TQT_SLOT(layerRemove()), actionCollection(), "remove_layer"); + m_layerDup = new KAction(i18n("Duplicate"), 0, this, TQT_SLOT(layerDuplicate()), actionCollection(), "duplicate_layer"); + m_layerHide = new KToggleAction(i18n("&Hide"), 0, this, TQT_SLOT(layerToggleVisible()), actionCollection(), "hide_layer"); m_layerHide->setCheckedState(KGuiItem(i18n("&Show"))); m_layerHide->setChecked(false); - m_layerRaise = new KAction(i18n("Raise"), "raise", "Ctrl+]", this, SLOT(layerRaise()), actionCollection(), "raiselayer"); - m_layerLower = new KAction(i18n("Lower"), "lower", "Ctrl+[", this, SLOT(layerLower()), actionCollection(), "lowerlayer"); - m_layerTop = new KAction(i18n("To Top"), "bring_forward", "Ctrl+Shift+]", this, SLOT(layerFront()), actionCollection(), "toplayer"); - m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", "Ctrl+Shift+[", this, SLOT(layerBack()), actionCollection(), "bottomlayer"); - m_layerProperties = new KAction(i18n("Properties"), 0, this, SLOT(layerProperties()), actionCollection(), "layer_properties"); - (void)new KAction(i18n("I&nsert Image as Layer..."), 0, this, SLOT(slotInsertImageAsLayer()), actionCollection(), "insert_image_as_layer"); - m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", this, SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image"); - (void)new KAction(i18n("Flip on &X Axis"), "view_left_right", 0, this, SLOT(mirrorLayerX()), actionCollection(), "mirrorLayerX"); - (void)new KAction(i18n("Flip on &Y Axis"), "view_top_bottom", 0, this, SLOT(mirrorLayerY()), actionCollection(), "mirrorLayerY"); + m_layerRaise = new KAction(i18n("Raise"), "raise", "Ctrl+]", this, TQT_SLOT(layerRaise()), actionCollection(), "raiselayer"); + m_layerLower = new KAction(i18n("Lower"), "lower", "Ctrl+[", this, TQT_SLOT(layerLower()), actionCollection(), "lowerlayer"); + m_layerTop = new KAction(i18n("To Top"), "bring_forward", "Ctrl+Shift+]", this, TQT_SLOT(layerFront()), actionCollection(), "toplayer"); + m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", "Ctrl+Shift+[", this, TQT_SLOT(layerBack()), actionCollection(), "bottomlayer"); + m_layerProperties = new KAction(i18n("Properties"), 0, this, TQT_SLOT(layerProperties()), actionCollection(), "layer_properties"); + (void)new KAction(i18n("I&nsert Image as Layer..."), 0, this, TQT_SLOT(slotInsertImageAsLayer()), actionCollection(), "insert_image_as_layer"); + m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", this, TQT_SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image"); + (void)new KAction(i18n("Flip on &X Axis"), "view_left_right", 0, this, TQT_SLOT(mirrorLayerX()), actionCollection(), "mirrorLayerX"); + (void)new KAction(i18n("Flip on &Y Axis"), "view_top_bottom", 0, this, TQT_SLOT(mirrorLayerY()), actionCollection(), "mirrorLayerY"); m_createMask = new KAction(i18n("Create Mask"), 0, this, - SLOT(slotCreateMask()), actionCollection(), "create_mask"); - m_maskFromSelection = new KAction(i18n("Mask From Selection"), 0, this, - SLOT(slotMaskFromSelection()), actionCollection(), - "mask_fromsel"); - m_maskToSelection = new KAction(i18n("Mask to Selection"), 0, this, - SLOT(slotMaskToSelection()), actionCollection(), "mask_tosel"); - m_applyMask = new KAction(i18n("Apply Mask"), 0, this, SLOT(slotApplyMask()), - actionCollection(), "apply_mask"); + TQT_SLOT(slotCreateMask()), actionCollection(), "create_tqmask"); + m_tqmaskFromSelection = new KAction(i18n("Mask From Selection"), 0, this, + TQT_SLOT(slotMaskFromSelection()), actionCollection(), + "tqmask_fromsel"); + m_tqmaskToSelection = new KAction(i18n("Mask to Selection"), 0, this, + TQT_SLOT(slotMaskToSelection()), actionCollection(), "tqmask_tosel"); + m_applyMask = new KAction(i18n("Apply Mask"), 0, this, TQT_SLOT(slotApplyMask()), + actionCollection(), "apply_tqmask"); m_removeMask = new KAction(i18n("Remove Mask"), 0, this, - SLOT(slotRemoveMask()), actionCollection(), "remove_mask"); + TQT_SLOT(slotRemoveMask()), actionCollection(), "remove_tqmask"); m_showMask = new KToggleAction(i18n( "Show Mask" ), 0, this, - SLOT(slotShowMask()), actionCollection(), "show_mask"); + TQT_SLOT(slotShowMask()), actionCollection(), "show_tqmask"); m_editMask = new KToggleAction(i18n( "Edit Mask" ), 0, this, - SLOT(slotEditMask()), actionCollection(), "edit_mask"); + TQT_SLOT(slotEditMask()), actionCollection(), "edit_tqmask"); // image actions - m_imgFlatten = new KAction(i18n("&Flatten Image"), "Ctrl+Shift+E", this, SLOT(flattenImage()), actionCollection(), "flatten_image"); - m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), "Ctrl+E", this, SLOT(mergeLayer()), actionCollection(), "merge_layer"); + m_imgFlatten = new KAction(i18n("&Flatten Image"), "Ctrl+Shift+E", this, TQT_SLOT(flattenImage()), actionCollection(), "flatten_image"); + m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), "Ctrl+E", this, TQT_SLOT(mergeLayer()), actionCollection(), "merge_layer"); // setting actions - KStdAction::preferences(this, SLOT(preferences()), actionCollection(), "preferences"); + KStdAction::preferences(this, TQT_SLOT(preferences()), actionCollection(), "preferences"); - m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), "Ctrl+R", this, SLOT( showRuler() ), actionCollection(), "view_ruler" ); + m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), "Ctrl+R", this, TQT_SLOT( showRuler() ), actionCollection(), "view_ruler" ); m_RulerAction->setChecked(cfg.showRulers()); m_RulerAction->setCheckedState(i18n("Hide Rulers")); m_RulerAction->setWhatsThis( i18n("The rulers show the horizontal and vertical positions of the mouse on the image " "and can be used to position your mouse at the right place on the canvas. <p>Uncheck this to disable " "the rulers from being displayed." ) ); - //m_guideAction = new KToggleAction( i18n( "Guide Lines" ), 0, this, SLOT( viewGuideLines() ), actionCollection(), "view_guidelines" ); + //m_guideAction = new KToggleAction( i18n( "Guide Lines" ), 0, this, TQT_SLOT( viewGuideLines() ), actionCollection(), "view_guidelines" ); // Add new palette - new KAction(i18n("Add New Palette..."), 0, this, SLOT(slotAddPalette()), + new KAction(i18n("Add New Palette..."), 0, this, TQT_SLOT(slotAddPalette()), actionCollection(), "add_palette"); - new KAction(i18n("Edit Palette..."), 0, this, SLOT(slotEditPalette()), + new KAction(i18n("Edit Palette..."), 0, this, TQT_SLOT(slotEditPalette()), actionCollection(), "edit_palette"); - // XXX: This triggers a repaint of the image, but way too early + // XXX: This triggers a tqrepaint of the image, but way too early //showRuler(); } -void KisView::resizeEvent(QResizeEvent *) +void KisView::resizeEvent(TQResizeEvent *) { if (!m_paintViewEnabled) { startInitialZoomTimerIfReady(); } KisImageSP img = currentImg(); - Q_INT32 scrollBarExtent = style().pixelMetric(QStyle::PM_ScrollBarExtent); - Q_INT32 drawH; - Q_INT32 drawW; - Q_INT32 docW; - Q_INT32 docH; + TQ_INT32 scrollBarExtent = style().tqpixelMetric(TQStyle::PM_ScrollBarExtent); + TQ_INT32 drawH; + TQ_INT32 drawW; + TQ_INT32 docW; + TQ_INT32 docH; // if (img) { // KisGuideMgr *mgr = img->guides(); // mgr->resize(size()); // } - docW = static_cast<Q_INT32>(ceil(docWidth() * zoom())); - docH = static_cast<Q_INT32>(ceil(docHeight() * zoom())); + docW = static_cast<TQ_INT32>(ceil(docWidth() * zoom())); + docH = static_cast<TQ_INT32>(ceil(docHeight() * zoom())); m_rulerThickness = m_RulerAction->isChecked() ? RULER_THICKNESS : 0; drawH = height() - m_rulerThickness; @@ -775,8 +775,8 @@ void KisView::resizeEvent(QResizeEvent *) m_hScrollBarExtent = scrollBarExtent; } - Q_INT32 oldCanvasXOffset = m_canvasXOffset; - Q_INT32 oldCanvasYOffset = m_canvasYOffset; + TQ_INT32 oldCanvasXOffset = m_canvasXOffset; + TQ_INT32 oldCanvasYOffset = m_canvasYOffset; if (docW < drawW) { m_canvasXOffset = (drawW - docW) / 2; @@ -799,29 +799,29 @@ void KisView::resizeEvent(QResizeEvent *) if (!m_canvas->isOpenGLCanvas()) { - if (m_canvasPixmap.size() != QSize(drawW, drawH)) { + if (m_canvasPixmap.size() != TQSize(drawW, drawH)) { - Q_INT32 oldCanvasWidth = m_canvasPixmap.width(); - Q_INT32 oldCanvasHeight = m_canvasPixmap.height(); + TQ_INT32 oldCanvasWidth = m_canvasPixmap.width(); + TQ_INT32 oldCanvasHeight = m_canvasPixmap.height(); - Q_INT32 newCanvasWidth = drawW; - Q_INT32 newCanvasHeight = drawH; + TQ_INT32 newCanvasWidth = drawW; + TQ_INT32 newCanvasHeight = drawH; - QRegion exposedRegion = QRect(0, 0, newCanvasWidth, newCanvasHeight); + TQRegion exposedRegion = TQRect(0, 0, newCanvasWidth, newCanvasHeight); // Increase size first so that we can copy the old image area to the new one. - m_canvasPixmap.resize(QMAX(oldCanvasWidth, newCanvasWidth), QMAX(oldCanvasHeight, newCanvasHeight)); + m_canvasPixmap.resize(TQMAX(oldCanvasWidth, newCanvasWidth), TQMAX(oldCanvasHeight, newCanvasHeight)); if (!m_canvasPixmap.isNull()) { if (oldCanvasXOffset != m_canvasXOffset || oldCanvasYOffset != m_canvasYOffset) { - Q_INT32 srcX; - Q_INT32 srcY; - Q_INT32 srcWidth; - Q_INT32 srcHeight; - Q_INT32 dstX; - Q_INT32 dstY; + TQ_INT32 srcX; + TQ_INT32 srcY; + TQ_INT32 srcWidth; + TQ_INT32 srcHeight; + TQ_INT32 dstX; + TQ_INT32 dstY; if (oldCanvasXOffset <= m_canvasXOffset) { // Move to the right @@ -848,9 +848,9 @@ void KisView::resizeEvent(QResizeEvent *) } bitBlt(&m_canvasPixmap, dstX, dstY, &m_canvasPixmap, srcX, srcY, srcWidth, srcHeight); - exposedRegion -= QRegion(QRect(dstX, dstY, srcWidth, srcHeight)); + exposedRegion -= TQRegion(TQRect(dstX, dstY, srcWidth, srcHeight)); } else { - exposedRegion -= QRegion(QRect(0, 0, oldCanvasWidth, oldCanvasHeight)); + exposedRegion -= TQRegion(TQRect(0, 0, oldCanvasWidth, oldCanvasHeight)); } } @@ -858,24 +858,24 @@ void KisView::resizeEvent(QResizeEvent *) if (!m_canvasPixmap.isNull() && !exposedRegion.isEmpty()) { - QMemArray<QRect> rects = exposedRegion.rects(); + TQMemArray<TQRect> rects = exposedRegion.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect r = rects[i]; - updateQPaintDeviceCanvas(viewToWindow(r)); + TQRect r = rects[i]; + updateTQPaintDeviceCanvas(viewToWindow(r)); } } } } - int fontheight = QFontMetrics(KGlobalSettings::generalFont()).height() * 3; + int fontheight = TQFontMetrics(KGlobalSettings::generalFont()).height() * 3; m_vScroll->setPageStep(drawH); m_vScroll->setLineStep(fontheight); m_hScroll->setPageStep(drawW); m_hScroll->setLineStep(fontheight); - m_hRuler->setGeometry(m_rulerThickness + m_canvasXOffset, 0, QMIN(docW, drawW), m_rulerThickness); - m_vRuler->setGeometry(0, m_rulerThickness + m_canvasYOffset, m_rulerThickness, QMIN(docH, drawH)); + m_hRuler->setGeometry(m_rulerThickness + m_canvasXOffset, 0, TQMIN(docW, drawW), m_rulerThickness); + m_vRuler->setGeometry(0, m_rulerThickness + m_canvasYOffset, m_rulerThickness, TQMIN(docH, drawH)); if (m_vScroll->isVisible()) m_vRuler->updateVisibleArea(0, m_vScroll->value()); @@ -900,20 +900,20 @@ void KisView::resizeEvent(QResizeEvent *) emit viewTransformationsChanged(); } -void KisView::styleChange(QStyle& oldStyle) +void KisView::styleChange(TQStyle& oldStyle) { Q_UNUSED(oldStyle); m_canvas->updateGeometry(); refreshKisCanvas(); } -void KisView::paletteChange(const QPalette& oldPalette) +void KisView::paletteChange(const TQPalette& oldPalette) { Q_UNUSED(oldPalette); refreshKisCanvas(); } -void KisView::showEvent(QShowEvent *) +void KisView::showEvent(TQShowEvent *) { if (!m_showEventReceived) { m_showEventReceived = true; @@ -926,24 +926,24 @@ void KisView::updateReadWrite(bool readwrite) layerUpdateGUI(readwrite); } -Q_INT32 KisView::horzValue() const +TQ_INT32 KisView::horzValue() const { return m_hScroll->value() - m_canvasXOffset; } -Q_INT32 KisView::vertValue() const +TQ_INT32 KisView::vertValue() const { return m_vScroll->value() - m_canvasYOffset; } -void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) +void KisView::updateTQPaintDeviceCanvas(const TQRect& imageRect) { - QRect vr = windowToView(imageRect); - vr &= QRect(0, 0, m_canvas->width(), m_canvas->height()); + TQRect vr = windowToView(imageRect); + vr &= TQRect(0, 0, m_canvas->width(), m_canvas->height()); if (!vr.isEmpty()) { - QPainter gc; + TQPainter gc; if (gc.begin(&m_canvasPixmap)) { @@ -951,20 +951,20 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) if (img && m_paintViewEnabled) { - QRect wr = viewToWindow(vr); + TQRect wr = viewToWindow(vr); if (wr.left() < 0 || wr.right() >= img->width() || wr.top() < 0 || wr.bottom() >= img->height()) { // Erase areas outside document - QRegion rg(vr); - rg -= QRegion(windowToView(QRect(0, 0, img->width(), img->height()))); + TQRegion rg(vr); + rg -= TQRegion(windowToView(TQRect(0, 0, img->width(), img->height()))); - QMemArray<QRect> rects = rg.rects(); + TQMemArray<TQRect> rects = rg.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect er = rects[i]; - gc.fillRect(er, colorGroup().mid()); + TQRect er = rects[i]; + gc.fillRect(er, tqcolorGroup().mid()); } - wr &= QRect(0, 0, img->width(), img->height()); + wr &= TQRect(0, 0, img->width(), img->height()); } if (!wr.isEmpty()) { @@ -991,14 +991,14 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) paintFlags, HDRExposure()); } else { - QRect canvasRect = windowToView(wr); - QRect scaledImageRect = canvasRect; + TQRect canvasRect = windowToView(wr); + TQRect scaledImageRect = canvasRect; scaledImageRect.moveBy(horzValue(), vertValue()); - QSize scaledImageSize(static_cast<Q_INT32>(ceil(docWidth() * zoom())), - static_cast<Q_INT32>(ceil(docHeight() * zoom()))); + TQSize scaledImageSize(static_cast<TQ_INT32>(ceil(docWidth() * zoom())), + static_cast<TQ_INT32>(ceil(docHeight() * zoom()))); - QImage image = m_image->convertToQImage(scaledImageRect, scaledImageSize, + TQImage image = m_image->convertToTQImage(scaledImageRect, scaledImageSize, monitorProfile(), paintFlags, HDRExposure()); gc.drawImage(canvasRect.topLeft(), image, image.rect()); @@ -1014,23 +1014,23 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) } // paintGuides(); } else { - gc.fillRect(vr, colorGroup().mid()); + gc.fillRect(vr, tqcolorGroup().mid()); } } } } -void KisView::paintQPaintDeviceView(const QRegion& canvasRegion) +void KisView::paintTQPaintDeviceView(const TQRegion& canvasRegion) { - Q_ASSERT(m_canvas->QPaintDeviceWidget() != 0); + Q_ASSERT(m_canvas->TQPaintDeviceWidget() != 0); - if (m_canvas->QPaintDeviceWidget() != 0 && !m_canvasPixmap.isNull()) { - QMemArray<QRect> rects = canvasRegion.rects(); + if (m_canvas->TQPaintDeviceWidget() != 0 && !m_canvasPixmap.isNull()) { + TQMemArray<TQRect> rects = canvasRegion.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect r = rects[i]; + TQRect r = rects[i]; - bitBlt(m_canvas->QPaintDeviceWidget(), r.x(), r.y(), &m_canvasPixmap, + bitBlt(m_canvas->TQPaintDeviceWidget(), r.x(), r.y(), &m_canvasPixmap, r.x(), r.y(), r.width(), r.height()); } @@ -1038,7 +1038,7 @@ void KisView::paintQPaintDeviceView(const QRegion& canvasRegion) } } -void KisView::updateOpenGLCanvas(const QRect& imageRect) +void KisView::updateOpenGLCanvas(const TQRect& imageRect) { #ifdef HAVE_GL KisImageSP img = currentImg(); @@ -1055,7 +1055,7 @@ void KisView::updateOpenGLCanvas(const QRect& imageRect) #endif } -void KisView::paintOpenGLView(const QRect& canvasRect) +void KisView::paintOpenGLView(const TQRect& canvasRect) { #ifdef HAVE_GL if (!m_canvas->isUpdatesEnabled()) { @@ -1066,7 +1066,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glDrawBuffer(GL_BACK); - QColor widgetBackgroundColor = colorGroup().mid(); + TQColor widgetBackgroundColor = tqcolorGroup().mid(); glClearColor(widgetBackgroundColor.red() / 255.0, widgetBackgroundColor.green() / 255.0, widgetBackgroundColor.blue() / 255.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); @@ -1075,8 +1075,8 @@ void KisView::paintOpenGLView(const QRect& canvasRect) if (img && m_paintViewEnabled) { - QRect vr = canvasRect; - vr &= QRect(0, 0, m_canvas->width(), m_canvas->height()); + TQRect vr = canvasRect; + vr &= TQRect(0, 0, m_canvas->width(), m_canvas->height()); if (!vr.isNull()) { @@ -1093,7 +1093,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glTranslatef(m_canvasXOffset, m_canvasYOffset, 0.0); glEnable(GL_TEXTURE_2D); - glBegin(GL_QUADS); + glBegin(GL_TQUADS); glTexCoord2f(0.0, 0.0); glVertex2f(0.0, 0.0); @@ -1118,8 +1118,8 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - QRect wr = viewToWindow(QRect(0, 0, m_canvas->width(), m_canvas->height())); - wr &= QRect(0, 0, img->width(), img->height()); + TQRect wr = viewToWindow(TQRect(0, 0, m_canvas->width(), m_canvas->height())); + wr &= TQRect(0, 0, img->width(), img->height()); m_OpenGLImageContext->setHDRExposure(HDRExposure()); @@ -1134,7 +1134,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glBindTexture(GL_TEXTURE_2D, m_OpenGLImageContext->imageTextureTile(x, y)); - glBegin(GL_QUADS); + glBegin(GL_TQUADS); glTexCoord2f(0.0, 0.0); glVertex2f(x, y); @@ -1168,7 +1168,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) m_canvas->OpenGLWidget()->swapBuffers(); - paintToolOverlay(QRegion(canvasRect)); + paintToolOverlay(TQRegion(canvasRect)); #else Q_UNUSED(canvasRect); @@ -1213,26 +1213,26 @@ void KisView::updateCanvas() } } -void KisView::updateCanvas(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisView::updateCanvas(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { - updateCanvas(QRect(x, y, w, h)); + updateCanvas(TQRect(x, y, w, h)); } -void KisView::updateCanvas(const QRect& imageRect) +void KisView::updateCanvas(const TQRect& imageRect) { if (m_canvas->isOpenGLCanvas()) { updateOpenGLCanvas(imageRect); paintOpenGLView(windowToView(imageRect)); } else { - updateQPaintDeviceCanvas(imageRect); + updateTQPaintDeviceCanvas(imageRect); //m_canvas->update(windowToView(imageRect)); - m_canvas->repaint(windowToView(imageRect)); + m_canvas->tqrepaint(windowToView(imageRect)); } } void KisView::refreshKisCanvas() { - QRect imageRect = viewToWindow(QRect(0, 0, m_canvas->width(), m_canvas->height())); + TQRect imageRect = viewToWindow(TQRect(0, 0, m_canvas->width(), m_canvas->height())); if (m_image) { imageRect |= m_image->bounds(); @@ -1241,7 +1241,7 @@ void KisView::refreshKisCanvas() updateCanvas(imageRect); // Enable this if updateCanvas does an m_canvas->update() - //m_canvas->repaint(); + //m_canvas->tqrepaint(); } void KisView::selectionDisplayToggled(bool displaySelection) @@ -1263,8 +1263,8 @@ void KisView::layerUpdateGUI(bool enable) KisImageSP img = currentImg(); KisLayerSP layer; - Q_INT32 nlayers = 0; - Q_INT32 nvisible = 0; + TQ_INT32 nlayers = 0; + TQ_INT32 nvisible = 0; @@ -1457,13 +1457,13 @@ void KisView::zoomAroundPoint(double x, double y, double zf) if (m_hScroll->isVisible()) { double vcx = m_canvas->width() / 2.0; - Q_INT32 scrollX = qRound(x * zoom() - vcx); + TQ_INT32 scrollX = tqRound(x * zoom() - vcx); m_hScroll->setValue(scrollX); } if (m_vScroll->isVisible()) { double vcy = m_canvas->height() / 2.0; - Q_INT32 scrollY = qRound(y * zoom() - vcy); + TQ_INT32 scrollY = tqRound(y * zoom() - vcy); m_vScroll->setValue(scrollY); } @@ -1475,7 +1475,7 @@ void KisView::zoomAroundPoint(double x, double y, double zf) m_vScroll->update(); if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { refreshKisCanvas(); } @@ -1504,22 +1504,22 @@ void KisView::zoomTo(const KisRect& r) } } -void KisView::zoomTo(const QRect& r) +void KisView::zoomTo(const TQRect& r) { zoomTo(KisRect(r)); } -void KisView::zoomTo(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisView::zoomTo(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { zoomTo(KisRect(x, y, w, h)); } -void KisView::zoomIn(Q_INT32 x, Q_INT32 y) +void KisView::zoomIn(TQ_INT32 x, TQ_INT32 y) { zoomAroundPoint(x, y, nextZoomInLevel()); } -void KisView::zoomOut(Q_INT32 x, Q_INT32 y) +void KisView::zoomOut(TQ_INT32 x, TQ_INT32 y) { zoomAroundPoint(x, y, nextZoomOutLevel()); } @@ -1574,7 +1574,7 @@ double KisView::fitToCanvasZoomLevel() const double xZoomLevel = static_cast<double>(fullCanvasWidth) / img->width(); double yZoomLevel = static_cast<double>(fullCanvasHeight) / img->height(); - return QMIN(xZoomLevel, yZoomLevel); + return TQMIN(xZoomLevel, yZoomLevel); } else { return 1; @@ -1612,7 +1612,7 @@ void KisView::imgResizeToActiveLayer() img->lock(); - QRect r = layer->exactBounds(); + TQRect r = layer->exactBounds(); img->resize(r.width(), r.height(), r.x(), r.y(), true); img->unlock(); @@ -1631,14 +1631,14 @@ void KisView::slotImageProperties() KisDlgImageProperties dlg(img, this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { if (dlg.imageWidth() != img->width() || dlg.imageHeight() != img->height()) { resizeCurrentImage(dlg.imageWidth(), dlg.imageHeight()); } - Q_INT32 opacity = dlg.opacity(); + TQ_INT32 opacity = dlg.opacity(); opacity = opacity * 255 / 100; img->setName(dlg.imageName()); img->setColorSpace(dlg.colorSpace()); @@ -1669,8 +1669,8 @@ void KisView::slotEditPalette() if (!srv) { return; } - QValueList<KisResource*> resources = srv->resources(); - QValueList<KisPalette*> palettes; + TQValueList<KisResource*> resources = srv->resources(); + TQValueList<KisPalette*> palettes; for(uint i = 0; i < resources.count(); i++) { KisPalette* palette = dynamic_cast<KisPalette*>(*resources.at(i)); @@ -1679,7 +1679,7 @@ void KisView::slotEditPalette() palettes.append(palette); } - if (chooser.exec() != QDialog::Accepted ) { + if (chooser.exec() != TQDialog::Accepted ) { return; } @@ -1700,10 +1700,10 @@ void KisView::slotEditPalette() void KisView::saveLayerAsImage() { - QStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); - QString mimelist = listMimeFilter.join(" "); + TQStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); + TQString mimelist = listMimeFilter.join(" "); - KFileDialog fd (QString::null, mimelist, this, "Export Layer", true); + KFileDialog fd (TQString(), mimelist, this, "Export Layer", true); fd.setCaption(i18n("Export Layer")); fd.setMimeFilter(listMimeFilter); fd.setOperationMode(KFileDialog::Saving); @@ -1711,7 +1711,7 @@ void KisView::saveLayerAsImage() if (!fd.exec()) return; KURL url = fd.selectedURL(); - QString mimefilter = fd.currentMimeFilter(); + TQString mimefilter = fd.currentMimeFilter(); if (url.isEmpty()) return; @@ -1723,7 +1723,7 @@ void KisView::saveLayerAsImage() KisLayerSP l = img->activeLayer(); if (!l) return; - QRect r = l->exactBounds(); + TQRect r = l->exactBounds(); KisDoc d; d.prepareForImport(); @@ -1738,7 +1738,7 @@ void KisView::saveLayerAsImage() -Q_INT32 KisView::importImage(const KURL& urlArg) +TQ_INT32 KisView::importImage(const KURL& urlArg) { KisImageSP currentImage = currentImg(); @@ -1747,11 +1747,11 @@ Q_INT32 KisView::importImage(const KURL& urlArg) } KURL::List urls; - Q_INT32 rc = 0; + TQ_INT32 rc = 0; if (urlArg.isEmpty()) { - QString mimelist = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Import).join(" "); - urls = KFileDialog::getOpenURLs(QString::null, mimelist, 0, i18n("Import Image")); + TQString mimelist = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Import).join(" "); + urls = KFileDialog::getOpenURLs(TQString(), mimelist, 0, i18n("Import Image")); } else { urls.push_back(urlArg); } @@ -1862,15 +1862,15 @@ void KisView::rotateLayer(double radians) } KisFilterStrategy *filter = KisFilterStrategyRegistry::instance()->get(KisID("Triangle")); - QRect r; + TQRect r; if(dev->hasSelection()) r = dev->selection()->selectedExactRect(); else r = dev->exactBounds(); double cx = r.x()+r.width()/2.0; double cy = r.y()+r.height()/2.0; - Q_INT32 tx = Q_INT32(cx*cos(radians) - cy*sin(radians) - cx + 0.5); - Q_INT32 ty = Q_INT32(cy*cos(radians) + cx*sin(radians) - cy + 0.5); + TQ_INT32 tx = TQ_INT32(cx*cos(radians) - cy*sin(radians) - cx + 0.5); + TQ_INT32 ty = TQ_INT32(cy*cos(radians) + cx*sin(radians) - cy + 0.5); KisTransformWorker tw(dev, 1.0, 1.0, 0, 0, radians, -tx, -ty, m_progress, filter); tw.run(); @@ -1965,7 +1965,7 @@ void KisView::preferences() } else { m_OpenGLImageContext = 0; - m_canvas->createQPaintDeviceCanvas(); + m_canvas->createTQPaintDeviceCanvas(); } connectCurrentImg(); @@ -2082,26 +2082,26 @@ void KisView::slotUpdateFullScreen(bool toggle) uint newState = KoView::shell()->windowState(); if (toggle) { - newState |= Qt::WindowFullScreen; + newState |= TQt::WindowFullScreen; } else { - newState &= ~Qt::WindowFullScreen; + newState &= ~TQt::WindowFullScreen; } KoView::shell()->setWindowState(newState); } } -Q_INT32 KisView::docWidth() const +TQ_INT32 KisView::docWidth() const { return currentImg() ? currentImg()->width() : 0; } -Q_INT32 KisView::docHeight() const +TQ_INT32 KisView::docHeight() const { return currentImg() ? currentImg()->height() : 0; } -void KisView::scrollTo(Q_INT32 x, Q_INT32 y) +void KisView::scrollTo(TQ_INT32 x, TQ_INT32 y) { if (m_hScroll->isVisible()) { m_hScroll->setValue(x); @@ -2160,14 +2160,14 @@ void KisView::setBGColor(const KisColor& c) { m_bg = c; notifyObservers(); - emit sigBGQColorChanged( c.toQColor() ); + emit sigBGTQColorChanged( c.toTQColor() ); } void KisView::setFGColor(const KisColor& c) { m_fg = c; notifyObservers(); - emit sigFGQColorChanged( c.toQColor() ); + emit sigFGTQColorChanged( c.toTQColor() ); } void KisView::slotSetFGColor(const KisColor& c) @@ -2184,18 +2184,18 @@ void KisView::slotSetBGColor(const KisColor& c) notifyObservers(); } -void KisView::slotSetFGQColor(const QColor& c) +void KisView::slotSetFGTQColor(const TQColor& c) { KisColorSpace * monitorSpace = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA"), m_monitorProfile); setFGColor(KisColor(c, monitorSpace)); - emit sigFGQColorChanged(c); + emit sigFGTQColorChanged(c); } -void KisView::slotSetBGQColor(const QColor& c) +void KisView::slotSetBGTQColor(const TQColor& c) { KisColorSpace * monitorSpace = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA"), m_monitorProfile); setBGColor(KisColor(c, monitorSpace)); - emit sigBGQColorChanged(c); + emit sigBGTQColorChanged(c); } @@ -2212,7 +2212,7 @@ void KisView::setupPrinter(KPrinter& printer) void KisView::print(KPrinter& printer) { - QPainter gc(&printer); + TQPainter gc(&printer); KisImageSP img = currentImg(); if (!img) return; @@ -2221,14 +2221,14 @@ void KisView::print(KPrinter& printer) gc.setClipping(false); KisConfig cfg; - QString printerProfileName = cfg.printerProfile(); + TQString printerProfileName = cfg.printerProfile(); KisProfile * printerProfile = KisMetaRegistry::instance()->csRegistry() ->getProfileByName(printerProfileName); - QRect r = img->bounds(); + TQRect r = img->bounds(); img->renderToPainter(r.x(), r.y(), r.width(), r.height(), gc, printerProfile, KisImage::PAINT_IMAGE_ONLY, HDRExposure()); } -void KisView::paintToolOverlay(const QRegion& region) +void KisView::paintToolOverlay(const TQRegion& region) { if (!region.isEmpty() && m_toolManager->currentTool() && !m_toolIsPainting) { KisCanvasPainter gc(m_canvas); @@ -2236,19 +2236,19 @@ void KisView::paintToolOverlay(const QRegion& region) gc.setClipRegion(region); gc.setClipping(true); - // Prevent endless loop if the tool needs to have the canvas repainted + // Prevent endless loop if the tool needs to have the canvas tqrepainted m_toolIsPainting = true; m_toolManager->currentTool()->paint(gc, region.boundingRect()); m_toolIsPainting = false; } } -void KisView::canvasGotPaintEvent(QPaintEvent *event) +void KisView::canvasGotPaintEvent(TQPaintEvent *event) { if (m_canvas->isOpenGLCanvas()) { paintOpenGLView(event->rect()); } else { - paintQPaintDeviceView(event->region()); + paintTQPaintDeviceView(event->region()); } } @@ -2274,19 +2274,19 @@ void KisView::canvasGotButtonPressEvent(KisButtonPressEvent *e) KisImageSP img = currentImg(); // if (img) { -// QPoint pt = mapToScreen(e->pos().floorQPoint()); +// TQPoint pt = mapToScreen(e->pos().floorTQPoint()); // KisGuideMgr *mgr = img->guides(); // -// m_lastGuidePoint = mapToScreen(e->pos().floorQPoint()); +// m_lastGuidePoint = mapToScreen(e->pos().floorTQPoint()); // m_currentGuide = 0; // -// if ((e->state() & ~Qt::ShiftButton) == Qt::NoButton) { -// KisGuideSP gd = mgr->find(static_cast<Q_INT32>(pt.x() / zoom()), static_cast<Q_INT32>(pt.y() / zoom()), QMAX(2.0, 2.0 / zoom())); +// if ((e->state() & ~TQt::ShiftButton) == Qt::NoButton) { +// KisGuideSP gd = mgr->tqfind(static_cast<TQ_INT32>(pt.x() / zoom()), static_cast<TQ_INT32>(pt.y() / zoom()), TQMAX(2.0, 2.0 / zoom())); // // if (gd) { // m_currentGuide = gd; // -// if ((e->button() == Qt::RightButton) || ((e->button() & Qt::ShiftButton) == Qt::ShiftButton)) { +// if ((e->button() == Qt::RightButton) || ((e->button() & TQt::ShiftButton) == TQt::ShiftButton)) { // if (gd->isSelected()) // mgr->unselect(gd); // else @@ -2304,13 +2304,13 @@ void KisView::canvasGotButtonPressEvent(KisButtonPressEvent *e) // } // } if (e->button() == Qt::RightButton) { - QPopupMenu * m_popup = 0; + TQPopupMenu * m_popup = 0; if (factory()) { Q_ASSERT(factory()); - m_popup = (QPopupMenu *)factory()->container("image_popup", this); + m_popup = (TQPopupMenu *)factory()->container("image_popup", this); } if (m_popup) { - m_popup->popup(e->globalPos().roundQPoint()); + m_popup->popup(e->globalPos().roundTQPoint()); } } else if (e->device() == currentInputDevice() && m_toolManager->currentTool()) { @@ -2357,7 +2357,7 @@ void KisView::canvasGotMoveEvent(KisMoveEvent *e) #if 0 if (img && m_currentGuide) { - QPoint p = mapToScreen(e->pos().floorQPoint()); + TQPoint p = mapToScreen(e->pos().floorTQPoint()); KisGuideMgr *mgr = img->guides(); if (((e->state() & Qt::LeftButton) == Qt::LeftButton) && mgr->hasSelected()) { @@ -2381,7 +2381,7 @@ void KisView::canvasGotMoveEvent(KisMoveEvent *e) m_toolManager->currentTool()->move(&ev); } -// m_lastGuidePoint = mapToScreen(e->pos().floorQPoint()); +// m_lastGuidePoint = mapToScreen(e->pos().floorTQPoint()); emit cursorPosition(wp.floorX(), wp.floorY()); } @@ -2405,13 +2405,13 @@ int KisView::bottomBorder() const return m_vScrollBarExtent; } -void KisView::mouseMoveEvent(QMouseEvent *e) +void KisView::mouseMoveEvent(TQMouseEvent *e) { KisMoveEvent ke(currentInputDevice(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->state()); canvasGotMoveEvent(&ke); } -void KisView::slotAutoScroll(const QPoint &p) +void KisView::slotAutoScroll(const TQPoint &p) { scrollTo(horzValue()+p.x(), vertValue()+p.y()); } @@ -2480,17 +2480,17 @@ void KisView::canvasGotDoubleClickEvent(KisDoubleClickEvent *e) } } -void KisView::canvasGotEnterEvent(QEvent *e) +void KisView::canvasGotEnterEvent(TQEvent *e) { Q_UNUSED( e ); } -void KisView::canvasGotLeaveEvent (QEvent *e) +void KisView::canvasGotLeaveEvent (TQEvent *e) { Q_UNUSED( e ); } -void KisView::canvasGotMouseWheelEvent(QWheelEvent *event) +void KisView::canvasGotMouseWheelEvent(TQWheelEvent *event) { //if(event->state() == ControlButton ) //{ @@ -2508,18 +2508,18 @@ void KisView::canvasGotMouseWheelEvent(QWheelEvent *event) } } //} else { - // QApplication::sendEvent(m_vScroll, event); + // TQApplication::sendEvent(m_vScroll, event); //} } -void KisView::canvasGotKeyPressEvent(QKeyEvent *event) +void KisView::canvasGotKeyPressEvent(TQKeyEvent *event) { if (!m_toolManager->currentTool()) { event->ignore(); return; } - if (event->key() == Qt::Key_Space) { + if (event->key() == TQt::Key_Space) { if (!m_panning) { // Set tool temporarily to pan m_panning = true; @@ -2537,26 +2537,26 @@ void KisView::canvasGotKeyPressEvent(QKeyEvent *event) m_toolManager->currentTool()->keyPress(event); } -void KisView::canvasGotKeyReleaseEvent(QKeyEvent *event) +void KisView::canvasGotKeyReleaseEvent(TQKeyEvent *event) { if (m_toolManager->currentTool()) m_toolManager->currentTool()->keyRelease(event); } -void KisView::canvasGotDragEnterEvent(QDragEnterEvent *event) +void KisView::canvasGotDragEnterEvent(TQDragEnterEvent *event) { bool accept = false; // Only accept drag if we're not busy, particularly as we may - // be showing a progress bar and calling qApp->processEvents(). - if (KURLDrag::canDecode(event) && QApplication::overrideCursor() == 0) { + // be showing a progress bar and calling tqApp->processEvents(). + if (KURLDrag::canDecode(event) && TQApplication::overrideCursor() == 0) { accept = true; } event->accept(accept); } -void KisView::canvasGotDropEvent(QDropEvent *event) +void KisView::canvasGotDropEvent(TQDropEvent *event) { KURL::List urls; @@ -2587,7 +2587,7 @@ void KisView::canvasGotDropEvent(QDropEvent *event) popup.insertSeparator(); popup.insertItem(i18n("Cancel"), cancelId); - int actionId = popup.exec(QCursor::pos()); + int actionId = popup.exec(TQCursor::pos()); if (actionId >= 0 && actionId != cancelId) { for (KURL::List::ConstIterator it = urls.begin (); it != urls.end (); ++it) { @@ -2620,11 +2620,11 @@ namespace { typedef KNamedCommand super; public: - // The QStrings are the _serialized_ configs + // The TQStrings are the _serialized_ configs KisChangeFilterCmd(KisAdjustmentLayerSP layer, KisFilterConfiguration* config, - const QString& before, - const QString& after) : super(i18n("Change Filter")) + const TQString& before, + const TQString& after) : super(i18n("Change Filter")) { m_layer = layer; m_config = config; @@ -2634,28 +2634,28 @@ namespace { public: virtual void execute() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_config->fromXML(m_after); //Q_ASSERT(m_after == m_config->toString()); m_layer->setFilter(m_config); m_layer->setDirty(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } virtual void unexecute() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_config->fromXML(m_before); //Q_ASSERT(m_before == m_config->toString()); m_layer->setFilter(m_config); m_layer->setDirty(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } private: KisAdjustmentLayerSP m_layer; KisFilterConfiguration* m_config; - QString m_before; - QString m_after; + TQString m_before; + TQString m_after; }; } @@ -2677,8 +2677,8 @@ void KisView::showLayerProperties(KisLayerSP layer) if (KisAdjustmentLayerSP alayer = dynamic_cast<KisAdjustmentLayer*>(layer.data())) { KisDlgAdjLayerProps dlg(alayer, alayer->name(), i18n("Adjustment Layer Properties"), this, "dlgadjlayerprops"); - QString before = dlg.filterConfiguration()->toString(); - if (dlg.exec() == QDialog::Accepted) + TQString before = dlg.filterConfiguration()->toString(); + if (dlg.exec() == TQDialog::Accepted) { KisChangeFilterCmd * cmd = new KisChangeFilterCmd(alayer, dlg.filterConfiguration(), @@ -2695,18 +2695,18 @@ void KisView::showLayerProperties(KisLayerSP layer) layer->opacity(), layer->compositeOp(), cs); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { if (layer->name() != dlg.getName() || layer->opacity() != dlg.getOpacity() || layer->compositeOp() != dlg.getCompositeOp()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_adapter->beginMacro(i18n("Property Changes")); layer->image()->setLayerProperties(layer, dlg.getOpacity(), dlg.getCompositeOp(), dlg.getName()); layer->setDirty(); m_adapter->endMacro(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_doc->setModified( true ); } } @@ -2717,29 +2717,29 @@ void KisView::layerAdd() { KisImageSP img = currentImg(); if (img && img->activeLayer()) { - addLayer(img->activeLayer()->parent(), img->activeLayer()); + addLayer(img->activeLayer()->tqparent(), img->activeLayer()); } else if (img) addLayer(static_cast<KisGroupLayer*>(img->rootLayer().data()), 0); } -void KisView::addLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addLayer(KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (img) { KisConfig cfg; - QString profilename; + TQString profilename; if(img->colorSpace()->getProfile()) profilename = img->colorSpace()->getProfile()->productName(); NewLayerDialog dlg(img->colorSpace()->id(), profilename, img->nextLayerName(), this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisColorSpace* cs = KisMetaRegistry::instance()-> csRegistry() -> getColorSpace(dlg.colorSpaceID(),dlg.profileName()); KisLayerSP layer = new KisPaintLayer(img, dlg.layerName(), dlg.opacity(), cs); if (layer) { layer->setCompositeOp(dlg.compositeOp()); - img->addLayer(layer, parent.data(), above); + img->addLayer(layer, tqparent.data(), above); updateCanvas(); } else { KMessageBox::error(this, i18n("Could not add layer to image."), i18n("Layer Error")); @@ -2751,22 +2751,22 @@ void KisView::addLayer(KisGroupLayerSP parent, KisLayerSP above) } } -void KisView::addGroupLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addGroupLayer(KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (img) { - QString profilename; + TQString profilename; if(img->colorSpace()->getProfile()) profilename = img->colorSpace()->getProfile()->productName(); KisConfig cfg; NewLayerDialog dlg(img->colorSpace()->id(), profilename, img->nextLayerName(), this); dlg.setColorSpaceEnabled(false); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisLayerSP layer = new KisGroupLayer(img, dlg.layerName(), dlg.opacity()); if (layer) { layer->setCompositeOp(dlg.compositeOp()); - img->addLayer(layer, parent.data(), above); + img->addLayer(layer, tqparent.data(), above); updateCanvas(); } else { KMessageBox::error(this, i18n("Could not add layer to image."), i18n("Layer Error")); @@ -2783,35 +2783,35 @@ void KisView::addPartLayer() addPartLayer(img->rootLayer(), img->rootLayer()->firstChild(), m_actionPartLayer->documentEntry()); } -void KisView::addPartLayer(KisGroupLayerSP parent, KisLayerSP above, const KoDocumentEntry& entry) +void KisView::addPartLayer(KisGroupLayerSP tqparent, KisLayerSP above, const KoDocumentEntry& entry) { delete m_partHandler; // Only one at a time - m_partHandler = new KisPartLayerHandler(this, entry, parent, above); - - disconnect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), this, 0); - - connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), - m_partHandler, SLOT(gotButtonPressEvent(KisButtonPressEvent*))); - connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), - m_partHandler, SLOT(gotButtonReleaseEvent(KisButtonReleaseEvent*))); - connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - m_partHandler, SLOT(gotMoveEvent(KisMoveEvent*))); - connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - m_partHandler, SLOT(gotKeyPressEvent(QKeyEvent*))); - - connect(m_partHandler, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - connect(m_partHandler, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); - connect(m_partHandler, SIGNAL(handlerDone()), - this, SLOT(reconnectAfterPartInsert())); -} - -void KisView::insertPart(const QRect& viewRect, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above) { + m_partHandler = new KisPartLayerHandler(this, entry, tqparent, above); + + disconnect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), this, 0); + + connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), + m_partHandler, TQT_SLOT(gotButtonPressEvent(KisButtonPressEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), + m_partHandler, TQT_SLOT(gotButtonReleaseEvent(KisButtonReleaseEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + m_partHandler, TQT_SLOT(gotMoveEvent(KisMoveEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + m_partHandler, TQT_SLOT(gotKeyPressEvent(TQKeyEvent*))); + + connect(m_partHandler, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + connect(m_partHandler, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); + connect(m_partHandler, TQT_SIGNAL(handlerDone()), + this, TQT_SLOT(reconnectAfterPartInsert())); +} + +void KisView::insertPart(const TQRect& viewRect, const KoDocumentEntry& entry, + KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (!img) return; @@ -2822,27 +2822,27 @@ void KisView::insertPart(const QRect& viewRect, const KoDocumentEntry& entry, if ( !doc->showEmbedInitDialog(this) ) return; - QRect rect = viewToWindow(viewRect); + TQRect rect = viewToWindow(viewRect); KisChildDoc * childDoc = m_doc->createChildDoc(rect, doc); KisPartLayerImpl* partLayer = new KisPartLayerImpl(img, childDoc); partLayer->setDocType(entry.service()->genericName()); - img->addLayer(partLayer, parent, above); + img->addLayer(partLayer, tqparent, above); m_doc->setModified(true); reconnectAfterPartInsert(); } void KisView::reconnectAfterPartInsert() { - connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), - this, SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); - connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), - this, SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); - connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), + this, TQT_SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), + this, TQT_SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); delete m_partHandler; m_partHandler = 0; @@ -2853,12 +2853,12 @@ void KisView::addAdjustmentLayer() KisImageSP img = currentImg(); if (!img) return; - addAdjustmentLayer( img->activeLayer()->parent(), img->activeLayer() ); + addAdjustmentLayer( img->activeLayer()->tqparent(), img->activeLayer() ); } -void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above) { - Q_ASSERT(parent); + Q_ASSERT(tqparent); Q_ASSERT(above); KisImageSP img = currentImg(); @@ -2890,23 +2890,23 @@ void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above) } KisDlgAdjustmentLayer dlg(img, img->nextLayerName(), i18n("New Adjustment Layer"), this, "dlgadjustmentlayer"); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisSelectionSP selection = 0; if (dev->hasSelection()) { selection = dev->selection(); } KisFilterConfiguration * filter = dlg.filterConfiguration(); - QString name = dlg.layerName(); + TQString name = dlg.layerName(); - addAdjustmentLayer( parent, above, name, filter, selection); + addAdjustmentLayer( tqparent, above, name, filter, selection); } } -void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const QString & name, +void KisView::addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above, const TQString & name, KisFilterConfiguration * filter, KisSelectionSP selection) { - Q_ASSERT(parent); + Q_ASSERT(tqparent); Q_ASSERT(above); Q_ASSERT(filter); @@ -2914,7 +2914,7 @@ void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const if (!img) return; KisAdjustmentLayer * l = new KisAdjustmentLayer(img, name, filter, selection); - img->addLayer(l, parent, above); + img->addLayer(l, tqparent, above); } void KisView::slotChildActivated(bool a) { @@ -2943,8 +2943,8 @@ void KisView::layerRemove() img->removeLayer(layer); - if (layer->parent()) - layer->parent()->setDirty(layer->extent()); + if (layer->tqparent()) + layer->tqparent()->setDirty(layer->extent()); updateCanvas(); layerUpdateGUI(img->activeLayer() != 0); @@ -2965,8 +2965,8 @@ void KisView::layerDuplicate() return; KisLayerSP dup = active->clone(); - dup->setName(i18n("Duplicate of '%1'").arg(active->name())); - img->addLayer(dup, active->parent().data(), active); + dup->setName(i18n("Duplicate of '%1'").tqarg(active->name())); + img->addLayer(dup, active->tqparent().data(), active); if (dup) { img->activate( dup ); updateCanvas(); @@ -3079,26 +3079,26 @@ void KisView::scrollH(int value) if (xShift > 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, 0, xShift, m_canvasPixmap.height()); + TQRect drawRect(0, 0, xShift, m_canvasPixmap.height()); bitBlt(&m_canvasPixmap, xShift, 0, &m_canvasPixmap, 0, 0, m_canvasPixmap.width() - xShift, m_canvasPixmap.height()); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } else if (xShift < 0) { - QRect drawRect(m_canvasPixmap.width() + xShift, 0, -xShift, m_canvasPixmap.height()); + TQRect drawRect(m_canvasPixmap.width() + xShift, 0, -xShift, m_canvasPixmap.height()); if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { bitBlt(&m_canvasPixmap, 0, 0, &m_canvasPixmap, -xShift, 0, m_canvasPixmap.width() + xShift, m_canvasPixmap.height()); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } if (m_oldTool) { @@ -3124,26 +3124,26 @@ void KisView::scrollV(int value) if (yShift > 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, 0, m_canvasPixmap.width(), yShift); + TQRect drawRect(0, 0, m_canvasPixmap.width(), yShift); bitBlt(&m_canvasPixmap, 0, yShift, &m_canvasPixmap, 0, 0, m_canvasPixmap.width(), m_canvasPixmap.height() - yShift); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } else if (yShift < 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, m_canvasPixmap.height() + yShift, m_canvasPixmap.width(), -yShift); + TQRect drawRect(0, m_canvasPixmap.height() + yShift, m_canvasPixmap.width(), -yShift); bitBlt(&m_canvasPixmap, 0, 0, &m_canvasPixmap, 0, -yShift, m_canvasPixmap.width(), m_canvasPixmap.height() + yShift); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } if (m_oldTool) { @@ -3161,53 +3161,53 @@ void KisView::scrollV(int value) void KisView::setupCanvas() { m_canvas = new KisCanvas(this, "kis_canvas"); - m_canvas->setFocusPolicy( QWidget::StrongFocus ); - QObject::connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent*)), this, SLOT(canvasGotDoubleClickEvent(KisDoubleClickEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotPaintEvent(QPaintEvent*)), this, SLOT(canvasGotPaintEvent(QPaintEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotEnterEvent(QEvent*)), this, SLOT(canvasGotEnterEvent(QEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotLeaveEvent(QEvent*)), this, SLOT(canvasGotLeaveEvent(QEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotMouseWheelEvent(QWheelEvent*)), this, SLOT(canvasGotMouseWheelEvent(QWheelEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotKeyReleaseEvent(QKeyEvent*)), this, SLOT(canvasGotKeyReleaseEvent(QKeyEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDragEnterEvent(QDragEnterEvent*)), this, SLOT(canvasGotDragEnterEvent(QDragEnterEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDropEvent(QDropEvent*)), this, SLOT(canvasGotDropEvent(QDropEvent*))); + m_canvas->setFocusPolicy( TQ_StrongFocus ); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, TQT_SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, TQT_SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent*)), this, TQT_SLOT(canvasGotDoubleClickEvent(KisDoubleClickEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotPaintEvent(TQPaintEvent*)), this, TQT_SLOT(canvasGotPaintEvent(TQPaintEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotEnterEvent(TQEvent*)), this, TQT_SLOT(canvasGotEnterEvent(TQEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotLeaveEvent(TQEvent*)), this, TQT_SLOT(canvasGotLeaveEvent(TQEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotMouseWheelEvent(TQWheelEvent*)), this, TQT_SLOT(canvasGotMouseWheelEvent(TQWheelEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotKeyReleaseEvent(TQKeyEvent*)), this, TQT_SLOT(canvasGotKeyReleaseEvent(TQKeyEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDragEnterEvent(TQDragEnterEvent*)), this, TQT_SLOT(canvasGotDragEnterEvent(TQDragEnterEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDropEvent(TQDropEvent*)), this, TQT_SLOT(canvasGotDropEvent(TQDropEvent*))); } void KisView::connectCurrentImg() { if (m_image) { - connect(m_image, SIGNAL(sigActiveSelectionChanged(KisImageSP)), m_selectionManager, SLOT(imgSelectionChanged(KisImageSP))); - connect(m_image, SIGNAL(sigActiveSelectionChanged(KisImageSP)), this, SLOT(updateCanvas())); - connect(m_image, SIGNAL(sigColorSpaceChanged(KisColorSpace *)), this, SLOT(updateStatusBarProfileLabel())); - connect(m_image, SIGNAL(sigProfileChanged(KisProfile * )), SLOT(profileChanged(KisProfile * ))); - - connect(m_image, SIGNAL(sigLayersChanged(KisGroupLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigMaskInfoChanged()), SLOT(maskUpdated())); - connect(m_image, SIGNAL(sigLayerAdded(KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerActivated(KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerActivated(KisLayerSP)), SLOT(updateCanvas())); - connect(m_image, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigActiveSelectionChanged(KisImageSP)), m_selectionManager, TQT_SLOT(imgSelectionChanged(KisImageSP))); + connect(m_image, TQT_SIGNAL(sigActiveSelectionChanged(KisImageSP)), this, TQT_SLOT(updateCanvas())); + connect(m_image, TQT_SIGNAL(sigColorSpaceChanged(KisColorSpace *)), this, TQT_SLOT(updateStatusBarProfileLabel())); + connect(m_image, TQT_SIGNAL(sigProfileChanged(KisProfile * )), TQT_SLOT(profileChanged(KisProfile * ))); + + connect(m_image, TQT_SIGNAL(sigLayersChanged(KisGroupLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigMaskInfoChanged()), TQT_SLOT(tqmaskUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), TQT_SLOT(updateCanvas())); + connect(m_image, TQT_SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), TQT_SLOT(layersUpdated())); KisConnectPartLayerVisitor v(m_image, this, true); m_image->rootLayer()->accept(v); - connect(m_image, SIGNAL(sigLayerAdded(KisLayerSP)), - SLOT(handlePartLayerAdded(KisLayerSP))); + connect(m_image, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), + TQT_SLOT(handlePartLayerAdded(KisLayerSP))); - maskUpdated(); + tqmaskUpdated(); #ifdef HAVE_GL if (m_OpenGLImageContext != 0) { - connect(m_OpenGLImageContext, SIGNAL(sigImageUpdated(QRect)), SLOT(slotOpenGLImageUpdated(QRect))); - connect(m_OpenGLImageContext, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_OpenGLImageContext, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(slotOpenGLImageUpdated(TQRect))); + connect(m_OpenGLImageContext, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); } else #endif { - connect(m_image, SIGNAL(sigImageUpdated(QRect)), SLOT(imgUpdated(QRect))); - connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(imgUpdated(TQRect))); + connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); } } @@ -3239,16 +3239,16 @@ void KisView::handlePartLayerAdded(KisLayerSP layer) if (!l) return; - connect(this, SIGNAL(childActivated(KoDocumentChild*)), - layer, SLOT(childActivated(KoDocumentChild*))); + connect(this, TQT_SIGNAL(childActivated(KoDocumentChild*)), + layer, TQT_SLOT(childActivated(KoDocumentChild*))); } -void KisView::imgUpdated(QRect rc) +void KisView::imgUpdated(TQRect rc) { updateCanvas(rc); } -void KisView::slotOpenGLImageUpdated(QRect rc) +void KisView::slotOpenGLImageUpdated(TQRect rc) { paintOpenGLView(windowToView(rc)); } @@ -3258,13 +3258,13 @@ void KisView::profileChanged(KisProfile * /*profile*/) updateStatusBarProfileLabel(); } -void KisView::slotImageSizeChanged(Q_INT32 /*w*/, Q_INT32 /*h*/) +void KisView::slotImageSizeChanged(TQ_INT32 /*w*/, TQ_INT32 /*h*/) { resizeEvent(0); refreshKisCanvas(); } -void KisView::resizeCurrentImage(Q_INT32 w, Q_INT32 h, bool cropLayers) +void KisView::resizeCurrentImage(TQ_INT32 w, TQ_INT32 h, bool cropLayers) { if (!currentImg()) return; @@ -3298,9 +3298,9 @@ void KisView::shearCurrentImage(double angleX, double angleY) } -QPoint KisView::viewToWindow(const QPoint& pt) +TQPoint KisView::viewToWindow(const TQPoint& pt) { - QPoint converted; + TQPoint converted; converted.rx() = static_cast<int>((pt.x() + horzValue()) / zoom()); converted.ry() = static_cast<int>((pt.y() + vertValue()) / zoom()); @@ -3308,9 +3308,9 @@ QPoint KisView::viewToWindow(const QPoint& pt) return converted; } -QPoint KisView::viewToWindow(const QPoint& pt) const +TQPoint KisView::viewToWindow(const TQPoint& pt) const { - QPoint converted; + TQPoint converted; converted.rx() = static_cast<int>((pt.x() + horzValue()) / zoom()); converted.ry() = static_cast<int>((pt.y() + vertValue()) / zoom()); @@ -3328,9 +3328,9 @@ KisPoint KisView::viewToWindow(const KisPoint& pt) return converted; } -QRect KisView::viewToWindow(const QRect& rc) +TQRect KisView::viewToWindow(const TQRect& rc) { - QRect r; + TQRect r; r.setTopLeft(viewToWindow(rc.topLeft())); r.setRight((int)(ceil((rc.right() + 1.0 + horzValue()) / zoom()) - 1)); @@ -3351,27 +3351,27 @@ KisRect KisView::viewToWindow(const KisRect& rc) return r; } -void KisView::viewToWindow(Q_INT32 *x, Q_INT32 *y) +void KisView::viewToWindow(TQ_INT32 *x, TQ_INT32 *y) { if (x && y) { - QPoint p = viewToWindow(QPoint(*x, *y)); + TQPoint p = viewToWindow(TQPoint(*x, *y)); *x = p.x(); *y = p.y(); } } -QPoint KisView::windowToView(const QPoint& pt) +TQPoint KisView::windowToView(const TQPoint& pt) { - QPoint p; + TQPoint p; p.setX(static_cast<int>(pt.x() * zoom() - horzValue())); p.setY(static_cast<int>(pt.y() * zoom() - vertValue())); return p; } -QPoint KisView::windowToView(const QPoint& pt) const +TQPoint KisView::windowToView(const TQPoint& pt) const { - QPoint p; + TQPoint p; p.setX(static_cast<int>(pt.x() * zoom() - horzValue())); p.setY(static_cast<int>(pt.y() * zoom() - vertValue())); @@ -3387,9 +3387,9 @@ KisPoint KisView::windowToView(const KisPoint& pt) return p; } -QRect KisView::windowToView(const QRect& rc) +TQRect KisView::windowToView(const TQRect& rc) { - QRect r; + TQRect r; r.setTopLeft(windowToView(rc.topLeft())); r.setRight((int)(ceil((rc.right() + 1.0) * zoom()) - horzValue() - 1)); @@ -3410,10 +3410,10 @@ KisRect KisView::windowToView(const KisRect& rc) return r; } -void KisView::windowToView(Q_INT32 *x, Q_INT32 *y) +void KisView::windowToView(TQ_INT32 *x, TQ_INT32 *y) { if (x && y) { - QPoint p = windowToView(QPoint(*x, *y)); + TQPoint p = windowToView(TQPoint(*x, *y)); *x = p.x(); *y = p.y(); } @@ -3439,29 +3439,29 @@ void KisView::guiActivateEvent(KParts::GUIActivateEvent *event) super::guiActivateEvent(event); } -bool KisView::eventFilter(QObject *o, QEvent *e) +bool KisView::eventFilter(TQObject *o, TQEvent *e) { Q_ASSERT(o); Q_ASSERT(e); switch (e->type()) { - case QEvent::TabletMove: - case QEvent::TabletPress: - case QEvent::TabletRelease: + case TQEvent::TabletMove: + case TQEvent::TabletPress: + case TQEvent::TabletRelease: { - QTabletEvent *te = static_cast<QTabletEvent *>(e); + TQTabletEvent *te = static_cast<TQTabletEvent *>(e); KisInputDevice device; switch (te->device()) { default: - case QTabletEvent::Stylus: - case QTabletEvent::NoDevice: + case TQTabletEvent::Stylus: + case TQTabletEvent::NoDevice: device = KisInputDevice::stylus(); break; - case QTabletEvent::Puck: + case TQTabletEvent::Puck: device = KisInputDevice::puck(); break; - case QTabletEvent::Eraser: + case TQTabletEvent::Eraser: device = KisInputDevice::eraser(); break; } @@ -3470,13 +3470,13 @@ bool KisView::eventFilter(QObject *o, QEvent *e) // We ignore device change due to mouse events for a short duration // after a tablet event, since these are almost certainly mouse events - // sent to receivers that don't accept the tablet event. + // sent to tqreceivers that don't accept the tablet event. m_tabletEventTimer.start(); break; } - case QEvent::MouseButtonPress: - case QEvent::MouseMove: - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonPress: + case TQEvent::MouseMove: + case TQEvent::MouseButtonRelease: { #ifdef EXTENDED_X11_TABLET_SUPPORT KisInputDevice device = KisCanvasWidget::findActiveInputDevice(); @@ -3493,8 +3493,8 @@ bool KisView::eventFilter(QObject *o, QEvent *e) } break; } - case QEvent::KeyPress: - case QEvent::KeyRelease: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: { if (m_canvas->cursorIsOverCanvas()) { m_canvas->handleKeyEvent(e); @@ -3507,17 +3507,17 @@ bool KisView::eventFilter(QObject *o, QEvent *e) // This eventFilter is called for all widgets already, no need to install event filters multiple times // Even worse: with multiple views, they would all install event filters on each other's widgets, // due to the qapp event filter triggering in all views! - case QEvent::ChildInserted: + case TQEvent::ChildInserted: { - QChildEvent *childEvent = static_cast<QChildEvent *>(e); - QObject *child = childEvent->child(); + TQChildEvent *childEvent = static_cast<TQChildEvent *>(e); + TQObject *child = childEvent->child(); if ( child->isWidgetType() ) { child->installEventFilter(this); - QObjectList *objectList = child->queryList("QWidget"); - QObjectListIt it(*objectList); - QObject *obj; + TQObjectList *objectList = child->queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectListIt it(*objectList); + TQObject *obj; while ((obj = it.current()) != 0) { obj->installEventFilter(this); ++it; @@ -3532,9 +3532,9 @@ bool KisView::eventFilter(QObject *o, QEvent *e) } #if 0 - if ((o == m_hRuler || o == m_vRuler) && (e->type() == QEvent::MouseMove || e->type() == QEvent::MouseButtonRelease)) { - QMouseEvent *me = dynamic_cast<QMouseEvent*>(e); - QPoint pt = mapFromGlobal(me->globalPos()); + if ((o == m_hRuler || o == m_vRuler) && (e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseButtonRelease)) { + TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(e); + TQPoint pt = mapFromGlobal(me->globalPos()); KisImageSP img = currentImg(); KisGuideMgr *mgr; @@ -3543,8 +3543,8 @@ bool KisView::eventFilter(QObject *o, QEvent *e) mgr = img->guides(); - if (e->type() == QEvent::MouseMove && (me->state() & Qt::LeftButton)) { - bool flag = geometry().contains(pt); + if (e->type() == TQEvent::MouseMove && (me->state() & Qt::LeftButton)) { + bool flag = tqgeometry().tqcontains(pt); KisGuideSP gd; if (m_currentGuide == 0 && flag) { @@ -3576,7 +3576,7 @@ bool KisView::eventFilter(QObject *o, QEvent *e) m_currentGuide = 0; } } - } else if (e->type() == QEvent::MouseButtonRelease && m_currentGuide) { + } else if (e->type() == TQEvent::MouseButtonRelease && m_currentGuide) { eraseGuides(); mgr->unselect(m_currentGuide); paintGuides(); @@ -3627,9 +3627,9 @@ void KisView::updateGuides() //{ //} -QPoint KisView::mapToScreen(const QPoint& pt) +TQPoint KisView::mapToScreen(const TQPoint& pt) { - QPoint converted; + TQPoint converted; converted.rx() = pt.x() + horzValue(); converted.ry() = pt.y() + vertValue(); @@ -3647,7 +3647,7 @@ void KisView::detach(KisCanvasObserver *observer) { Q_ASSERT(observer); if (observer) { - vKisCanvasObserver_it it = std::find(m_observers.begin(), m_observers.end(), observer); + vKisCanvasObserver_it it = std::tqfind(m_observers.begin(), m_observers.end(), observer); if (it != m_observers.end()) m_observers.erase(it); @@ -3759,10 +3759,10 @@ KisProgressDisplayInterface *KisView::progressDisplay() const return m_progress; } -QCursor KisView::setCanvasCursor(const QCursor & cursor) +TQCursor KisView::setCanvasCursor(const TQCursor & cursor) { - QCursor oldCursor = m_canvas->cursor(); - QCursor newCursor; + TQCursor oldCursor = m_canvas->cursor(); + TQCursor newCursor; KisConfig cfg; @@ -3811,51 +3811,51 @@ void KisView::createDockers() m_hsvwidget = new KoHSVWidget(this, "hsv"); m_hsvwidget->setCaption(i18n("HSV")); - connect(m_hsvwidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_hsvwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setBgColor(const QColor &))); + connect(m_hsvwidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_hsvwidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_hsvwidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_hsvwidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_hsvwidget, "hsvwidget", krita::COLORBOX, 0, PALETTE_DOCKER, true); m_rgbwidget = new KoRGBWidget(this, "rgb"); m_rgbwidget->setCaption(i18n("RGB")); - connect(m_rgbwidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_rgbwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setBgColor(const QColor &))); + connect(m_rgbwidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_rgbwidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_rgbwidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_rgbwidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_rgbwidget, "rgbwidget", krita::COLORBOX); m_graywidget = new KoGrayWidget(this, "gray"); m_graywidget->setCaption(i18n("Gray")); - connect(m_graywidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_graywidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_graywidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_graywidget, SLOT(setBgColor(const QColor &))); + connect(m_graywidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_graywidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_graywidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_graywidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_graywidget, "graywidget", krita::COLORBOX); //make sure the color chooser get right default values - emit sigFGQColorChanged(m_fg.toQColor()); - emit sigBGQColorChanged(m_bg.toQColor()); + emit sigFGTQColorChanged(m_fg.toTQColor()); + emit sigBGTQColorChanged(m_bg.toTQColor()); m_palettewidget = new KisPaletteWidget(this); m_palettewidget->setCaption(i18n("Palettes")); - connect(m_palettewidget, SIGNAL(colorSelected(const QColor &)), - this, SLOT(slotSetFGQColor(const QColor &))); + connect(m_palettewidget, TQT_SIGNAL(colorSelected(const TQColor &)), + this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); // No BGColor or reverse slotFGChanged->palette connections, since that's not useful here KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("PaletteServer"); - QValueList<KisResource*> resources = rServer->resources(); - QValueList<KisResource*>::iterator it; + TQValueList<KisResource*> resources = rServer->resources(); + TQValueList<KisResource*>::iterator it; for ( it = resources.begin(); it != resources.end(); ++it ) { m_palettewidget->slotAddPalette( *it ); } - connect(m_palettewidget, SIGNAL(colorSelected(const KisColor &)), this, SLOT(slotSetFGColor(const KisColor &))); + connect(m_palettewidget, TQT_SIGNAL(colorSelected(const KisColor &)), this, TQT_SLOT(slotSetFGColor(const KisColor &))); m_paletteManager->addWidget( m_palettewidget, "palettewidget", krita::COLORBOX, 10, PALETTE_DOCKER, true); } -QPoint KisView::applyViewTransformations(const QPoint& p) const { - QPoint point(windowToView(p)); +TQPoint KisView::applyViewTransformations(const TQPoint& p) const { + TQPoint point(windowToView(p)); if (m_hRuler->isShown()) point.ry() += m_hRuler->height(); @@ -3865,11 +3865,11 @@ QPoint KisView::applyViewTransformations(const QPoint& p) const { return point; } -QPoint KisView::reverseViewTransformations(const QPoint& p) const { +TQPoint KisView::reverseViewTransformations(const TQPoint& p) const { // Since we now zoom ourselves, the only thing super::~ does is nothing anymore. // Hence, zoom ourselves, like super would // viewToWindow doesn't take the rulers into account, do that ourselves - QPoint point(p); + TQPoint point(p); if (m_hRuler -> isShown()) point.ry() -= m_hRuler -> height(); if (m_vRuler -> isShown()) @@ -3880,7 +3880,7 @@ QPoint KisView::reverseViewTransformations(const QPoint& p) const { void KisView::canvasAddChild(KoViewChild *child) { super::canvasAddChild(child); - connect(this, SIGNAL(viewTransformationsChanged()), child, SLOT(reposition())); + connect(this, TQT_SIGNAL(viewTransformationsChanged()), child, TQT_SLOT(reposition())); m_vScroll->raise(); m_hScroll->raise(); m_vScroll->raise(); @@ -3894,7 +3894,7 @@ void KisView::slotLoadingFinished() setCurrentImage(document()->currentImage()); m_paletteManager->showWidget( "layerbox" ); m_canvas->show(); - disconnect(document(), SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + disconnect(document(), TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); m_imageLoaded = true; startInitialZoomTimerIfReady(); @@ -3933,7 +3933,7 @@ void KisView::slotMaskFromSelection() { if (!layer) return; - KNamedCommand *cmd = layer->maskFromSelectionCommand(); + KNamedCommand *cmd = layer->tqmaskFromSelectionCommand(); cmd->execute(); if (undoAdapter() && undoAdapter()->undo()) { undoAdapter()->addCommand(cmd); @@ -3945,7 +3945,7 @@ void KisView::slotMaskToSelection() { if (!layer) return; - KNamedCommand *cmd = layer->maskToSelectionCommand(); + KNamedCommand *cmd = layer->tqmaskToSelectionCommand(); cmd->execute(); if (undoAdapter() && undoAdapter()->undo()) { undoAdapter()->addCommand(cmd); @@ -3992,7 +3992,7 @@ void KisView::slotShowMask() { layer->setRenderMask(m_showMask->isChecked()); } -void KisView::maskUpdated() { +void KisView::tqmaskUpdated() { KisPaintLayer* layer = dynamic_cast<KisPaintLayer*>(currentImg()->activeLayer().data()); if (!layer) { m_createMask->setEnabled(false); @@ -4003,8 +4003,8 @@ void KisView::maskUpdated() { return; } m_createMask->setEnabled(!layer->hasMask()); - m_maskFromSelection->setEnabled(true); // Perhaps also update this to false when no selection? - m_maskToSelection->setEnabled(layer->hasMask()); + m_tqmaskFromSelection->setEnabled(true); // Perhaps also update this to false when no selection? + m_tqmaskToSelection->setEnabled(layer->hasMask()); m_applyMask->setEnabled(layer->hasMask()); m_removeMask->setEnabled(layer->hasMask()); diff --git a/krita/ui/kis_view.h b/krita/ui/kis_view.h index 71d97017..134d934a 100644 --- a/krita/ui/kis_view.h +++ b/krita/ui/kis_view.h @@ -29,10 +29,10 @@ #include <list> -#include <qdatetime.h> -#include <qpixmap.h> -#include <qstringlist.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqpixmap.h> +#include <tqstringlist.h> +#include <tqtimer.h> #include <ksqueezedtextlabel.h> #include <kdebug.h> @@ -52,13 +52,13 @@ #include "kis_color.h" #include "kis_input_device.h" -class QButton; -class QLabel; -class QPaintEvent; -class QScrollBar; -class QWidget; -class QPopup; -class QPopupMenu; +class TQButton; +class TQLabel; +class TQPaintEvent; +class TQScrollBar; +class TQWidget; +class TQPopup; +class TQPopupMenu; class DCOPObject; class KAction; @@ -118,6 +118,7 @@ class KRITA_EXPORT KisView { Q_OBJECT + TQ_OBJECT typedef KoView super; @@ -126,16 +127,16 @@ class KRITA_EXPORT KisView typedef vKisCanvasObserver::const_iterator vKisCanvasObserver_cit; public: - KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent = 0, const char *name = 0); + KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *tqparent = 0, const char *name = 0); virtual ~KisView(); public: // KXMLGUIBuilder implementation - virtual QWidget *createContainer( QWidget *parent, int index, const QDomElement &element, int &id ); - virtual void removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id ); + virtual TQWidget *createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ); + virtual void removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id ); public: // KoView implementation - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); virtual DCOPObject* dcopObject(); @@ -150,13 +151,13 @@ public: // KoView implementation virtual int topBorder() const; virtual int bottomBorder() const; - Q_INT32 docWidth() const; - Q_INT32 docHeight() const; + TQ_INT32 docWidth() const; + TQ_INT32 docHeight() const; void updateStatusBarSelectionLabel(); - virtual QPoint applyViewTransformations(const QPoint& p) const; - virtual QPoint reverseViewTransformations( const QPoint& p) const; + virtual TQPoint applyViewTransformations(const TQPoint& p) const; + virtual TQPoint reverseViewTransformations( const TQPoint& p) const; virtual void canvasAddChild(KoViewChild *child); signals: @@ -170,10 +171,10 @@ signals: * changed. **/ void currentColorSpaceChanged(KisColorSpace* cs); - void cursorPosition(Q_INT32 xpos, Q_INT32 ypos); + void cursorPosition(TQ_INT32 xpos, TQ_INT32 ypos); - void sigFGQColorChanged(const QColor &); - void sigBGQColorChanged(const QColor &); + void sigFGTQColorChanged(const TQColor &); + void sigBGTQColorChanged(const TQColor &); void sigInputDeviceChanged(const KisInputDevice& inputDevice); @@ -211,15 +212,15 @@ public slots: public: - virtual void mouseMoveEvent(QMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); - void resizeCurrentImage(Q_INT32 w, Q_INT32 h, bool cropLayers = false); + void resizeCurrentImage(TQ_INT32 w, TQ_INT32 h, bool cropLayers = false); void scaleCurrentImage(double sx, double sy, KisFilterStrategy *filterStrategy); void rotateCurrentImage(double radians); void shearCurrentImage(double angleX, double angleY); - void insertPart(const QRect& viewRect, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above); + void insertPart(const TQRect& viewRect, const KoDocumentEntry& entry, + KisGroupLayerSP tqparent, KisLayerSP above); /** * Import an image as a layer. If there is more than @@ -229,13 +230,13 @@ public: * @param url the url to the image file * @return the number of layers added */ - Q_INT32 importImage(const KURL& url = KURL()); + TQ_INT32 importImage(const KURL& url = KURL()); protected: - virtual void resizeEvent(QResizeEvent*); // From QWidget - virtual void styleChange(QStyle& oldStyle); // From QWidget - virtual void paletteChange(const QPalette& oldPalette); // From QWidget - virtual void showEvent(QShowEvent *); + virtual void resizeEvent(TQResizeEvent*); // From TQWidget + virtual void styleChange(TQStyle& oldStyle); // From TQWidget + virtual void paletteChange(const TQPalette& oldPalette); // From TQWidget + virtual void showEvent(TQShowEvent *); protected slots: virtual void slotChildActivated(bool a); // from KoView @@ -309,40 +310,40 @@ private slots: private: virtual KisCanvas *kiscanvas() const; - virtual Q_INT32 horzValue() const; - virtual Q_INT32 vertValue() const; + virtual TQ_INT32 horzValue() const; + virtual TQ_INT32 vertValue() const; - virtual void scrollTo(Q_INT32 x, Q_INT32 y); + virtual void scrollTo(TQ_INT32 x, TQ_INT32 y); - virtual void updateCanvas(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - virtual void updateCanvas(const QRect& imageRect); + virtual void updateCanvas(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + virtual void updateCanvas(const TQRect& imageRect); virtual void zoomIn(); - virtual void zoomIn(Q_INT32 x, Q_INT32 y); + virtual void zoomIn(TQ_INT32 x, TQ_INT32 y); virtual void zoomOut(); - virtual void zoomOut(Q_INT32 x, Q_INT32 y); + virtual void zoomOut(TQ_INT32 x, TQ_INT32 y); - virtual void zoomTo(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); - virtual void zoomTo(const QRect& r); + virtual void zoomTo(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h); + virtual void zoomTo(const TQRect& r); virtual void zoomTo(const KisRect& r); virtual void zoomAroundPoint(double x, double y, double zf); - virtual QPoint viewToWindow(const QPoint& pt); - virtual QPoint viewToWindow(const QPoint& pt) const; + virtual TQPoint viewToWindow(const TQPoint& pt); + virtual TQPoint viewToWindow(const TQPoint& pt) const; virtual KisPoint viewToWindow(const KisPoint& pt); - virtual QRect viewToWindow(const QRect& rc); + virtual TQRect viewToWindow(const TQRect& rc); virtual KisRect viewToWindow(const KisRect& rc); - virtual void viewToWindow(Q_INT32 *x, Q_INT32 *y); + virtual void viewToWindow(TQ_INT32 *x, TQ_INT32 *y); - virtual QPoint windowToView(const QPoint& pt); - virtual QPoint windowToView(const QPoint& pt) const; + virtual TQPoint windowToView(const TQPoint& pt); + virtual TQPoint windowToView(const TQPoint& pt) const; virtual KisPoint windowToView(const KisPoint& pt); - virtual QRect windowToView(const QRect& rc); + virtual TQRect windowToView(const TQRect& rc); virtual KisRect windowToView(const KisRect& rc); - virtual void windowToView(Q_INT32 *x, Q_INT32 *y); + virtual void windowToView(TQ_INT32 *x, TQ_INT32 *y); - virtual QCursor setCanvasCursor(const QCursor & cursor); + virtual TQCursor setCanvasCursor(const TQCursor & cursor); void setInputDevice(KisInputDevice inputDevice); KisInputDevice currentInputDevice() const; @@ -366,13 +367,13 @@ private: void createLayerBox(); void createDockers(); - void paintToolOverlay(const QRegion& region); + void paintToolOverlay(const TQRegion& region); - void paintQPaintDeviceView(const QRegion& canvasRegion); - void paintOpenGLView(const QRect& canvasRect); + void paintTQPaintDeviceView(const TQRegion& canvasRegion); + void paintOpenGLView(const TQRect& canvasRect); - void updateQPaintDeviceCanvas(const QRect& imageRect); - void updateOpenGLCanvas(const QRect& imageRect); + void updateTQPaintDeviceCanvas(const TQRect& imageRect); + void updateOpenGLCanvas(const TQRect& imageRect); /** * Update the whole of the KisCanvas, including areas outside the image. @@ -427,13 +428,13 @@ private: private slots: void layersUpdated(); // Used in the channel separation to notify the view that we have added a few layers. - void maskUpdated(); // To update the enabled or disabled status of the mask entries + void tqmaskUpdated(); // To update the enabled or disabled status of the tqmask entries - void slotSetFGQColor(const QColor & c); - void slotSetBGQColor(const QColor & c); + void slotSetFGTQColor(const TQColor & c); + void slotSetBGTQColor(const TQColor & c); - void imgUpdated(QRect rc); - void slotOpenGLImageUpdated(QRect rc); + void imgUpdated(TQRect rc); + void slotOpenGLImageUpdated(TQRect rc); void imgResizeToActiveLayer(); @@ -441,18 +442,18 @@ private slots: void canvasGotButtonPressEvent(KisButtonPressEvent *e); void canvasGotButtonReleaseEvent(KisButtonReleaseEvent *e); void canvasGotDoubleClickEvent(KisDoubleClickEvent *e); - void canvasGotPaintEvent(QPaintEvent *e); - void canvasGotEnterEvent(QEvent *e); - void canvasGotLeaveEvent(QEvent *e); - void canvasGotMouseWheelEvent(QWheelEvent *e); - void canvasGotKeyPressEvent(QKeyEvent*); - void canvasGotKeyReleaseEvent(QKeyEvent*); - void canvasGotDragEnterEvent(QDragEnterEvent*); - void canvasGotDropEvent(QDropEvent*); + void canvasGotPaintEvent(TQPaintEvent *e); + void canvasGotEnterEvent(TQEvent *e); + void canvasGotLeaveEvent(TQEvent *e); + void canvasGotMouseWheelEvent(TQWheelEvent *e); + void canvasGotKeyPressEvent(TQKeyEvent*); + void canvasGotKeyReleaseEvent(TQKeyEvent*); + void canvasGotDragEnterEvent(TQDragEnterEvent*); + void canvasGotDropEvent(TQDropEvent*); void reconnectAfterPartInsert(); - QPoint mapToScreen(const QPoint& pt); + TQPoint mapToScreen(const TQPoint& pt); void slotImageProperties(); void layerCompositeOp(const KisCompositeOp& compositeOp); @@ -465,13 +466,13 @@ private slots: void layerProperties(); void showLayerProperties(KisLayerSP layer); void layerAdd(); - void addLayer(KisGroupLayerSP parent, KisLayerSP above); - void addGroupLayer(KisGroupLayerSP parent, KisLayerSP above); + void addLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void addGroupLayer(KisGroupLayerSP tqparent, KisLayerSP above); void addPartLayer(); - void addPartLayer(KisGroupLayerSP parent, KisLayerSP above, const KoDocumentEntry& entry); + void addPartLayer(KisGroupLayerSP tqparent, KisLayerSP above, const KoDocumentEntry& entry); void addAdjustmentLayer(); - void addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above); - void addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const QString & name, KisFilterConfiguration * filter, KisSelectionSP selection = 0); + void addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above); + void addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above, const TQString & name, KisFilterConfiguration * filter, KisSelectionSP selection = 0); void layerRemove(); void layerDuplicate(); void layerRaise(); @@ -491,7 +492,7 @@ private slots: void slotActualSize(); void slotFitToCanvas(); - void slotImageSizeChanged(Q_INT32 w, Q_INT32 h); + void slotImageSizeChanged(TQ_INT32 w, TQ_INT32 h); void scrollH(int value); void scrollV(int value); @@ -504,7 +505,7 @@ private slots: void preferences(); - void slotAutoScroll(const QPoint &p); + void slotAutoScroll(const TQPoint &p); void handlePartLayerAdded(KisLayerSP layer); @@ -534,9 +535,9 @@ private: // Fringe benefits KisRuler *m_hRuler; KisRuler *m_vRuler; - Q_INT32 m_rulerThickness; - Q_INT32 m_vScrollBarExtent; - Q_INT32 m_hScrollBarExtent; + TQ_INT32 m_rulerThickness; + TQ_INT32 m_vScrollBarExtent; + TQ_INT32 m_hScrollBarExtent; // Actions KAction *m_imgFlatten; @@ -559,8 +560,8 @@ private: KAction *m_layerTop; KAction *m_createMask; - KAction *m_maskFromSelection; - KAction *m_maskToSelection; + KAction *m_tqmaskFromSelection; + KAction *m_tqmaskToSelection; KAction *m_applyMask; KAction *m_removeMask; KToggleAction *m_editMask; @@ -581,8 +582,8 @@ private: DCOPObject *m_dcop; // Widgets - QScrollBar *m_hScroll; // XXX: the sizing of the scrollthumbs - QScrollBar *m_vScroll; // is not right yet. + TQScrollBar *m_hScroll; // XXX: the sizing of the scrollthumbs + TQScrollBar *m_vScroll; // is not right yet. int m_scrollX; int m_scrollY; int m_canvasXOffset; @@ -593,14 +594,14 @@ private: bool m_showEventReceived; bool m_imageLoaded; - QTimer m_initialZoomTimer; + TQTimer m_initialZoomTimer; // KisGuideSP m_currentGuide; -// QPoint m_lastGuidePoint; +// TQPoint m_lastGuidePoint; KisUndoAdapter *m_adapter; vKisCanvasObserver m_observers; - QLabel *m_statusBarZoomLabel; + TQLabel *m_statusBarZoomLabel; KSqueezedTextLabel *m_statusBarSelectionLabel; KSqueezedTextLabel *m_statusBarProfileLabel; KisLabelProgress *m_progress; @@ -622,10 +623,10 @@ private: KisID m_paintop; const KisPaintOpSettings *m_paintopSettings; - QTime m_tabletEventTimer; - QTabletEvent::TabletDevice m_lastTabletEventDevice; + TQTime m_tabletEventTimer; + TQTabletEvent::TabletDevice m_lastTabletEventDevice; - QPixmap m_canvasPixmap; + TQPixmap m_canvasPixmap; bool m_toolIsPainting; #ifdef HAVE_GL diff --git a/krita/ui/kis_view_iface.h b/krita/ui/kis_view_iface.h index 0cc9b79d..5a9cd360 100644 --- a/krita/ui/kis_view_iface.h +++ b/krita/ui/kis_view_iface.h @@ -21,7 +21,7 @@ #include <KoViewIface.h> -#include <qstring.h> +#include <tqstring.h> class KisView; diff --git a/krita/ui/kobirdeyepanel.cpp b/krita/ui/kobirdeyepanel.cpp index fda95945..c3091680 100644 --- a/krita/ui/kobirdeyepanel.cpp +++ b/krita/ui/kobirdeyepanel.cpp @@ -17,15 +17,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpixmap.h> -#include <qimage.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qframe.h> -#include <qlabel.h> -#include <qtoolbutton.h> -#include <qslider.h> -#include <qcursor.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqtoolbutton.h> +#include <tqslider.h> +#include <tqcursor.h> #include <kdebug.h> #include <kglobalsettings.h> @@ -52,33 +52,33 @@ KoThumbnailAdapter::~KoThumbnailAdapter() {} KoBirdEyePanel::KoBirdEyePanel( KoZoomAdapter * zoomListener, KoThumbnailAdapter * thumbnailProvider, KoCanvasAdapter * canvas, - QWidget * parent, + TQWidget * tqparent, const char * name, WFlags f) - : QWidget(parent, name, f) + : TQWidget(tqparent, name, f) , m_zoomListener(zoomListener) , m_thumbnailProvider(thumbnailProvider) , m_canvas(canvas) , m_dragging(false) { - QHBoxLayout * l = new QHBoxLayout(this); + TQHBoxLayout * l = new TQHBoxLayout(this); m_page = new WdgBirdEye(this); - m_page->zoom->setRange((int) (QMAX(1, 100 * zoomListener->getMinZoom())), (int) (100 * zoomListener->getMaxZoom())); + m_page->zoom->setRange((int) (TQMAX(1, 100 * zoomListener->getMinZoom())), (int) (100 * zoomListener->getMaxZoom())); m_page->zoom->setValue(100); m_page->zoom->setSuffix("%"); m_page->toolbar->setIconSize(16); m_page->view->installEventFilter(this); - m_page->view->setBackgroundMode(Qt::NoBackground); + m_page->view->setBackgroundMode(TQt::NoBackground); - m_zoomIn = new KAction( i18n("Zoom In"), "birdeye_zoom_plus", 0, this, SLOT(zoomPlus()), this, "zoomIn" ); - m_zoomOut = new KAction( i18n("Zoom Out"), "birdeye_zoom_minus", 0, this, SLOT(zoomMinus()), this, "zoomOut" ); + m_zoomIn = new KAction( i18n("Zoom In"), "birdeye_zoom_plus", 0, this, TQT_SLOT(zoomPlus()), this, "zoomIn" ); + m_zoomOut = new KAction( i18n("Zoom Out"), "birdeye_zoom_minus", 0, this, TQT_SLOT(zoomMinus()), this, "zoomOut" ); l->addWidget(m_page); - connect(m_page->zoom, SIGNAL(valueChanged(int)), SLOT(zoomValueChanged(int))); - connect(m_page->bn100, SIGNAL(clicked()), SLOT(zoom100())); - connect(m_page->slZoom, SIGNAL(valueChanged(int)), SLOT(sliderChanged( int ))); + connect(m_page->zoom, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(zoomValueChanged(int))); + connect(m_page->bn100, TQT_SIGNAL(clicked()), TQT_SLOT(zoom100())); + connect(m_page->slZoom, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderChanged( int ))); } KoBirdEyePanel::~KoBirdEyePanel() @@ -192,10 +192,10 @@ void KoBirdEyePanel::sliderChanged( int v ) } } -void KoBirdEyePanel::cursorPosChanged(Q_INT32 xpos, Q_INT32 ypos) +void KoBirdEyePanel::cursorPosChanged(TQ_INT32 xpos, TQ_INT32 ypos) { - m_page->txtX->setText(QString("%L1").arg(xpos, 5)); - m_page->txtY->setText(QString("%L1").arg(ypos, 5)); + m_page->txtX->setText(TQString("%L1").tqarg(xpos, 5)); + m_page->txtY->setText(TQString("%L1").tqarg(ypos, 5)); } void KoBirdEyePanel::setThumbnailProvider(KoThumbnailAdapter * thumbnailProvider) @@ -209,36 +209,36 @@ void KoBirdEyePanel::slotViewTransformationChanged() updateVisibleArea(); renderView(); m_page->view->update(); - setZoom(qRound(m_canvas->zoomFactor() * 100)); + setZoom(tqRound(m_canvas->zoomFactor() * 100)); } -void KoBirdEyePanel::slotUpdate(const QRect & r) +void KoBirdEyePanel::slotUpdate(const TQRect & r) { - QRect updateRect = r; + TQRect updateRect = r; if (m_thumbnailProvider->pixelSize() != m_documentSize) { m_documentSize = m_thumbnailProvider->pixelSize(); fitThumbnailToView(); - updateRect = QRect(0, 0, m_documentSize.width(), m_documentSize.height()); + updateRect = TQRect(0, 0, m_documentSize.width(), m_documentSize.height()); } - updateRect &= QRect(0, 0, m_documentSize.width(), m_documentSize.height()); + updateRect &= TQRect(0, 0, m_documentSize.width(), m_documentSize.height()); if (!updateRect.isEmpty() && !m_documentSize.isEmpty()) { - QRect thumbnailRect = documentToThumbnail(KoRect::fromQRect(updateRect)); + TQRect thumbnailRect = documentToThumbnail(KoRect::fromTQRect(updateRect)); if (!thumbnailRect.isEmpty()) { - QImage thumbnailImage = m_thumbnailProvider->image(thumbnailRect, m_thumbnail.size()); + TQImage thumbnailImage = m_thumbnailProvider->image(thumbnailRect, m_thumbnail.size()); if (!thumbnailImage.isNull()) { Q_ASSERT(thumbnailImage.size() == thumbnailRect.size()); - QPainter painter(&m_thumbnail); + TQPainter painter(&m_thumbnail); - painter.fillRect(thumbnailRect, colorGroup().mid()); + painter.fillRect(thumbnailRect, tqcolorGroup().mid()); painter.drawImage(thumbnailRect.x(), thumbnailRect.y(), thumbnailImage); } } @@ -248,24 +248,24 @@ void KoBirdEyePanel::slotUpdate(const QRect & r) m_page->view->update(); } -QRect KoBirdEyePanel::documentToThumbnail(const KoRect& docRect) +TQRect KoBirdEyePanel::documentToThumbnail(const KoRect& docRect) { if (docRect.isEmpty() || m_documentSize.isEmpty() || m_thumbnail.isNull()) { - return QRect(); + return TQRect(); } - Q_INT32 thumbnailLeft = static_cast<Q_INT32>((docRect.left() * m_thumbnail.width()) / m_documentSize.width()); - Q_INT32 thumbnailRight = static_cast<Q_INT32>(((docRect.right() + 1) * m_thumbnail.width()) / m_documentSize.width()); - Q_INT32 thumbnailTop = static_cast<Q_INT32>((docRect.top() * m_thumbnail.height()) / m_documentSize.height()); - Q_INT32 thumbnailBottom = static_cast<Q_INT32>(((docRect.bottom() + 1) * m_thumbnail.height()) / m_documentSize.height()); + TQ_INT32 thumbnailLeft = static_cast<TQ_INT32>((docRect.left() * m_thumbnail.width()) / m_documentSize.width()); + TQ_INT32 thumbnailRight = static_cast<TQ_INT32>(((docRect.right() + 1) * m_thumbnail.width()) / m_documentSize.width()); + TQ_INT32 thumbnailTop = static_cast<TQ_INT32>((docRect.top() * m_thumbnail.height()) / m_documentSize.height()); + TQ_INT32 thumbnailBottom = static_cast<TQ_INT32>(((docRect.bottom() + 1) * m_thumbnail.height()) / m_documentSize.height()); - QRect thumbnailRect(thumbnailLeft, thumbnailTop, thumbnailRight - thumbnailLeft + 1, thumbnailBottom - thumbnailTop + 1); + TQRect thumbnailRect(thumbnailLeft, thumbnailTop, thumbnailRight - thumbnailLeft + 1, thumbnailBottom - thumbnailTop + 1); thumbnailRect &= m_thumbnail.rect(); return thumbnailRect; } -KoRect KoBirdEyePanel::thumbnailToDocument(const QRect& thumbnailRect) +KoRect KoBirdEyePanel::thumbnailToDocument(const TQRect& thumbnailRect) { if (thumbnailRect.isEmpty() || m_documentSize.isEmpty() || m_thumbnail.isNull()) { return KoRect(); @@ -282,12 +282,12 @@ KoRect KoBirdEyePanel::thumbnailToDocument(const QRect& thumbnailRect) return docRect; } -QPoint KoBirdEyePanel::viewToThumbnail(const QPoint& viewPoint) +TQPoint KoBirdEyePanel::viewToThumbnail(const TQPoint& viewPoint) { int thumbnailX = (m_viewBuffer.width() - m_thumbnail.width()) / 2; int thumbnailY = (m_viewBuffer.height() - m_thumbnail.height()) / 2; - return QPoint(viewPoint.x() - thumbnailX, viewPoint.y() - thumbnailY); + return TQPoint(viewPoint.x() - thumbnailX, viewPoint.y() - thumbnailY); } @@ -305,20 +305,20 @@ void KoBirdEyePanel::updateVisibleArea() } -bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) +bool KoBirdEyePanel::eventFilter(TQObject* o, TQEvent* ev) { - if (o == m_page->view && ev->type() == QEvent::Resize) { - resizeViewEvent(static_cast<QResizeEvent *>(ev)->size()); + if (o == m_page->view && ev->type() == TQEvent::Resize) { + resizeViewEvent(static_cast<TQResizeEvent *>(ev)->size()); } - if (o == m_page->view && ev->type() == QEvent::Paint) { - paintViewEvent(static_cast<QPaintEvent *>(ev)); + if (o == m_page->view && ev->type() == TQEvent::Paint) { + paintViewEvent(static_cast<TQPaintEvent *>(ev)); } - if (o == m_page->view && ev->type() == QEvent::MouseMove) { + if (o == m_page->view && ev->type() == TQEvent::MouseMove) { - QMouseEvent* me = (QMouseEvent*)ev; - QPoint thumbnailPos = viewToThumbnail(me->pos()); + TQMouseEvent* me = (TQMouseEvent*)ev; + TQPoint thumbnailPos = viewToThumbnail(me->pos()); if (m_dragging) { handleMouseMoveAction(thumbnailPos); @@ -329,10 +329,10 @@ bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) return true; } - if (o == m_page->view && ev->type() == QEvent::MouseButtonPress) { + if (o == m_page->view && ev->type() == TQEvent::MouseButtonPress) { - QMouseEvent* me = (QMouseEvent*)ev; - QPoint thumbnailPos = viewToThumbnail(me->pos()); + TQMouseEvent* me = (TQMouseEvent*)ev; + TQPoint thumbnailPos = viewToThumbnail(me->pos()); if (me->button() == LeftButton) { handleMousePress(thumbnailPos); @@ -341,9 +341,9 @@ bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) return true; } - if (o == m_page->view && ev->type() == QEvent::MouseButtonRelease) { + if (o == m_page->view && ev->type() == TQEvent::MouseButtonRelease) { - QMouseEvent* me = (QMouseEvent*)ev; + TQMouseEvent* me = (TQMouseEvent*)ev; if (me->button() == LeftButton) { m_dragging = false; @@ -355,58 +355,58 @@ bool KoBirdEyePanel::eventFilter(QObject* o, QEvent* ev) return m_page->eventFilter(o, ev); } -KoBirdEyePanel::enumDragHandle KoBirdEyePanel::dragHandleAt(QPoint p) +KoBirdEyePanel::enumDragHandle KoBirdEyePanel::dragHandleAt(TQPoint p) { - QRect left = QRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); - QRect right = QRect(m_visibleAreaInThumbnail.right()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); - QRect top = QRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, m_visibleAreaInThumbnail.width()+2, 3); - QRect bottom = QRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.bottom()-1, m_visibleAreaInThumbnail.width()+2, 3); + TQRect left = TQRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); + TQRect right = TQRect(m_visibleAreaInThumbnail.right()-1, m_visibleAreaInThumbnail.top()-1, 3, m_visibleAreaInThumbnail.height()+2); + TQRect top = TQRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.top()-1, m_visibleAreaInThumbnail.width()+2, 3); + TQRect bottom = TQRect(m_visibleAreaInThumbnail.left()-1, m_visibleAreaInThumbnail.bottom()-1, m_visibleAreaInThumbnail.width()+2, 3); - if (left.contains(p)) { + if (left.tqcontains(p)) { return DragHandleLeft; } - if (right.contains(p)) { + if (right.tqcontains(p)) { return DragHandleRight; } - if (top.contains(p)) { + if (top.tqcontains(p)) { return DragHandleTop; } - if (bottom.contains(p)) { + if (bottom.tqcontains(p)) { return DragHandleBottom; } - if (m_visibleAreaInThumbnail.contains(p)) { + if (m_visibleAreaInThumbnail.tqcontains(p)) { return DragHandleCentre; } return DragHandleNone; } -void KoBirdEyePanel::handleMouseMove(QPoint p) +void KoBirdEyePanel::handleMouseMove(TQPoint p) { - QCursor cursor; + TQCursor cursor; switch (dragHandleAt(p)) { case DragHandleLeft: case DragHandleRight: - cursor = Qt::sizeHorCursor; + cursor = TQt::sizeHorCursor; break; case DragHandleTop: case DragHandleBottom: - cursor = Qt::sizeVerCursor; + cursor = TQt::sizeVerCursor; break; case DragHandleCentre: - cursor = Qt::sizeAllCursor; + cursor = TQt::sizeAllCursor; break; default: case DragHandleNone: - if (m_thumbnail.rect().contains(p)) { - cursor = Qt::PointingHandCursor; + if (m_thumbnail.rect().tqcontains(p)) { + cursor = TQt::PointingHandCursor; } else { - cursor = Qt::arrowCursor; + cursor = TQt::arrowCursor; } break; } @@ -414,16 +414,16 @@ void KoBirdEyePanel::handleMouseMove(QPoint p) m_page->view->setCursor(cursor); } -void KoBirdEyePanel::handleMouseMoveAction(QPoint p) +void KoBirdEyePanel::handleMouseMoveAction(TQPoint p) { if (m_dragging) { - Q_INT32 dx = p.x() - m_lastDragPos.x(); - Q_INT32 dy = p.y() - m_lastDragPos.y(); + TQ_INT32 dx = p.x() - m_lastDragPos.x(); + TQ_INT32 dy = p.y() - m_lastDragPos.y(); m_lastDragPos = p; - QRect thumbnailRect = m_visibleAreaInThumbnail; + TQRect thumbnailRect = m_visibleAreaInThumbnail; switch (m_dragHandle) { case DragHandleLeft: { @@ -455,23 +455,23 @@ void KoBirdEyePanel::handleMouseMoveAction(QPoint p) } } -void KoBirdEyePanel::handleMousePress(QPoint p) +void KoBirdEyePanel::handleMousePress(TQPoint p) { if (!m_dragging) { enumDragHandle dragHandle = dragHandleAt(p); if (dragHandle == DragHandleNone) { - if (m_thumbnail.rect().contains(p)) { + if (m_thumbnail.rect().tqcontains(p)) { // Snap visible area centre to p and begin a centre drag. - QRect thumbnailRect = m_visibleAreaInThumbnail; + TQRect thumbnailRect = m_visibleAreaInThumbnail; thumbnailRect.moveCenter(p); makeThumbnailRectVisible(thumbnailRect); m_dragHandle = DragHandleCentre; - m_page->view->setCursor(Qt::sizeAllCursor); + m_page->view->setCursor(TQt::sizeAllCursor); m_dragging = true; } } else { @@ -482,13 +482,13 @@ void KoBirdEyePanel::handleMousePress(QPoint p) } } -void KoBirdEyePanel::makeThumbnailRectVisible(const QRect& r) +void KoBirdEyePanel::makeThumbnailRectVisible(const TQRect& r) { if (r.isEmpty()) { return; } - QRect thumbnailRect = r; + TQRect thumbnailRect = r; if (thumbnailRect.left() < m_thumbnail.rect().left()) { thumbnailRect.moveLeft(m_thumbnail.rect().left()); @@ -538,18 +538,18 @@ void KoBirdEyePanel::makeThumbnailRectVisible(const QRect& r) m_zoomListener->zoomTo(docRect.center().x(), docRect.center().y(), zoomFactor); } -void KoBirdEyePanel::resizeViewEvent(QSize size) +void KoBirdEyePanel::resizeViewEvent(TQSize size) { m_viewBuffer.resize(size); fitThumbnailToView(); - slotUpdate(QRect(0, 0, m_documentSize.width(), m_documentSize.height())); + slotUpdate(TQRect(0, 0, m_documentSize.width(), m_documentSize.height())); } void KoBirdEyePanel::fitThumbnailToView() { - QRect docRect = QRect(0, 0, m_thumbnailProvider->pixelSize().width(), m_thumbnailProvider->pixelSize().height()); - Q_INT32 thumbnailWidth; - Q_INT32 thumbnailHeight; + TQRect docRect = TQRect(0, 0, m_thumbnailProvider->pixelSize().width(), m_thumbnailProvider->pixelSize().height()); + TQ_INT32 thumbnailWidth; + TQ_INT32 thumbnailHeight; if (docRect.isEmpty()) { thumbnailWidth = 0; @@ -562,9 +562,9 @@ void KoBirdEyePanel::fitThumbnailToView() if (xScale < yScale) { thumbnailWidth = m_page->view->contentsRect().width() - thumbnailBorderPixels; - thumbnailHeight = Q_INT32(ceil(docRect.height() * xScale)); + thumbnailHeight = TQ_INT32(ceil(docRect.height() * xScale)); } else { - thumbnailWidth = Q_INT32(ceil(docRect.width() * yScale)); + thumbnailWidth = TQ_INT32(ceil(docRect.width() * yScale)); thumbnailHeight = m_page->view->contentsRect().height() - thumbnailBorderPixels; } } @@ -581,9 +581,9 @@ void KoBirdEyePanel::renderView() updateVisibleArea(); - QPainter painter(&m_viewBuffer); + TQPainter painter(&m_viewBuffer); - painter.fillRect(0, 0, m_viewBuffer.width(), m_viewBuffer.height(), colorGroup().mid()); + painter.fillRect(0, 0, m_viewBuffer.width(), m_viewBuffer.height(), tqcolorGroup().mid()); if (!m_thumbnail.isNull()) { @@ -592,12 +592,12 @@ void KoBirdEyePanel::renderView() painter.drawPixmap(thumbnailX, thumbnailY, m_thumbnail); - painter.setPen(Qt::red); + painter.setPen(TQt::red); painter.drawRect(thumbnailX + m_visibleAreaInThumbnail.x() - 1, thumbnailY + m_visibleAreaInThumbnail.y() - 1, m_visibleAreaInThumbnail.width() + 2, m_visibleAreaInThumbnail.height() + 2); - painter.setPen(Qt::red.light()); + painter.setPen(TQt::red.light()); painter.drawRect(thumbnailX + m_visibleAreaInThumbnail.x() - 2, thumbnailY + m_visibleAreaInThumbnail.y() - 2, m_visibleAreaInThumbnail.width() + 4, @@ -606,7 +606,7 @@ void KoBirdEyePanel::renderView() } } -void KoBirdEyePanel::paintViewEvent(QPaintEvent *e) +void KoBirdEyePanel::paintViewEvent(TQPaintEvent *e) { Q_ASSERT(!m_viewBuffer.isNull()); diff --git a/krita/ui/kobirdeyepanel.h b/krita/ui/kobirdeyepanel.h index 0b625c99..24770b18 100644 --- a/krita/ui/kobirdeyepanel.h +++ b/krita/ui/kobirdeyepanel.h @@ -21,13 +21,13 @@ #ifndef KO_BIRD_EYE_PANEL #define KO_BIRD_EYE_PANEL -#include <qrect.h> -#include <qwidget.h> +#include <tqrect.h> +#include <tqwidget.h> #include <KoPoint.h> #include <KoRect.h> -class QPixmap; +class TQPixmap; class KAction; class KoDocument; class WdgBirdEye; @@ -49,7 +49,7 @@ public: * Returns the total area of the document in pixels. Use KoPageLayout and KoZoomhandler * to take care of zoom, points and whatnot when computing this. */ - virtual QRect size() = 0; + virtual TQRect size() = 0; /** * Return the current canvas zoom factor. @@ -117,17 +117,17 @@ class KoThumbnailAdapter * * @returns the size in pixels. */ - virtual QSize pixelSize() = 0; + virtual TQSize pixelSize() = 0; /** - * Returns the specified rectangle of the thumbnail as a QImage. thumbnailSize + * Returns the specified rectangle of the thumbnail as a TQImage. thumbnailSize * gives the dimensions of the whole document thumbnail, and r specifies a rectangle * within that. * * @param r the rectangle in the thumbnail to be rendered * @param thumbnailSize the size in pixels of the full thumbnail */ - virtual QImage image(QRect r, QSize thumbnailSize) = 0; + virtual TQImage image(TQRect r, TQSize thumbnailSize) = 0; }; /** @@ -135,9 +135,10 @@ class KoThumbnailAdapter * with a red panning rectangle to and a zoom slider and a toolbar * with a couple of useful functions. */ -class KoBirdEyePanel : public QWidget { +class KoBirdEyePanel : public TQWidget { Q_OBJECT + TQ_OBJECT public: @@ -148,20 +149,20 @@ public: * @param thumbnailProvider the class that creates the small image at the right * zoomlevel * @param canvas the place the document is painted. - * @param parent the parent widget - * @param name the QObject name of this bird eye widget - * @param f the widget flags (@see QWidget) + * @param tqparent the tqparent widget + * @param name the TQObject name of this bird eye widget + * @param f the widget flags (@see TQWidget) */ KoBirdEyePanel( KoZoomAdapter * zoomListener, KoThumbnailAdapter * thumbnailProvider, KoCanvasAdapter * canvas, - QWidget * parent, + TQWidget * tqparent, const char * name = 0, WFlags f = 0 ); virtual ~KoBirdEyePanel(); - bool eventFilter(QObject*, QEvent*); + bool eventFilter(TQObject*, TQEvent*); public slots: @@ -178,7 +179,7 @@ public slots: */ void slotViewTransformationChanged(); - void cursorPosChanged(Q_INT32 xpos, Q_INT32 ypos); + void cursorPosChanged(TQ_INT32 xpos, TQ_INT32 ypos); void zoomMinus(); void zoomPlus(); @@ -188,7 +189,7 @@ public slots: * * @param r The rect that has been changed: this is unzoomed. */ - void slotUpdate(const QRect & r); + void slotUpdate(const TQRect & r); protected slots: @@ -200,14 +201,14 @@ protected slots: protected: void setZoom(int zoom); - void handleMouseMove(QPoint); - void handleMouseMoveAction(QPoint); - void handleMousePress(QPoint); + void handleMouseMove(TQPoint); + void handleMouseMoveAction(TQPoint); + void handleMousePress(TQPoint); void fitThumbnailToView(); void renderView(); - void resizeViewEvent(QSize size); - void paintViewEvent(QPaintEvent *e); - void makeThumbnailRectVisible(const QRect& r); + void resizeViewEvent(TQSize size); + void paintViewEvent(TQPaintEvent *e); + void makeThumbnailRectVisible(const TQRect& r); enum enumDragHandle { DragHandleNone, @@ -221,22 +222,22 @@ protected: /* * Returns the drag handle type at point p in thumbnail coordinates. */ - enumDragHandle dragHandleAt(QPoint p); + enumDragHandle dragHandleAt(TQPoint p); /** * Returns the rectangle in the thumbnail covered by the given document rectangle. */ - QRect documentToThumbnail(const KoRect& docRect); + TQRect documentToThumbnail(const KoRect& docRect); /** * Returns the rectangle in the document covered by the given thumbnail rectangle. */ - KoRect thumbnailToDocument(const QRect& thumbnailRect); + KoRect thumbnailToDocument(const TQRect& thumbnailRect); /** * Converts a point in the view to a point in the thumbnail. */ - QPoint viewToThumbnail(const QPoint& viewPoint); + TQPoint viewToThumbnail(const TQPoint& viewPoint); private: @@ -248,14 +249,14 @@ private: KAction* m_zoomIn; KAction* m_zoomOut; - QPixmap m_viewBuffer; - QPixmap m_thumbnail; + TQPixmap m_viewBuffer; + TQPixmap m_thumbnail; - QSize m_documentSize; - QRect m_visibleAreaInThumbnail; + TQSize m_documentSize; + TQRect m_visibleAreaInThumbnail; bool m_dragging; enumDragHandle m_dragHandle; - QPoint m_lastDragPos; + TQPoint m_lastDragPos; }; diff --git a/krita/ui/layerlist.cpp b/krita/ui/layerlist.cpp index 5246896d..d1c925b4 100644 --- a/krita/ui/layerlist.cpp +++ b/krita/ui/layerlist.cpp @@ -20,15 +20,15 @@ #include "layerlist.h" -#include <qtooltip.h> -#include <qbitmap.h> -#include <qcursor.h> -#include <qimage.h> -#include <qheader.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qsimplerichtext.h> -#include <qtimer.h> +#include <tqtooltip.h> +#include <tqbitmap.h> +#include <tqcursor.h> +#include <tqimage.h> +#include <tqheader.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqsimplerichtext.h> +#include <tqtimer.h> #include <kapplication.h> #include <kdebug.h> @@ -40,27 +40,27 @@ #include <kpopupmenu.h> #include <kstringhandler.h> -class LayerItemIterator: public QListViewItemIterator +class LayerItemIterator: public TQListViewItemIterator { public: - LayerItemIterator( LayerList *list ): QListViewItemIterator( list ) { } - LayerItemIterator( LayerList *list, IteratorFlag flags ): QListViewItemIterator( list, flags ) { } - LayerItemIterator( LayerItem *item ): QListViewItemIterator( item ) { } - LayerItemIterator( LayerItem *item, IteratorFlag flags ): QListViewItemIterator( item, flags ) { } - LayerItem *operator*() { return static_cast<LayerItem*>( QListViewItemIterator::operator*() ); } + LayerItemIterator( LayerList *list ): TQListViewItemIterator( list ) { } + LayerItemIterator( LayerList *list, IteratorFlag flags ): TQListViewItemIterator( list, flags ) { } + LayerItemIterator( LayerItem *item ): TQListViewItemIterator( item ) { } + LayerItemIterator( LayerItem *item, IteratorFlag flags ): TQListViewItemIterator( item, flags ) { } + LayerItem *operator*() { return static_cast<LayerItem*>( TQListViewItemIterator::operator*() ); } }; struct LayerProperty { - QString name; - QString displayName; - QPixmap enabledIcon; - QPixmap disabledIcon; + TQString name; + TQString displayName; + TQPixmap enabledIcon; + TQPixmap disabledIcon; bool defaultValue; bool validForFolders; LayerProperty(): defaultValue( false ), validForFolders( true ) { } - LayerProperty( const QString &pname, const QString &pdisplayName, const QPixmap &enabled, const QPixmap &disabled, + LayerProperty( const TQString &pname, const TQString &pdisplayName, const TQPixmap &enabled, const TQPixmap &disabled, bool pdefaultValue, bool pvalidForFolders ) : name( pname ), displayName( pdisplayName ), @@ -79,11 +79,11 @@ public: bool foldersCanBeActive; bool previewsShown; int itemHeight; - QValueList<LayerProperty> properties; + TQValueList<LayerProperty> properties; KPopupMenu contextMenu; LayerToolTip *tooltip; - Private( QWidget *parent, LayerList *list ); + Private( TQWidget *tqparent, LayerList *list ); ~Private(); }; @@ -92,43 +92,43 @@ class LayerItem::Private public: bool isFolder; int id; - QValueList<bool> properties; - QImage *previewImage; + TQValueList<bool> properties; + TQImage *previewImage; bool previewChanged; - QPixmap scaledPreview; - QSize previewSize; - QPoint previewOffset; + TQPixmap scaledPreview; + TQSize previewSize; + TQPoint previewOffset; Private( int pid ): isFolder( false ), id( pid ), previewImage( 0 ), previewChanged( false ) { } }; static const int MAX_SIZE = 256; -class LayerToolTip: public QToolTip, public QFrame +class LayerToolTip: public TQToolTip, public TQFrame { LayerList *m_list; LayerItem *m_item; - QPoint m_pos; - QTimer m_timer; - QImage m_img; + TQPoint m_pos; + TQTimer m_timer; + TQImage m_img; public: - LayerToolTip( QWidget *parent, LayerList *list ) - : QToolTip( parent ), - QFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM | WNoAutoErase ), + LayerToolTip( TQWidget *tqparent, LayerList *list ) + : TQToolTip( tqparent ), + TQFrame( 0, 0, WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WStyle_StaysOnTop | WX11BypassWM | WNoAutoErase ), m_list( list ) { - QFrame::setPalette( QToolTip::palette() ); - connect( &m_timer, SIGNAL( timeout() ), m_list, SLOT( hideTip() ) ); - qApp->installEventFilter( this ); + TQFrame::setPalette( TQToolTip::palette() ); + connect( &m_timer, TQT_SIGNAL( timeout() ), m_list, TQT_SLOT( hideTip() ) ); + tqApp->installEventFilter( this ); } - virtual void maybeTip( const QPoint &pos ) + virtual void maybeTip( const TQPoint &pos ) { m_pos = pos; LayerItem *prev = m_item; m_item = static_cast<LayerItem*>(m_list->itemAt( m_pos )); - if( QToolTip::parentWidget() && m_list->showToolTips() && m_item ) + if( TQToolTip::tqparentWidget() && m_list->showToolTips() && m_item ) { if( m_item != prev ) hideTip(); @@ -142,9 +142,9 @@ public: { m_img = m_item->tooltipPreview(); m_timer.start( 15000, true ); - if( !isVisible() || sizeHint() != size() ) + if( !isVisible() || tqsizeHint() != size() ) { - resize( sizeHint() ); + resize( tqsizeHint() ); position(); } if( !isVisible() ) @@ -157,29 +157,29 @@ public: { if( !isVisible() ) return; - QFrame::hide(); - QToolTip::hide(); + TQFrame::hide(); + TQToolTip::hide(); m_timer.stop(); m_img.reset(); m_list->triggerUpdate(); } - virtual void drawContents( QPainter *painter ) + virtual void drawContents( TQPainter *painter ) { - QPixmap buf( width(), height() ); - QPainter p( &buf ); - buf.fill( colorGroup().background() ); - p.setPen( colorGroup().foreground() ); + TQPixmap buf( width(), height() ); + TQPainter p( &buf ); + buf.fill( tqcolorGroup().background() ); + p.setPen( tqcolorGroup().foreground() ); p.drawRect( buf.rect() ); - QSimpleRichText text( m_item->tooltip(), QToolTip::font() ); - text.setWidth( QCOORD_MAX ); + TQSimpleRichText text( m_item->tooltip(), TQToolTip::font() ); + text.setWidth( TQCOORD_MAX ); p.translate( 5, 5 ); if( !m_img.isNull() ) { if( m_img.width() > MAX_SIZE || m_img.height() > MAX_SIZE ) - m_img = m_img.scale( MAX_SIZE, MAX_SIZE, QImage::ScaleMin ); + m_img = m_img.scale( MAX_SIZE, MAX_SIZE, TQ_ScaleMin ); int y = 0; if( m_img.height() < text.height() ) y = text.height()/2 - m_img.height()/2; @@ -188,18 +188,18 @@ public: p.translate( m_img.width() + 10, 0 ); } - text.draw( &p, 0, 0, rect(), colorGroup() ); + text.draw( &p, 0, 0, rect(), tqcolorGroup() ); painter->drawPixmap( 0, 0, buf ); } - virtual QSize sizeHint() const + virtual TQSize tqsizeHint() const { if( !m_item ) - return QSize( 0, 0 ); + return TQSize( 0, 0 ); - QSimpleRichText text( m_item->tooltip(), QToolTip::font() ); - text.setWidth( QCOORD_MAX ); + TQSimpleRichText text( m_item->tooltip(), TQToolTip::font() ); + text.setWidth( TQCOORD_MAX ); int width = text.widthUsed(); if( !m_img.isNull() ) @@ -211,16 +211,16 @@ public: height = kMin( m_img.height(), MAX_SIZE ); height += 10; - return QSize( width, height ); + return TQSize( width, height ); } void position() { - const QRect drect = QApplication::desktop()->availableGeometry( QToolTip::parentWidget() ); - const QSize size = sizeHint(); + const TQRect drect = TQApplication::desktop()->availableGeometry( TQToolTip::tqparentWidget() ); + const TQSize size = tqsizeHint(); const int width = size.width(), height = size.height(); - const QRect tmp = m_item->rect(); - const QRect irect( m_list->viewport()->mapToGlobal( m_list->contentsToViewport(tmp.topLeft()) ), tmp.size() ); + const TQRect tmp = m_item->rect(); + const TQRect irect( m_list->viewport()->mapToGlobal( m_list->contentsToViewport(tmp.topLeft()) ), tmp.size() ); int y; if( irect.bottom() + height < drect.bottom() ) @@ -228,27 +228,27 @@ public: else y = kMax( drect.top(), irect.top() - height ); - int x = kMax( drect.x(), QToolTip::parentWidget()->mapToGlobal( m_pos ).x() - width/2 ); + int x = kMax( drect.x(), TQToolTip::tqparentWidget()->mapToGlobal( m_pos ).x() - width/2 ); if( x + width > drect.right() ) x = drect.right() - width; move( x, y ); } - virtual bool eventFilter( QObject *, QEvent *e ) + virtual bool eventFilter( TQObject *, TQEvent *e ) { if( isVisible() ) switch ( e->type() ) { - case QEvent::KeyPress: - case QEvent::KeyRelease: - case QEvent::MouseButtonPress: - case QEvent::MouseButtonRelease: - //case QEvent::MouseMove: - case QEvent::FocusIn: - case QEvent::FocusOut: - case QEvent::Wheel: - case QEvent::Leave: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonRelease: + //case TQEvent::MouseMove: + case TQEvent::FocusIn: + case TQEvent::FocusOut: + case TQEvent::Wheel: + case TQEvent::Leave: hideTip(); default: break; } @@ -257,9 +257,9 @@ public: } }; -LayerList::Private::Private( QWidget *parent, LayerList *list ) +LayerList::Private::Private( TQWidget *tqparent, LayerList *list ) : activeLayer( 0 ), foldersCanBeActive( false ), previewsShown( false ), itemHeight( 32 ), - tooltip( new LayerToolTip( parent, list ) ) { } + tooltip( new LayerToolTip( tqparent, list ) ) { } LayerList::Private::~Private() { @@ -273,17 +273,17 @@ static int getID() return id--; } -static QSize iconSize() { return QIconSet::iconSize( QIconSet::Small ); } +static TQSize iconSize() { return TQIconSet::iconSize( TQIconSet::Small ); } /////////////// // LayerList // /////////////// -LayerList::LayerList( QWidget *parent, const char *name ) - : super( parent, name ), d( new Private( viewport(), this ) ) +LayerList::LayerList( TQWidget *tqparent, const char *name ) + : super( tqparent, name ), d( new Private( viewport(), this ) ) { - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); setRootIsDecorated( true ); setSorting( -1 ); setSortColumn( -1 ); @@ -291,23 +291,23 @@ LayerList::LayerList( QWidget *parent, const char *name ) setFullWidth( true ); setItemsRenameable( false ); setDropHighlighter( true ); - setDefaultRenameAction( QListView::Accept ); + setDefaultRenameAction( TQListView::Accept ); setDragEnabled( true ); setAcceptDrops( true ); setItemsMovable( true ); - addColumn( QString() ); + addColumn( TQString() ); header()->hide(); - QToolTip::add(this, i18n("Right-click to create folders. Click on the layername to change the layer's name. Click and drag to move layers.")); + TQToolTip::add(this, i18n("Right-click to create folders. Click on the layername to change the layer's name. Click and drag to move layers.")); setNumRows( 2 ); - connect( this, SIGNAL( itemRenamed( QListViewItem*, const QString&, int ) ), - SLOT( slotItemRenamed( QListViewItem*, const QString&, int ) ) ); - connect( this, SIGNAL( moved( QPtrList<QListViewItem>&, QPtrList<QListViewItem>&, QPtrList<QListViewItem>& ) ), - SLOT( slotItemMoved( QPtrList<QListViewItem>&, QPtrList<QListViewItem>&, QPtrList<QListViewItem>& ) ) ); - connect( this, SIGNAL( onItem( QListViewItem* ) ), SLOT( hideTip() ) ); - connect( this, SIGNAL( onViewport() ), SLOT( hideTip() ) ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ), + TQT_SLOT( slotItemRenamed( TQListViewItem*, const TQString&, int ) ) ); + connect( this, TQT_SIGNAL( moved( TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>& ) ), + TQT_SLOT( slotItemMoved( TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>& ) ) ); + connect( this, TQT_SIGNAL( onItem( TQListViewItem* ) ), TQT_SLOT( hideTip() ) ); + connect( this, TQT_SIGNAL( onViewport() ), TQT_SLOT( hideTip() ) ); } LayerList::~LayerList() @@ -315,13 +315,13 @@ LayerList::~LayerList() delete d; } -void LayerList::addProperty( const QString &name, const QString &displayName, const QIconSet &icon, +void LayerList::addProperty( const TQString &name, const TQString &displayName, const TQIconSet &icon, bool defaultValue, bool validForFolders ) { - addProperty( name, displayName, icon.pixmap( QIconSet::Small, QIconSet::Normal ), icon.pixmap( QIconSet::Small, QIconSet::Disabled ), defaultValue, validForFolders ); + addProperty( name, displayName, icon.pixmap( TQIconSet::Small, TQIconSet::Normal ), icon.pixmap( TQIconSet::Small, TQIconSet::Disabled ), defaultValue, validForFolders ); } -void LayerList::addProperty( const QString &name, const QString &displayName, QPixmap enabled, QPixmap disabled, +void LayerList::addProperty( const TQString &name, const TQString &displayName, TQPixmap enabled, TQPixmap disabled, bool defaultValue, bool validForFolders ) { d->properties.append( LayerProperty( name, displayName, enabled, disabled, defaultValue, validForFolders ) ); @@ -376,12 +376,12 @@ int LayerList::activeLayerID() const return -1; } -QValueList<LayerItem*> LayerList::selectedLayers() const +TQValueList<LayerItem*> LayerList::selectedLayers() const { if( !firstChild() ) - return QValueList<LayerItem*>(); + return TQValueList<LayerItem*>(); - QValueList<LayerItem*> layers; + TQValueList<LayerItem*> layers; for( LayerItemIterator it( firstChild() ); *it; ++it ) if( (*it)->isSelected() ) layers.append( *it ); @@ -389,10 +389,10 @@ QValueList<LayerItem*> LayerList::selectedLayers() const return layers; } -QValueList<int> LayerList::selectedLayerIDs() const +TQValueList<int> LayerList::selectedLayerIDs() const { - const QValueList<LayerItem*> layers = selectedLayers(); - QValueList<int> ids; + const TQValueList<LayerItem*> layers = selectedLayers(); + TQValueList<int> ids; for( int i = 0, n = layers.count(); i < n; ++i ) ids.append( layers[i]->id() ); @@ -438,16 +438,16 @@ bool LayerList::isFolder( int id ) const return l->isFolder(); } -QString LayerList::displayName( int id ) const +TQString LayerList::displayName( int id ) const { LayerItem* const l = layer( id ); if( !l ) - return QString::null; //should be more severe... + return TQString(); //should be more severe... return l->displayName(); } -bool LayerList::property( int id, const QString &name ) const +bool LayerList::property( int id, const TQString &name ) const { LayerItem* const l = layer( id ); if( !l ) @@ -533,7 +533,7 @@ void LayerList::setActiveLayer( int id ) //SLOT setActiveLayer( layer( id ) ); } -void LayerList::setLayerDisplayName( LayerItem *layer, const QString &displayName ) +void LayerList::setLayerDisplayName( LayerItem *layer, const TQString &displayName ) { if( !layer ) return; @@ -541,12 +541,12 @@ void LayerList::setLayerDisplayName( LayerItem *layer, const QString &displayNam layer->setDisplayName( displayName ); } -void LayerList::setLayerDisplayName( int id, const QString &displayName ) +void LayerList::setLayerDisplayName( int id, const TQString &displayName ) { setLayerDisplayName( layer( id ), displayName ); } -void LayerList::setLayerProperty( LayerItem *layer, const QString &name, bool on ) //SLOT +void LayerList::setLayerProperty( LayerItem *layer, const TQString &name, bool on ) //SLOT { if( !layer ) return; @@ -554,12 +554,12 @@ void LayerList::setLayerProperty( LayerItem *layer, const QString &name, bool on layer->setProperty( name, on ); } -void LayerList::setLayerProperty( int id, const QString &name, bool on ) //SLOT +void LayerList::setLayerProperty( int id, const TQString &name, bool on ) //SLOT { setLayerProperty( layer( id ), name, on ); } -void LayerList::toggleLayerProperty( LayerItem *layer, const QString &name ) //SLOT +void LayerList::toggleLayerProperty( LayerItem *layer, const TQString &name ) //SLOT { if( !layer ) return; @@ -567,12 +567,12 @@ void LayerList::toggleLayerProperty( LayerItem *layer, const QString &name ) //S layer->toggleProperty( name ); } -void LayerList::toggleLayerProperty( int id, const QString &name ) //SLOT +void LayerList::toggleLayerProperty( int id, const TQString &name ) //SLOT { toggleLayerProperty( layer( id ), name ); } -void LayerList::setLayerPreviewImage( LayerItem *layer, QImage *image ) +void LayerList::setLayerPreviewImage( LayerItem *layer, TQImage *image ) { if( !layer ) return; @@ -580,7 +580,7 @@ void LayerList::setLayerPreviewImage( LayerItem *layer, QImage *image ) layer->setPreviewImage( image ); } -void LayerList::setLayerPreviewImage( int id, QImage *image ) +void LayerList::setLayerPreviewImage( int id, TQImage *image ) { setLayerPreviewImage( layer( id ), image ); } @@ -598,54 +598,54 @@ void LayerList::layerPreviewChanged( int id ) layerPreviewChanged( layer( id ) ); } -LayerItem *LayerList::addLayer( const QString &displayName, LayerItem *after, int id ) //SLOT +LayerItem *LayerList::addLayer( const TQString &displayName, LayerItem *after, int id ) //SLOT { return new LayerItem( displayName, this, after, id ); } -LayerItem *LayerList::addLayer( const QString &displayName, int afterID, int id ) //SLOT +LayerItem *LayerList::addLayer( const TQString &displayName, int afterID, int id ) //SLOT { return new LayerItem( displayName, this, layer( afterID ), id ); } //SLOT -LayerItem *LayerList::addLayerToParent( const QString &displayName, LayerItem *parent, LayerItem *after, int id ) +LayerItem *LayerList::addLayerToParent( const TQString &displayName, LayerItem *tqparent, LayerItem *after, int id ) { - if( parent && parent->isFolder() ) - return parent->addLayer( displayName, after, id ); + if( tqparent && tqparent->isFolder() ) + return tqparent->addLayer( displayName, after, id ); else return 0; } -LayerItem *LayerList::addLayerToParent( const QString &displayName, int parentID, int afterID, int id ) //SLOT +LayerItem *LayerList::addLayerToParent( const TQString &displayName, int tqparentID, int afterID, int id ) //SLOT { - return addLayerToParent( displayName, folder( parentID ), layer( afterID ), id ); + return addLayerToParent( displayName, folder( tqparentID ), layer( afterID ), id ); } -void LayerList::moveLayer( LayerItem *layer, LayerItem *parent, LayerItem *after ) //SLOT +void LayerList::moveLayer( LayerItem *layer, LayerItem *tqparent, LayerItem *after ) //SLOT { if( !layer ) return; - if( parent && !parent->isFolder() ) - parent = 0; + if( tqparent && !tqparent->isFolder() ) + tqparent = 0; - if( layer->parent() == parent && layer->prevSibling() == after ) + if( layer->tqparent() == tqparent && layer->prevSibling() == after ) return; - QListViewItem *current = currentItem(); + TQListViewItem *current = currentItem(); - moveItem( layer, parent, after ); + moveItem( layer, tqparent, after ); - emit layerMoved( layer, parent, after ); - emit layerMoved( layer->id(), parent ? parent->id() : -1, after ? after->id() : -1 ); + emit layerMoved( layer, tqparent, after ); + emit layerMoved( layer->id(), tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); - setCurrentItem( current ); //HACK, sometimes Qt changes this under us + setCurrentItem( current ); //HACK, sometimes TQt changes this under us } -void LayerList::moveLayer( int id, int parentID, int afterID ) //SLOT +void LayerList::moveLayer( int id, int tqparentID, int afterID ) //SLOT { - moveLayer( layer( id ), folder( parentID ), layer( afterID ) ); + moveLayer( layer( id ), folder( tqparentID ), layer( afterID ) ); } void LayerList::removeLayer( LayerItem *layer ) //SLOT @@ -658,13 +658,13 @@ void LayerList::removeLayer( int id ) //SLOT delete layer( id ); } -void LayerList::contentsMousePressEvent( QMouseEvent *e ) +void LayerList::contentsMousePressEvent( TQMouseEvent *e ) { LayerItem *item = static_cast<LayerItem*>( itemAt( contentsToViewport( e->pos() ) ) ); if( item ) { - QMouseEvent m( QEvent::MouseButtonPress, item->mapFromListView( e->pos() ), e->button(), e->state() ); + TQMouseEvent m( TQEvent::MouseButtonPress, item->mapFromListView( e->pos() ), e->button(), e->state() ); if( !item->mousePressEvent( &m ) ) super::contentsMousePressEvent( e ); } @@ -676,12 +676,12 @@ void LayerList::contentsMousePressEvent( QMouseEvent *e ) } } -void LayerList::contentsMouseDoubleClickEvent( QMouseEvent *e ) +void LayerList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) { super::contentsMouseDoubleClickEvent( e ); if( LayerItem *layer = static_cast<LayerItem*>( itemAt( contentsToViewport( e->pos() ) ) ) ) { - if( !layer->iconsRect().contains( layer->mapFromListView( e->pos() ) ) ) + if( !layer->iconsRect().tqcontains( layer->mapFromListView( e->pos() ) ) ) { emit requestLayerProperties( layer ); emit requestLayerProperties( layer->id() ); @@ -694,26 +694,26 @@ void LayerList::contentsMouseDoubleClickEvent( QMouseEvent *e ) } } -void LayerList::findDrop( const QPoint &pos, QListViewItem *&parent, QListViewItem *&after ) +void LayerList::findDrop( const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after ) { LayerItem *item = static_cast<LayerItem*>( itemAt( contentsToViewport( pos ) ) ); if( item && item->isFolder() ) { - parent = item; + tqparent = item; after = 0; } else - super::findDrop( pos, parent, after ); + super::findDrop( pos, tqparent, after ); } void LayerList::showContextMenu() { - LayerItem *layer = static_cast<LayerItem*>( itemAt( viewport()->mapFromGlobal( QCursor::pos() ) ) ); + LayerItem *layer = static_cast<LayerItem*>( itemAt( viewport()->mapFromGlobal( TQCursor::pos() ) ) ); if( layer ) setCurrentItem( layer ); d->contextMenu.clear(); constructMenu( layer ); - menuActivated( d->contextMenu.exec( QCursor::pos() ), layer ); + menuActivated( d->contextMenu.exec( TQCursor::pos() ), layer ); } void LayerList::hideTip() @@ -723,7 +723,7 @@ void LayerList::hideTip() void LayerList::maybeTip() { - d->tooltip->maybeTip( d->tooltip->QToolTip::parentWidget()->mapFromGlobal( QCursor::pos() ) ); + d->tooltip->maybeTip( d->tooltip->TQToolTip::tqparentWidget()->mapFromGlobal( TQCursor::pos() ) ); } void LayerList::constructMenu( LayerItem *layer ) @@ -746,28 +746,28 @@ void LayerList::constructMenu( LayerItem *layer ) void LayerList::menuActivated( int id, LayerItem *layer ) { - const QValueList<LayerItem*> selected = selectedLayers(); + const TQValueList<LayerItem*> selected = selectedLayers(); - LayerItem *parent = ( layer && layer->isFolder() ) ? layer : 0; + LayerItem *tqparent = ( layer && layer->isFolder() ) ? layer : 0; LayerItem *after = 0; - if( layer && !parent ) + if( layer && !tqparent ) { - parent = layer->parent(); + tqparent = layer->tqparent(); after = layer->prevSibling(); } switch( id ) { case MenuItems::NewLayer: - emit requestNewLayer( parent, after ); - emit requestNewLayer( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewLayer( tqparent, after ); + emit requestNewLayer( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::NewFolder: - emit requestNewFolder( parent, after ); - emit requestNewFolder( parent ? parent->id() : -1, after ? after->id() : -1 ); + emit requestNewFolder( tqparent, after ); + emit requestNewFolder( tqparent ? tqparent->id() : -1, after ? after->id() : -1 ); break; case MenuItems::RemoveLayer: { - QValueList<int> ids; + TQValueList<int> ids; for( int i = 0, n = selected.count(); i < n; ++i ) { ids.append( selected[i]->id() ); @@ -793,7 +793,7 @@ void LayerList::menuActivated( int id, LayerItem *layer ) } } -void LayerList::slotItemRenamed( QListViewItem *item, const QString &text, int col ) +void LayerList::slotItemRenamed( TQListViewItem *item, const TQString &text, int col ) { if( !item || col != 0 ) return; @@ -802,7 +802,7 @@ void LayerList::slotItemRenamed( QListViewItem *item, const QString &text, int c emit displayNameChanged( static_cast<LayerItem*>( item )->id(), text ); } -void LayerList::slotItemMoved( QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &/*afterBefore*/, QPtrList<QListViewItem> &afterNow ) +void LayerList::slotItemMoved( TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &/*afterBefore*/, TQPtrList<TQListViewItem> &afterNow ) { for( int i = 0, n = items.count(); i < n; ++i ) { @@ -810,15 +810,15 @@ void LayerList::slotItemMoved( QPtrList<QListViewItem> &items, QPtrList<QListVie if( !l ) continue; - if( l->parent() ) - l->parent()->setOpen( true ); + if( l->tqparent() ) + l->tqparent()->setOpen( true ); - emit layerMoved( l, l->parent(), a ); - emit layerMoved( l->id(), l->parent() ? l->parent()->id() : -1, a ? a->id() : -1 ); + emit layerMoved( l, l->tqparent(), a ); + emit layerMoved( l->id(), l->tqparent() ? l->tqparent()->id() : -1, a ? a->id() : -1 ); } } -void LayerList::setCurrentItem( QListViewItem *item ) +void LayerList::setCurrentItem( TQListViewItem *item ) { if( !item ) return; @@ -839,14 +839,14 @@ void LayerList::setCurrentItem( QListViewItem *item ) // LayerItem // /////////////// -LayerItem::LayerItem( const QString &displayName, LayerList *p, LayerItem *after, int id ) +LayerItem::LayerItem( const TQString &displayName, LayerList *p, LayerItem *after, int id ) : super( p, after ), d( new Private( id ) ) { init(); setDisplayName( displayName ); } -LayerItem::LayerItem( const QString &displayName, LayerItem *p, LayerItem *after, int id ) +LayerItem::LayerItem( const TQString &displayName, LayerItem *p, LayerItem *after, int id ) : super( ( p && p->isFolder() ) ? p : 0, after ), d( new Private( id ) ) { init(); @@ -861,13 +861,13 @@ void LayerItem::init() for( int i = 0, n = listView()->d->properties.count(); i < n; ++i ) d->properties.append( listView()->d->properties[i].defaultValue ); - if( parent()) - parent()->setOpen( true ); + if( tqparent()) + tqparent()->setOpen( true ); } LayerItem::~LayerItem() { - if (listView() && (listView()->activeLayer() == this || contains(listView()->activeLayer()))) + if (listView() && (listView()->activeLayer() == this || tqcontains(listView()->activeLayer()))) listView()->setActiveLayer( static_cast<LayerItem*>( 0 ) ); delete d; } @@ -885,9 +885,9 @@ bool LayerItem::isFolder() const return d->isFolder; } -bool LayerItem::contains(const LayerItem *item) +bool LayerItem::tqcontains(const LayerItem *item) { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); while (it.current()) { if (static_cast<const LayerItem *>(it.current()) == item) { @@ -903,12 +903,12 @@ int LayerItem::id() const return d->id; } -QString LayerItem::displayName() const +TQString LayerItem::displayName() const { return text( 0 ); } -void LayerItem::setDisplayName( const QString &s ) +void LayerItem::setDisplayName( const TQString &s ) { if( displayName() == s ) return; @@ -927,7 +927,7 @@ void LayerItem::setActive() listView()->setActiveLayer( this ); } -bool LayerItem::property( const QString &name ) const +bool LayerItem::property( const TQString &name ) const { int i = listView()->d->properties.count() - 1; while( i && listView()->d->properties[i].name != name ) @@ -939,7 +939,7 @@ bool LayerItem::property( const QString &name ) const return d->properties[i]; } -void LayerItem::setProperty( const QString &name, bool on ) +void LayerItem::setProperty( const TQString &name, bool on ) { int i = listView()->d->properties.count() - 1; while( i && listView()->d->properties[i].name != name ) @@ -959,7 +959,7 @@ void LayerItem::setProperty( const QString &name, bool on ) update(); } -void LayerItem::toggleProperty( const QString &name ) +void LayerItem::toggleProperty( const TQString &name ) { int i = listView()->d->properties.count() - 1; while( i && listView()->d->properties[i].name != name ) @@ -975,7 +975,7 @@ void LayerItem::toggleProperty( const QString &name ) update(); } -void LayerItem::setPreviewImage( QImage *image ) +void LayerItem::setPreviewImage( TQImage *image ) { d->previewImage = image; previewChanged(); @@ -987,7 +987,7 @@ void LayerItem::previewChanged() update(); } -LayerItem *LayerItem::addLayer( const QString &displayName, LayerItem *after, int id ) +LayerItem *LayerItem::addLayer( const TQString &displayName, LayerItem *after, int id ) { if( !isFolder() ) return 0; @@ -996,7 +996,7 @@ LayerItem *LayerItem::addLayer( const QString &displayName, LayerItem *after, in LayerItem *LayerItem::prevSibling() const { - LayerItem *item = parent() ? parent()->firstChild() : listView()->firstChild(); + LayerItem *item = tqparent() ? tqparent()->firstChild() : listView()->firstChild(); if( !item || this == item ) return 0; for(; item && this != item->nextSibling(); item = item->nextSibling() ); @@ -1013,14 +1013,14 @@ int LayerItem::mapYFromListView( int y ) const return y - rect().top(); } -QPoint LayerItem::mapFromListView( const QPoint &point ) const +TQPoint LayerItem::mapFromListView( const TQPoint &point ) const { - return QPoint( mapXFromListView( point.x() ), mapYFromListView( point.y() ) ); + return TQPoint( mapXFromListView( point.x() ), mapYFromListView( point.y() ) ); } -QRect LayerItem::mapFromListView( const QRect &rect ) const +TQRect LayerItem::mapFromListView( const TQRect &rect ) const { - return QRect( mapFromListView( rect.topLeft() ), rect.size() ); + return TQRect( mapFromListView( rect.topLeft() ), rect.size() ); } int LayerItem::mapXToListView( int x ) const @@ -1033,26 +1033,26 @@ int LayerItem::mapYToListView( int y ) const return y + rect().top(); } -QPoint LayerItem::mapToListView( const QPoint &point ) const +TQPoint LayerItem::mapToListView( const TQPoint &point ) const { - return QPoint( mapXToListView( point.x() ), mapYToListView( point.y() ) ); + return TQPoint( mapXToListView( point.x() ), mapYToListView( point.y() ) ); } -QRect LayerItem::mapToListView( const QRect &rect ) const +TQRect LayerItem::mapToListView( const TQRect &rect ) const { - return QRect( mapToListView( rect.topLeft() ), rect.size() ); + return TQRect( mapToListView( rect.topLeft() ), rect.size() ); } -QRect LayerItem::rect() const +TQRect LayerItem::rect() const { const int indent = listView()->treeStepSize() * ( depth() + 1 ); - return QRect( listView()->header()->sectionPos( 0 ) + indent, itemPos(), + return TQRect( listView()->header()->sectionPos( 0 ) + indent, itemPos(), listView()->header()->sectionSize( 0 ) - indent, height() ); } -QRect LayerItem::textRect() const +TQRect LayerItem::textRect() const { - static QFont f; + static TQFont f; static int minbearing = 1337 + 666; //can be 0 or negative, 2003 is less likely if( minbearing == 2003 || f != font() ) { @@ -1067,12 +1067,12 @@ QRect LayerItem::textRect() const const int width = ( multiline() ? rect().right() : iconsRect().left() ) - indent - margin + minbearing; - return QRect( indent, 0, width, fontMetrics().height() ); + return TQRect( indent, 0, width, fontMetrics().height() ); } -QRect LayerItem::iconsRect() const +TQRect LayerItem::iconsRect() const { - const QValueList<LayerProperty> &lp = listView()->d->properties; + const TQValueList<LayerProperty> &lp = listView()->d->properties; int propscount = 0; for( int i = 0, n = lp.count(); i < n; ++i ) if( !lp[i].enabledIcon.isNull() && ( !multiline() || !isFolder() || lp[i].validForFolders ) ) @@ -1083,32 +1083,32 @@ QRect LayerItem::iconsRect() const const int x = multiline() ? previewRect().right() + listView()->itemMargin() : rect().width() - iconswidth; const int y = multiline() ? fontMetrics().height() : 0; - return QRect( x, y, iconswidth, iconSize().height() ); + return TQRect( x, y, iconswidth, iconSize().height() ); } -QRect LayerItem::previewRect() const +TQRect LayerItem::previewRect() const { - return QRect( 0, 0, listView()->previewsShown() ? height() : 0, height() ); + return TQRect( 0, 0, listView()->previewsShown() ? height() : 0, height() ); } -void LayerItem::drawText( QPainter *p, const QColorGroup &cg, const QRect &r ) +void LayerItem::drawText( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) { p->translate( r.left(), r.top() ); p->setPen( isSelected() ? cg.highlightedText() : cg.text() ); - const QString text = KStringHandler::rPixelSqueeze( displayName(), p->fontMetrics(), r.width() ); - p->drawText( listView()->itemMargin(), 0, r.width(), r.height(), Qt::AlignAuto | Qt::AlignTop, text ); + const TQString text = KStringHandler::rPixelSqueeze( displayName(), p->fontMetrics(), r.width() ); + p->drawText( listView()->itemMargin(), 0, r.width(), r.height(), TQt::AlignAuto | TQt::AlignTop, text ); p->translate( -r.left(), -r.top() ); } -void LayerItem::drawIcons( QPainter *p, const QColorGroup &/*cg*/, const QRect &r ) +void LayerItem::drawIcons( TQPainter *p, const TQColorGroup &/*cg*/, const TQRect &r ) { p->translate( r.left(), r.top() ); int x = 0; - const QValueList<LayerProperty> &lp = listView()->d->properties; + const TQValueList<LayerProperty> &lp = listView()->d->properties; for( int i = 0, n = lp.count(); i < n; ++i ) if( !lp[i].enabledIcon.isNull() && ( !multiline() || !isFolder() || lp[i].validForFolders ) ) { @@ -1120,7 +1120,7 @@ void LayerItem::drawIcons( QPainter *p, const QColorGroup &/*cg*/, const QRect & p->translate( -r.left(), -r.top() ); } -void LayerItem::drawPreview( QPainter *p, const QColorGroup &/*cg*/, const QRect &r ) +void LayerItem::drawPreview( TQPainter *p, const TQColorGroup &/*cg*/, const TQRect &r ) { if( !showPreview() ) return; @@ -1128,7 +1128,7 @@ void LayerItem::drawPreview( QPainter *p, const QColorGroup &/*cg*/, const QRect if( d->previewChanged || r.size() != d->previewSize ) { //TODO handle width() != height() const int size = kMin( r.width(), kMax( previewImage()->width(), previewImage()->height() ) ); - const QImage i = previewImage()->smoothScale( size, size, QImage::ScaleMin ); + const TQImage i = previewImage()->smoothScale( size, size, TQ_ScaleMin ); d->scaledPreview.convertFromImage( i ); d->previewOffset.setX( r.width()/2 - i.width()/2 ); d->previewOffset.setY( r.height()/2 - i.height()/2 ); @@ -1150,11 +1150,11 @@ bool LayerItem::multiline() const return height() >= fontMetrics().height() + iconSize().height(); } -QFont LayerItem::font() const +TQFont LayerItem::font() const { if( isActive() ) { - QFont f = listView()->font(); + TQFont f = listView()->font(); f.setBold( !f.bold() ); f.setItalic( !f.italic() ); return f; @@ -1163,30 +1163,30 @@ QFont LayerItem::font() const return listView()->font(); } -QFontMetrics LayerItem::fontMetrics() const +TQFontMetrics LayerItem::fontMetrics() const { - return QFontMetrics( font() ); + return TQFontMetrics( font() ); } -bool LayerItem::mousePressEvent( QMouseEvent *e ) +bool LayerItem::mousePressEvent( TQMouseEvent *e ) { if( e->button() == Qt::RightButton ) { - if ( !(e->state() & Qt::ControlButton) && !(e->state() & Qt::ShiftButton) ) + if ( !(e->state() & TQt::ControlButton) && !(e->state() & TQt::ShiftButton) ) setActive(); - QTimer::singleShot( 0, listView(), SLOT( showContextMenu() ) ); + TQTimer::singleShot( 0, listView(), TQT_SLOT( showContextMenu() ) ); return false; } - const QRect ir = iconsRect(), tr = textRect(); + const TQRect ir = iconsRect(), tr = textRect(); - if( ir.contains( e->pos() ) ) + if( ir.tqcontains( e->pos() ) ) { const int iconWidth = iconSize().width(); int x = e->pos().x() - ir.left(); if( x % ( iconWidth + listView()->itemMargin() ) < iconWidth ) //it's on an icon, not a margin { - const QValueList<LayerProperty> &lp = listView()->d->properties; + const TQValueList<LayerProperty> &lp = listView()->d->properties; int p = -1; for( int i = 0, n = lp.count(); i < n; ++i ) { @@ -1201,56 +1201,56 @@ bool LayerItem::mousePressEvent( QMouseEvent *e ) return true; } - else if( tr.contains( e->pos() ) && isSelected() && !listView()->renameLineEdit()->isVisible() ) + else if( tr.tqcontains( e->pos() ) && isSelected() && !listView()->renameLineEdit()->isVisible() ) { listView()->rename( this, 0 ); - QRect r( listView()->contentsToViewport( mapToListView( tr.topLeft() ) ), tr.size() ); + TQRect r( listView()->contentsToViewport( mapToListView( tr.topLeft() ) ), tr.size() ); listView()->renameLineEdit()->setGeometry( r ); return true; } - if ( !(e->state() & Qt::ControlButton) && !(e->state() & Qt::ShiftButton) ) + if ( !(e->state() & TQt::ControlButton) && !(e->state() & TQt::ShiftButton) ) setActive(); return false; } -QString LayerItem::tooltip() const +TQString LayerItem::tooltip() const { - QString tip; + TQString tip; tip += "<table cellspacing=\"0\" cellpadding=\"0\">"; - tip += QString("<tr><td colspan=\"2\" align=\"center\"><b>%1</b></td></tr>").arg( displayName() ); - QString row = "<tr><td>%1</td><td>%2</td></tr>"; + tip += TQString("<tr><td colspan=\"2\" align=\"center\"><b>%1</b></td></tr>").tqarg( displayName() ); + TQString row = "<tr><td>%1</td><td>%2</td></tr>"; for( int i = 0, n = listView()->d->properties.count(); i < n; ++i ) if( !isFolder() || listView()->d->properties[i].validForFolders ) { if( d->properties[i] ) - tip += row.arg( i18n( "%1:" ).arg( listView()->d->properties[i].displayName ) ).arg( i18n( "Yes" ) ); + tip += row.tqarg( i18n( "%1:" ).tqarg( listView()->d->properties[i].displayName ) ).tqarg( i18n( "Yes" ) ); else - tip += row.arg( i18n( "%1:" ).arg( listView()->d->properties[i].displayName ) ).arg( i18n( "No" ) ); + tip += row.tqarg( i18n( "%1:" ).tqarg( listView()->d->properties[i].displayName ) ).tqarg( i18n( "No" ) ); } tip += "</table>"; return tip; } -QImage *LayerItem::previewImage() const +TQImage *LayerItem::previewImage() const { return d->previewImage; } -QImage LayerItem::tooltipPreview() const +TQImage LayerItem::tooltipPreview() const { if( previewImage() ) return *previewImage(); - return QImage(); + return TQImage(); } -int LayerItem::width( const QFontMetrics &fm, const QListView *lv, int c ) const +int LayerItem::width( const TQFontMetrics &fm, const TQListView *lv, int c ) const { if( c != 0 ) return super::width( fm, lv, c ); - const QValueList<LayerProperty> &lp = listView()->d->properties; + const TQValueList<LayerProperty> &lp = listView()->d->properties; int propscount = 0; for( int i = 0, n = d->properties.count(); i < n; ++i ) if( !lp[i].enabledIcon.isNull() && ( !multiline() || !isFolder() || lp[i].validForFolders ) ) @@ -1264,7 +1264,7 @@ int LayerItem::width( const QFontMetrics &fm, const QListView *lv, int c ) const return super::width( fm, lv, 0 ) + iconswidth; } -void LayerItem::paintCell( QPainter *painter, const QColorGroup &cg, int column, int width, int align ) +void LayerItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int column, int width, int align ) { if( column != 0 ) { @@ -1272,14 +1272,14 @@ void LayerItem::paintCell( QPainter *painter, const QColorGroup &cg, int column, return; } - QPixmap buf( width, height() ); - QPainter p( &buf ); + TQPixmap buf( width, height() ); + TQPainter p( &buf ); p.setFont( font() ); - const QColorGroup cg_ = isEnabled() ? listView()->palette().active() : listView()->palette().disabled(); + const TQColorGroup cg_ = isEnabled() ? listView()->palette().active() : listView()->palette().disabled(); - const QColor bg = isSelected() ? cg_.highlight() + const TQColor bg = isSelected() ? cg_.highlight() : isAlternate() ? listView()->alternateBackground() : listView()->viewport()->backgroundColor(); @@ -1316,10 +1316,10 @@ void LayerItem::setSelected( bool selected ) LayerItem *LayerList::firstChild() const { return static_cast<LayerItem*>( super::firstChild() ); } LayerItem *LayerList::lastChild() const { return static_cast<LayerItem*>( super::lastChild() ); } LayerList *LayerItem::listView() const { return static_cast<LayerList*>( super::listView() ); } -void LayerItem::update() const { listView()->repaintItem( this ); } +void LayerItem::update() const { listView()->tqrepaintItem( this ); } LayerItem *LayerItem::firstChild() const { return static_cast<LayerItem*>( super::firstChild() ); } LayerItem *LayerItem::nextSibling() const { return static_cast<LayerItem*>( super::nextSibling() ); } -LayerItem *LayerItem::parent() const { return static_cast<LayerItem*>( super::parent() ); } +LayerItem *LayerItem::tqparent() const { return static_cast<LayerItem*>( super::tqparent() ); } #include "layerlist.moc" diff --git a/krita/ui/layerlist.h b/krita/ui/layerlist.h index b981b266..129baa7c 100644 --- a/krita/ui/layerlist.h +++ b/krita/ui/layerlist.h @@ -21,27 +21,28 @@ #ifndef LAYERLIST_H #define LAYERLIST_H -#include <qiconset.h> +#include <tqiconset.h> #include <klistview.h> -class QMouseEvent; -class QString; +class TQMouseEvent; +class TQString; class KPopupMenu; class LayerItem; class LayerFolder; -template<class T> class QPtrList; +template<class T> class TQPtrList; class LayerList: public KListView { Q_OBJECT + TQ_OBJECT public: - LayerList( QWidget *parent = 0, const char *name = 0 ); + LayerList( TQWidget *tqparent = 0, const char *name = 0 ); virtual ~LayerList(); - void addProperty( const QString &name, const QString &displayName, const QIconSet &icon = QIconSet(), + void addProperty( const TQString &name, const TQString &displayName, const TQIconSet &icon = TQIconSet(), bool defaultValue = false, bool validForFolders = true ); - void addProperty( const QString &name, const QString &displayName, QPixmap enabled, QPixmap disabled, + void addProperty( const TQString &name, const TQString &displayName, TQPixmap enabled, TQPixmap disabled, bool defaultValue = false, bool validForFolders = true ); bool foldersCanBeActive() const; @@ -55,13 +56,13 @@ public: LayerItem *activeLayer() const; int activeLayerID() const; - QValueList<LayerItem*> selectedLayers() const; - QValueList<int> selectedLayerIDs() const; + TQValueList<LayerItem*> selectedLayers() const; + TQValueList<int> selectedLayerIDs() const; void makeFolder( int id ); bool isFolder( int id ) const; - QString displayName( int id ) const; - bool property( int id, const QString &name ) const; + TQString displayName( int id ) const; + bool property( int id, const TQString &name ) const; struct MenuItems { @@ -78,29 +79,29 @@ public slots: void setActiveLayer( LayerItem *layer ); void setActiveLayer( int id ); - void setLayerDisplayName( LayerItem *layer, const QString &displayName ); - void setLayerDisplayName( int id, const QString &displayName ); + void setLayerDisplayName( LayerItem *layer, const TQString &displayName ); + void setLayerDisplayName( int id, const TQString &displayName ); - void setLayerProperty( LayerItem *layer, const QString &name, bool on ); - void setLayerProperty( int id, const QString &name, bool on ); + void setLayerProperty( LayerItem *layer, const TQString &name, bool on ); + void setLayerProperty( int id, const TQString &name, bool on ); - void toggleLayerProperty( LayerItem *layer, const QString &name ); - void toggleLayerProperty( int id, const QString &name ); + void toggleLayerProperty( LayerItem *layer, const TQString &name ); + void toggleLayerProperty( int id, const TQString &name ); - void setLayerPreviewImage( LayerItem *layer, QImage *image ); - void setLayerPreviewImage( int id, QImage *image ); + void setLayerPreviewImage( LayerItem *layer, TQImage *image ); + void setLayerPreviewImage( int id, TQImage *image ); void layerPreviewChanged( LayerItem *layer ); void layerPreviewChanged( int id ); - LayerItem *addLayer( const QString &displayName, LayerItem *after = 0, int id = -1 ); - LayerItem *addLayer( const QString &displayName, int afterID, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, int afterID, int id = -1 ); - LayerItem *addLayerToParent( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ); - LayerItem *addLayerToParent( const QString &displayName, int parentID, int afterID = -1, int id = -1 ); + LayerItem *addLayerToParent( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayerToParent( const TQString &displayName, int tqparentID, int afterID = -1, int id = -1 ); - void moveLayer( LayerItem *layer, LayerItem *parent, LayerItem *after ); - void moveLayer( int id, int parentID, int afterID ); + void moveLayer( LayerItem *layer, LayerItem *tqparent, LayerItem *after ); + void moveLayer( int id, int tqparentID, int afterID ); void removeLayer( LayerItem *layer ); void removeLayer( int id ); @@ -109,26 +110,26 @@ signals: void activated( LayerItem *layer ); void activated( int id ); - void displayNameChanged( LayerItem *layer, const QString &displayName ); - void displayNameChanged( int id, const QString &displayName ); + void displayNameChanged( LayerItem *layer, const TQString &displayName ); + void displayNameChanged( int id, const TQString &displayName ); - void propertyChanged( LayerItem *layer, const QString &name, bool on ); - void propertyChanged( int id, const QString &name, bool on ); + void propertyChanged( LayerItem *layer, const TQString &name, bool on ); + void propertyChanged( int id, const TQString &name, bool on ); - void layerMoved( LayerItem *layer, LayerItem *parent, LayerItem *after ); - void layerMoved( int id, int parentID, int afterID ); + void layerMoved( LayerItem *layer, LayerItem *tqparent, LayerItem *after ); + void layerMoved( int id, int tqparentID, int afterID ); - void requestNewLayer( LayerItem *parent, LayerItem *after ); - void requestNewLayer( int parentID, int afterID ); + void requestNewLayer( LayerItem *tqparent, LayerItem *after ); + void requestNewLayer( int tqparentID, int afterID ); - void requestNewFolder( LayerItem *parent, LayerItem *after ); - void requestNewFolder( int parentID, int afterID ); + void requestNewFolder( LayerItem *tqparent, LayerItem *after ); + void requestNewFolder( int tqparentID, int afterID ); void requestRemoveLayer( LayerItem *layer ); void requestRemoveLayer( int id ); - void requestRemoveLayers( QValueList<LayerItem*> layers ); - void requestRemoveLayers( QValueList<int> ids ); + void requestRemoveLayers( TQValueList<LayerItem*> layers ); + void requestRemoveLayers( TQValueList<int> ids ); void requestLayerProperties( LayerItem *layer ); void requestLayerProperties( int id ); @@ -150,26 +151,26 @@ private: Private* const d; private slots: - void slotItemRenamed( QListViewItem *item, const QString &text, int col ); - void slotItemMoved( QPtrList<QListViewItem>&, QPtrList<QListViewItem>&, QPtrList<QListViewItem>& ); + void slotItemRenamed( TQListViewItem *item, const TQString &text, int col ); + void slotItemMoved( TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>& ); void showContextMenu(); void hideTip(); void maybeTip(); public: //reimplemented for internal reasons - virtual void setCurrentItem( QListViewItem *i ); + virtual void setCurrentItem( TQListViewItem *i ); protected: - virtual void contentsMousePressEvent( QMouseEvent *e ); - virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e ); - virtual void findDrop( const QPoint &pos, QListViewItem *&parent, QListViewItem *&after ); + virtual void contentsMousePressEvent( TQMouseEvent *e ); + virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e ); + virtual void findDrop( const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after ); }; class LayerItem: public KListViewItem { public: - LayerItem( const QString &displayName, LayerList *parent, LayerItem *after = 0, int id = -1 ); - LayerItem( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ); + LayerItem( const TQString &displayName, LayerList *tqparent, LayerItem *after = 0, int id = -1 ); + LayerItem( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ); virtual ~LayerItem(); void makeFolder(); @@ -177,24 +178,24 @@ public: // Returns true if this item is the given item or the tree rooted at // this item contains the given item. - bool contains(const LayerItem *item); + bool tqcontains(const LayerItem *item); int id() const; - QString displayName() const; - void setDisplayName( const QString &displayName ); + TQString displayName() const; + void setDisplayName( const TQString &displayName ); bool isActive() const; void setActive(); - bool property( const QString &name ) const; - void setProperty( const QString &name, bool on ); - void toggleProperty( const QString &name ); + bool property( const TQString &name ) const; + void setProperty( const TQString &name, bool on ); + void toggleProperty( const TQString &name ); - void setPreviewImage( QImage *image ); + void setPreviewImage( TQImage *image ); void previewChanged(); - LayerItem *addLayer( const QString &displayName, LayerItem *after = 0, int id = -1 ); + LayerItem *addLayer( const TQString &displayName, LayerItem *after = 0, int id = -1 ); LayerItem *prevSibling() const; @@ -202,41 +203,41 @@ public: //convenience LayerItem *nextSibling() const; LayerList *listView() const; LayerItem *firstChild() const; - LayerItem *parent() const; - void update() const; //like QWidget::update() + LayerItem *tqparent() const; + void update() const; //like TQWidget::update() protected: - virtual QRect rect() const; + virtual TQRect rect() const; int mapXFromListView( int x ) const; int mapYFromListView( int y ) const; - QPoint mapFromListView( const QPoint &point ) const; - QRect mapFromListView( const QRect &rect ) const; + TQPoint mapFromListView( const TQPoint &point ) const; + TQRect mapFromListView( const TQRect &rect ) const; int mapXToListView( int x ) const; int mapYToListView( int y ) const; - QPoint mapToListView( const QPoint &point ) const; - QRect mapToListView( const QRect &rect ) const; + TQPoint mapToListView( const TQPoint &point ) const; + TQRect mapToListView( const TQRect &rect ) const; - virtual QRect textRect() const; - virtual QRect iconsRect() const; - virtual QRect previewRect() const; + virtual TQRect textRect() const; + virtual TQRect iconsRect() const; + virtual TQRect previewRect() const; - virtual void drawText( QPainter *p, const QColorGroup &cg, const QRect &r ); - virtual void drawIcons( QPainter *p, const QColorGroup &cg, const QRect &r ); - virtual void drawPreview( QPainter *p, const QColorGroup &cg, const QRect &r ); + virtual void drawText( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); + virtual void drawIcons( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); + virtual void drawPreview( TQPainter *p, const TQColorGroup &cg, const TQRect &r ); bool multiline() const; bool showPreview() const; - virtual QFont font() const; - QFontMetrics fontMetrics() const; + virtual TQFont font() const; + TQFontMetrics fontMetrics() const; - virtual bool mousePressEvent( QMouseEvent *e ); + virtual bool mousePressEvent( TQMouseEvent *e ); - virtual QString tooltip() const; + virtual TQString tooltip() const; - virtual QImage *previewImage() const; - virtual QImage tooltipPreview() const; + virtual TQImage *previewImage() const; + virtual TQImage tooltipPreview() const; private: typedef KListViewItem super; @@ -249,8 +250,8 @@ private: void init(); public: //reimplemented for internal reasons - virtual int width( const QFontMetrics &fm, const QListView *lv, int c ) const; - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + virtual int width( const TQFontMetrics &fm, const TQListView *lv, int c ) const; + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); virtual void setup(); virtual void setSelected( bool selected ); }; @@ -258,10 +259,10 @@ public: //reimplemented for internal reasons class LayerFolder: public LayerItem { public: - LayerFolder( const QString &displayName, LayerList *parent, LayerItem *after = 0, int id = -1 ) - : LayerItem( displayName, parent, after, id ) { makeFolder(); } - LayerFolder( const QString &displayName, LayerItem *parent, LayerItem *after = 0, int id = -1 ) - : LayerItem( displayName, parent, after, id ) { makeFolder(); } + LayerFolder( const TQString &displayName, LayerList *tqparent, LayerItem *after = 0, int id = -1 ) + : LayerItem( displayName, tqparent, after, id ) { makeFolder(); } + LayerFolder( const TQString &displayName, LayerItem *tqparent, LayerItem *after = 0, int id = -1 ) + : LayerItem( displayName, tqparent, after, id ) { makeFolder(); } }; diff --git a/krita/ui/squeezedcombobox.cpp b/krita/ui/squeezedcombobox.cpp index 971a73e6..81aaa33f 100644 --- a/krita/ui/squeezedcombobox.cpp +++ b/krita/ui/squeezedcombobox.cpp @@ -20,54 +20,54 @@ /** @file squeezedcombobox.cpp */ -// Qt includes. +// TQt includes. -#include <qlistbox.h> -#include <qcombobox.h> -#include <qpair.h> -#include <qtimer.h> -#include <qvaluelist.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qtooltip.h> +#include <tqlistbox.h> +#include <tqcombobox.h> +#include <tqpair.h> +#include <tqtimer.h> +#include <tqvaluelist.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqtooltip.h> // Local includes. #include "squeezedcombobox.h" -SqueezedComboBoxTip::SqueezedComboBoxTip( QWidget * parent, SqueezedComboBox* name ) - : QToolTip( parent ) +SqueezedComboBoxTip::SqueezedComboBoxTip( TQWidget * tqparent, SqueezedComboBox* name ) + : TQToolTip( tqparent ) { m_originalWidget = name; } -void SqueezedComboBoxTip::maybeTip( const QPoint &pos ) +void SqueezedComboBoxTip::maybeTip( const TQPoint &pos ) { - QListBox* listBox = m_originalWidget->listBox(); + TQListBox* listBox = m_originalWidget->listBox(); if (!listBox) return; - QListBoxItem* selectedItem = listBox->itemAt( pos ); + TQListBoxItem* selectedItem = listBox->itemAt( pos ); if (selectedItem) { - QRect positionToolTip = listBox->itemRect( selectedItem ); - QString toolTipText = m_originalWidget->itemHighlighted(); + TQRect positionToolTip = listBox->tqitemRect( selectedItem ); + TQString toolTipText = m_originalWidget->itemHighlighted(); if (!toolTipText.isNull()) tip(positionToolTip, toolTipText); } } -SqueezedComboBox::SqueezedComboBox( QWidget *parent, const char *name ) - : QComboBox( parent, name ) +SqueezedComboBox::SqueezedComboBox( TQWidget *tqparent, const char *name ) + : TQComboBox( tqparent, name ) { setMinimumWidth(100); - m_timer = new QTimer(this); + m_timer = new TQTimer(this); m_tooltip = new SqueezedComboBoxTip( listBox()->viewport(), this ); - connect(m_timer, SIGNAL(timeout()), - SLOT(slotTimeOut())); - connect(this, SIGNAL(activated( int )), - SLOT(slotUpdateToolTip( int ))); + connect(m_timer, TQT_SIGNAL(timeout()), + TQT_SLOT(slotTimeOut())); + connect(this, TQT_SIGNAL(activated( int )), + TQT_SLOT(slotUpdateToolTip( int ))); } SqueezedComboBox::~SqueezedComboBox() @@ -76,7 +76,7 @@ SqueezedComboBox::~SqueezedComboBox() delete m_timer; } -bool SqueezedComboBox::contains( const QString& _text ) const +bool SqueezedComboBox::tqcontains( const TQString& _text ) const { if ( _text.isEmpty() ) return false; @@ -90,20 +90,20 @@ bool SqueezedComboBox::contains( const QString& _text ) const return false; } -QSize SqueezedComboBox::sizeHint() const +TQSize SqueezedComboBox::tqsizeHint() const { constPolish(); - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); - int maxW = count() ? 18 : 7 * fm.width(QChar('x')) + 18; - int maxH = QMAX( fm.lineSpacing(), 14 ) + 2; + int maxW = count() ? 18 : 7 * fm.width(TQChar('x')) + 18; + int maxH = TQMAX( fm.lineSpacing(), 14 ) + 2; - return style().sizeFromContents(QStyle::CT_ComboBox, this, - QSize(maxW, maxH)). - expandedTo(QApplication::globalStrut()); + return style().sizeFromContents(TQStyle::CT_ComboBox, this, + TQSize(maxW, maxH)). + expandedTo(TQApplication::globalStrut()); } -void SqueezedComboBox::insertSqueezedItem(const QString& newItem, int index) +void SqueezedComboBox::insertSqueezedItem(const TQString& newItem, int index) { m_originalItems[index] = newItem; insertItem( squeezeText(newItem), index ); @@ -113,14 +113,14 @@ void SqueezedComboBox::insertSqueezedItem(const QString& newItem, int index) slotUpdateToolTip(0); } -void SqueezedComboBox::resizeEvent ( QResizeEvent * ) +void SqueezedComboBox::resizeEvent ( TQResizeEvent * ) { m_timer->start(200, true); } void SqueezedComboBox::slotTimeOut() { - QMapIterator<int,QString> it; + TQMapIterator<int,TQString> it; for (it = m_originalItems.begin() ; it != m_originalItems.end(); ++it) { @@ -128,24 +128,24 @@ void SqueezedComboBox::slotTimeOut() } } -QString SqueezedComboBox::squeezeText( const QString& original) +TQString SqueezedComboBox::squeezeText( const TQString& original) { // not the complete widgetSize is usable. Need to compensate for that. int widgetSize = width()-30; - QFontMetrics fm( fontMetrics() ); + TQFontMetrics fm( fontMetrics() ); // If we can fit the full text, return that. if (fm.width(original) < widgetSize) return(original); // We need to squeeze. - QString sqItem = original; // prevent empty return value; + TQString sqItem = original; // prevent empty return value; widgetSize = widgetSize-fm.width("..."); for (uint i = 0 ; i != original.length(); ++i) { if ( (int)fm.width(original.right(i)) > widgetSize) { - sqItem = QString("..." + original.right(--i)); + sqItem = TQString("..." + original.right(--i)); break; } } @@ -154,11 +154,11 @@ QString SqueezedComboBox::squeezeText( const QString& original) void SqueezedComboBox::slotUpdateToolTip( int index ) { - QToolTip::remove(this); - QToolTip::add(this, m_originalItems[index]); + TQToolTip::remove(this); + TQToolTip::add(this, m_originalItems[index]); } -QString SqueezedComboBox::itemHighlighted() +TQString SqueezedComboBox::itemHighlighted() { int curItem = this->listBox()->currentItem(); return m_originalItems[curItem]; diff --git a/krita/ui/squeezedcombobox.h b/krita/ui/squeezedcombobox.h index 51f9eb51..66758335 100644 --- a/krita/ui/squeezedcombobox.h +++ b/krita/ui/squeezedcombobox.h @@ -20,15 +20,15 @@ /** @file squeezedcombobox.h */ -#ifndef SQUEEZEDCOMBOBOX_H -#define SQUEEZEDCOMBOBOX_H +#ifndef STQUEEZEDCOMBOBOX_H +#define STQUEEZEDCOMBOBOX_H -class QTimer; +class TQTimer; -// Qt includes. +// TQt includes. -#include <qcombobox.h> -#include <qtooltip.h> +#include <tqcombobox.h> +#include <tqtooltip.h> class SqueezedComboBox; @@ -37,11 +37,11 @@ class SqueezedComboBox; * the tooltip will contain the full text and helps * the user find the correct entry. It is automatically * activated when starting a SqueezedComboBox. This is - * inherited from QToolTip + * inherited from TQToolTip * * @author Tom Albers */ -class SqueezedComboBoxTip : public QToolTip +class SqueezedComboBoxTip : public TQToolTip { public: /** @@ -51,18 +51,18 @@ public: * t = new SqueezedComboBoxTip( this->listBox()->viewport(), this ); * @endcode * - * @param parent parent widget (viewport) - * @param name parent widget + * @param tqparent tqparent widget (viewport) + * @param name tqparent widget */ - SqueezedComboBoxTip( QWidget *parent, SqueezedComboBox *name ); + SqueezedComboBoxTip( TQWidget *tqparent, SqueezedComboBox *name ); protected: /** - * Reimplemented version from QToolTip which shows the + * Reimplemented version from TQToolTip which shows the * tooltip when needed. * @param pos the point where the mouse currently is */ - void maybeTip( const QPoint& pos ); + void maybeTip( const TQPoint& pos ); private: SqueezedComboBox* m_originalWidget; @@ -70,7 +70,7 @@ private: /** @class SqueezedComboBox * - * This widget is a QComboBox, but then a little bit + * This widget is a TQComboBox, but then a little bit * different. It only shows the right part of the items * depending on de size of the widget. When it is not * possible to show the complete item, it will be shortened @@ -79,58 +79,59 @@ private: * @image html squeezedcombobox.png "This is how it looks" * @author Tom Albers */ -class SqueezedComboBox : public QComboBox +class SqueezedComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: /** * Constructor - * @param parent parent widget + * @param tqparent tqparent widget * @param name name to give to the widget */ - SqueezedComboBox(QWidget *parent = 0, const char *name = 0 ); + SqueezedComboBox(TQWidget *tqparent = 0, const char *name = 0 ); /** * destructor */ virtual ~SqueezedComboBox(); - bool contains(const QString & text) const; + bool tqcontains(const TQString & text) const; /** - * This inserts a item to the list. See QComboBox::insertItem() - * for detaills. Please do not use QComboBox::insertItem() to this + * This inserts a item to the list. See TQComboBox::insertItem() + * for detaills. Please do not use TQComboBox::insertItem() to this * widget, as that will fail. * @param newItem the original (long version) of the item which needs * to be added to the combobox * @param index the position in the widget. */ - void insertSqueezedItem(const QString& newItem, int index); + void insertSqueezedItem(const TQString& newItem, int index); /** * This method returns the full text (not squeezed) of the currently * highlighted item. * @return full text of the highlighted item */ - QString itemHighlighted( ); + TQString itemHighlighted( ); /** - * Sets the sizeHint() of this widget. + * Sets the tqsizeHint() of this widget. */ - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; private slots: void slotTimeOut(); void slotUpdateToolTip( int index ); private: - void resizeEvent ( QResizeEvent * ); - QString squeezeText( const QString& original); + void resizeEvent ( TQResizeEvent * ); + TQString squeezeText( const TQString& original); - QMap<int,QString> m_originalItems; - QTimer* m_timer; + TQMap<int,TQString> m_originalItems; + TQTimer* m_timer; SqueezedComboBoxTip* m_tooltip; }; -#endif // SQUEEZEDCOMBOBOX_H +#endif // STQUEEZEDCOMBOBOX_H diff --git a/krita/ui/wdgapplyprofile.ui b/krita/ui/wdgapplyprofile.ui index f486b625..549cd10c 100644 --- a/krita/ui/wdgapplyprofile.ui +++ b/krita/ui/wdgapplyprofile.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>WdgApplyProfile</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgApplyProfile</cstring> </property> @@ -24,7 +24,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -35,7 +35,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblProfile</cstring> </property> @@ -64,18 +64,18 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>The image data you want to paste does not have an ICM profile associated with it. If you do not select a profile, Krita will assume that the image data is encoded in the import profile defined in the Settings dialog.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>grpRenderIntent</cstring> </property> @@ -92,7 +92,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioRelativeColorimetric</cstring> </property> @@ -103,7 +103,7 @@ <string>Within and outside gamut; same as Absolute Colorimetric. White point changed to result in neutral grays.</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioSaturation</cstring> </property> @@ -114,7 +114,7 @@ <string>Hue and saturation maintained with lightness sacrificed to maintain saturation. White point changed to result in neutral grays. Intended for business graphics (make it colorful charts, graphs, overheads, ...)</string> </property> </widget> - <widget class="QRadioButton" row="3" column="0"> + <widget class="TQRadioButton" row="3" column="0"> <property name="name"> <cstring>radioButton4</cstring> </property> @@ -125,7 +125,7 @@ <string>Within the destination device gamut; hue, lightness and saturation are maintained. Outside the gamut; hue and lightness are maintained, saturation is sacrificed. White point for source and destination; unchanged. Intended for spot colors (Pantone, TruMatch, logo colors, ...)</string> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioPerceptual</cstring> </property> @@ -168,5 +168,5 @@ <tabstops> <tabstop>cmbProfile</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgautobrush.ui b/krita/ui/wdgautobrush.ui index dd6b55fc..a8aa02e0 100644 --- a/krita/ui/wdgautobrush.ui +++ b/krita/ui/wdgautobrush.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgAutobrush</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgAutobrush</cstring> </property> @@ -24,15 +24,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpSize</cstring> </property> @@ -46,9 +46,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <grid> <property name="name"> @@ -57,7 +57,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -76,7 +76,7 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>spinBoxWidth</cstring> </property> @@ -90,7 +90,7 @@ <number>5</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -101,7 +101,7 @@ <pixmap>image1</pixmap> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>spinBoxHeigth</cstring> </property> @@ -117,7 +117,7 @@ </widget> </grid> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnLinkSize</cstring> </property> @@ -129,13 +129,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>16</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>16</width> <height>32767</height> @@ -153,7 +153,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpFade</cstring> </property> @@ -167,9 +167,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <grid> <property name="name"> @@ -178,7 +178,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabelHorizontal</cstring> </property> @@ -189,7 +189,7 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>spinBoxHorizontal</cstring> </property> @@ -203,7 +203,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -214,7 +214,7 @@ <pixmap>image1</pixmap> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>spinBoxVertical</cstring> </property> @@ -230,7 +230,7 @@ </widget> </grid> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnLinkFade</cstring> </property> @@ -242,13 +242,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>16</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>16</width> <height>32767</height> @@ -271,15 +271,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>brushPreview</cstring> </property> @@ -291,7 +291,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>95</width> <height>95</height> @@ -304,7 +304,7 @@ <bool>true</bool> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Circle</string> @@ -332,7 +332,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> @@ -351,5 +351,5 @@ <data format="PNG" length="242">89504e470d0a1a0a0000000d49484452000000190000001a0806000000427df7cd000000b9494441544889dd95410ec4200845b1e9ba78ff538a176056260c5181569bccfca590ff2a204da510ecd601008078ed8778953372cec8db20d23c0a72417aa611900999997941a795500a256d2acf7a434354bf212d4927ebc488a417518d4dd75d0dcbb5f2ed983d59f101af94eb7f20d39e3c1963136299f7e2b361f89d9e8c6ed16efc4ee3892a205ecb9adc24fdcc176ffd4b9839e9b896592eb9d623b1106464e605b821da340200086e61afb91ea2a377e89577e57f00357f504513c00b590000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgautogradient.ui b/krita/ui/wdgautogradient.ui index ab2821c8..59875f87 100644 --- a/krita/ui/wdgautogradient.ui +++ b/krita/ui/wdgautogradient.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgAutogradient</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgAutogradient</cstring> </property> @@ -22,7 +22,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -45,7 +45,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>30</height> @@ -55,9 +55,9 @@ <enum>ClickFocus</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <property name="font"> <font> @@ -69,9 +69,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <property name="font"> <font> @@ -81,7 +81,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -93,9 +93,9 @@ <string>Segment Color</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <property name="font"> <font> @@ -105,7 +105,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelLeftColor</cstring> </property> @@ -129,7 +129,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>30</height> @@ -148,9 +148,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <property name="font"> <font> @@ -160,7 +160,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelRightColor</cstring> </property> @@ -184,7 +184,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>30</width> <height>30</height> @@ -205,9 +205,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <property name="font"> <font> @@ -217,7 +217,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -285,9 +285,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11_2</cstring> + <cstring>tqlayout11_2</cstring> </property> <property name="font"> <font> @@ -299,7 +299,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Linear</string> @@ -336,7 +336,7 @@ <enum>ClickFocus</enum> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>RGB</string> @@ -392,7 +392,7 @@ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> </includehints> diff --git a/krita/ui/wdgbirdeye.ui b/krita/ui/wdgbirdeye.ui index 0333ef7a..77f03131 100644 --- a/krita/ui/wdgbirdeye.ui +++ b/krita/ui/wdgbirdeye.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgBirdEye</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgBirdEye</cstring> </property> @@ -23,9 +23,9 @@ <property name="caption"> <string>Overview</string> </property> - <property name="layoutMargin" stdset="0"> + <property name="tqlayoutMargin" stdset="0"> </property> - <property name="layoutSpacing" stdset="0"> + <property name="tqlayoutSpacing" stdset="0"> </property> <vbox> <property name="name"> @@ -37,9 +37,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -51,15 +51,15 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblX</cstring> </property> @@ -67,17 +67,17 @@ <string>X:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>txtX</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>50</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>50</width> <height>32767</height> @@ -93,7 +93,7 @@ <string>00000</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblY</cstring> </property> @@ -101,17 +101,17 @@ <string>Y:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>txtY</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>50</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>50</width> <height>32767</height> @@ -137,7 +137,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -146,7 +146,7 @@ </spacer> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>view</cstring> </property> @@ -158,13 +158,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>75</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>200</width> <height>75</height> @@ -186,16 +186,16 @@ <property name="name"> <cstring>toolbar</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32</height> </size> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -224,7 +224,7 @@ <number>10</number> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>slZoom</cstring> </property> @@ -249,7 +249,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bn100</cstring> </property> @@ -290,13 +290,13 @@ <includes> <include location="local" impldecl="in declaration">kiconloader.h</include> </includes> -<slots> +<Q_SLOTS> <slot>zoomChanged(int)</slot> <slot>zoomMinus()</slot> <slot>zoomPlus()</slot> -</slots> +</Q_SLOTS> <pixmapfunction>BarIcon</pixmapfunction> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>ktoolbar.h</includehint> <includehint>knuminput.h</includehint> diff --git a/krita/ui/wdgcolorsettings.ui b/krita/ui/wdgcolorsettings.ui index 63034d50..3d2def86 100644 --- a/krita/ui/wdgcolorsettings.ui +++ b/krita/ui/wdgcolorsettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgColorSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgColorSettings</cstring> </property> @@ -19,15 +19,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -47,7 +47,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>20</height> @@ -56,7 +56,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>grpDisplay</cstring> </property> @@ -67,7 +67,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -81,7 +81,7 @@ <string>The icm profile for your calibrated monitor.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -154,7 +154,7 @@ The different rendering intent methods will affect only what is shown on screen, </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -186,7 +186,7 @@ The different rendering intent methods will affect only what is shown on screen, <cstring>cmbPrintProfile</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lbldefaultprinterspace</cstring> </property> @@ -194,7 +194,7 @@ The different rendering intent methods will affect only what is shown on screen, <string>Color model:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -210,7 +210,7 @@ The different rendering intent methods will affect only what is shown on screen, </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>grpPasteBehaviour</cstring> </property> @@ -221,18 +221,18 @@ The different rendering intent methods will affect only what is shown on screen, <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> <property name="text"> <string><p>Select what color profile to add when pasting from external applications that do not use a color profile.</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioPasteWeb</cstring> </property> @@ -243,7 +243,7 @@ The different rendering intent methods will affect only what is shown on screen, <string>sRGB are like images from the web are supposed to be seen.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioPasteMonitor</cstring> </property> @@ -254,7 +254,7 @@ The different rendering intent methods will affect only what is shown on screen, <string>This is like you see it in the other application</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioPasteAsk</cstring> </property> @@ -264,15 +264,15 @@ The different rendering intent methods will affect only what is shown on screen, </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>chkBlackpoint</cstring> </property> @@ -295,7 +295,7 @@ The different rendering intent methods will affect only what is shown on screen, <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -346,7 +346,7 @@ The different rendering intent methods will affect only what is shown on screen, <data format="PNG" length="1003">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388db5944d4c5c5518869f73ce9db9cc40f929cc30300e18129a50685268a28291982e1a2175212eaab1c49d3f8971e7aec6aedb54a32b435dd8685cb8c0c4b8b0feb421b7bd8186a069d23209144b18cb0c02f3732ff3c3ccbdd705a571941213f1dd9d93739ef37e6fbeef08d334d9d5d0d090c701c8344d2176c1a6697a5d5d5dd8b64d2a95c2b2ac7f05b12c8b783c8e6118d8b6fd685fdb753a39394928e2a7c55724d693a7e214104220242805520a84d8b9e4790f0b1302c7751958f1e30534be9fa41a0c60db362dbe227f64af91b6e7719c2dfc0117a71c603da591de2882a7d3d4ec27122b10acad50aeb88044d542b84de3af7ab44aa55274f4e449dbf354bc347aa096fbf37e7efa2ecbad1b36907d78b289de8120232f37726250c3f52cf0a026a0f6065b9645d929e038167aa096d91b307171059034b5f8e9e9eb44fa052b4b25eeccd9dc99cb71f6ad082fbea2e351c075bdbdc13b9109fc01b83fef63e2e232e03076b68393231a0dcd024daf502c1e66e67a89cb971ef0e5a74bb4b61e6378248094b92ab0ac024b70ca017ef8360394187b2dc6d8b89ffa500e4d4f93d9083275d5e6f9913ade3dd70ee87c7d25c95646a25415aadab152b09ed4f8c5cc130a853839eac3951b684a61e70ef3f9c739668c24eba912afbfddc6d4d506e6a6d7b8b7d082aa8eb8dab19482cdcd220e36dd3dc19df23545de0a71f952861923493456cfd3cf36123c54a0b7bf0e8064621b21f7712c040857071ca4eea0f40a99f510573ec971cb48030e811a1faded3e94be85f2fb00703d1ff26f96ab9f011a5b04d0c4f26fdb948a754c1b25668c2491483d5d5d611617d6b8f0fe32cb779b492ce65168b4c774a4701eefd8f3a02d56e6e8f13aeefe9a63fa5a89d1970e91d908f3d46003e1480d173e28b37827c9b977348ab92ce16890237d1ec907ee3e8e3d8f60d0e1f4583d009f7d9860662acff89bad1c1faad0717493f7ce7713ed8cb0995c255f2a317a26427b67198f6a70f51c0a41b902279ed1187f23cc17130b7c74de65eac77a7a8f05517e41e2deefa4930576db60fa7a8ee1535134df3e93e7b82e0817476439fd6a9070a49f6fbe4a3077739db99b15c001146dd13a46cf1cc1f83943c62e51de76b0738fc9381e8f3390f0236b252e124999e11724fd833196164bacadb87848224fe874f779b43fe9f2dca928956d505a96dbb3f9bdc18661e00534c26d1a7a40e13912a11c9454280da41048a9915c75585df500074d53d816dc9edd229528ef0db66dbbea3ffdaffa471f1f28d8344df1bf800f1a6e9aa6f813c39885bc050f269c0000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kis_cmb_idlist.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/krita/ui/wdgcustombrush.ui b/krita/ui/wdgcustombrush.ui index ea0418b3..78c77be3 100644 --- a/krita/ui/wdgcustombrush.ui +++ b/krita/ui/wdgcustombrush.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgCustomBrush</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgCustomBrush</cstring> </property> @@ -16,15 +16,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -32,7 +32,7 @@ <string>Style:</string> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <item> <property name="text"> <string>Constant</string> @@ -68,7 +68,7 @@ <number>2</number> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -76,7 +76,7 @@ <string>Selection mode:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>Regular</string> @@ -93,17 +93,17 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>colorAsMask</cstring> </property> <property name="text"> - <string>Use color as mask</string> + <string>Use color as tqmask</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -119,14 +119,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>preview</cstring> </property> @@ -138,7 +138,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>50</width> <height>50</height> @@ -158,7 +158,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -167,15 +167,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>brushButton</cstring> </property> @@ -183,7 +183,7 @@ <string>Use as Brush</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addButton</cstring> </property> @@ -195,5 +195,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgcustompalette.ui b/krita/ui/wdgcustompalette.ui index 251a51bb..c5cbe9dc 100644 --- a/krita/ui/wdgcustompalette.ui +++ b/krita/ui/wdgcustompalette.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgCustomPalette</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgCustomPalette</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>palettename</cstring> </property> @@ -29,7 +29,7 @@ <cstring>view</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addColor</cstring> </property> @@ -37,7 +37,7 @@ <string>Add New Color...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>removeColor</cstring> </property> @@ -48,7 +48,7 @@ <string>Remove Selected Color</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addPalette</cstring> </property> @@ -81,7 +81,7 @@ <data format="PNG" length="1003">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388db5944d4c5c5518869f73ce9db9cc40f929cc30300e18129a50685268a28291982e1a2175212eaab1c49d3f8971e7aec6aedb54a32b435dd8685cb8c0c4b8b0feb421b7bd8186a069d23209144b18cb0c02f3732ff3c3ccbdd705a571941213f1dd9d93739ef37e6fbeef08d334d9d5d0d090c701c8344d2176c1a6697a5d5d5dd8b64d2a95c2b2ac7f05b12c8b783c8e6118d8b6fd685fdb753a39394928e2a7c55724d693a7e214104220242805520a84d8b9e4790f0b1302c7751958f1e30534be9fa41a0c60db362dbe227f64af91b6e7719c2dfc0117a71c603da591de2882a7d3d4ec27122b10acad50aeb88044d542b84de3af7ab44aa55274f4e449dbf354bc347aa096fbf37e7efa2ecbad1b36907d78b289de8120232f37726250c3f52cf0a026a0f6065b9645d929e038167aa096d91b307171059034b5f8e9e9eb44fa052b4b25eeccd9dc99cb71f6ad082fbea2e351c075bdbdc13b9109fc01b83fef63e2e232e03076b68393231a0dcd024daf502c1e66e67a89cb971ef0e5a74bb4b61e6378248094b92ab0ac024b70ca017ef8360394187b2dc6d8b89ffa500e4d4f93d9083275d5e6f9913ade3dd70ee87c7d25c95646a25415aadab152b09ed4f8c5cc130a853839eac3951b684a61e70ef3f9c739668c24eba912afbfddc6d4d506e6a6d7b8b7d082aa8eb8dab19482cdcd220e36dd3dc19df23545de0a71f952861923493456cfd3cf36123c54a0b7bf0e8064621b21f7712c040857071ca4eea0f40a99f510573ec971cb48030e811a1faded3e94be85f2fb00703d1ff26f96ab9f011a5b04d0c4f26fdb948a754c1b25668c2491483d5d5d611617d6b8f0fe32cb779b492ce65168b4c774a4701eefd8f3a02d56e6e8f13aeefe9a63fa5a89d1970e91d908f3d46003e1480d173e28b37827c9b977348ab92ce16890237d1ec907ee3e8e3d8f60d0e1f4583d009f7d9860662acff89bad1c1faad0717493f7ce7713ed8cb0995c255f2a317a26427b67198f6a70f51c0a41b902279ed1187f23cc17130b7c74de65eac77a7a8f05517e41e2deefa4930576db60fa7a8ee1535134df3e93e7b82e0817476439fd6a9070a49f6fbe4a3077739db99b15c001146dd13a46cf1cc1f83943c62e51de76b0738fc9381e8f3390f0236b252e124999e11724fd833196164bacadb87848224fe874f779b43fe9f2dca928956d505a96dbb3f9bdc18661e00534c26d1a7a40e13912a11c9454280da41048a9915c75585df500074d53d816dc9edd229528ef0db66dbbea3ffdaffa471f1f28d8344df1bf800f1a6e9aa6f813c39885bc050f269c0000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kis_palette_view.h</includehint> </includehints> diff --git a/krita/ui/wdgcustompattern.ui b/krita/ui/wdgcustompattern.ui index 9db08918..d195f670 100644 --- a/krita/ui/wdgcustompattern.ui +++ b/krita/ui/wdgcustompattern.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgCustomPattern</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgCustomPattern</cstring> </property> @@ -16,15 +16,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -32,7 +32,7 @@ <string>Source:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Entire Image</string> @@ -47,9 +47,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -65,14 +65,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>preview</cstring> </property> @@ -84,7 +84,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>50</width> <height>50</height> @@ -104,7 +104,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -113,15 +113,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>patternButton</cstring> </property> @@ -129,7 +129,7 @@ <string>Use as Pattern</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>exportButton</cstring> </property> @@ -140,7 +140,7 @@ <string>Export</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addButton</cstring> </property> @@ -152,5 +152,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgdisplaysettings.ui b/krita/ui/wdgdisplaysettings.ui index 1427a497..990f316b 100644 --- a/krita/ui/wdgdisplaysettings.ui +++ b/krita/ui/wdgdisplaysettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgDisplaySettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgDisplaySettings</cstring> </property> @@ -29,14 +29,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>50</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -47,15 +47,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbUseOpenGL</cstring> </property> @@ -75,7 +75,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>121</width> <height>31</height> @@ -86,5 +86,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdggeneralsettings.ui b/krita/ui/wdggeneralsettings.ui index 35864b49..051cf795 100644 --- a/krita/ui/wdggeneralsettings.ui +++ b/krita/ui/wdggeneralsettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgGeneralSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgGeneralSettings</cstring> </property> @@ -16,34 +16,34 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> - <string>&Cursor shape:</string> + <string>&Cursor tqshape:</string> </property> <property name="buddy" stdset="0"> - <cstring>m_cmbCursorShape</cstring> + <cstring>m_cmbtqCursorShape</cstring> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Tool Icon</string> @@ -65,12 +65,12 @@ </property> </item> <property name="name"> - <cstring>m_cmbCursorShape</cstring> + <cstring>m_cmbtqCursorShape</cstring> </property> </widget> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>grpDockability</cstring> </property> @@ -84,7 +84,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioAllowDocking</cstring> </property> @@ -92,7 +92,7 @@ <string>Allow &docking</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioDisallowDocking</cstring> </property> @@ -100,7 +100,7 @@ <string>Allow only &floating</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioSmartDocking</cstring> </property> @@ -110,15 +110,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -148,7 +148,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -165,7 +165,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -176,7 +176,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> </includehints> diff --git a/krita/ui/wdggridsettings.ui b/krita/ui/wdggridsettings.ui index 77515844..a89574d1 100644 --- a/krita/ui/wdggridsettings.ui +++ b/krita/ui/wdggridsettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgGridSettingsBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgGridSettingsBase</cstring> </property> @@ -29,14 +29,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> </size> </property> </spacer> - <widget class="QGroupBox" row="0" column="1"> + <widget class="TQGroupBox" row="0" column="1"> <property name="name"> <cstring>groupBox9</cstring> </property> @@ -57,7 +57,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -79,7 +79,7 @@ </color> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -87,7 +87,7 @@ <string>Subdivision:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -112,7 +112,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -123,7 +123,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -174,7 +174,7 @@ <cstring>selectSubdivisionStyle</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -192,7 +192,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>34</width> <height>20</height> @@ -201,7 +201,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -212,23 +212,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -247,7 +247,7 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -282,7 +282,7 @@ </widget> </grid> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnLinkSpacing</cstring> </property> @@ -294,13 +294,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>16</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>16</width> <height>32767</height> @@ -318,15 +318,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -357,7 +357,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -366,7 +366,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox" row="1" column="1"> + <widget class="TQGroupBox" row="1" column="1"> <property name="name"> <cstring>groupBox3_2</cstring> </property> @@ -377,7 +377,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -393,7 +393,7 @@ <string>X:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -427,7 +427,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -448,7 +448,7 @@ <data format="PNG" length="242">89504e470d0a1a0a0000000d49484452000000190000001a0806000000427df7cd000000b9494441544889dd95410ec4200845b1e9ba78ff538a176056260c5181569bccfca590ff2a204da510ecd601008078ed8778953372cec8db20d23c0a72417aa611900999997941a795500a256d2acf7a434354bf212d4927ebc488a417518d4dd75d0dcbb5f2ed983d59f101af94eb7f20d39e3c1963136299f7e2b361f89d9e8c6ed16efc4ee3892a205ecb9adc24fdcc176ffd4b9839e9b896592eb9d623b1106464e605b821da340200086e61afb91ea2a377e89577e57f00357f504513c00b590000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/krita/ui/wdglayerbox.ui b/krita/ui/wdglayerbox.ui index a384f306..9bfe5760 100644 --- a/krita/ui/wdglayerbox.ui +++ b/krita/ui/wdglayerbox.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgLayerBox</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgLayerBox</cstring> </property> @@ -22,9 +22,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -42,7 +42,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>10</height> @@ -72,25 +72,25 @@ <cstring>listLayers</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnAdd</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -106,17 +106,17 @@ <string>Create a new layer</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnLower</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -132,17 +132,17 @@ <string>Move layer down</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnRaise</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -158,17 +158,17 @@ <string>Move layer up</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnProperties</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -191,24 +191,24 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnDelete</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>18</width> <height>18</height> @@ -295,5 +295,5 @@ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdglayerproperties.ui b/krita/ui/wdglayerproperties.ui index b4000ea5..35eb01ad 100644 --- a/krita/ui/wdglayerproperties.ui +++ b/krita/ui/wdglayerproperties.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgLayerProperties</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgLayerProperties</cstring> </property> @@ -16,12 +16,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>editName</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -37,7 +37,7 @@ <cstring>cmbProfile</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -45,7 +45,7 @@ <string>Composite mode:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -53,7 +53,7 @@ <string>Profile:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -61,7 +61,7 @@ <string>Colorspace:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -166,5 +166,5 @@ <data format="PNG" length="1003">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b249444154388db5944d4c5c5518869f73ce9db9cc40f929cc30300e18129a50685268a28291982e1a2175212eaab1c49d3f8971e7aec6aedb54a32b435dd8685cb8c0c4b8b0feb421b7bd8186a069d23209144b18cb0c02f3732ff3c3ccbdd705a571941213f1dd9d93739ef37e6fbeef08d334d9d5d0d090c701c8344d2176c1a6697a5d5d5dd8b64d2a95c2b2ac7f05b12c8b783c8e6118d8b6fd685fdb753a39394928e2a7c55724d693a7e214104220242805520a84d8b9e4790f0b1302c7751958f1e30534be9fa41a0c60db362dbe227f64af91b6e7719c2dfc0117a71c603da591de2882a7d3d4ec27122b10acad50aeb88044d542b84de3af7ab44aa55274f4e449dbf354bc347aa096fbf37e7efa2ecbad1b36907d78b289de8120232f37726250c3f52cf0a026a0f6065b9645d929e038167aa096d91b307171059034b5f8e9e9eb44fa052b4b25eeccd9dc99cb71f6ad082fbea2e351c075bdbdc13b9109fc01b83fef63e2e232e03076b68393231a0dcd024daf502c1e66e67a89cb971ef0e5a74bb4b61e6378248094b92ab0ac024b70ca017ef8360394187b2dc6d8b89ffa500e4d4f93d9083275d5e6f9913ade3dd70ee87c7d25c95646a25415aadab152b09ed4f8c5cc130a853839eac3951b684a61e70ef3f9c739668c24eba912afbfddc6d4d506e6a6d7b8b7d082aa8eb8dab19482cdcd220e36dd3dc19df23545de0a71f952861923493456cfd3cf36123c54a0b7bf0e8064621b21f7712c040857071ca4eea0f40a99f510573ec971cb48030e811a1faded3e94be85f2fb00703d1ff26f96ab9f011a5b04d0c4f26fdb948a754c1b25668c2491483d5d5d611617d6b8f0fe32cb779b492ce65168b4c774a4701eefd8f3a02d56e6e8f13aeefe9a63fa5a89d1970e91d908f3d46003e1480d173e28b37827c9b977348ab92ce16890237d1ec907ee3e8e3d8f60d0e1f4583d009f7d9860662acff89bad1c1faad0717493f7ce7713ed8cb0995c255f2a317a26427b67198f6a70f51c0a41b902279ed1187f23cc17130b7c74de65eac77a7a8f05517e41e2deefa4930576db60fa7a8ee1535134df3e93e7b82e0817476439fd6a9070a49f6fbe4a3077739db99b15c001146dd13a46cf1cc1f83943c62e51de76b0738fc9381e8f3390f0236b252e124999e11724fd833196164bacadb87848224fe874f779b43fe9f2dca928956d505a96dbb3f9bdc18661e00534c26d1a7a40e13912a11c9454280da41048a9915c75585df500074d53d816dc9edd229528ef0db66dbbea3ffdaffa471f1f28d8344df1bf800f1a6e9aa6f813c39885bc050f269c0000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgnewimage.ui b/krita/ui/wdgnewimage.ui index a85c1469..5e3b89a6 100644 --- a/krita/ui/wdgnewimage.ui +++ b/krita/ui/wdgnewimage.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgNewImage</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgNewImage</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblName</cstring> </property> @@ -33,7 +33,7 @@ <cstring>txtName</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>txtName</cstring> </property> @@ -41,7 +41,7 @@ <string>untitled-1</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpImage</cstring> </property> @@ -52,7 +52,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblHeight</cstring> </property> @@ -63,7 +63,7 @@ <cstring>intHeight</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblWidth</cstring> </property> @@ -96,7 +96,7 @@ <number>0</number> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>lblResolution</cstring> </property> @@ -137,7 +137,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>131</width> <height>61</height> @@ -146,7 +146,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpMode</cstring> </property> @@ -157,7 +157,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblColorSpaces</cstring> </property> @@ -178,7 +178,7 @@ <cstring>cmbProfile</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblProfiles</cstring> </property> @@ -191,7 +191,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>grpContents</cstring> </property> @@ -202,12 +202,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTextEdit" row="2" column="1"> + <widget class="TQTextEdit" row="2" column="1"> <property name="name"> <cstring>txtDescription</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblColor</cstring> </property> @@ -223,21 +223,21 @@ <cstring>cmbColor</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>lblDescription</cstring> </property> <property name="text"> <string>Description:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> <property name="buddy" stdset="0"> <cstring>txtDescription</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblOpacity</cstring> </property> @@ -248,7 +248,7 @@ <cstring>sliderOpacity</cstring> </property> </widget> - <widget class="QFrame" row="1" column="1"> + <widget class="TQFrame" row="1" column="1"> <property name="name"> <cstring>opacityPanel</cstring> </property> @@ -265,7 +265,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -273,7 +273,7 @@ <string>Transparent</string> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderOpacity</cstring> </property> @@ -302,7 +302,7 @@ <string>Opacity of the background color.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -314,9 +314,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -332,14 +332,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>480</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_createButton</cstring> </property> @@ -359,7 +359,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>0</height> @@ -421,7 +421,7 @@ <tabstop>sliderOpacity</tabstop> <tabstop>txtDescription</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/krita/ui/wdgpalettechooser.ui b/krita/ui/wdgpalettechooser.ui index f1840dd8..553cd62b 100644 --- a/krita/ui/wdgpalettechooser.ui +++ b/krita/ui/wdgpalettechooser.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisPaletteChooser</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KisPaletteChooser</cstring> </property> @@ -22,14 +22,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>paletteList</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -45,14 +45,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>255</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -69,7 +69,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -101,5 +101,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgperformancesettings.ui b/krita/ui/wdgperformancesettings.ui index e5f1b9c8..b8cd4cf4 100644 --- a/krita/ui/wdgperformancesettings.ui +++ b/krita/ui/wdgperformancesettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgPerformanceSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgPerformanceSettings</cstring> </property> @@ -16,15 +16,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -61,7 +61,7 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>81</width> <height>20</height> @@ -70,15 +70,15 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -89,11 +89,11 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be <string>This configures how much Krita will use the swap file. If you move the slider all the way to the left, Krita will not use the swap file at all. If you move it all the way to the right, Krita will make maximum use of the swap file.</string> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>m_swappiness</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>600</width> <height>32767</height> @@ -127,7 +127,7 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>139</height> @@ -138,7 +138,7 @@ Note that this number is only a guideline for Krita, and is not guaranteed to be </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/krita/ui/wdgpressuresettings.ui b/krita/ui/wdgpressuresettings.ui index a081142c..41ead6a9 100644 --- a/krita/ui/wdgpressuresettings.ui +++ b/krita/ui/wdgpressuresettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgPressureSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgPressureSettings</cstring> </property> @@ -26,14 +26,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>89</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -41,7 +41,7 @@ <string>Softer</string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -49,7 +49,7 @@ <string>Firmer</string> </property> </widget> - <widget class="QSlider" row="0" column="1"> + <widget class="TQSlider" row="0" column="1"> <property name="name"> <cstring>slPressure</cstring> </property> @@ -62,5 +62,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgselectionoptions.ui b/krita/ui/wdgselectionoptions.ui index 13c9394d..39846fa3 100644 --- a/krita/ui/wdgselectionoptions.ui +++ b/krita/ui/wdgselectionoptions.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgSelectionOptions</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgSelectionOptions</cstring> </property> @@ -22,9 +22,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -33,7 +33,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblAction</cstring> </property> @@ -41,7 +41,7 @@ <string>Action:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Add</string> @@ -60,5 +60,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgshapeoptions.ui b/krita/ui/wdgshapeoptions.ui index 9c18771e..c0e6338b 100644 --- a/krita/ui/wdgshapeoptions.ui +++ b/krita/ui/wdgshapeoptions.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgGeometryOptions</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgGeometryOptions</cstring> </property> @@ -35,14 +35,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -50,7 +50,7 @@ <string>Fill:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="0" column="1" rowspan="1" colspan="2"> <item> <property name="text"> <string>Not Filled</string> @@ -85,7 +85,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -94,5 +94,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgtabletdevicesettings.ui b/krita/ui/wdgtabletdevicesettings.ui index 07f90d30..59cad307 100644 --- a/krita/ui/wdgtabletdevicesettings.ui +++ b/krita/ui/wdgtabletdevicesettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgTabletDeviceSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgTabletDeviceSettings</cstring> </property> @@ -29,14 +29,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>90</height> </size> </property> </spacer> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -47,15 +47,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -63,22 +63,22 @@ <string>X:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cbX</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4_4</cstring> + <cstring>tqlayout4_4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_4</cstring> </property> @@ -86,22 +86,22 @@ <string>Y:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cbY</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4_2</cstring> + <cstring>tqlayout4_2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -109,22 +109,22 @@ <string>Pressure:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cbPressure</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4_3</cstring> + <cstring>tqlayout4_3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_3</cstring> </property> @@ -132,22 +132,22 @@ <string>X tilt:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cbXTilt</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4_6</cstring> + <cstring>tqlayout4_6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_6</cstring> </property> @@ -155,22 +155,22 @@ <string>Y tilt:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cbYTilt</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4_5</cstring> + <cstring>tqlayout4_5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_5</cstring> </property> @@ -178,7 +178,7 @@ <string>Wheel:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cbWheel</cstring> </property> @@ -189,5 +189,5 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgtabletsettings.ui b/krita/ui/wdgtabletsettings.ui index 775f1e9b..ad4dc7bf 100644 --- a/krita/ui/wdgtabletsettings.ui +++ b/krita/ui/wdgtabletsettings.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgTabletSettings</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgTabletSettings</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>grpTabletDevices</cstring> </property> @@ -30,15 +30,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -46,22 +46,22 @@ <string>Device:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cbTabletDevice</cstring> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>chkEnableTabletDevice</cstring> </property> @@ -69,7 +69,7 @@ <string>Enable</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>btnConfigureTabletDevice</cstring> </property> @@ -91,7 +91,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>90</height> @@ -100,5 +100,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/ui/wdgtextbrush.ui b/krita/ui/wdgtextbrush.ui index 4126dc76..562a62f9 100644 --- a/krita/ui/wdgtextbrush.ui +++ b/krita/ui/wdgtextbrush.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KisWdgTextBrush</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KisWdgTextBrush</cstring> </property> @@ -19,23 +19,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>labelText</cstring> </property> @@ -47,7 +47,7 @@ <property name="name"> <cstring>lineEdit</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>120</width> <height>0</height> @@ -63,15 +63,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblFont</cstring> </property> @@ -87,7 +87,7 @@ <string>Font:</string> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>bnFont</cstring> </property> @@ -120,7 +120,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>121</width> <height>20</height> @@ -137,7 +137,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -148,10 +148,10 @@ </widget> <customwidgets> </customwidgets> -<slots> +<Q_SLOTS> <slot access="private">boldButtonClicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> </includehints> |