diff options
Diffstat (limited to 'krita/plugins/tools')
102 files changed, 1543 insertions, 1496 deletions
diff --git a/krita/plugins/tools/defaulttools/default_tools.cc b/krita/plugins/tools/defaulttools/default_tools.cc index c4edcfb3..a281a52c 100644 --- a/krita/plugins/tools/defaulttools/default_tools.cc +++ b/krita/plugins/tools/defaulttools/default_tools.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -56,14 +56,14 @@ typedef KGenericFactory<DefaultTools> DefaultToolsFactory; K_EXPORT_COMPONENT_FACTORY( kritadefaulttools, DefaultToolsFactory( "krita" ) ) -DefaultTools::DefaultTools(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +DefaultTools::DefaultTools(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(DefaultToolsFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolFillFactory()); r->add(new KisToolGradientFactory()); diff --git a/krita/plugins/tools/defaulttools/default_tools.h b/krita/plugins/tools/defaulttools/default_tools.h index 0088263d..b4c6d4de 100644 --- a/krita/plugins/tools/defaulttools/default_tools.h +++ b/krita/plugins/tools/defaulttools/default_tools.h @@ -34,8 +34,9 @@ class DefaultTools : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - DefaultTools(QObject *parent, const char *name, const QStringList &); + DefaultTools(TQObject *tqparent, const char *name, const TQStringList &); virtual ~DefaultTools(); }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_brush.cc b/krita/plugins/tools/defaulttools/kis_tool_brush.cc index a65795d1..3a931bfb 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_brush.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_brush.cc @@ -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 <qevent.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qpainter.h> -#include <qrect.h> -#include <qcheckbox.h> +#include <tqevent.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqpainter.h> +#include <tqrect.h> +#include <tqcheckbox.h> #include <kdebug.h> #include <kaction.h> @@ -52,10 +52,10 @@ KisToolBrush::KisToolBrush() setName("tool_brush"); setCursor(KisCursor::load("tool_freehand_cursor.png", 5, 5)); m_rate = 100; // Conveniently hardcoded for now - m_timer = new QTimer(this); + m_timer = new TQTimer(this); Q_CHECK_PTR(m_timer); - connect(m_timer, SIGNAL(timeout()), this, SLOT(timeoutPaint())); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeoutPaint())); } @@ -114,8 +114,8 @@ void KisToolBrush::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Brush"), - "tool_freehand", Qt::Key_B, this, - SLOT(activate()), collection, + "tool_freehand", TQt::Key_B, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw freehand")); m_action->setExclusiveGroup("tools"); @@ -130,14 +130,14 @@ void KisToolBrush::move(KisMoveEvent *e) { paintOutline(e->pos()); } -void KisToolBrush::leave(QEvent */*e*/) { +void KisToolBrush::leave(TQEvent */*e*/) { m_subject->canvasController()->kiscanvas()->update(); // remove the outline } void KisToolBrush::slotSetPaintingMode( int mode ) { - if (mode == QButton::On) { + if (mode == TQButton::On) { // Direct painting m_paintIncremental = true; } @@ -147,14 +147,14 @@ void KisToolBrush::slotSetPaintingMode( int mode ) } -QWidget* KisToolBrush::createOptionWidget(QWidget* parent) +TQWidget* KisToolBrush::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); - m_chkDirect = new QCheckBox(i18n("Paint direct"), widget, "chkDirect"); + TQWidget *widget = super::createOptionWidget(tqparent); + m_chkDirect = new TQCheckBox(i18n("Paint direct"), widget, "chkDirect"); m_chkDirect->setChecked(true); - connect(m_chkDirect, SIGNAL(stateChanged(int)), this, SLOT(slotSetPaintingMode(int))); + connect(m_chkDirect, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotSetPaintingMode(int))); - m_optionLayout = new QGridLayout(widget, 3, 2, 0, 6); + m_optionLayout = new TQGridLayout(widget, 3, 2, 0, 6); Q_CHECK_PTR(m_optionLayout); super::addOptionWidgetLayout(m_optionLayout); diff --git a/krita/plugins/tools/defaulttools/kis_tool_brush.h b/krita/plugins/tools/defaulttools/kis_tool_brush.h index 0024213d..a23e8d12 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_brush.h +++ b/krita/plugins/tools/defaulttools/kis_tool_brush.h @@ -25,16 +25,17 @@ #include "kis_tool_factory.h" #include "koffice_export.h" -class QTimer; +class TQTimer; class KisPoint; -class QHBoxLayout; -class QPainter; -class QRect; -class QCheckBox; -class QGridLayout; +class TQHBoxLayout; +class TQPainter; +class TQRect; +class TQCheckBox; +class TQGridLayout; class KRITACORE_EXPORT KisToolBrush : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -43,15 +44,15 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 0; } - QWidget* createOptionWidget(QWidget* parent); + virtual TQ_UINT32 priority() { return 0; } + TQWidget* createOptionWidget(TQWidget* tqparent); protected: virtual void initPaint(KisEvent *e); virtual void endPaint(); virtual void move(KisMoveEvent *e); - virtual void leave(QEvent *e); + virtual void leave(TQEvent *e); private slots: @@ -60,10 +61,10 @@ private slots: private: - Q_INT32 m_rate; - QTimer * m_timer; - QGridLayout* m_optionLayout; - QCheckBox * m_chkDirect; + TQ_INT32 m_rate; + TQTimer * m_timer; + TQGridLayout* m_optionLayout; + TQCheckBox * m_chkDirect; }; class KisToolBrushFactory : public KisToolFactory { diff --git a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc index ae553952..77020342 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc @@ -18,16 +18,16 @@ */ #include <string.h> -#include <qpoint.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlistview.h> -#include <qspinbox.h> +#include <tqpoint.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlistview.h> +#include <tqspinbox.h> #include <kaction.h> #include <klocale.h> -#include <qcolor.h> +#include <tqcolor.h> #include <kmessagebox.h> #include "kis_layer.h" @@ -77,7 +77,7 @@ void KisToolColorPicker::update(KisCanvasSubject *subject) void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) { if (m_subject) { - if (e->button() != QMouseEvent::LeftButton && e->button() != QMouseEvent::RightButton) + if (e->button() != TQMouseEvent::LeftButton && e->button() != TQMouseEvent::RightButton) return; KisImageSP img; @@ -102,9 +102,9 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) } } - QPoint pos = QPoint(e->pos().floorX(), e->pos().floorY()); + TQPoint pos = TQPoint(e->pos().floorX(), e->pos().floorY()); - if (!img->bounds().contains(pos)) { + if (!img->bounds().tqcontains(pos)) { return; } @@ -121,9 +121,9 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) KisColorSpace* cs = dev->colorSpace(); int pixelSize = cs->pixelSize(); - Q_UINT8* data = new Q_UINT8[pixelSize]; - Q_UINT8** pixels = new Q_UINT8*[counts[m_radius]]; - Q_UINT8* weights = new Q_UINT8[counts[m_radius]]; + TQ_UINT8* data = new TQ_UINT8[pixelSize]; + TQ_UINT8** pixels = new TQ_UINT8*[counts[m_radius]]; + TQ_UINT8* weights = new TQ_UINT8[counts[m_radius]]; int i = 0; // dummy init @@ -133,7 +133,7 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) if (x*x + y*y < m_radius * m_radius) { iter = dev->createHLineIterator(pos.x() + x, pos.y() + y, 1, false); - pixels[i] = new Q_UINT8[pixelSize]; + pixels[i] = new TQ_UINT8[pixelSize]; memcpy(pixels[i], iter.rawData(), pixelSize); if (x == 0 && y == 0) { @@ -151,7 +151,7 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) } } // Weird, I can't do that directly :/ - const Q_UINT8** cpixels = const_cast<const Q_UINT8**>(pixels); + const TQ_UINT8** cpixels = const_cast<const TQ_UINT8**>(pixels); cs->mixColors(cpixels, weights, counts[m_radius], data); m_pickedColor = KisColor(data, cs); @@ -164,7 +164,7 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) displayPickedColor(); if (m_updateColor) { - if (e->button() == QMouseEvent::LeftButton) + if (e->button() == TQMouseEvent::LeftButton) m_subject->setFGColor(m_pickedColor); else m_subject->setBGColor(m_pickedColor); @@ -173,14 +173,14 @@ void KisToolColorPicker::buttonPress(KisButtonPressEvent *e) if (m_addPalette) { // Convert to RGB to add to palette, we ought to have our own format :( KisPaletteEntry ent; - ent.color = m_pickedColor.toQColor(); + ent.color = m_pickedColor.toTQColor(); // We don't ask for a name, too intrusive here KisPalette* palette = m_palettes.at(m_optionsWidget-> cmbPalette->currentItem()); palette->add(ent); if (!palette->save()) { - KMessageBox::error(0, i18n("Cannot write to palette file %1. Maybe it is read-only.").arg(palette->filename()), i18n("Palette")); + KMessageBox::error(0, i18n("Cannot write to palette file %1. Maybe it is read-only.").tqarg(palette->filename()), i18n("Palette")); } } } @@ -190,19 +190,19 @@ void KisToolColorPicker::displayPickedColor() { if (m_pickedColor.data() && m_optionsWidget) { - QValueVector<KisChannelInfo *> channels = m_pickedColor.colorSpace()->channels(); + TQValueVector<KisChannelInfo *> channels = m_pickedColor.colorSpace()->channels(); m_optionsWidget->listViewChannels->clear(); for (int i = channels.count() - 1; i >= 0 ; --i) { - QString channelValueText; + TQString channelValueText; if (m_normaliseValues) { - channelValueText = i18n("%1%").arg(m_pickedColor.colorSpace()->normalisedChannelValueText(m_pickedColor.data(), i)); + channelValueText = i18n("%1%").tqarg(m_pickedColor.colorSpace()->normalisedChannelValueText(m_pickedColor.data(), i)); } else { channelValueText = m_pickedColor.colorSpace()->channelValueText(m_pickedColor.data(), i); } - m_optionsWidget->listViewChannels->insertItem(new QListViewItem(m_optionsWidget->listViewChannels, + m_optionsWidget->listViewChannels->insertItem(new TQListViewItem(m_optionsWidget->listViewChannels, channels[i]->name(), channelValueText)); } @@ -214,16 +214,16 @@ void KisToolColorPicker::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Color Picker"), "tool_colorpicker", Qt::Key_P, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Color Picker"), "tool_colorpicker", TQt::Key_P, this, TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Color picker")); m_action->setExclusiveGroup("tools"); m_ownAction = true; } } -QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) +TQWidget* KisToolColorPicker::createOptionWidget(TQWidget* tqparent) { - m_optionsWidget = new ColorPickerOptionsWidget(parent); + m_optionsWidget = new ColorPickerOptionsWidget(tqparent); m_optionsWidget->cbUpdateCurrentColour->setChecked(m_updateColor); @@ -235,12 +235,12 @@ QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) m_optionsWidget->listViewChannels->setSorting(-1); - connect(m_optionsWidget->cbUpdateCurrentColour, SIGNAL(toggled(bool)), SLOT(slotSetUpdateColor(bool))); - connect(m_optionsWidget->cbNormaliseValues, SIGNAL(toggled(bool)), SLOT(slotSetNormaliseValues(bool))); - connect(m_optionsWidget->cbPalette, SIGNAL(toggled(bool)), - SLOT(slotSetAddPalette(bool))); - connect(m_optionsWidget->radius, SIGNAL(valueChanged(int)), - SLOT(slotChangeRadius(int))); + connect(m_optionsWidget->cbUpdateCurrentColour, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetUpdateColor(bool))); + connect(m_optionsWidget->cbNormaliseValues, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetNormaliseValues(bool))); + connect(m_optionsWidget->cbPalette, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotSetAddPalette(bool))); + connect(m_optionsWidget->radius, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChangeRadius(int))); KisResourceServerBase* srv = KisResourceServerRegistry::instance()->get("PaletteServer"); @@ -248,7 +248,7 @@ QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) return m_optionsWidget; } - QValueList<KisResource*> palettes = srv->resources(); + TQValueList<KisResource*> palettes = srv->resources(); for(uint i = 0; i < palettes.count(); i++) { KisPalette* palette = dynamic_cast<KisPalette*>(*palettes.at(i)); @@ -258,12 +258,12 @@ QWidget* KisToolColorPicker::createOptionWidget(QWidget* parent) } } - connect(srv, SIGNAL(resourceAdded(KisResource*)), this, SLOT(slotAddPalette(KisResource*))); + connect(srv, TQT_SIGNAL(resourceAdded(KisResource*)), this, TQT_SLOT(slotAddPalette(KisResource*))); return m_optionsWidget; } -QWidget* KisToolColorPicker::optionWidget() +TQWidget* KisToolColorPicker::optionWidget() { return m_optionsWidget; } diff --git a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h index 2834b8c6..ab59ef17 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h +++ b/krita/plugins/tools/defaulttools/kis_tool_colorpicker.h @@ -22,7 +22,7 @@ #include "kis_tool_non_paint.h" #include "kis_tool_factory.h" -#include "qvaluevector.h" +#include "tqvaluevector.h" class ColorPickerOptionsWidget; class KisResource; @@ -31,6 +31,7 @@ class KisPalette; class KisToolColorPicker : public KisToolNonPaint { Q_OBJECT + TQ_OBJECT typedef KisToolNonPaint super; public: @@ -41,10 +42,10 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); virtual void buttonPress(KisButtonPressEvent *e); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } public slots: void slotSetUpdateColor(bool); @@ -64,7 +65,7 @@ private: ColorPickerOptionsWidget *m_optionsWidget; KisCanvasSubject *m_subject; - QValueVector<KisPalette*> m_palettes; + TQValueVector<KisPalette*> m_palettes; }; class KisToolColorPickerFactory : public KisToolFactory { diff --git a/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc b/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc index 71678e6f..bd03245d 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qbitmap.h> -#include <qcheckbox.h> -#include <qpainter.h> -#include <qlabel.h> +#include <tqbitmap.h> +#include <tqcheckbox.h> +#include <tqpainter.h> +#include <tqlabel.h> #include <kaction.h> #include <kdebug.h> @@ -46,7 +46,7 @@ #include "kis_boundary_painter.h" KisToolDuplicate::KisToolDuplicate() - : super(i18n("Duplicate Brush")), m_isOffsetNotUptodate(true), m_position(QPoint(-1,-1)) + : super(i18n("Duplicate Brush")), m_isOffsetNotUptodate(true), m_position(TQPoint(-1,-1)) { setName("tool_duplicate"); m_subject = 0; @@ -59,7 +59,7 @@ KisToolDuplicate::~KisToolDuplicate() void KisToolDuplicate::activate() { - m_position = QPoint(-1,-1); + m_position = TQPoint(-1,-1); super::activate(); if( m_subject->currentImg()->perspectiveGrid()->countSubGrids() != 1 ) { @@ -76,7 +76,7 @@ void KisToolDuplicate::buttonPress(KisButtonPressEvent *e) m_position = e->pos(); m_isOffsetNotUptodate = true; } else { - if (m_position != QPoint(-1, -1)) { + if (m_position != TQPoint(-1, -1)) { super::buttonPress(e); } } @@ -89,8 +89,8 @@ void KisToolDuplicate::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Duplicate Brush"), - "tool_duplicate", Qt::Key_C, this, - SLOT(activate()), collection, + "tool_duplicate", TQt::Key_C, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Duplicate parts of the image. Shift-click to select the point to duplicate from to begin.")); m_action->setExclusiveGroup("tools"); @@ -100,7 +100,7 @@ void KisToolDuplicate::setup(KActionCollection *collection) void KisToolDuplicate::initPaint(KisEvent *e) { - if( m_position != QPoint(-1,-1)) + if( m_position != TQPoint(-1,-1)) { if(m_isOffsetNotUptodate) { @@ -124,10 +124,10 @@ void KisToolDuplicate::move(KisMoveEvent *e) { // Paint the outline where we will (or are) copying from - if( m_position == QPoint(-1,-1) ) + if( m_position == TQPoint(-1,-1) ) return; - QPoint srcPos; + TQPoint srcPos; if (m_mode == PAINT) { // if we are in perspective correction mode, update the offset when moving if(m_perspectiveCorrection->isChecked()) @@ -147,7 +147,7 @@ void KisToolDuplicate::move(KisMoveEvent *e) // First look for the grid corresponding to the start point KisSubPerspectiveGrid* subGridStart = *m_subject->currentImg()->perspectiveGrid()->begin();//device->image()->perspectiveGrid()->gridAt(KisPoint(srcPoint.x() +hotSpot.x(),srcPoint.y() +hotSpot.y())); - QRect r = QRect(0,0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); + TQRect r = TQRect(0,0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); if(subGridStart) { @@ -182,26 +182,26 @@ void KisToolDuplicate::move(KisMoveEvent *e) KisPoint duplicateStartPoisitionT = KisPerspectiveMath::matProd(endM, m_positionStartPainting - m_offset); KisPoint duplicateRealPosition = KisPerspectiveMath::matProd(startM, duplicateStartPoisitionT + (currentPositionT - positionStartPaintingT) ); KisPoint p = e->pos() - duplicateRealPosition; - srcPos = p.floorQPoint(); + srcPos = p.floorTQPoint(); } }else { - srcPos = painter()->duplicateOffset().floorQPoint(); + srcPos = painter()->duplicateOffset().floorTQPoint(); } } else { if(m_isOffsetNotUptodate) - srcPos = e->pos().floorQPoint() - m_position.floorQPoint(); + srcPos = e->pos().floorTQPoint() - m_position.floorTQPoint(); else - srcPos = m_offset.floorQPoint(); + srcPos = m_offset.floorTQPoint(); } - Q_INT32 x; - Q_INT32 y; + TQ_INT32 x; + TQ_INT32 y; // like KisPaintOp::splitCoordinate - x = (Q_INT32)((e->x() < 0) ? e->x() - 1 : e->x()); - y = (Q_INT32)((e->y() < 0) ? e->y() - 1 : e->y()); - srcPos = QPoint(x - srcPos.x(), y - srcPos.y()); + x = (TQ_INT32)((e->x() < 0) ? e->x() - 1 : e->x()); + y = (TQ_INT32)((e->y() < 0) ? e->y() - 1 : e->y()); + srcPos = TQPoint(x - srcPos.x(), y - srcPos.y()); paintOutline(srcPos); super::move(e); @@ -212,7 +212,7 @@ void KisToolDuplicate::paintAt(const KisPoint &pos, const double xtilt, const double ytilt) { - if( m_position != QPoint(-1,-1)) + if( m_position != TQPoint(-1,-1)) { if(m_isOffsetNotUptodate) { @@ -226,29 +226,29 @@ void KisToolDuplicate::paintAt(const KisPoint &pos, } } -QString KisToolDuplicate::quickHelp() const { +TQString KisToolDuplicate::quickHelp() const { return i18n("To start, shift-click on the place you want to duplicate from. Then you can start painting. An indication of where you are copying from will be displayed while drawing and moving the mouse."); } -QWidget* KisToolDuplicate::createOptionWidget(QWidget* parent) +TQWidget* KisToolDuplicate::createOptionWidget(TQWidget* tqparent) { - QWidget* widget = KisToolPaint::createOptionWidget(parent); - m_healing = new QCheckBox(widget); + TQWidget* widget = KisToolPaint::createOptionWidget(tqparent); + m_healing = new TQCheckBox(widget); m_healing->setChecked( false); - addOptionWidgetOption(m_healing, new QLabel(i18n("Healing"), widget )); + addOptionWidgetOption(m_healing, new TQLabel(i18n("Healing"), widget )); m_healingRadius = new KIntNumInput(widget); KisBrush *brush = m_subject->currentBrush(); int healingradius = 20; if( brush ) { - healingradius = 2 * QMAX(brush->width(),brush->height()); + healingradius = 2 * TQMAX(brush->width(),brush->height()); } m_healingRadius->setValue( healingradius ); - addOptionWidgetOption(m_healingRadius, new QLabel(i18n("Healing radius"), widget )); - m_perspectiveCorrection = new QCheckBox(widget); - addOptionWidgetOption(m_perspectiveCorrection, new QLabel(i18n("Correct the perspective"), widget )); + addOptionWidgetOption(m_healingRadius, new TQLabel(i18n("Healing radius"), widget )); + m_perspectiveCorrection = new TQCheckBox(widget); + addOptionWidgetOption(m_perspectiveCorrection, new TQLabel(i18n("Correct the perspective"), widget )); return widget; } diff --git a/krita/plugins/tools/defaulttools/kis_tool_duplicate.h b/krita/plugins/tools/defaulttools/kis_tool_duplicate.h index 758542b8..2201badd 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_duplicate.h +++ b/krita/plugins/tools/defaulttools/kis_tool_duplicate.h @@ -27,13 +27,14 @@ class KisEvent; class KisButtonPressEvent; -class QCheckBox; +class TQCheckBox; class KIntNumInput; class KisToolDuplicate : public KisToolFreehand { typedef KisToolFreehand super; Q_OBJECT + TQ_OBJECT public: KisToolDuplicate(); @@ -41,7 +42,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FREEHAND; } - virtual Q_UINT32 priority() { return 0; } + virtual TQ_UINT32 priority() { return 0; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); @@ -50,8 +51,8 @@ public: const double xTilt, const double yTilt); - virtual QString quickHelp() const; - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQString quickHelp() const; + virtual TQWidget* createOptionWidget(TQWidget* tqparent); protected slots: virtual void activate(); @@ -64,9 +65,9 @@ protected: bool m_isOffsetNotUptodate; // Tells if the offset is update KisPoint m_position; // Give the position of the last alt-click KisPoint m_positionStartPainting; - QCheckBox* m_healing; + TQCheckBox* m_healing; KIntNumInput* m_healingRadius; - QCheckBox* m_perspectiveCorrection; + TQCheckBox* m_perspectiveCorrection; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc b/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc index dd8867c6..bae8ae04 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_ellipse.cc @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpainter.h> +#include <tqpainter.h> #include <kaction.h> #include <kdebug.h> @@ -75,23 +75,23 @@ void KisToolEllipse::move(KisMoveEvent *event) // erase old lines on canvas draw(m_dragStart, m_dragEnd); // move (alt) or resize ellipse - if (event->state() & Qt::AltButton) { + if (event->state() & TQt::AltButton) { KisPoint trans = event->pos() - m_dragEnd; m_dragStart += trans; m_dragEnd += trans; } else { - KisPoint diag = event->pos() - (event->state() & Qt::ControlButton + KisPoint diag = event->pos() - (event->state() & TQt::ControlButton ? m_dragCenter : m_dragStart); // circle? - if (event->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (event->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (event->state() & Qt::ControlButton) { + if (event->state() & TQt::ControlButton) { m_dragStart = m_dragCenter - diag; m_dragEnd = m_dragCenter + diag; } else { @@ -158,8 +158,8 @@ void KisToolEllipse::draw(const KisPoint& start, const KisPoint& end ) KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter p (canvas); - p.setRasterOp (Qt::NotROP); - p.drawEllipse (QRect (controller->windowToView (start).floorQPoint(), controller->windowToView (end).floorQPoint())); + p.setRasterOp (TQt::NotROP); + p.drawEllipse (TQRect (controller->windowToView (start).floorTQPoint(), controller->windowToView (end).floorTQPoint())); p.end (); } @@ -168,13 +168,13 @@ void KisToolEllipse::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F7)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F7)); m_action = new KRadioAction(i18n("&Ellipse"), "tool_ellipse", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw an ellipse")); diff --git a/krita/plugins/tools/defaulttools/kis_tool_ellipse.h b/krita/plugins/tools/defaulttools/kis_tool_ellipse.h index a7bd595c..4f79fbd6 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_ellipse.h +++ b/krita/plugins/tools/defaulttools/kis_tool_ellipse.h @@ -33,6 +33,7 @@ class KisToolEllipse : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolEllipse(); @@ -49,7 +50,7 @@ public: // virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } virtual enumToolType toolType() { return TOOL_SHAPE; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); diff --git a/krita/plugins/tools/defaulttools/kis_tool_fill.cc b/krita/plugins/tools/defaulttools/kis_tool_fill.cc index 3edd4f17..6e2ae99c 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_fill.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_fill.cc @@ -24,11 +24,11 @@ #include <kdebug.h> #include <klocale.h> #include <kcommand.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> -#include <qcolor.h> +#include <tqcolor.h> #include "knuminput.h" @@ -81,7 +81,7 @@ bool KisToolFill::flood(int startX, int startY) if (!device) return false; if (m_fillOnlySelection) { - QRect rc = device->selection()->selectedRect(); + TQRect rc = device->selection()->selectedRect(); KisPaintDeviceSP filled = new KisPaintDevice(device->colorSpace(), "filled"); KisFillPainter painter(filled); if (m_usePattern) @@ -145,41 +145,41 @@ void KisToolFill::buttonRelease(KisButtonReleaseEvent *e) { if (!m_subject) return; if (!m_currentImage || !m_currentImage->activeDevice()) return; - if (e->button() != QMouseEvent::LeftButton) return; + if (e->button() != TQMouseEvent::LeftButton) return; if(!m_wasPressed) return; m_wasPressed = false; int x, y; x = m_startPos.floorX(); y = m_startPos.floorY(); - if (!m_currentImage->bounds().contains(x, y)) { + if (!m_currentImage->bounds().tqcontains(x, y)) { return; } flood(x, y); notifyModified(); } -QWidget* KisToolFill::createOptionWidget(QWidget* parent) +TQWidget* KisToolFill::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); - m_lbThreshold = new QLabel(i18n("Threshold: "), widget); + m_lbThreshold = new TQLabel(i18n("Threshold: "), widget); m_slThreshold = new KIntNumInput( widget, "int_widget"); m_slThreshold->setRange( 1, 100); m_slThreshold->setSteps( 3, 3); m_slThreshold->setValue(m_threshold); - connect(m_slThreshold, SIGNAL(valueChanged(int)), this, SLOT(slotSetThreshold(int))); + connect(m_slThreshold, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetThreshold(int))); - m_checkUsePattern = new QCheckBox(i18n("Use pattern"), widget); + m_checkUsePattern = new TQCheckBox(i18n("Use pattern"), widget); m_checkUsePattern->setChecked(m_usePattern); - connect(m_checkUsePattern, SIGNAL(toggled(bool)), this, SLOT(slotSetUsePattern(bool))); + connect(m_checkUsePattern, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetUsePattern(bool))); - m_checkSampleMerged = new QCheckBox(i18n("Limit to current layer"), widget); + m_checkSampleMerged = new TQCheckBox(i18n("Limit to current layer"), widget); m_checkSampleMerged->setChecked(m_unmerged); - connect(m_checkSampleMerged, SIGNAL(toggled(bool)), this, SLOT(slotSetSampleMerged(bool))); + connect(m_checkSampleMerged, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetSampleMerged(bool))); - m_checkFillSelection = new QCheckBox(i18n("Fill entire selection"), widget); + m_checkFillSelection = new TQCheckBox(i18n("Fill entire selection"), widget); m_checkFillSelection->setChecked(m_fillOnlySelection); - connect(m_checkFillSelection, SIGNAL(toggled(bool)), this, SLOT(slotSetFillSelection(bool))); + connect(m_checkFillSelection, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFillSelection(bool))); addOptionWidgetOption(m_slThreshold, m_lbThreshold); @@ -219,9 +219,9 @@ void KisToolFill::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Fill"), "tool_color_fill", - Qt::Key_F, + TQt::Key_F, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Contiguous fill")); diff --git a/krita/plugins/tools/defaulttools/kis_tool_fill.h b/krita/plugins/tools/defaulttools/kis_tool_fill.h index 2b121d9c..411d711e 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_fill.h +++ b/krita/plugins/tools/defaulttools/kis_tool_fill.h @@ -21,15 +21,15 @@ #ifndef __filltool_h__ #define __filltool_h__ -#include <qpoint.h> +#include <tqpoint.h> #include "kis_point.h" #include "kis_tool_paint.h" class KisPainter; -class QWidget; -class QLabel; -class QCheckBox; +class TQWidget; +class TQLabel; +class TQCheckBox; class KIntNumInput; class KActionCollection; @@ -37,6 +37,7 @@ class KisToolFill : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: @@ -45,7 +46,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 0; } + virtual TQ_UINT32 priority() { return 0; } virtual void update(KisCanvasSubject *subject); @@ -54,7 +55,7 @@ public: bool flood(int startX, int startY); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: virtual void slotSetThreshold(int); @@ -65,20 +66,20 @@ public slots: private: KisPoint m_startPos; int m_threshold; - Q_INT32 m_depth; + TQ_INT32 m_depth; KisLayerSP m_lay; - Q_UINT8* m_oldColor, *m_color; + TQ_UINT8* m_oldColor, *m_color; KisPainter *m_painter; KisCanvasSubject *m_subject; KisImageSP m_currentImage; bool *m_map, m_unmerged, m_usePattern, m_fillOnlySelection; KisSelectionSP m_selection; - QLabel *m_lbThreshold; + TQLabel *m_lbThreshold; KIntNumInput *m_slThreshold; - QCheckBox *m_checkUsePattern; - QCheckBox *m_checkSampleMerged; - QCheckBox *m_checkFillSelection; + TQCheckBox *m_checkUsePattern; + TQCheckBox *m_checkSampleMerged; + TQCheckBox *m_checkFillSelection; bool m_wasPressed; // use for preventing bug:133148 }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_gradient.cc b/krita/plugins/tools/defaulttools/kis_tool_gradient.cc index 6c35de4e..20ea5aa1 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_gradient.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_gradient.cc @@ -21,10 +21,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpainter.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqpainter.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> #include <kdebug.h> #include <kaction.h> @@ -58,7 +58,7 @@ KisToolGradient::KisToolGradient() m_endPos = KisPoint(0, 0); m_reverse = false; - m_shape = KisGradientPainter::GradientShapeLinear; + m_tqshape = KisGradientPainter::GradientShapeLinear; m_repeat = KisGradientPainter::GradientRepeatNone; m_antiAliasThreshold = 0.2; } @@ -79,7 +79,7 @@ void KisToolGradient::paint(KisCanvasPainter& gc) paintLine(gc); } -void KisToolGradient::paint(KisCanvasPainter& gc, const QRect&) +void KisToolGradient::paint(KisCanvasPainter& gc, const TQRect&) { if (m_dragging) paintLine(gc); @@ -91,7 +91,7 @@ void KisToolGradient::buttonPress(KisButtonPressEvent *e) return; } - if (e->button() == QMouseEvent::LeftButton) { + if (e->button() == TQMouseEvent::LeftButton) { m_dragging = true; m_startPos = e->pos(); m_endPos = e->pos(); @@ -105,7 +105,7 @@ void KisToolGradient::move(KisMoveEvent *e) paintLine(); } - if ((e->state() & Qt::ShiftButton) == Qt::ShiftButton) { + if ((e->state() & TQt::ShiftButton) == TQt::ShiftButton) { m_endPos = straightLine(e->pos()); } else { @@ -118,7 +118,7 @@ void KisToolGradient::move(KisMoveEvent *e) void KisToolGradient::buttonRelease(KisButtonReleaseEvent *e) { - if (m_dragging && e->button() == QMouseEvent::LeftButton) { + if (m_dragging && e->button() == TQMouseEvent::LeftButton) { KisCanvasController *controller = m_subject->canvasController(); KisImageSP img = m_subject->currentImg(); @@ -131,7 +131,7 @@ void KisToolGradient::buttonRelease(KisButtonReleaseEvent *e) return; } - if ((e->state() & Qt::ShiftButton) == Qt::ShiftButton) { + if ((e->state() & TQt::ShiftButton) == TQt::ShiftButton) { m_endPos = straightLine(e->pos()); } else { @@ -157,7 +157,7 @@ void KisToolGradient::buttonRelease(KisButtonReleaseEvent *e) progress->setSubject(&painter, true, true); } - bool painted = painter.paintGradient(m_startPos, m_endPos, m_shape, m_repeat, m_antiAliasThreshold, m_reverse, 0, 0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); + bool painted = painter.paintGradient(m_startPos, m_endPos, m_tqshape, m_repeat, m_antiAliasThreshold, m_reverse, 0, 0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); if (painted) { // does whole thing at moment @@ -215,30 +215,30 @@ void KisToolGradient::paintLine(KisCanvasPainter& gc) KisPoint end = controller->windowToView(m_endPos); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawLine(start.floorQPoint(), end.floorQPoint()); + gc.drawLine(start.floorTQPoint(), end.floorTQPoint()); gc.setRasterOp(op); gc.setPen(old); } } -QWidget* KisToolGradient::createOptionWidget(QWidget* parent) +TQWidget* KisToolGradient::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); Q_CHECK_PTR(widget); - m_lbShape = new QLabel(i18n("Shape:"), widget); - m_lbRepeat = new QLabel(i18n("Repeat:"), widget); + m_lbShape = new TQLabel(i18n("Shape:"), widget); + m_lbRepeat = new TQLabel(i18n("Repeat:"), widget); - m_ckReverse = new QCheckBox(i18n("Reverse"), widget, "reverse_check"); - connect(m_ckReverse, SIGNAL(toggled(bool)), this, SLOT(slotSetReverse(bool))); + m_ckReverse = new TQCheckBox(i18n("Reverse"), widget, "reverse_check"); + connect(m_ckReverse, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetReverse(bool))); - m_cmbShape = new QComboBox(false, widget, "shape_combo"); - connect(m_cmbShape, SIGNAL(activated(int)), this, SLOT(slotSetShape(int))); + m_cmbShape = new TQComboBox(false, widget, "tqshape_combo"); + connect(m_cmbShape, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetShape(int))); m_cmbShape->insertItem(i18n("Linear")); m_cmbShape->insertItem(i18n("Bi-Linear")); m_cmbShape->insertItem(i18n("Radial")); @@ -246,8 +246,8 @@ QWidget* KisToolGradient::createOptionWidget(QWidget* parent) m_cmbShape->insertItem(i18n("Conical")); m_cmbShape->insertItem(i18n("Conical Symmetric")); - m_cmbRepeat = new QComboBox(false, widget, "repeat_combo"); - connect(m_cmbRepeat, SIGNAL(activated(int)), this, SLOT(slotSetRepeat(int))); + m_cmbRepeat = new TQComboBox(false, widget, "repeat_combo"); + connect(m_cmbRepeat, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetRepeat(int))); m_cmbRepeat->insertItem(i18n("None")); m_cmbRepeat->insertItem(i18n("Forwards")); m_cmbRepeat->insertItem(i18n("Alternating")); @@ -258,21 +258,21 @@ QWidget* KisToolGradient::createOptionWidget(QWidget* parent) addOptionWidgetOption(m_ckReverse); - m_lbAntiAliasThreshold = new QLabel(i18n("Anti-alias threshold:"), widget); + m_lbAntiAliasThreshold = new TQLabel(i18n("Anti-alias threshold:"), widget); m_slAntiAliasThreshold = new KDoubleNumInput(widget, "threshold_slider"); m_slAntiAliasThreshold->setRange( 0, 1); m_slAntiAliasThreshold->setValue(m_antiAliasThreshold); - connect(m_slAntiAliasThreshold, SIGNAL(valueChanged(double)), this, SLOT(slotSetAntiAliasThreshold(double))); + connect(m_slAntiAliasThreshold, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotSetAntiAliasThreshold(double))); addOptionWidgetOption(m_slAntiAliasThreshold, m_lbAntiAliasThreshold); return widget; } -void KisToolGradient::slotSetShape(int shape) +void KisToolGradient::slotSetShape(int tqshape) { - m_shape = static_cast<KisGradientPainter::enumGradientShape>(shape); + m_tqshape = static_cast<KisGradientPainter::enumGradientShape>(tqshape); } void KisToolGradient::slotSetRepeat(int repeat) @@ -296,8 +296,8 @@ void KisToolGradient::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Gradient"), - "tool_gradient", Qt::Key_G, this, - SLOT(activate()), collection, + "tool_gradient", TQt::Key_G, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a gradient")); m_action->setExclusiveGroup("tools"); diff --git a/krita/plugins/tools/defaulttools/kis_tool_gradient.h b/krita/plugins/tools/defaulttools/kis_tool_gradient.h index c80529e3..59d78ad3 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_gradient.h +++ b/krita/plugins/tools/defaulttools/kis_tool_gradient.h @@ -37,16 +37,17 @@ class KDoubleNumInput; class KisCmbComposite; class KisPainter; -class QLabel; -class QPoint; -class QWidget; -class QCheckBox; +class TQLabel; +class TQPoint; +class TQWidget; +class TQCheckBox; class KisToolGradient : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: @@ -55,7 +56,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual void update(KisCanvasSubject *subject); @@ -64,9 +65,9 @@ public: virtual void buttonRelease(KisButtonReleaseEvent *event); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); - QWidget* createOptionWidget(QWidget* parent); + TQWidget* createOptionWidget(TQWidget* tqparent); public slots: void slotSetShape(int); @@ -87,18 +88,18 @@ private: KisCanvasSubject *m_subject; - KisGradientPainter::enumGradientShape m_shape; + KisGradientPainter::enumGradientShape m_tqshape; KisGradientPainter::enumGradientRepeat m_repeat; bool m_reverse; double m_antiAliasThreshold; - QLabel *m_lbShape; - QLabel *m_lbRepeat; - QCheckBox *m_ckReverse; - QComboBox *m_cmbShape; - QComboBox *m_cmbRepeat; - QLabel *m_lbAntiAliasThreshold; + TQLabel *m_lbShape; + TQLabel *m_lbRepeat; + TQCheckBox *m_ckReverse; + TQComboBox *m_cmbShape; + TQComboBox *m_cmbRepeat; + TQLabel *m_lbAntiAliasThreshold; KDoubleNumInput *m_slAntiAliasThreshold; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_line.cc b/krita/plugins/tools/defaulttools/kis_tool_line.cc index cbdf5448..a335f918 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_line.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_line.cc @@ -20,9 +20,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpainter.h> -#include <qlayout.h> -#include <qwidget.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqwidget.h> #include <kdebug.h> #include <kaction.h> @@ -72,10 +72,10 @@ void KisToolLine::update(KisCanvasSubject *subject) void KisToolLine::paint(KisCanvasPainter& gc) { if (m_dragging) - paintLine(gc, QRect()); + paintLine(gc, TQRect()); } -void KisToolLine::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolLine::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_dragging) paintLine(gc, rc); @@ -87,7 +87,7 @@ void KisToolLine::buttonPress(KisButtonPressEvent *e) if (!m_subject->currentBrush()) return; - if (e->button() == QMouseEvent::LeftButton) { + if (e->button() == TQMouseEvent::LeftButton) { m_dragging = true; //KisCanvasController *controller = m_subject->canvasController(); m_startPos = e->pos(); //controller->windowToView(e->pos()); @@ -102,11 +102,11 @@ void KisToolLine::move(KisMoveEvent *e) paintLine(); //KisCanvasController *controller = m_subject->canvasController(); - if (e->state() & Qt::AltButton) { + if (e->state() & TQt::AltButton) { KisPoint trans = e->pos() - m_endPos; m_startPos += trans; m_endPos += trans; - } else if (e->state() & Qt::ShiftButton) + } else if (e->state() & TQt::ShiftButton) m_endPos = straightLine(e->pos()); else m_endPos = e->pos();//controller->windowToView(e->pos()); @@ -116,7 +116,7 @@ void KisToolLine::move(KisMoveEvent *e) void KisToolLine::buttonRelease(KisButtonReleaseEvent *e) { - if (m_dragging && e->button() == QMouseEvent::LeftButton) { + if (m_dragging && e->button() == TQMouseEvent::LeftButton) { m_dragging = false; KisCanvasController *controller = m_subject->canvasController(); KisImageSP img = m_subject->currentImg(); @@ -127,7 +127,7 @@ void KisToolLine::buttonRelease(KisButtonReleaseEvent *e) return; } - if ((e->state() & Qt::ShiftButton) == Qt::ShiftButton) { + if ((e->state() & TQt::ShiftButton) == TQt::ShiftButton) { m_endPos = straightLine(e->pos()); } else { @@ -196,19 +196,19 @@ void KisToolLine::paintLine() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintLine(gc, rc); } } -void KisToolLine::paintLine(KisCanvasPainter& gc, const QRect&) +void KisToolLine::paintLine(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); KisPoint start; KisPoint end; @@ -223,9 +223,9 @@ void KisToolLine::paintLine(KisCanvasPainter& gc, const QRect&) // end.setY((end.y() - start.y())); // start *= m_subject->zoomFactor(); // end *= m_subject->zoomFactor(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawLine(start.floorQPoint(), end.floorQPoint()); + gc.drawLine(start.floorTQPoint(), end.floorTQPoint()); gc.setRasterOp(op); gc.setPen(old); } @@ -237,8 +237,8 @@ void KisToolLine::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Line"), - "tool_line", Qt::Key_L, this, - SLOT(activate()), collection, + "tool_line", TQt::Key_L, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a line")); m_action->setExclusiveGroup("tools"); @@ -246,7 +246,7 @@ void KisToolLine::setup(KActionCollection *collection) } } -QString KisToolLine::quickHelp() const { +TQString KisToolLine::quickHelp() const { return i18n("Alt+Drag will move the origin of the currently displayed line around, Shift+Drag will force you to draw straight lines"); } diff --git a/krita/plugins/tools/defaulttools/kis_tool_line.h b/krita/plugins/tools/defaulttools/kis_tool_line.h index 8a84a819..4ce0ff38 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_line.h +++ b/krita/plugins/tools/defaulttools/kis_tool_line.h @@ -32,13 +32,14 @@ class KisBrush; class KisPainter; -class QPoint; -class QWidget; +class TQPoint; +class TQWidget; class KisToolLine : public KisToolPaint { Q_OBJECT + TQ_OBJECT typedef KisToolPaint super; public: @@ -47,7 +48,7 @@ class KisToolLine : public KisToolPaint { virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual void update(KisCanvasSubject *subject); virtual void buttonPress(KisButtonPressEvent *event); @@ -55,13 +56,13 @@ class KisToolLine : public KisToolPaint { virtual void buttonRelease(KisButtonReleaseEvent *event); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; private: void paintLine(); - void paintLine(KisCanvasPainter& gc, const QRect& rc); + void paintLine(KisCanvasPainter& gc, const TQRect& rc); KisPoint straightLine(KisPoint point); diff --git a/krita/plugins/tools/defaulttools/kis_tool_move.cc b/krita/plugins/tools/defaulttools/kis_tool_move.cc index 810bda37..643c29c8 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_move.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_move.cc @@ -20,10 +20,10 @@ */ #include <stdlib.h> -#include <qpoint.h> +#include <tqpoint.h> #include <kaction.h> #include <klocale.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_canvas_subject.h" #include "kis_cursor.h" #include "kis_image.h" @@ -45,8 +45,8 @@ KisToolMove::KisToolMove() setName("tool_move"); setCursor(KisCursor::moveCursor()); - m_repeatTimer = new QTimer(this); - connect( m_repeatTimer, SIGNAL( timeout() ), this, SLOT( slotMove() ) ); + m_repeatTimer = new TQTimer(this); + connect( m_repeatTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotMove() ) ); } KisToolMove::~KisToolMove() @@ -62,8 +62,8 @@ void KisToolMove::update(KisCanvasSubject *subject) void KisToolMove::buttonPress(KisButtonPressEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); KisImageSP img = m_subject->currentImg(); KisLayerSP dev; @@ -76,9 +76,9 @@ void KisToolMove::buttonPress(KisButtonPressEvent *e) void KisToolMove::move(KisMoveEvent *e) { - if (m_subject && e->state() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); - if((e->state() & Qt::AltButton) || (e->state() & Qt::ControlButton)) { + if (m_subject && e->state() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); + if((e->state() & TQt::AltButton) || (e->state() & TQt::ControlButton)) { if(fabs(pos.x() - m_dragStart.x()) > fabs(pos.y() - m_dragStart.y())) pos.setY(m_dragStart.y()); else @@ -90,8 +90,8 @@ void KisToolMove::move(KisMoveEvent *e) void KisToolMove::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { - m_strategy.endDrag(e->pos().floorQPoint()); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + m_strategy.endDrag(e->pos().floorTQPoint()); } } @@ -102,9 +102,9 @@ void KisToolMove::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Move"), "tool_move", - Qt::SHIFT+Qt::Key_V, + TQt::SHIFT+TQt::Key_V, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Move")); @@ -114,7 +114,7 @@ void KisToolMove::setup(KActionCollection *collection) } -void KisToolMove::keyPress( QKeyEvent *e ) +void KisToolMove::keyPress( TQKeyEvent *e ) { m_keyEvent = e; @@ -126,7 +126,7 @@ void KisToolMove::keyPress( QKeyEvent *e ) if (!img || !(dev = img->activeLayer())) return; - m_dragStart = QPoint( 0, 0 ); + m_dragStart = TQPoint( 0, 0 ); m_strategy.startDrag( m_dragStart ); m_steps = 1; m_repeatTimer->start(200); @@ -134,23 +134,23 @@ void KisToolMove::keyPress( QKeyEvent *e ) } } -void KisToolMove::keyRelease(QKeyEvent *) +void KisToolMove::keyRelease(TQKeyEvent *) { m_repeatTimer->stop(); if ( m_subject && m_keyEvent) { - if ( m_keyEvent->key() == Qt::Key_Left ) { - m_strategy.endDrag(QPoint( -m_steps, 0 )); + if ( m_keyEvent->key() == TQt::Key_Left ) { + m_strategy.endDrag(TQPoint( -m_steps, 0 )); } - else if ( m_keyEvent->key() == Qt::Key_Right ) { - m_strategy.endDrag(QPoint(m_steps, 0) ); + else if ( m_keyEvent->key() == TQt::Key_Right ) { + m_strategy.endDrag(TQPoint(m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Up ) { - m_strategy.endDrag(QPoint(0, -m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Up ) { + m_strategy.endDrag(TQPoint(0, -m_steps) ); } - else if ( m_keyEvent->key() == Qt::Key_Down ) { - m_strategy.endDrag(QPoint(0, m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Down ) { + m_strategy.endDrag(TQPoint(0, m_steps) ); } } m_steps = 0; @@ -162,17 +162,17 @@ void KisToolMove::slotMove() { if (m_subject && m_keyEvent) { - if ( m_keyEvent->key() == Qt::Key_Left ) { - m_strategy.drag(QPoint(-m_steps, 0) ); + if ( m_keyEvent->key() == TQt::Key_Left ) { + m_strategy.drag(TQPoint(-m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Right ) { - m_strategy.drag(QPoint(m_steps, 0) ); + else if ( m_keyEvent->key() == TQt::Key_Right ) { + m_strategy.drag(TQPoint(m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Up ) { - m_strategy.drag(QPoint(0, -m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Up ) { + m_strategy.drag(TQPoint(0, -m_steps) ); } - else if ( m_keyEvent->key() == Qt::Key_Down ) { - m_strategy.drag(QPoint(0, m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Down ) { + m_strategy.drag(TQPoint(0, m_steps) ); } ++m_steps; diff --git a/krita/plugins/tools/defaulttools/kis_tool_move.h b/krita/plugins/tools/defaulttools/kis_tool_move.h index 128a9661..274cc3c7 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_move.h +++ b/krita/plugins/tools/defaulttools/kis_tool_move.h @@ -21,18 +21,19 @@ #ifndef KIS_TOOL_MOVE_H_ #define KIS_TOOL_MOVE_H_ -#include <qtimer.h> +#include <tqtimer.h> #include "kis_strategy_move.h" #include "kis_tool_non_paint.h" #include "kis_tool_factory.h" -class QTimer; +class TQTimer; class KisToolMove : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolMove(); @@ -44,13 +45,13 @@ public: public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); - virtual void keyPress(QKeyEvent *e); - virtual void keyRelease(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); + virtual void keyRelease(TQKeyEvent *e); private slots: @@ -60,9 +61,9 @@ private: KisCanvasSubject *m_subject; KisStrategyMove m_strategy; - QPoint m_dragStart; - QTimer * m_repeatTimer; - QKeyEvent * m_keyEvent; + TQPoint m_dragStart; + TQTimer * m_repeatTimer; + TQKeyEvent * m_keyEvent; int m_steps; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_pan.cc b/krita/plugins/tools/defaulttools/kis_tool_pan.cc index 56da211d..f7a92dcb 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_pan.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_pan.cc @@ -85,7 +85,7 @@ void KisToolPan::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Pan"), "tool_pan", Qt::SHIFT+Qt::Key_H, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Pan"), "tool_pan", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Pan")); m_action->setExclusiveGroup("tools"); m_ownAction = true; diff --git a/krita/plugins/tools/defaulttools/kis_tool_pan.h b/krita/plugins/tools/defaulttools/kis_tool_pan.h index d0f37669..36ed9dcc 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_pan.h +++ b/krita/plugins/tools/defaulttools/kis_tool_pan.h @@ -32,6 +32,7 @@ class KRITATOOL_EXPORT KisToolPan : public KisToolNonPaint typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolPan(); @@ -41,7 +42,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_VIEW; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); @@ -52,11 +53,11 @@ public: private: 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; - QCursor m_openHandCursor; - QCursor m_closedHandCursor; + TQCursor m_openHandCursor; + TQCursor m_closedHandCursor; }; class KisToolPanFactory : public KisToolFactory { diff --git a/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc b/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc index 13b81c7f..741b5051 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc @@ -21,7 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpainter.h> +#include <tqpainter.h> #include <kaction.h> #include <kdebug.h> @@ -76,23 +76,23 @@ void KisToolRectangle::move(KisMoveEvent *event) // erase old lines on canvas draw(m_dragStart, m_dragEnd); // move (alt) or resize rectangle - if (event->state() & Qt::AltButton) { + if (event->state() & TQt::AltButton) { KisPoint trans = event->pos() - m_dragEnd; m_dragStart += trans; m_dragEnd += trans; } else { - KisPoint diag = event->pos() - (event->state() & Qt::ControlButton + KisPoint diag = event->pos() - (event->state() & TQt::ControlButton ? m_dragCenter : m_dragStart); // square? - if (event->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (event->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (event->state() & Qt::ControlButton) { + if (event->state() & TQt::ControlButton) { m_dragStart = m_dragCenter - diag; m_dragEnd = m_dragCenter + diag; } else { @@ -161,8 +161,8 @@ void KisToolRectangle::draw(const KisPoint& start, const KisPoint& end ) KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter p (canvas); - p.setRasterOp (Qt::NotROP); - p.drawRect (QRect (controller->windowToView (start).floorQPoint(), controller->windowToView (end).floorQPoint())); + p.setRasterOp (TQt::NotROP); + p.drawRect (TQRect (controller->windowToView (start).floorTQPoint(), controller->windowToView (end).floorTQPoint())); p.end (); } @@ -173,9 +173,9 @@ void KisToolRectangle::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Rectangle"), "tool_rectangle", - Qt::Key_F6, + TQt::Key_F6, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Draw a rectangle")); diff --git a/krita/plugins/tools/defaulttools/kis_tool_rectangle.h b/krita/plugins/tools/defaulttools/kis_tool_rectangle.h index d9f1bf21..cc6c0853 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_rectangle.h +++ b/krita/plugins/tools/defaulttools/kis_tool_rectangle.h @@ -24,20 +24,21 @@ #ifndef __KIS_TOOL_RECTANGLE_H__ #define __KIS_TOOL_RECTANGLE_H__ -#include <qrect.h> +#include <tqrect.h> #include "kis_tool_shape.h" #include "kis_types.h" #include "kis_tool_factory.h" #include "kis_point.h" -class QPainter; +class TQPainter; class KisPainter; class KisToolRectangle : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolRectangle(); @@ -55,7 +56,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); @@ -69,7 +70,7 @@ protected: KisPoint m_dragCenter; KisPoint m_dragStart; KisPoint m_dragEnd; - QRect m_final_lines; + TQRect m_final_lines; bool m_dragging; KisImageSP m_currentImage; diff --git a/krita/plugins/tools/defaulttools/kis_tool_text.cc b/krita/plugins/tools/defaulttools/kis_tool_text.cc index b75f1b1b..853ff322 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_text.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_text.cc @@ -16,17 +16,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qfont.h> -#include <qrect.h> -#include <qimage.h> -#include <qlayout.h> -#include <qwidget.h> -#include <qstring.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qfontmetrics.h> -#include <qhbox.h> +#include <tqfont.h> +#include <tqrect.h> +#include <tqimage.h> +#include <tqlayout.h> +#include <tqwidget.h> +#include <tqstring.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqfontmetrics.h> +#include <tqhbox.h> #include <kaction.h> #include <kinputdialog.h> @@ -34,7 +34,7 @@ #include <kfontdialog.h> #include <ksqueezedtextlabel.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_point.h" #include "kis_image.h" @@ -72,7 +72,7 @@ void KisToolText::update(KisCanvasSubject *subject) void KisToolText::buttonPress(KisButtonPressEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { m_wasPressed = true; } } @@ -81,15 +81,15 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) { if ( m_windowIsBeingShown ) return; - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { if(!m_wasPressed) return; m_wasPressed = false; KisImageSP img = m_subject->currentImg(); m_windowIsBeingShown = true; bool ok; - QString text = KInputDialog::getText(i18n("Font Tool"), i18n("Enter text:"), - QString::null, &ok); + TQString text = KInputDialog::getText(i18n("Font Tool"), i18n("Enter text:"), + TQString(), &ok); if (!ok) { m_windowIsBeingShown = false; return; @@ -100,37 +100,37 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) undoAdapter->beginMacro(i18n("Text")); } - QFontMetrics metrics(m_font); - QRect boundingRect = metrics.boundingRect(text).normalize(); + TQFontMetrics metrics(m_font); + TQRect boundingRect = metrics.boundingRect(text).normalize(); int xB = - boundingRect.x(); int yB = - boundingRect.y(); if (boundingRect.x() < 0 || boundingRect.y() < 0) boundingRect.moveBy(- boundingRect.x(), - boundingRect.y()); - QPixmap pixels(boundingRect.width(), boundingRect.height()); + TQPixmap pixels(boundingRect.width(), boundingRect.height()); { - QPainter paint(&pixels); - paint.fillRect(boundingRect, Qt::white); + TQPainter paint(&pixels); + paint.fillRect(boundingRect, TQt::white); paint.setFont(m_font); - paint.setBrush(QBrush(Qt::black)); + paint.setBrush(TQBrush(TQt::black)); paint.drawText(xB, yB, text); } - QImage image = pixels.convertToImage(); + TQImage image = pixels.convertToImage(); - Q_INT32 height = boundingRect.height(); - Q_INT32 width = boundingRect.width(); + TQ_INT32 height = boundingRect.height(); + TQ_INT32 width = boundingRect.width(); KisPaintLayer *layer = new KisPaintLayer(img, '"' + text + '"', OPACITY_OPAQUE); - KisGroupLayerSP parent = img->rootLayer(); + KisGroupLayerSP tqparent = img->rootLayer(); if (img->activeLayer()) - parent = img->activeLayer()->parent(); - img->addLayer(layer, parent, img->activeLayer()); + tqparent = img->activeLayer()->tqparent(); + img->addLayer(layer, tqparent, img->activeLayer()); for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { - QRgb pixel = image.pixel(x, y); + TQRgb pixel = image.pixel(x, y); // use the 'blackness' as alpha :) - Q_UINT8 alpha = 255 - qRed(pixel) * OPACITY_OPAQUE / 255; - QColor c = m_subject->fgColor().toQColor(); + TQ_UINT8 alpha = 255 - tqRed(pixel) * OPACITY_OPAQUE / 255; + TQColor c = m_subject->fgColor().toTQColor(); layer->paintDevice()->setPixel(x, y, c, alpha); } } @@ -139,8 +139,8 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) layer->setCompositeOp(m_compositeOp); layer->setVisible(false); - Q_INT32 x = QMAX(0, static_cast<int>(e->x() - width/2)); - Q_INT32 y = QMAX(0, static_cast<int>(e->y() - height/2)); + TQ_INT32 x = TQMAX(0, static_cast<int>(e->x() - width/2)); + TQ_INT32 y = TQMAX(0, static_cast<int>(e->y() - height/2)); layer->setX(x); layer->setY(y); layer->setVisible(true); @@ -155,22 +155,22 @@ void KisToolText::buttonRelease(KisButtonReleaseEvent *e) } void KisToolText::setFont() { - KFontDialog::getFont( m_font, false/*, QWidget* parent! */ ); - m_lbFontName->setText(QString(m_font.family() + ", %1").arg(m_font.pointSize())); + KFontDialog::getFont( m_font, false/*, TQWidget* tqparent! */ ); + m_lbFontName->setText(TQString(m_font.family() + ", %1").tqarg(m_font.pointSize())); } -QWidget* KisToolText::createOptionWidget(QWidget* parent) +TQWidget* KisToolText::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); - m_lbFont = new QLabel(i18n("Font: "), widget); + m_lbFont = new TQLabel(i18n("Font: "), widget); - QHBox *fontBox = new QHBox(widget); - m_lbFontName = new KSqueezedTextLabel(QString(m_font.family() + ", %1") - .arg(m_font.pointSize()), fontBox); - m_btnMoreFonts = new QPushButton("...", fontBox); + TQHBox *fontBox = new TQHBox(widget); + m_lbFontName = new KSqueezedTextLabel(TQString(m_font.family() + ", %1") + .tqarg(m_font.pointSize()), fontBox); + m_btnMoreFonts = new TQPushButton("...", fontBox); - connect(m_btnMoreFonts, SIGNAL(released()), this, SLOT(setFont())); + connect(m_btnMoreFonts, TQT_SIGNAL(released()), this, TQT_SLOT(setFont())); addOptionWidgetOption(fontBox, m_lbFont); @@ -184,9 +184,9 @@ void KisToolText::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("T&ext"), "tool_text", - Qt::SHIFT+Qt::Key_T, + TQt::SHIFT+TQt::Key_T, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setExclusiveGroup("tools"); diff --git a/krita/plugins/tools/defaulttools/kis_tool_text.h b/krita/plugins/tools/defaulttools/kis_tool_text.h index b7bc857c..b2aa7e18 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_text.h +++ b/krita/plugins/tools/defaulttools/kis_tool_text.h @@ -23,10 +23,10 @@ #include "kis_tool_factory.h" -class QFont; -class QLabel; -class QWidget; -class QPushButton; +class TQFont; +class TQLabel; +class TQWidget; +class TQPushButton; class KSqueezedTextLabel; @@ -34,6 +34,7 @@ class KSqueezedTextLabel; class KisToolText : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: KisToolText(); @@ -42,20 +43,20 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FILL; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent*); virtual void buttonRelease(KisButtonReleaseEvent *e); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: virtual void setFont(); private: KisCanvasSubject *m_subject; - QFont m_font; - QLabel *m_lbFont; + TQFont m_font; + TQLabel *m_lbFont; KSqueezedTextLabel *m_lbFontName; - QPushButton *m_btnMoreFonts; + TQPushButton *m_btnMoreFonts; bool m_wasPressed; // use for preventing bug:136151 bool m_windowIsBeingShown; }; diff --git a/krita/plugins/tools/defaulttools/kis_tool_zoom.cc b/krita/plugins/tools/defaulttools/kis_tool_zoom.cc index a5567f83..f866e5e2 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_zoom.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_zoom.cc @@ -41,12 +41,12 @@ KisToolZoom::KisToolZoom() setName("tool_zoom"); m_subject = 0; m_dragging = false; - m_startPos = QPoint(0, 0); - m_endPos = QPoint(0, 0); + m_startPos = TQPoint(0, 0); + m_endPos = TQPoint(0, 0); m_plusCursor = KisCursor::load("tool_zoom_plus_cursor.png", 8, 8); m_minusCursor = KisCursor::load("tool_zoom_minus_cursor.png", 8, 8); setCursor(m_plusCursor); - connect(&m_timer, SIGNAL(timeout()), SLOT(slotTimer())); + connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimer())); } KisToolZoom::~KisToolZoom() @@ -62,10 +62,10 @@ void KisToolZoom::update(KisCanvasSubject *subject) void KisToolZoom::paint(KisCanvasPainter& gc) { if (m_dragging) - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolZoom::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolZoom::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_dragging) paintOutline(gc, rc); @@ -75,8 +75,8 @@ void KisToolZoom::buttonPress(KisButtonPressEvent *e) { if (m_subject && m_subject->currentImg() && !m_dragging) { if (e->button() == Qt::LeftButton) { - m_startPos = e->pos().floorQPoint(); - m_endPos = e->pos().floorQPoint(); + m_startPos = e->pos().floorTQPoint(); + m_endPos = e->pos().floorTQPoint(); m_dragging = true; } } @@ -88,7 +88,7 @@ void KisToolZoom::move(KisMoveEvent *e) if (m_startPos != m_endPos) paintOutline(); - m_endPos = e->pos().floorQPoint(); + m_endPos = e->pos().floorTQPoint(); paintOutline(); } } @@ -98,19 +98,19 @@ void KisToolZoom::buttonRelease(KisButtonReleaseEvent *e) if (m_subject && m_dragging && e->button() == Qt::LeftButton) { KisCanvasController *controller = m_subject->canvasController(); - m_endPos = e->pos().floorQPoint(); + m_endPos = e->pos().floorTQPoint(); m_dragging = false; - QPoint delta = m_endPos - m_startPos; + TQPoint delta = m_endPos - m_startPos; if (sqrt(delta.x() * delta.x() + delta.y() * delta.y()) < 10) { - if (e->state() & Qt::ControlButton) { + if (e->state() & TQt::ControlButton) { controller->zoomOut(m_endPos.x(), m_endPos.y()); } else { controller->zoomIn(m_endPos.x(), m_endPos.y()); } } else { - controller->zoomTo(QRect(m_startPos, m_endPos)); + controller->zoomTo(TQRect(m_startPos, m_endPos)); } } } @@ -129,13 +129,13 @@ void KisToolZoom::deactivate() void KisToolZoom::slotTimer() { #if KDE_IS_VERSION(3,4,0) - int state = kapp->keyboardMouseState() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton); + int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton); #else int state = kapp->keyboardModifiers() & (KApplication::ShiftModifier |KApplication::ControlModifier|KApplication::Modifier1); #endif - if (state & Qt::ControlButton) { + if (state & TQt::ControlButton) { m_subject->canvasController()->setCanvasCursor(m_minusCursor); } else { m_subject->canvasController()->setCanvasCursor(m_plusCursor); @@ -148,29 +148,29 @@ void KisToolZoom::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolZoom::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolZoom::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::DotLine); - QPoint start; - QPoint end; + TQPen old = gc.pen(); + TQPen pen(TQt::DotLine); + TQPoint start; + TQPoint end; Q_ASSERT(controller); start = controller->windowToView(m_startPos); end = controller->windowToView(m_endPos); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawRect(QRect(start, end)); + gc.drawRect(TQRect(start, end)); gc.setRasterOp(op); gc.setPen(old); } @@ -181,7 +181,7 @@ void KisToolZoom::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Zoom"), "tool_zoom", Qt::Key_Z, this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Zoom"), "tool_zoom", TQt::Key_Z, this, TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Zoom")); m_action->setExclusiveGroup("tools"); m_ownAction = true; diff --git a/krita/plugins/tools/defaulttools/kis_tool_zoom.h b/krita/plugins/tools/defaulttools/kis_tool_zoom.h index 235c3a74..3faa5bf1 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_zoom.h +++ b/krita/plugins/tools/defaulttools/kis_tool_zoom.h @@ -21,7 +21,7 @@ #ifndef KIS_ZOOM_TOOL_H_ #define KIS_ZOOM_TOOL_H_ -#include <qtimer.h> +#include <tqtimer.h> #include "kis_tool_non_paint.h" @@ -33,6 +33,7 @@ class KisToolZoom : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolZoom(); @@ -44,18 +45,18 @@ public: public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_VIEW; } - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); virtual void buttonRelease(KisButtonReleaseEvent *e); virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); private: void paintOutline(); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); public slots: @@ -69,12 +70,12 @@ private slots: private: KisCanvasSubject *m_subject; - QPoint m_startPos; - QPoint m_endPos; + TQPoint m_startPos; + TQPoint m_endPos; bool m_dragging; - QCursor m_plusCursor; - QCursor m_minusCursor; - QTimer m_timer; + TQCursor m_plusCursor; + TQCursor m_minusCursor; + TQTimer m_timer; }; diff --git a/krita/plugins/tools/defaulttools/wdgcolorpicker.ui b/krita/plugins/tools/defaulttools/wdgcolorpicker.ui index 4a26c53f..a2b9d7d3 100644 --- a/krita/plugins/tools/defaulttools/wdgcolorpicker.ui +++ b/krita/plugins/tools/defaulttools/wdgcolorpicker.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ColorPickerOptionsWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ColorPickerOptionsWidget</cstring> </property> @@ -25,7 +25,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Sample All Visible Layers</string> @@ -47,20 +47,20 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>200</width> <height>32767</height> </size> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbUpdateCurrentColour</cstring> </property> @@ -68,15 +68,15 @@ <string>Update current color</string> </property> </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="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbPalette</cstring> </property> @@ -84,14 +84,14 @@ <string>Add to palette:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>cmbPalette</cstring> </property> </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>cbNormaliseValues</cstring> </property> @@ -99,15 +99,15 @@ <string>Show colors as percentages</string> </property> </widget> - <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> @@ -115,7 +115,7 @@ <string>Sample radius:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>radius</cstring> </property> @@ -128,7 +128,7 @@ </widget> </hbox> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Channel</string> @@ -163,5 +163,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc b/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc index 25ceb924..42c95093 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc @@ -19,11 +19,11 @@ #include "kis_tool_move_selection.h" #include <stdlib.h> -#include <qpoint.h> +#include <tqpoint.h> #include <kaction.h> #include <kcommand.h> #include <klocale.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_canvas_subject.h" #include "kis_cursor.h" #include "kis_image.h" @@ -41,22 +41,22 @@ class KisSelectionOffsetCommand : public KNamedCommand { typedef KNamedCommand super; public: - KisSelectionOffsetCommand(KisSelectionSP layer, const QPoint& oldpos, const QPoint& newpos); + KisSelectionOffsetCommand(KisSelectionSP layer, const TQPoint& oldpos, const TQPoint& newpos); virtual ~KisSelectionOffsetCommand(); virtual void execute(); virtual void unexecute(); private: - void moveTo(const QPoint& pos); + void moveTo(const TQPoint& pos); private: KisSelectionSP m_layer; - QPoint m_oldPos; - QPoint m_newPos; + TQPoint m_oldPos; + TQPoint m_newPos; }; - KisSelectionOffsetCommand::KisSelectionOffsetCommand(KisSelectionSP layer, const QPoint& oldpos, const QPoint& newpos) : + KisSelectionOffsetCommand::KisSelectionOffsetCommand(KisSelectionSP layer, const TQPoint& oldpos, const TQPoint& newpos) : super(i18n("Move Layer")) { m_layer = layer; @@ -79,7 +79,7 @@ private: moveTo(m_oldPos); } - void KisSelectionOffsetCommand::moveTo(const QPoint& pos) + void KisSelectionOffsetCommand::moveTo(const TQPoint& pos) { if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(false); @@ -88,7 +88,7 @@ private: m_layer->setX(pos.x()); m_layer->setY(pos.y()); - m_layer->parentPaintDevice()->setDirty(); + m_layer->tqparentPaintDevice()->setDirty(); if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(true); @@ -118,8 +118,8 @@ void KisToolMoveSelection::update(KisCanvasSubject *subject) void KisToolMoveSelection::buttonPress(KisButtonPressEvent *e) { m_dragging = false; - if (m_subject && e->button() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); KisImageSP img = m_subject->currentImg(); KisPaintLayerSP lay; @@ -145,8 +145,8 @@ void KisToolMoveSelection::buttonPress(KisButtonPressEvent *e) void KisToolMoveSelection::move(KisMoveEvent *e) { if (m_subject && m_dragging) { - QPoint pos = e->pos().floorQPoint(); - if((e->state() & Qt::AltButton) || (e->state() & Qt::ControlButton)) { + TQPoint pos = e->pos().floorTQPoint(); + if((e->state() & TQt::AltButton) || (e->state() & TQt::ControlButton)) { if(fabs(pos.x() - m_dragStart.x()) > fabs(pos.y() - m_dragStart.y())) pos.setY(m_dragStart.y()); else @@ -158,7 +158,7 @@ void KisToolMoveSelection::move(KisMoveEvent *e) if(!lay) return; KisSelectionSP sel = lay->paintDevice()->selection(); - QRect rc; + TQRect rc; pos -= m_dragStart; // convert to delta rc = sel->selectedRect(); @@ -166,8 +166,8 @@ void KisToolMoveSelection::move(KisMoveEvent *e) sel->setY(sel->getY() + pos.y()); rc = rc.unite(sel->selectedRect()); - m_layerPosition = QPoint(sel->getX(), sel->getY()); - m_dragStart = e->pos().floorQPoint(); + m_layerPosition = TQPoint(sel->getX(), sel->getY()); + m_dragStart = e->pos().floorTQPoint(); lay->paintDevice()->setDirty(rc); } @@ -176,7 +176,7 @@ void KisToolMoveSelection::move(KisMoveEvent *e) void KisToolMoveSelection::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton && m_dragging) { + if (m_subject && e->button() == TQMouseEvent::LeftButton && m_dragging) { m_dragging = false; KisImageSP img = m_subject->currentImg(); if(!img) return; @@ -209,9 +209,9 @@ void KisToolMoveSelection::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Move selection"), "tool_move", - Qt::SHIFT+Qt::Key_V, + TQt::SHIFT+TQt::Key_V, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Move the selection")); diff --git a/krita/plugins/tools/selectiontools/kis_tool_move_selection.h b/krita/plugins/tools/selectiontools/kis_tool_move_selection.h index b7eb47ec..60d73a9b 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_move_selection.h +++ b/krita/plugins/tools/selectiontools/kis_tool_move_selection.h @@ -27,6 +27,7 @@ class KisToolMoveSelection : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolMoveSelection(); @@ -38,7 +39,7 @@ public: public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SELECT; } - virtual Q_UINT32 priority() { return 10; } + virtual TQ_UINT32 priority() { return 10; } virtual void buttonPress(KisButtonPressEvent *e); virtual void move(KisMoveEvent *e); @@ -46,9 +47,9 @@ public: private: KisCanvasSubject *m_subject; - QPoint m_dragStart; - QPoint m_layerStart; - QPoint m_layerPosition; + TQPoint m_dragStart; + TQPoint m_layerStart; + TQPoint m_layerPosition; bool m_dragging; }; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc b/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc index 9257d15a..c5737b2d 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_brush.cc @@ -18,11 +18,11 @@ * 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> @@ -93,14 +93,14 @@ void KisToolSelectBrush::initPaint(KisEvent* /*e*/) m_target = selection; m_painter = new KisPainter(selection.data()); Q_CHECK_PTR(m_painter); - m_painter->setPaintColor(KisColor(Qt::black, selection->colorSpace())); + m_painter->setPaintColor(KisColor(TQt::black, selection->colorSpace())); m_painter->setBrush(m_subject->currentBrush()); m_painter->setOpacity(OPACITY_OPAQUE);//m_subject->fgColor().colorSpace()->intensity8(m_subject->fgColor().data())); m_painter->setCompositeOp(COMPOSITE_OVER); KisPaintOp * op = KisPaintOpRegistry::instance()->paintOp("paintbrush", 0, painter()); painter()->setPaintOp(op); // And now the painter owns the op and will destroy it. - // Set the cursor -- ideally. this should be a mask created from the brush, + // Set the cursor -- ideally. this should be a tqmask created from the brush, // now that X11 can handle colored cursors. #if 0 // Setting cursors has no effect until the tool is selected again; this @@ -134,7 +134,7 @@ void KisToolSelectBrush::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Selection Brush"), "tool_brush_selection", "Ctrl+Shift+B", this, - SLOT(activate()), collection, + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Paint a selection")); @@ -143,24 +143,24 @@ void KisToolSelectBrush::setup(KActionCollection *collection) } } -QWidget* KisToolSelectBrush::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectBrush::createOptionWidget(TQWidget* tqparent) { - Q_UNUSED(parent); + Q_UNUSED(tqparent); // Commented out due to the fact that this doesn't actually work if you change the action #if 0 - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Selection Brush")); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; #endif return 0; } -QWidget* KisToolSelectBrush::optionWidget() +TQWidget* KisToolSelectBrush::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_brush.h b/krita/plugins/tools/selectiontools/kis_tool_select_brush.h index cc49cd5e..a85ac55f 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_brush.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_brush.h @@ -25,18 +25,19 @@ #include <kis_tool_freehand.h> #include <kis_tool_factory.h> -class QWidget; +class TQWidget; class KisPoint; class KisSelectedTransaction; class KisSelectionOptions; /** * The selection brush creates a selection by painting with the current - * brush shape. Not sure what kind of an icon could represent this... + * brush tqshape. Not sure what kind of an icon could represent this... * Depends a bit on how we're going to visualize selections. */ class KisToolSelectBrush : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -44,10 +45,10 @@ public: virtual ~KisToolSelectBrush(); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } virtual enumToolType toolType() { return TOOL_SELECT; } - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void activate(); diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc index 01acbbcb..1344c39f 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.cc @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpainter.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qapplication.h> -#include <qcheckbox.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqapplication.h> +#include <tqcheckbox.h> #include <kaction.h> #include <kdebug.h> @@ -84,9 +84,9 @@ void KisToolSelectContiguous::buttonPress(KisButtonPressEvent * e) KisImageSP img; KisPaintDeviceSP dev; - QPoint pos; + TQPoint pos; - if (e->button() != QMouseEvent::LeftButton && e->button() != QMouseEvent::RightButton) + if (e->button() != TQMouseEvent::LeftButton && e->button() != TQMouseEvent::RightButton) return; if (!(img = m_subject->currentImg())) @@ -97,9 +97,9 @@ void KisToolSelectContiguous::buttonPress(KisButtonPressEvent * e) if (!dev || !img->activeLayer()->visible()) return; - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); - pos = QPoint(e->pos().floorX(), e->pos().floorY()); + pos = TQPoint(e->pos().floorX(), e->pos().floorY()); KisFillPainter fillpainter(dev); fillpainter.setFillThreshold(m_fuzziness); @@ -132,7 +132,7 @@ void KisToolSelectContiguous::buttonPress(KisButtonPressEvent * e) if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } @@ -146,7 +146,7 @@ void KisToolSelectContiguous::setup(KActionCollection *collection) "tool_contiguous_selection" , 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -183,21 +183,21 @@ void KisToolSelectContiguous::slotSetAction(int action) } -QWidget* KisToolSelectContiguous::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectContiguous::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Contiguous Area Selection")); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); l->setSpacing( 6 ); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QHBoxLayout * hbox = new QHBoxLayout(l); + TQHBoxLayout * hbox = new TQHBoxLayout(l); Q_CHECK_PTR(hbox); - QLabel * lbl = new QLabel(i18n("Fuzziness: "), m_optWidget); + TQLabel * lbl = new TQLabel(i18n("Fuzziness: "), m_optWidget); hbox->addWidget(lbl); KIntNumInput * input = new KIntNumInput(m_optWidget, "fuzziness"); @@ -206,29 +206,29 @@ QWidget* KisToolSelectContiguous::createOptionWidget(QWidget* parent) input->setRange(0, 200, 10, true); input->setValue(20); hbox->addWidget(input); - connect(input, SIGNAL(valueChanged(int)), this, SLOT(slotSetFuzziness(int))); + connect(input, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetFuzziness(int))); - QCheckBox* samplemerged = new QCheckBox(i18n("Sample merged"), m_optWidget); + TQCheckBox* samplemerged = new TQCheckBox(i18n("Sample merged"), m_optWidget); l->addWidget( samplemerged ); samplemerged->setChecked(m_sampleMerged); - connect(samplemerged, SIGNAL(stateChanged(int)), - this, SLOT(slotSetSampleMerged(int))); + connect(samplemerged, TQT_SIGNAL(stateChanged(int)), + this, TQT_SLOT(slotSetSampleMerged(int))); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectContiguous::optionWidget() +TQWidget* KisToolSelectContiguous::optionWidget() { return m_optWidget; } void KisToolSelectContiguous::slotSetSampleMerged(int state) { - if (state == QButton::NoChange) + if (state == TQButton::NoChange) return; - m_sampleMerged = (state == QButton::On); + m_sampleMerged = (state == TQButton::On); } #include "kis_tool_select_contiguous.moc" diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h index cc91b3ef..c60b0673 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_contiguous.h @@ -28,9 +28,9 @@ #include <kis_selection.h> class KisCanvasSubject; -class QWidget; -class QVBoxLayout; -class QCheckBox; +class TQWidget; +class TQVBoxLayout; +class TQCheckBox; class KisSelectionOptions; /** @@ -41,6 +41,7 @@ class KisToolSelectContiguous : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectContiguous(); @@ -50,11 +51,11 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 7; } + virtual TQ_UINT32 priority() { return 7; } virtual enumToolType toolType() { return TOOL_SELECT; }; - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void buttonPress(KisButtonPressEvent *event); diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc index 226277b2..a97518ce 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.cc @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qpainter.h> -#include <qpen.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqlayout.h> #include <kdebug.h> #include <kaction.h> @@ -84,10 +84,10 @@ void KisToolSelectElliptical::update(KisCanvasSubject *subject) void KisToolSelectElliptical::paint(KisCanvasPainter& gc) { if (m_selecting) - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolSelectElliptical::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolSelectElliptical::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_selecting) paintOutline(gc, rc); @@ -131,23 +131,23 @@ void KisToolSelectElliptical::move(KisMoveEvent *e) if (m_subject && m_selecting) { paintOutline(); // move (alt) or resize ellipse - if (e->state() & Qt::AltButton) { + if (e->state() & TQt::AltButton) { KisPoint trans = e->pos() - m_endPos; m_startPos += trans; m_endPos += trans; } else { - KisPoint diag = e->pos() - (e->state() & Qt::ControlButton + KisPoint diag = e->pos() - (e->state() & TQt::ControlButton ? m_centerPos : m_startPos); // circle? - if (e->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (e->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (e->state() & Qt::ControlButton) { + if (e->state() & TQt::ControlButton) { m_startPos = m_centerPos - diag; m_endPos = m_centerPos + diag; } else { @@ -169,7 +169,7 @@ void KisToolSelectElliptical::buttonRelease(KisButtonReleaseEvent *e) if (m_startPos == m_endPos) { clearSelection(); } else { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisImageSP img = m_subject->currentImg(); if (!img) @@ -199,16 +199,16 @@ void KisToolSelectElliptical::buttonRelease(KisButtonReleaseEvent *e) if(m_selectAction==SELECTION_SUBTRACT) dev->selection()->invert(); } - QRect rc( m_startPos.floorQPoint(), m_endPos.floorQPoint()); + TQRect rc( m_startPos.floorTQPoint(), m_endPos.floorTQPoint()); rc = rc.normalize(); KisSelectionSP tmpSel = new KisSelection(dev); - KisAutobrushCircleShape shape(rc.width(),rc.height(), 1, 1); - Q_UINT8 value; + KisAutobrushCircleShape tqshape(rc.width(),rc.height(), 1, 1); + TQ_UINT8 value; for (int y = 0; y <= rc.height(); y++) for (int x = 0; x <= rc.width(); x++) { - value = MAX_SELECTED - shape.valueAt(x,y); + value = MAX_SELECTED - tqshape.valueAt(x,y); tmpSel->setSelected( x+rc.x(), y+rc.y(), value); } switch(m_selectAction) @@ -232,7 +232,7 @@ void KisToolSelectElliptical::buttonRelease(KisButtonReleaseEvent *e) if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } m_selecting = false; @@ -245,29 +245,29 @@ void KisToolSelectElliptical::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolSelectElliptical::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolSelectElliptical::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::DotLine); - QPoint start; - QPoint end; + TQPen old = gc.pen(); + TQPen pen(TQt::DotLine); + TQPoint start; + TQPoint end; Q_ASSERT(controller); - start = controller->windowToView(m_startPos).floorQPoint(); - end = controller->windowToView(m_endPos).floorQPoint(); + start = controller->windowToView(m_startPos).floorTQPoint(); + end = controller->windowToView(m_endPos).floorTQPoint(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawEllipse(QRect(start, end)); + gc.drawEllipse(TQRect(start, end)); gc.setRasterOp(op); gc.setPen(old); } @@ -285,9 +285,9 @@ void KisToolSelectElliptical::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Elliptical Selection"), "tool_elliptical_selection" , - Qt::Key_J, + TQt::Key_J, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -297,21 +297,21 @@ void KisToolSelectElliptical::setup(KActionCollection *collection) } } -QWidget* KisToolSelectElliptical::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectElliptical::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Elliptical Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectElliptical::optionWidget() +TQWidget* KisToolSelectElliptical::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h index e3b46737..dbccda59 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_elliptical.h @@ -23,7 +23,7 @@ #ifndef __KIS_TOOL_SELECT_ELLIPTICAL_H__ #define __KIS_TOOL_SELECT_ELLIPTICAL_H__ -#include <qpoint.h> +#include <tqpoint.h> #include "kis_point.h" #include "kis_selection.h" @@ -36,6 +36,7 @@ class KisToolSelectElliptical : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectElliptical(); @@ -44,13 +45,13 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 4; } - virtual QWidget * createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQ_UINT32 priority() { return 4; } + virtual TQWidget * createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual enumToolType toolType() { return TOOL_SELECT; } 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); @@ -63,7 +64,7 @@ public slots: private: void clearSelection(); void paintOutline(); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); private: KisCanvasSubject *m_subject; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc index 6880c61b..08c30fc0 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.cc @@ -18,10 +18,10 @@ * 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 <tqevent.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwidget.h> #include <kdebug.h> #include <kaction.h> @@ -93,14 +93,14 @@ void KisToolSelectEraser::initPaint(KisEvent */*e*/) m_painter = new KisPainter(selection.data()); Q_CHECK_PTR(m_painter); m_painter->beginTransaction(i18n("Selection Eraser")); - m_painter->setPaintColor(KisColor(Qt::white, selection->colorSpace())); + m_painter->setPaintColor(KisColor(TQt::white, selection->colorSpace())); m_painter->setBrush(m_subject->currentBrush()); m_painter->setOpacity(OPACITY_OPAQUE); m_painter->setCompositeOp(COMPOSITE_ERASE); KisPaintOp * op = KisPaintOpRegistry::instance()->paintOp("eraser", 0, painter()); painter()->setPaintOp(op); // And now the painter owns the op and will destroy it. - // Set the cursor -- ideally. this should be a mask created from the brush, + // Set the cursor -- ideally. this should be a tqmask created from the brush, // now that X11 can handle colored cursors. #if 0 // Setting cursors has no effect until the tool is selected again; this @@ -121,7 +121,7 @@ void KisToolSelectEraser::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("Selection &Eraser"), "tool_eraser_selection", "Ctrl+Shift+E", this, - SLOT(activate()), collection, + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Erase parts of a selection")); @@ -130,24 +130,24 @@ void KisToolSelectEraser::setup(KActionCollection *collection) } } -QWidget* KisToolSelectEraser::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectEraser::createOptionWidget(TQWidget* tqparent) { - Q_UNUSED(parent); + Q_UNUSED(tqparent); // Commented out due to the fact that this doesn't actually work if you change the action #if 0 - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Selection Eraser")); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; #endif return 0; } -QWidget* KisToolSelectEraser::optionWidget() +TQWidget* KisToolSelectEraser::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h index 092122c8..79352df1 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_eraser.h @@ -30,11 +30,12 @@ class KisSelectionOptions; /** * The selection eraser makes a selection smaller by painting with the - * current eraser shape. Not sure what kind of an icon could represent + * current eraser tqshape. Not sure what kind of an icon could represent * this... Depends a bit on how we're going to visualize selections. */ class KisToolSelectEraser : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -42,10 +43,10 @@ public: virtual ~KisToolSelectEraser(); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 2; } + virtual TQ_UINT32 priority() { return 2; } virtual enumToolType toolType() { return TOOL_SELECT; } - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void activate(); diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc b/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc index fe76c989..11c59824 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_outline.cc @@ -19,11 +19,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 <qapplication.h> -#include <qpainter.h> -#include <qregion.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqregion.h> +#include <tqwidget.h> +#include <tqlayout.h> #include <kaction.h> #include <kdebug.h> @@ -115,7 +115,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) KisImageSP img = m_subject->currentImg(); if (img && img->activeDevice()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = img->activeDevice(); bool hasSelection = dev->hasSelection(); KisSelectedTransaction *t = 0; @@ -128,7 +128,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) KisPainter painter(selection.data()); - painter.setPaintColor(KisColor(Qt::black, selection->colorSpace())); + painter.setPaintColor(KisColor(TQt::black, selection->colorSpace())); painter.setFillStyle(KisPainter::FillStyleForegroundColor); painter.setStrokeStyle(KisPainter::StrokeStyleNone); painter.setBrush(m_subject->currentBrush()); @@ -151,7 +151,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) if(hasSelection) { - QRect dirty(painter.dirtyRect()); + TQRect dirty(painter.dirtyRect()); dev->setDirty(dirty); dev->emitSelectionChanged(dirty); } else { @@ -162,7 +162,7 @@ void KisToolSelectOutline::buttonRelease(KisButtonReleaseEvent *event) if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } m_points.clear(); @@ -174,7 +174,7 @@ void KisToolSelectOutline::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolSelectOutline::paint(KisCanvasPainter& gc, const QRect&) +void KisToolSelectOutline::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -196,18 +196,18 @@ void KisToolSelectOutline::draw(KisCanvasPainter& gc) return; if (m_dragging && !m_points.empty()) { - QPen pen(Qt::white, 0, Qt::DotLine); + TQPen pen(TQt::white, 0, TQt::DotLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } } @@ -219,14 +219,14 @@ void KisToolSelectOutline::deactivate() KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QPen pen(Qt::white, 0, Qt::DotLine); + TQPen pen(TQt::white, 0, TQt::DotLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -236,8 +236,8 @@ void KisToolSelectOutline::deactivate() } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -256,7 +256,7 @@ void KisToolSelectOutline::setup(KActionCollection *collection) "tool_outline_selection", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -267,21 +267,21 @@ void KisToolSelectOutline::setup(KActionCollection *collection) } -QWidget* KisToolSelectOutline::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectOutline::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Outline Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectOutline::optionWidget() +TQWidget* KisToolSelectOutline::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_outline.h b/krita/plugins/tools/selectiontools/kis_tool_select_outline.h index eda10504..bc43ff88 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_outline.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_outline.h @@ -23,8 +23,8 @@ #ifndef __selecttoolfreehand_h__ #define __selecttoolfreehand_h__ -#include <qpoint.h> -#include <qpointarray.h> +#include <tqpoint.h> +#include <tqpointarray.h> #include "kis_point.h" #include "kis_tool_non_paint.h" @@ -37,6 +37,7 @@ class KisToolSelectOutline : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectOutline(); virtual ~KisToolSelectOutline(); @@ -44,15 +45,15 @@ public: virtual void update (KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 6; } + virtual TQ_UINT32 priority() { return 6; } virtual enumToolType toolType() { return TOOL_SELECT; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); - QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void slotSetAction(int); @@ -61,7 +62,7 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); @@ -72,7 +73,7 @@ protected: bool m_dragging; private: - typedef QValueVector<KisPoint> KisPointVector; + typedef TQValueVector<KisPoint> KisPointVector; KisCanvasSubject *m_subject; KisPointVector m_points; KisSelectionOptions * m_optWidget; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc index dc7cec97..dc8ceeca 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.cc @@ -19,11 +19,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 <qapplication.h> -#include <qpainter.h> -#include <qregion.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqregion.h> +#include <tqwidget.h> +#include <tqlayout.h> #include <kaction.h> #include <kdebug.h> @@ -124,7 +124,7 @@ void KisToolSelectPolygonal::finish() KisImageSP img = m_subject->currentImg(); if (img && img->activeDevice()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = img->activeDevice(); bool hasSelection = dev->hasSelection(); @@ -138,7 +138,7 @@ void KisToolSelectPolygonal::finish() } KisPainter painter(selection.data()); - painter.setPaintColor(KisColor(Qt::black, selection->colorSpace())); + painter.setPaintColor(KisColor(TQt::black, selection->colorSpace())); painter.setFillStyle(KisPainter::FillStyleForegroundColor); painter.setStrokeStyle(KisPainter::StrokeStyleNone); painter.setBrush(m_subject->currentBrush()); @@ -161,7 +161,7 @@ void KisToolSelectPolygonal::finish() painter.paintPolygon(m_points); if(hasSelection) { - QRect rect(painter.dirtyRect()); + TQRect rect(painter.dirtyRect()); dev->setDirty(rect); dev->emitSelectionChanged(rect); } else { @@ -171,7 +171,7 @@ void KisToolSelectPolygonal::finish() if (img->undo()) img->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } m_points.clear(); @@ -210,7 +210,7 @@ void KisToolSelectPolygonal::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolSelectPolygonal::paint(KisCanvasPainter& gc, const QRect&) +void KisToolSelectPolygonal::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -231,19 +231,19 @@ void KisToolSelectPolygonal::draw(KisCanvasPainter& gc) if (!m_subject) return; - QPen pen(Qt::white, 0, Qt::DotLine); + TQPen pen(TQt::white, 0, TQt::DotLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -254,8 +254,8 @@ void KisToolSelectPolygonal::draw(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -275,7 +275,7 @@ void KisToolSelectPolygonal::setup(KActionCollection *collection) "tool_polygonal_selection" , 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -286,21 +286,21 @@ void KisToolSelectPolygonal::setup(KActionCollection *collection) } -QWidget* KisToolSelectPolygonal::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectPolygonal::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Polygonal Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectPolygonal::optionWidget() +TQWidget* KisToolSelectPolygonal::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h index 05764c61..f233bd51 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_polygonal.h @@ -34,6 +34,7 @@ class KisToolSelectPolygonal : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectPolygonal(); virtual ~KisToolSelectPolygonal(); @@ -49,7 +50,7 @@ public: // virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 5; } + virtual TQ_UINT32 priority() { return 5; } virtual enumToolType toolType() { return TOOL_SELECT; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); @@ -57,8 +58,8 @@ public: virtual void doubleClick(KisDoubleClickEvent * event); void finish(); - QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); public slots: virtual void slotSetAction(int); @@ -67,7 +68,7 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); @@ -77,7 +78,7 @@ protected: bool m_dragging; private: - typedef QValueVector<KisPoint> KisPointVector; + typedef TQValueVector<KisPoint> KisPointVector; KisCanvasSubject *m_subject; KisPointVector m_points; KisSelectionOptions * m_optWidget; diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc index 61a4c292..0f29844a 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.cc @@ -21,10 +21,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qpainter.h> -#include <qpen.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqlayout.h> #include <kdebug.h> #include <kaction.h> @@ -85,10 +85,10 @@ void KisToolSelectRectangular::update(KisCanvasSubject *subject) void KisToolSelectRectangular::paint(KisCanvasPainter& gc) { if (m_selecting) - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolSelectRectangular::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolSelectRectangular::paint(KisCanvasPainter& gc, const TQRect& rc) { if (m_selecting) paintOutline(gc, rc); @@ -127,23 +127,23 @@ void KisToolSelectRectangular::move(KisMoveEvent *e) if (m_subject && m_selecting) { paintOutline(); // move (alt) or resize rectangle - if (e->state() & Qt::AltButton) { + if (e->state() & TQt::AltButton) { KisPoint trans = e->pos() - m_endPos; m_startPos += trans; m_endPos += trans; } else { - KisPoint diag = e->pos() - (e->state() & Qt::ControlButton + KisPoint diag = e->pos() - (e->state() & TQt::ControlButton ? m_centerPos : m_startPos); // square? - if (e->state() & Qt::ShiftButton) { - double size = QMAX(fabs(diag.x()), fabs(diag.y())); + if (e->state() & TQt::ShiftButton) { + double size = TQMAX(fabs(diag.x()), fabs(diag.y())); double w = diag.x() < 0 ? -size : size; double h = diag.y() < 0 ? -size : size; diag = KisPoint(w, h); } // resize around center point? - if (e->state() & Qt::ControlButton) { + if (e->state() & TQt::ControlButton) { m_startPos = m_centerPos - diag; m_endPos = m_centerPos + diag; } else { @@ -183,18 +183,18 @@ void KisToolSelectRectangular::buttonRelease(KisButtonReleaseEvent *e) m_endPos.setX(img->width()); if (img && img->activeDevice()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = img->activeDevice(); bool hasSelection = dev->hasSelection(); KisSelectedTransaction *t = 0; if (img->undo()) t = new KisSelectedTransaction(i18n("Rectangular Selection"), dev); KisSelectionSP selection = dev->selection(); - QRect rc(m_startPos.floorQPoint(), m_endPos.floorQPoint()); + TQRect rc(m_startPos.floorTQPoint(), m_endPos.floorTQPoint()); rc = rc.normalize(); // We don't want the border of the 'rectangle' to be included in our selection - rc.setSize(rc.size() - QSize(1,1)); + rc.setSize(rc.size() - TQSize(1,1)); if(! hasSelection) { @@ -232,7 +232,7 @@ void KisToolSelectRectangular::buttonRelease(KisButtonReleaseEvent *e) KisCanvasController *controller = m_subject -> canvasController(); controller -> kiscanvas() -> update(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } @@ -246,29 +246,29 @@ void KisToolSelectRectangular::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolSelectRectangular::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolSelectRectangular::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::DotLine); - QPoint start; - QPoint end; + TQPen old = gc.pen(); + TQPen pen(TQt::DotLine); + TQPoint start; + TQPoint end; Q_ASSERT(controller); - start = controller->windowToView(m_startPos.floorQPoint()); - end = controller->windowToView(m_endPos.floorQPoint()); + start = controller->windowToView(m_startPos.floorTQPoint()); + end = controller->windowToView(m_endPos.floorTQPoint()); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); - gc.drawRect(QRect(start, end)); + gc.drawRect(TQRect(start, end)); gc.setRasterOp(op); gc.setPen(old); } @@ -286,9 +286,9 @@ void KisToolSelectRectangular::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Rectangular Selection"), "tool_rect_selection", - Qt::Key_R, + TQt::Key_R, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -298,21 +298,21 @@ void KisToolSelectRectangular::setup(KActionCollection *collection) } } -QWidget* KisToolSelectRectangular::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectRectangular::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Rectangular Selection")); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectRectangular::optionWidget() +TQWidget* KisToolSelectRectangular::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h index 2724a2ca..7c3fb529 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h +++ b/krita/plugins/tools/selectiontools/kis_tool_select_rectangular.h @@ -33,6 +33,7 @@ class KisToolSelectRectangular : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolSelectRectangular(); @@ -41,13 +42,13 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } virtual enumToolType toolType() { return TOOL_SELECT; } - virtual QWidget * createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget * createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); 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); @@ -60,7 +61,7 @@ public slots: private: void clearSelection(); void paintOutline(); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); private: KisCanvasSubject *m_subject; diff --git a/krita/plugins/tools/selectiontools/selection_tools.cc b/krita/plugins/tools/selectiontools/selection_tools.cc index 1297aa31..cff97ea5 100644 --- a/krita/plugins/tools/selectiontools/selection_tools.cc +++ b/krita/plugins/tools/selectiontools/selection_tools.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -51,14 +51,14 @@ typedef KGenericFactory<SelectionTools> SelectionToolsFactory; K_EXPORT_COMPONENT_FACTORY( kritaselectiontools, SelectionToolsFactory( "krita" ) ) -SelectionTools::SelectionTools(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +SelectionTools::SelectionTools(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(SelectionToolsFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolSelectOutlineFactory()); r->add(new KisToolSelectPolygonalFactory()); r->add(new KisToolSelectRectangularFactory()); diff --git a/krita/plugins/tools/selectiontools/selection_tools.h b/krita/plugins/tools/selectiontools/selection_tools.h index ad023762..ff888aa9 100644 --- a/krita/plugins/tools/selectiontools/selection_tools.h +++ b/krita/plugins/tools/selectiontools/selection_tools.h @@ -34,8 +34,9 @@ class SelectionTools : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - SelectionTools(QObject *parent, const char *name, const QStringList &); + SelectionTools(TQObject *tqparent, const char *name, const TQStringList &); virtual ~SelectionTools(); }; diff --git a/krita/plugins/tools/tool_crop/kis_tool_crop.cc b/krita/plugins/tools/tool_crop/kis_tool_crop.cc index fd83e204..763e19b1 100644 --- a/krita/plugins/tools/tool_crop/kis_tool_crop.cc +++ b/krita/plugins/tools/tool_crop/kis_tool_crop.cc @@ -21,13 +21,13 @@ */ -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qobject.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpushbutton.h> -#include <qrect.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqobject.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpushbutton.h> +#include <tqrect.h> #include <kdebug.h> #include <kaction.h> @@ -67,7 +67,7 @@ KisToolCrop::KisToolCrop() setCursor(m_cropCursor); m_subject = 0; m_selecting = false; - m_rectCrop = QRect(0, 0, 0, 0); + m_rectCrop = TQRect(0, 0, 0, 0); m_handleSize = 13; m_haveCropSelection = false; m_optWidget = 0; @@ -113,10 +113,10 @@ void KisToolCrop::deactivate() void KisToolCrop::paint(KisCanvasPainter& gc) { - paintOutlineWithHandles(gc, QRect()); + paintOutlineWithHandles(gc, TQRect()); } -void KisToolCrop::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolCrop::paint(KisCanvasPainter& gc, const TQRect& rc) { paintOutlineWithHandles(gc, rc); } @@ -133,7 +133,7 @@ void KisToolCrop::clearRect() controller->kiscanvas()->update(); - m_rectCrop = QRect(0,0,0,0); + m_rectCrop = TQRect(0,0,0,0); updateWidgetValues(); m_selecting = false; @@ -147,8 +147,8 @@ void KisToolCrop::buttonPress(KisButtonPressEvent *e) if (img && img->activeDevice() && e->button() == LeftButton) { - QPoint pos = e->pos().floorQPoint(); - QRect b = img->bounds(); + TQPoint pos = e->pos().floorTQPoint(); + TQRect b = img->bounds(); if (pos.x() < b.x()) pos.setX(b.x()); @@ -164,7 +164,7 @@ void KisToolCrop::buttonPress(KisButtonPressEvent *e) if( !m_haveCropSelection ) //if the selection is not set { - m_rectCrop = QRect( pos.x(), pos.y(), 0, 0); + m_rectCrop = TQRect( pos.x(), pos.y(), 0, 0); paintOutlineWithHandles(); } else @@ -189,28 +189,28 @@ void KisToolCrop::move(KisMoveEvent *e) { paintOutlineWithHandles(); - m_rectCrop.setBottomRight( e->pos().floorQPoint()); + m_rectCrop.setBottomRight( e->pos().floorTQPoint()); KisImageSP image = m_subject->currentImg(); - m_rectCrop.setRight( QMIN(m_rectCrop.right(), image->width())); - m_rectCrop.setBottom( QMIN(m_rectCrop.bottom(), image->width())); + m_rectCrop.setRight( TQMIN(m_rectCrop.right(), image->width())); + m_rectCrop.setBottom( TQMIN(m_rectCrop.bottom(), image->width())); m_rectCrop = m_rectCrop.normalize(); paintOutlineWithHandles(); } else //if the crop selection is set { - m_dragStop = e->pos().floorQPoint(); + m_dragStop = e->pos().floorTQPoint(); if (m_mouseOnHandleType != None && m_dragStart != m_dragStop ) { - Q_INT32 imageWidth = m_subject->currentImg()->width(); - Q_INT32 imageHeight = m_subject->currentImg()->height(); + TQ_INT32 imageWidth = m_subject->currentImg()->width(); + TQ_INT32 imageHeight = m_subject->currentImg()->height(); paintOutlineWithHandles(); - QPoint pos = e->pos().floorQPoint(); + TQPoint pos = e->pos().floorTQPoint(); if( m_mouseOnHandleType == Inside ) { m_rectCrop.moveBy( ( m_dragStop.x() - m_dragStart.x() ), ( m_dragStop.y() - m_dragStart.y() ) ); @@ -232,35 +232,35 @@ void KisToolCrop::move(KisMoveEvent *e) } } else if(m_optWidget->boolRatio->isChecked()) { - QPoint drag = m_dragStop - m_dragStart; + TQPoint drag = m_dragStop - m_dragStart; if( ! m_optWidget->boolWidth->isChecked() && !m_optWidget->boolHeight->isChecked() ) { switch (m_mouseOnHandleType) { case (UpperLeft): { - Q_INT32 dep = (drag.x() + drag.y()) / 2; + TQ_INT32 dep = (drag.x() + drag.y()) / 2; m_rectCrop.setTop( m_rectCrop.top() + dep ); m_rectCrop.setLeft( (int) ( m_rectCrop.right() - m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); } break; case (LowerRight): { - Q_INT32 dep = (drag.x() + drag.y()) / 2; + TQ_INT32 dep = (drag.x() + drag.y()) / 2; m_rectCrop.setBottom( m_rectCrop.bottom() + dep ); m_rectCrop.setWidth( (int) ( m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); break; } case (UpperRight): { - Q_INT32 dep = (drag.x() - drag.y()) / 2; + TQ_INT32 dep = (drag.x() - drag.y()) / 2; m_rectCrop.setTop( m_rectCrop.top() - dep ); m_rectCrop.setWidth( (int) ( m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); break; } case (LowerLeft): { - Q_INT32 dep = (drag.x() - drag.y()) / 2; + TQ_INT32 dep = (drag.x() - drag.y()) / 2; m_rectCrop.setBottom( m_rectCrop.bottom() - dep ); m_rectCrop.setLeft( (int) ( m_rectCrop.right() - m_optWidget->doubleRatio->value() * m_rectCrop.height() ) ); break; @@ -359,8 +359,8 @@ void KisToolCrop::move(KisMoveEvent *e) } m_rectCrop = m_rectCrop.normalize(); - m_rectCrop = m_rectCrop.intersect( QRect(0,0, imageWidth + 1, imageHeight + 1 ) ); - m_dragStart = e->pos().floorQPoint(); + m_rectCrop = m_rectCrop.intersect( TQRect(0,0, imageWidth + 1, imageHeight + 1 ) ); + m_dragStart = e->pos().floorTQPoint(); paintOutlineWithHandles(); } } @@ -371,7 +371,7 @@ void KisToolCrop::move(KisMoveEvent *e) if ( m_haveCropSelection ) //if the crop selection is set { KisCanvasController *controller = m_subject->canvasController(); - Q_INT32 type = mouseOnHandle(controller->windowToView(e->pos().floorQPoint())); + TQ_INT32 type = mouseOnHandle(controller->windowToView(e->pos().floorTQPoint())); //set resize cursor if we are on one of the handles setMoveResizeCursor(type); } @@ -381,7 +381,7 @@ void KisToolCrop::move(KisMoveEvent *e) void KisToolCrop::updateWidgetValues(bool updateratio) { - QRect r = realRectCrop(); + TQRect r = realRectCrop(); setOptionWidgetX(r.x()); setOptionWidgetY(r.y()); setOptionWidgetWidth(r.width() ); @@ -414,12 +414,12 @@ void KisToolCrop::validateSelection(bool updateratio) KisImageSP image = m_subject->currentImg(); if (image) { - Q_INT32 imageWidth = image->width(); - Q_INT32 imageHeight = image->height(); - m_rectCrop.setLeft(QMAX(0, m_rectCrop.left())); - m_rectCrop.setTop(QMAX(0, m_rectCrop.top())); - m_rectCrop.setRight(QMIN(imageWidth, m_rectCrop.right())); - m_rectCrop.setBottom(QMIN(imageHeight, m_rectCrop.bottom())); + TQ_INT32 imageWidth = image->width(); + TQ_INT32 imageHeight = image->height(); + m_rectCrop.setLeft(TQMAX(0, m_rectCrop.left())); + m_rectCrop.setTop(TQMAX(0, m_rectCrop.top())); + m_rectCrop.setRight(TQMIN(imageWidth, m_rectCrop.right())); + m_rectCrop.setBottom(TQMIN(imageHeight, m_rectCrop.bottom())); updateWidgetValues(updateratio); } @@ -432,36 +432,36 @@ void KisToolCrop::paintOutlineWithHandles() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutlineWithHandles(gc, rc); } } -void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const QRect&) +void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const TQRect&) { if (m_subject && (m_selecting || m_haveCropSelection)) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); pen.setWidth(1); - QPoint start; - QPoint end; + TQPoint start; + TQPoint end; Q_ASSERT(controller); start = controller->windowToView(m_rectCrop.topLeft()); end = controller->windowToView(m_rectCrop.bottomRight()); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); //draw handles - m_handlesRegion = handles(QRect(start, end)); + m_handlesRegion = handles(TQRect(start, end)); - Q_INT32 startx; - Q_INT32 starty; - Q_INT32 endx; - Q_INT32 endy; + TQ_INT32 startx; + TQ_INT32 starty; + TQ_INT32 endx; + TQ_INT32 endy; if(start.x()<=end.x()) { startx=start.x(); @@ -500,10 +500,10 @@ void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const QRect&) gc.drawLine(startx,endy + m_handleSize / 2 + 1, startx, controller->kiscanvas()->height()); gc.drawLine(endx,0,endx,starty - m_handleSize / 2); gc.drawLine(endx + m_handleSize / 2 + 1,starty, controller->kiscanvas()->width(), starty); - QMemArray <QRect> rects = m_handlesRegion.rects (); - for (QMemArray <QRect>::ConstIterator it = rects.begin (); it != rects.end (); ++it) + TQMemArray <TQRect> rects = m_handlesRegion.rects (); + for (TQMemArray <TQRect>::ConstIterator it = rects.begin (); it != rects.end (); ++it) { - gc.fillRect (*it, Qt::black); + gc.fillRect (*it, TQt::black); } @@ -523,12 +523,12 @@ void KisToolCrop::crop() { if (!img) return; - QRect rc = realRectCrop().normalize(); + TQRect rc = realRectCrop().normalize(); // The visitor adds the undo steps to the macro if (m_optWidget->cmbType->currentItem() == 0) { - QRect dirty = img->bounds(); + TQRect dirty = img->bounds(); // The layer(s) under the current layer will take care of adding // undo information to the Crop macro. @@ -548,7 +548,7 @@ void KisToolCrop::crop() { img->resize(rc, true); } - m_rectCrop = QRect(0,0,0,0); + m_rectCrop = TQRect(0,0,0,0); updateWidgetValues(); } @@ -660,7 +660,7 @@ void KisToolCrop::setRatio(double ) } } -void KisToolCrop::setOptionWidgetX(Q_INT32 x) +void KisToolCrop::setOptionWidgetX(TQ_INT32 x) { // Disable signals otherwise we get the valueChanged signal, which we don't want // to go through the logic for setting values that way. @@ -669,21 +669,21 @@ void KisToolCrop::setOptionWidgetX(Q_INT32 x) m_optWidget->intX->blockSignals(false); } -void KisToolCrop::setOptionWidgetY(Q_INT32 y) +void KisToolCrop::setOptionWidgetY(TQ_INT32 y) { m_optWidget->intY->blockSignals(true); m_optWidget->intY->setValue(y); m_optWidget->intY->blockSignals(false); } -void KisToolCrop::setOptionWidgetWidth(Q_INT32 x) +void KisToolCrop::setOptionWidgetWidth(TQ_INT32 x) { m_optWidget->intWidth->blockSignals(true); m_optWidget->intWidth->setValue(x); m_optWidget->intWidth->blockSignals(false); } -void KisToolCrop::setOptionWidgetHeight(Q_INT32 y) +void KisToolCrop::setOptionWidgetHeight(TQ_INT32 y) { m_optWidget->intHeight->blockSignals(true); m_optWidget->intHeight->setValue(y); @@ -698,23 +698,23 @@ void KisToolCrop::setOptionWidgetRatio(double ratio) } -QWidget* KisToolCrop::createOptionWidget(QWidget* parent) +TQWidget* KisToolCrop::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new WdgToolCrop(parent); + m_optWidget = new WdgToolCrop(tqparent); Q_CHECK_PTR(m_optWidget); - connect(m_optWidget->bnCrop, SIGNAL(clicked()), this, SLOT(crop())); + connect(m_optWidget->bnCrop, TQT_SIGNAL(clicked()), this, TQT_SLOT(crop())); - connect(m_optWidget->intX, SIGNAL(valueChanged(int)), this, SLOT(setCropX(int))); - connect(m_optWidget->intY, SIGNAL(valueChanged(int)), this, SLOT(setCropY(int))); - connect(m_optWidget->intWidth, SIGNAL(valueChanged(int)), this, SLOT(setCropWidth(int))); - connect(m_optWidget->intHeight, SIGNAL(valueChanged(int)), this, SLOT(setCropHeight(int))); - connect(m_optWidget->doubleRatio, SIGNAL(valueChanged(double)), this, SLOT(setRatio( double ))); + connect(m_optWidget->intX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropX(int))); + connect(m_optWidget->intY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropY(int))); + connect(m_optWidget->intWidth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropWidth(int))); + connect(m_optWidget->intHeight, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropHeight(int))); + connect(m_optWidget->doubleRatio, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(setRatio( double ))); return m_optWidget; } -QWidget* KisToolCrop::optionWidget() +TQWidget* KisToolCrop::optionWidget() { return m_optWidget; } @@ -728,7 +728,7 @@ void KisToolCrop::setup(KActionCollection *collection) "tool_crop", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -740,31 +740,31 @@ void KisToolCrop::setup(KActionCollection *collection) } } -QRect toQRect(double x, double y, int w, int h) +TQRect toTQRect(double x, double y, int w, int h) { - return QRect(int(x), int(y), w, h); + return TQRect(int(x), int(y), w, h); } -QRegion KisToolCrop::handles(QRect rect) +TQRegion KisToolCrop::handles(TQRect rect) { - QRegion handlesRegion; + TQRegion handlesRegion; //add handle at the lower right corner - handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0, QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0, TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the upper right corner - handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add rectangle at the lower left corner - handlesRegion += toQRect( 0 - m_handleSize / 2.0 , QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( 0 - m_handleSize / 2.0 , TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add rectangle at the upper left corner - handlesRegion += toQRect( 0 - m_handleSize / 2.0, 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( 0 - m_handleSize / 2.0, 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the lower edge of the rectangle - handlesRegion += toQRect( ( QABS( rect.width() ) - m_handleSize ) / 2.0 , QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( ( TQABS( rect.width() ) - m_handleSize ) / 2.0 , TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the right edge of the rectangle - handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0 , ( QABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0 , ( TQABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); //add handle at the upper edge of the rectangle - handlesRegion += toQRect( ( QABS( rect.width() ) - m_handleSize ) / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( ( TQABS( rect.width() ) - m_handleSize ) / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize ); //add handle at the left edge of the rectangle - handlesRegion += toQRect( 0 - m_handleSize / 2.0, ( QABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); + handlesRegion += toTQRect( 0 - m_handleSize / 2.0, ( TQABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize ); //move the handles to the correct position if( rect.width() >= 0 && rect.height() >= 0) @@ -773,30 +773,30 @@ QRegion KisToolCrop::handles(QRect rect) } else if( rect.width() < 0 && rect.height() >= 0) { - handlesRegion.translate ( rect.x() - QABS( rect.width() ), rect.y() ); + handlesRegion.translate ( rect.x() - TQABS( rect.width() ), rect.y() ); } else if( rect.width() >= 0 && rect.height() < 0) { - handlesRegion.translate ( rect.x(), rect.y() - QABS( rect.height() ) ); + handlesRegion.translate ( rect.x(), rect.y() - TQABS( rect.height() ) ); } else if( rect.width() < 0 && rect.height() < 0) { - handlesRegion.translate ( rect.x() - QABS( rect.width() ), rect.y() - QABS( rect.height() ) ); + handlesRegion.translate ( rect.x() - TQABS( rect.width() ), rect.y() - TQABS( rect.height() ) ); } return handlesRegion; } -Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) +TQ_INT32 KisToolCrop::mouseOnHandle(TQPoint currentViewPoint) { KisCanvasController *controller = m_subject->canvasController(); Q_ASSERT(controller); - QPoint start = controller->windowToView(m_rectCrop.topLeft()); - QPoint end = controller->windowToView(m_rectCrop.bottomRight()); + TQPoint start = controller->windowToView(m_rectCrop.topLeft()); + TQPoint end = controller->windowToView(m_rectCrop.bottomRight()); - Q_INT32 startx; - Q_INT32 starty; - Q_INT32 endx; - Q_INT32 endy; + TQ_INT32 startx; + TQ_INT32 starty; + TQ_INT32 endx; + TQ_INT32 endy; if(start.x()<=end.x()) { startx=start.x(); @@ -818,7 +818,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) endy=start.y(); } - if ( toQRect ( startx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + if ( toTQRect ( startx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -827,7 +827,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return UpperLeft; } - else if ( toQRect ( startx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -836,7 +836,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return LowerLeft; } - else if ( toQRect ( endx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( endx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -845,7 +845,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return UpperRight; } - else if ( toQRect ( endx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( endx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -854,7 +854,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return LowerRight; } - else if ( toQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -862,7 +862,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Upper; } - else if ( toQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, endy - m_handleSize / 2, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, endy - m_handleSize / 2, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -870,7 +870,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Lower; } - else if ( toQRect ( startx - m_handleSize / 2.0, starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx - m_handleSize / 2.0, starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -878,7 +878,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Left; } - else if ( toQRect ( endx - m_handleSize / 2.0 , starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) ) + else if ( toTQRect ( endx - m_handleSize / 2.0 , starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) ) { if( !m_selecting ) { @@ -886,14 +886,14 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint) } return Right; } - else if ( toQRect ( startx , starty, endx - startx , endy - starty ).contains( currentViewPoint ) ) + else if ( toTQRect ( startx , starty, endx - startx , endy - starty ).tqcontains( currentViewPoint ) ) { return Inside; } else return None; } -void KisToolCrop::setMoveResizeCursor (Q_INT32 handle) +void KisToolCrop::setMoveResizeCursor (TQ_INT32 handle) { switch (handle) { diff --git a/krita/plugins/tools/tool_crop/kis_tool_crop.h b/krita/plugins/tools/tool_crop/kis_tool_crop.h index 538e4158..5be2daa2 100644 --- a/krita/plugins/tools/tool_crop/kis_tool_crop.h +++ b/krita/plugins/tools/tool_crop/kis_tool_crop.h @@ -21,26 +21,27 @@ #ifndef KIS_TOOL_CROP_H_ #define KIS_TOOL_CROP_H_ -#include <qpoint.h> -#include <qregion.h> +#include <tqpoint.h> +#include <tqregion.h> #include <kis_tool_non_paint.h> #include <kis_tool_factory.h> -class QRect; -class QCursor; +class TQRect; +class TQCursor; class WdgToolCrop; /** * Crop tool * * TODO: - crop from selection -- i.e, set crop outline to the exact bounds of the selection. - * - (when moving to Qt 4: replace rectangle with darker, dimmer overlay layer + * - (when moving to TQt 4: replace rectangle with darker, dimmer overlay layer * like we have for selections right now) */ class KisToolCrop : public KisToolNonPaint { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: @@ -49,14 +50,14 @@ public: virtual void update(KisCanvasSubject *subject); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 1; } + virtual TQ_UINT32 priority() { return 1; } 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); @@ -70,16 +71,16 @@ public slots: private: void clearRect(); - QRegion handles(QRect rect); + TQRegion handles(TQRect rect); void paintOutlineWithHandles(); - void paintOutlineWithHandles(KisCanvasPainter& gc, const QRect& rc); - Q_INT32 mouseOnHandle (const QPoint currentViewPoint); - void setMoveResizeCursor (Q_INT32 handle); + void paintOutlineWithHandles(KisCanvasPainter& gc, const TQRect& rc); + TQ_INT32 mouseOnHandle (const TQPoint currentViewPoint); + void setMoveResizeCursor (TQ_INT32 handle); void validateSelection(bool updateratio = true); - void setOptionWidgetX(Q_INT32 x); - void setOptionWidgetY(Q_INT32 y); - void setOptionWidgetWidth(Q_INT32 x); - void setOptionWidgetHeight(Q_INT32 y); + void setOptionWidgetX(TQ_INT32 x); + void setOptionWidgetY(TQ_INT32 y); + void setOptionWidgetWidth(TQ_INT32 x); + void setOptionWidgetHeight(TQ_INT32 y); void setOptionWidgetRatio(double ratio); private slots: @@ -91,26 +92,26 @@ private slots: void setCropHeight(int y); void setRatio(double ratio); - inline QRect realRectCrop() { QRect r = m_rectCrop; r.setSize(r.size() - QSize(1,1)); return r; } + inline TQRect realRectCrop() { TQRect r = m_rectCrop; r.setSize(r.size() - TQSize(1,1)); return r; } private: void updateWidgetValues(bool updateratio = true); KisCanvasSubject *m_subject; - QRect m_rectCrop; // Is the coordinate of the outline rect and not of the region to crop (to get the region to crop you need to remove 1 to width and height -// QPoint m_startPos; -// QPoint m_endPos; + TQRect m_rectCrop; // Is the coordinate of the outline rect and not of the region to crop (to get the region to crop you need to remove 1 to width and height +// TQPoint m_startPos; +// TQPoint m_endPos; bool m_selecting; - QPoint m_dragStart; - QPoint m_dragStop; + TQPoint m_dragStart; + TQPoint m_dragStop; WdgToolCrop* m_optWidget; - Q_INT32 m_handleSize; - QRegion m_handlesRegion; + TQ_INT32 m_handleSize; + TQRegion m_handlesRegion; bool m_haveCropSelection; - Q_INT32 m_dx, m_dy; - Q_INT32 m_mouseOnHandleType; - QCursor m_cropCursor; + TQ_INT32 m_dx, m_dy; + TQ_INT32 m_mouseOnHandleType; + TQCursor m_cropCursor; enum handleType { diff --git a/krita/plugins/tools/tool_crop/tool_crop.cc b/krita/plugins/tools/tool_crop/tool_crop.cc index 542af31b..7090b713 100644 --- a/krita/plugins/tools/tool_crop/tool_crop.cc +++ b/krita/plugins/tools/tool_crop/tool_crop.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -42,14 +42,14 @@ typedef KGenericFactory<ToolCrop> ToolCropFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolcrop, ToolCropFactory( "krita" ) ) -ToolCrop::ToolCrop(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolCrop::ToolCrop(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolCropFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolCropFactory()); } diff --git a/krita/plugins/tools/tool_crop/tool_crop.h b/krita/plugins/tools/tool_crop/tool_crop.h index 1ebe9064..df5d7c28 100644 --- a/krita/plugins/tools/tool_crop/tool_crop.h +++ b/krita/plugins/tools/tool_crop/tool_crop.h @@ -29,8 +29,9 @@ class KisView; class ToolCrop : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolCrop(QObject *parent, const char *name, const QStringList &); + ToolCrop(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolCrop(); private: diff --git a/krita/plugins/tools/tool_crop/wdg_tool_crop.ui b/krita/plugins/tools/tool_crop/wdg_tool_crop.ui index 8099af7c..4f857cf9 100644 --- a/krita/plugins/tools/tool_crop/wdg_tool_crop.ui +++ b/krita/plugins/tools/tool_crop/wdg_tool_crop.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgToolCrop</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgToolCrop</cstring> </property> @@ -25,9 +25,9 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> @@ -39,7 +39,7 @@ <property name="spacing"> <number>3</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -66,7 +66,7 @@ <number>1000000000</number> </property> </widget> - <widget class="QCheckBox" row="0" column="2"> + <widget class="TQCheckBox" row="0" column="2"> <property name="name"> <cstring>boolWidth</cstring> </property> @@ -93,7 +93,7 @@ <number>1000000000</number> </property> </widget> - <widget class="QCheckBox" row="1" column="2"> + <widget class="TQCheckBox" row="1" column="2"> <property name="name"> <cstring>boolHeight</cstring> </property> @@ -104,7 +104,7 @@ <string>Will keep the height of the crop constant</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -123,7 +123,7 @@ <number>2</number> </property> </widget> - <widget class="QCheckBox" row="2" column="2"> + <widget class="TQCheckBox" row="2" column="2"> <property name="name"> <cstring>boolRatio</cstring> </property> @@ -136,9 +136,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> @@ -147,7 +147,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Layer</string> @@ -165,7 +165,7 @@ <number>1</number> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>bnCrop</cstring> </property> @@ -185,7 +185,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -204,7 +204,7 @@ <tabstop>cmbType</tabstop> <tabstop>bnCrop</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/plugins/tools/tool_curves/kis_curve_framework.cc b/krita/plugins/tools/tool_curves/kis_curve_framework.cc index 2ccb87a4..416d3bfd 100644 --- a/krita/plugins/tools/tool_curves/kis_curve_framework.cc +++ b/krita/plugins/tools/tool_curves/kis_curve_framework.cc @@ -16,8 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qvaluelist.h> -#include <qrect.h> +#include <tqvaluelist.h> +#include <tqrect.h> #include "kis_point.h" #include "kis_curve_framework.h" @@ -79,12 +79,12 @@ KisCurve KisCurve::selectedPivots(bool selected) KisCurve KisCurve::subCurve(const KisPoint& tend) { - return subCurve(find(tend).previousPivot(),find(tend)); + return subCurve(tqfind(tend).previousPivot(),tqfind(tend)); } KisCurve KisCurve::subCurve(const CurvePoint& tend) { - return subCurve(find(tend).previousPivot(),find(tend)); + return subCurve(tqfind(tend).previousPivot(),tqfind(tend)); } KisCurve KisCurve::subCurve(iterator tend) @@ -94,12 +94,12 @@ KisCurve KisCurve::subCurve(iterator tend) KisCurve KisCurve::subCurve(const KisPoint& tstart, const KisPoint& tend) { - return subCurve(find(tstart),find(tend)); + return subCurve(tqfind(tstart),tqfind(tend)); } KisCurve KisCurve::subCurve(const CurvePoint& tstart, const CurvePoint& tend) { - return subCurve(find(tstart),find(tend)); + return subCurve(tqfind(tstart),tqfind(tend)); } KisCurve KisCurve::subCurve(iterator tstart, iterator tend) @@ -137,7 +137,7 @@ KisCurve::iterator KisCurve::deleteCurve (const KisPoint& pos1, const KisPoint& KisCurve::iterator KisCurve::deleteCurve (const CurvePoint& pos1, const CurvePoint& pos2) { - return deleteCurve (find(pos1),find(pos2)); + return deleteCurve (tqfind(pos1),tqfind(pos2)); } KisCurve::iterator KisCurve::deleteCurve (KisCurve::iterator pos1, KisCurve::iterator pos2) @@ -154,12 +154,12 @@ KisCurve::iterator KisCurve::deleteCurve (KisCurve::iterator pos1, KisCurve::ite KisCurve::iterator KisCurve::selectPivot(const KisPoint& pt, bool isSelected) { - return selectPivot(find(CurvePoint(pt,true)),isSelected); + return selectPivot(tqfind(CurvePoint(pt,true)),isSelected); } KisCurve::iterator KisCurve::selectPivot(const CurvePoint& pt, bool isSelected) { - return selectPivot(find(pt),isSelected); + return selectPivot(tqfind(pt),isSelected); } KisCurve::iterator KisCurve::selectPivot(KisCurve::iterator it, bool isSelected) @@ -171,7 +171,7 @@ KisCurve::iterator KisCurve::selectPivot(KisCurve::iterator it, bool isSelected) } KisCurve selected = pivots(); for (iterator i = selected.begin(); i != selected.end(); i++) - (*find((*i))).setSelected(sel); + (*tqfind((*i))).setSelected(sel); (*it).setSelected(isSelected); return it; @@ -184,7 +184,7 @@ KisCurve::iterator KisCurve::movePivot(const KisPoint& oldPt, const KisPoint& ne KisCurve::iterator KisCurve::movePivot(const CurvePoint& oldPt, const KisPoint& newPt) { - return movePivot(find(oldPt), newPt); + return movePivot(tqfind(oldPt), newPt); } KisCurve::iterator KisCurve::movePivot(KisCurve::iterator it, const KisPoint& newPt) @@ -213,7 +213,7 @@ void KisCurve::deletePivot (const KisPoint& pt) void KisCurve::deletePivot (const CurvePoint& pt) { - deletePivot(find(pt)); + deletePivot(tqfind(pt)); } void KisCurve::deletePivot (KisCurve::iterator it) diff --git a/krita/plugins/tools/tool_curves/kis_curve_framework.h b/krita/plugins/tools/tool_curves/kis_curve_framework.h index 23e326c8..c27369aa 100644 --- a/krita/plugins/tools/tool_curves/kis_curve_framework.h +++ b/krita/plugins/tools/tool_curves/kis_curve_framework.h @@ -78,8 +78,8 @@ public: void setHint(int h) {m_hint = h;} }; -typedef QValueList<CurvePoint> PointList; -typedef QValueList<CurvePoint>::iterator BaseIterator; +typedef TQValueList<CurvePoint> PointList; +typedef TQValueList<CurvePoint>::iterator BaseIterator; class CurveIterator; @@ -130,10 +130,10 @@ public: iterator begin() const; iterator lastIterator() const; iterator end() const; - iterator find(const CurvePoint& pt); - iterator find(const KisPoint& pt); - iterator find(iterator it, const CurvePoint& pt); - iterator find(iterator it, const KisPoint& pt); + iterator tqfind(const CurvePoint& pt); + iterator tqfind(const KisPoint& pt); + iterator tqfind(iterator it, const CurvePoint& pt); + iterator tqfind(iterator it, const KisPoint& pt); KisCurve pivots(); KisCurve selectedPivots(bool = true); @@ -312,34 +312,34 @@ inline KisCurve::iterator KisCurve::end() const return iterator(*this,m_curve.end()); } -inline KisCurve::iterator KisCurve::find (const CurvePoint& pt) +inline KisCurve::iterator KisCurve::tqfind (const CurvePoint& pt) { - return iterator(*this,m_curve.find(pt)); + return iterator(*this,m_curve.tqfind(pt)); } -inline KisCurve::iterator KisCurve::find (const KisPoint& pt) +inline KisCurve::iterator KisCurve::tqfind (const KisPoint& pt) { - return iterator(*this,m_curve.find(CurvePoint(pt))); + return iterator(*this,m_curve.tqfind(CurvePoint(pt))); } -inline KisCurve::iterator KisCurve::find (KisCurve::iterator it, const CurvePoint& pt) +inline KisCurve::iterator KisCurve::tqfind (KisCurve::iterator it, const CurvePoint& pt) { - return iterator(*this,m_curve.find(it.position(),pt)); + return iterator(*this,m_curve.tqfind(it.position(),pt)); } -inline KisCurve::iterator KisCurve::find (iterator it, const KisPoint& pt) +inline KisCurve::iterator KisCurve::tqfind (iterator it, const KisPoint& pt) { - return iterator(*this,m_curve.find(it.position(),CurvePoint(pt))); + return iterator(*this,m_curve.tqfind(it.position(),CurvePoint(pt))); } inline void KisCurve::calculateCurve(const KisPoint& start, const KisPoint& end, KisCurve::iterator it) { - calculateCurve(find(CurvePoint(start)),find(CurvePoint(end)),it); + calculateCurve(tqfind(CurvePoint(start)),tqfind(CurvePoint(end)),it); } inline void KisCurve::calculateCurve(const CurvePoint& start, const CurvePoint& end, KisCurve::iterator it) { - calculateCurve(find(start),find(end),it); + calculateCurve(tqfind(start),tqfind(end),it); } inline void KisCurve::calculateCurve(KisCurve::iterator, KisCurve::iterator, KisCurve::iterator) diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier.cc b/krita/plugins/tools/tool_curves/kis_tool_bezier.cc index b6d16f78..cd9e7cf4 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier.cc @@ -20,9 +20,9 @@ #include <math.h> -#include <qpainter.h> -#include <qlayout.h> -#include <qrect.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqrect.h> #include <kaction.h> #include <kdebug.h> @@ -260,7 +260,7 @@ void KisCurveBezier::deletePivot (KisCurve::iterator it) } } -KisToolBezier::KisToolBezier(const QString& UIName) +KisToolBezier::KisToolBezier(const TQString& UIName) : super(UIName) { m_derivated = new KisCurveBezier; @@ -276,20 +276,20 @@ KisToolBezier::~KisToolBezier() } -KisCurve::iterator KisToolBezier::handleUnderMouse(const QPoint& pos) +KisCurve::iterator KisToolBezier::handleUnderMouse(const TQPoint& pos) { - QPoint qpos; + TQPoint qpos; KisCurve pivs = m_curve->pivots(), inHandle; KisCurve::iterator it; int hint; for (it = pivs.begin(); it != pivs.end(); it++) { - qpos = m_subject->canvasController()->windowToView((*it).point().toQPoint()); + qpos = m_subject->canvasController()->windowToView((*it).point().toTQPoint()); hint = (*it).hint(); if (hint != BEZIERENDHINT && !m_derivated->groupSelected(it)) continue; if (hint == BEZIERENDHINT && (m_actionOptions & SHIFTOPTION)) continue; - if (pivotRect(qpos).contains(pos)) { + if (pivotRect(qpos).tqcontains(pos)) { inHandle.pushPoint((*it)); if (hint == BEZIERENDHINT && !(m_actionOptions & SHIFTOPTION)) break; @@ -300,7 +300,7 @@ KisCurve::iterator KisToolBezier::handleUnderMouse(const QPoint& pos) if (inHandle.isEmpty()) return m_curve->end(); - return m_curve->find(inHandle.last()); + return m_curve->tqfind(inHandle.last()); } KisCurve::iterator KisToolBezier::drawPoint (KisCanvasPainter& gc, KisCurve::iterator point) @@ -321,11 +321,11 @@ KisCurve::iterator KisToolBezier::drawPoint (KisCanvasPainter& gc, KisCurve::ite if (control2 != m_curve->end()) { point = control2; - QPointArray vec(4); - vec[0] = controller->windowToView((*origin).point().toQPoint()); - vec[1] = controller->windowToView((*control1).point().toQPoint()); - vec[2] = controller->windowToView((*control2).point().toQPoint()); - vec[3] = controller->windowToView((*destination).point().toQPoint()); + TQPointArray vec(4); + vec[0] = controller->windowToView((*origin).point().toTQPoint()); + vec[1] = controller->windowToView((*control1).point().toTQPoint()); + vec[2] = controller->windowToView((*control2).point().toTQPoint()); + vec[3] = controller->windowToView((*destination).point().toTQPoint()); gc.drawCubicBezier(vec); } @@ -341,14 +341,14 @@ void KisToolBezier::drawPivotHandle (KisCanvasPainter& gc, KisCurve::iterator po KisCanvasController *controller = m_subject->canvasController(); - QPoint endpPos = controller->windowToView((*point).point().toQPoint()); + TQPoint endpPos = controller->windowToView((*point).point().toTQPoint()); if (!m_derivated->groupSelected(point)) { gc.setPen(m_pivotPen); gc.drawRoundRect(pivotRect(endpPos),m_pivotRounding,m_pivotRounding); } else { - QPoint nextControlPos = controller->windowToView((*point.next()).point().toQPoint()); - QPoint prevControlPos = controller->windowToView((*point.previousPivot()).point().toQPoint()); + TQPoint nextControlPos = controller->windowToView((*point.next()).point().toTQPoint()); + TQPoint prevControlPos = controller->windowToView((*point.previousPivot()).point().toTQPoint()); gc.setPen(m_selectedPivotPen); gc.drawRoundRect(selectedPivotRect(endpPos),m_selectedPivotRounding,m_selectedPivotRounding); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier.h b/krita/plugins/tools/tool_curves/kis_tool_bezier.h index ec4ce7bb..09f5b77d 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier.h +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier.h @@ -77,14 +77,15 @@ class KisToolBezier : public KisToolCurve { typedef KisToolCurve super; Q_OBJECT + TQ_OBJECT public: - KisToolBezier(const QString&); + KisToolBezier(const TQString&); virtual ~KisToolBezier(); protected: - virtual KisCurve::iterator handleUnderMouse(const QPoint& pos); + virtual KisCurve::iterator handleUnderMouse(const TQPoint& pos); virtual void drawPivotHandle(KisCanvasPainter& gc, KisCurve::iterator point); virtual KisCurve::iterator drawPoint(KisCanvasPainter& gc, KisCurve::iterator point); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc index 94ee2b79..a29d0ca0 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.cc @@ -19,13 +19,13 @@ */ -#include <qpainter.h> -#include <qlayout.h> -#include <qrect.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqrect.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> #include <kaction.h> #include <kdebug.h> @@ -95,13 +95,13 @@ void KisToolBezierPaint::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Bezier"), "tool_bezier_paint", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h index 052f23e6..fb358aea 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_paint.h @@ -29,6 +29,7 @@ class KisToolBezierPaint : public KisToolBezier { typedef KisToolBezier super; Q_OBJECT + TQ_OBJECT public: KisToolBezierPaint(); @@ -36,7 +37,7 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 7; } + virtual TQ_UINT32 priority() { return 7; } protected: @@ -56,7 +57,7 @@ public: t->setup(ac); return t; } - virtual KisID id() { return KisID("beziershape", i18n("Bezier Painting Tool")); } + virtual KisID id() { return KisID("beziertqshape", i18n("Bezier Painting Tool")); } }; #endif //__KIS_TOOL_CURVE_PAINT_H_ diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc index 94ebde37..c4649f24 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.cc @@ -19,13 +19,13 @@ */ -#include <qpainter.h> -#include <qlayout.h> -#include <qrect.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qcheckbox.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqrect.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqcheckbox.h> #include <kaction.h> #include <kdebug.h> @@ -67,9 +67,9 @@ KisToolBezierSelect::~KisToolBezierSelect() } -QValueVector<KisPoint> KisToolBezierSelect::convertCurve() +TQValueVector<KisPoint> KisToolBezierSelect::convertCurve() { - QValueVector<KisPoint> points; + TQValueVector<KisPoint> points; for (KisCurve::iterator i = m_curve->begin(); i != m_curve->end(); i++) { if (((*i).hint() != BEZIERPREVCONTROLHINT) && ((*i).hint() != BEZIERNEXTCONTROLHINT)) @@ -84,13 +84,13 @@ void KisToolBezierSelect::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Bezier"), "tool_bezier_select", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h index ac596eeb..9b7cd975 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h +++ b/krita/plugins/tools/tool_curves/kis_tool_bezier_select.h @@ -29,6 +29,7 @@ class KisToolBezierSelect : public KisToolBezier { typedef KisToolBezier super; Q_OBJECT + TQ_OBJECT public: KisToolBezierSelect(); @@ -36,11 +37,11 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SELECT; } - virtual Q_UINT32 priority() { return 10; } + virtual TQ_UINT32 priority() { return 10; } protected: - virtual QValueVector<KisPoint> convertCurve(); + virtual TQValueVector<KisPoint> convertCurve(); }; diff --git a/krita/plugins/tools/tool_curves/kis_tool_curve.cc b/krita/plugins/tools/tool_curves/kis_tool_curve.cc index 526311e3..3ca41af6 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_curve.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_curve.cc @@ -21,10 +21,10 @@ #include <math.h> #include <limits.h> -#include <qapplication.h> -#include <qpainter.h> -#include <qlayout.h> -#include <qrect.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqrect.h> #include <kaction.h> #include <kdebug.h> @@ -53,17 +53,17 @@ #include "kis_curve_framework.h" #include "kis_tool_curve.h" -QRect KisToolCurve::pivotRect (const QPoint& pos) +TQRect KisToolCurve::pivotRect (const TQPoint& pos) { - return QRect (pos-QPoint(4,4),pos+QPoint(4,4)); + return TQRect (pos-TQPoint(4,4),pos+TQPoint(4,4)); } -QRect KisToolCurve::selectedPivotRect (const QPoint& pos) +TQRect KisToolCurve::selectedPivotRect (const TQPoint& pos) { - return QRect (pos-QPoint(5,5),pos+QPoint(5,5)); + return TQRect (pos-TQPoint(5,5),pos+TQPoint(5,5)); } -KisToolCurve::KisToolCurve(const QString& UIName) +KisToolCurve::KisToolCurve(const TQString& UIName) : super(UIName) { m_UIName = UIName; @@ -75,9 +75,9 @@ KisToolCurve::KisToolCurve(const QString& UIName) m_dragging = false; m_draggingCursor = false; m_drawPivots = true; - m_drawingPen = QPen(Qt::white, 0, Qt::SolidLine); - m_pivotPen = QPen(Qt::gray, 0, Qt::SolidLine); - m_selectedPivotPen = QPen(Qt::yellow, 0, Qt::SolidLine); + m_drawingPen = TQPen(TQt::white, 0, TQt::SolidLine); + m_pivotPen = TQPen(TQt::gray, 0, TQt::SolidLine); + m_selectedPivotPen = TQPen(TQt::yellow, 0, TQt::SolidLine); m_pivotRounding = m_selectedPivotRounding = 55; m_actionOptions = NOOPTIONS; @@ -118,13 +118,13 @@ void KisToolCurve::buttonPress(KisButtonPressEvent *event) if (event->button() == Qt::LeftButton) { m_dragging = true; m_currentPoint = event->pos(); - PointPair temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toQPoint())); + PointPair temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !(m_actionOptions)) { draw(true, true); m_curve->selectAll(false); draw(true, true); draw(m_curve->end()); - m_previous = m_curve->find(m_curve->last()); + m_previous = m_curve->tqfind(m_curve->last()); m_current = m_curve->pushPivot(event->pos()); if (m_curve->pivots().count() > 1) m_curve->calculateCurve(m_previous,m_current,m_current); @@ -143,28 +143,28 @@ void KisToolCurve::buttonPress(KisButtonPressEvent *event) } } -void KisToolCurve::keyPress(QKeyEvent *event) +void KisToolCurve::keyPress(TQKeyEvent *event) { - if (event->key() == Qt::Key_Return) { + if (event->key() == TQt::Key_Return) { m_dragging = false; commitCurve(); } else - if (event->key() == Qt::Key_Escape) { + if (event->key() == TQt::Key_Escape) { m_dragging = false; draw(false); m_curve->clear(); } else - if (event->key() == Qt::Key_Delete) { + if (event->key() == TQt::Key_Delete) { draw(false); m_dragging = false; m_curve->deleteSelected(); - m_current = m_curve->find(m_curve->last()); + m_current = m_curve->tqfind(m_curve->last()); m_previous = m_curve->selectPivot(m_current); draw(false); } } -void KisToolCurve::keyRelease(QKeyEvent *) +void KisToolCurve::keyRelease(TQKeyEvent *) { } @@ -183,7 +183,7 @@ void KisToolCurve::doubleClick(KisDoubleClickEvent *) void KisToolCurve::move(KisMoveEvent *event) { updateOptions(event->state()); - PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toQPoint())); + PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !m_dragging) { if (m_draggingCursor) { setCursor(KisCursor::load(m_cursor, 6, 6)); @@ -220,10 +220,10 @@ double pointToSegmentDistance(const KisPoint& p, const KisPoint& l0, const KisPo return distance; } -PointPair KisToolCurve::pointUnderMouse(const QPoint& pos) +PointPair KisToolCurve::pointUnderMouse(const TQPoint& pos) { KisCurve::iterator it, next; - QPoint pos1, pos2; + TQPoint pos1, pos2; it = handleUnderMouse(pos); if (it != m_curve->end()) return PointPair(it,true); @@ -234,8 +234,8 @@ PointPair KisToolCurve::pointUnderMouse(const QPoint& pos) return PointPair(m_curve->end(),false); if ((*it).hint() > LINEHINT || (*next).hint() > LINEHINT) continue; - pos1 = m_subject->canvasController()->windowToView((*it).point().toQPoint()); - pos2 = m_subject->canvasController()->windowToView((*next).point().toQPoint()); + pos1 = m_subject->canvasController()->windowToView((*it).point().toTQPoint()); + pos2 = m_subject->canvasController()->windowToView((*next).point().toTQPoint()); if (pos1 == pos2) continue; if (pointToSegmentDistance(pos,pos1,pos2) <= MAXDISTANCE) @@ -245,17 +245,17 @@ PointPair KisToolCurve::pointUnderMouse(const QPoint& pos) return PointPair(it,false); } -KisCurve::iterator KisToolCurve::handleUnderMouse(const QPoint& pos) +KisCurve::iterator KisToolCurve::handleUnderMouse(const TQPoint& pos) { KisCurve pivs = m_curve->pivots(), inHandle; KisCurve::iterator it; for (it = pivs.begin(); it != pivs.end(); it++) { - if (pivotRect(m_subject->canvasController()->windowToView((*it).point().toQPoint())).contains(pos)) + if (pivotRect(m_subject->canvasController()->windowToView((*it).point().toTQPoint())).tqcontains(pos)) inHandle.pushPoint((*it)); } if (inHandle.isEmpty()) return m_curve->end(); - return m_curve->find(inHandle.last()); + return m_curve->tqfind(inHandle.last()); } KisCurve::iterator KisToolCurve::selectByMouse(KisCurve::iterator it) @@ -278,13 +278,13 @@ int KisToolCurve::updateOptions(int key) { int options = 0x0000; - if (key & Qt::ControlButton) + if (key & TQt::ControlButton) options |= CONTROLOPTION; - if (key & Qt::ShiftButton) + if (key & TQt::ShiftButton) options |= SHIFTOPTION; - if (key & Qt::AltButton) + if (key & TQt::AltButton) options |= ALTOPTION; if (options != m_actionOptions) { @@ -317,7 +317,7 @@ void KisToolCurve::draw(KisCurve::iterator inf, bool pivotonly, bool minimal) return; gc->setPen(m_drawingPen); - gc->setRasterOp(Qt::XorROP); + gc->setRasterOp(TQt::XorROP); KisCurve::iterator it, finish; @@ -344,8 +344,8 @@ void KisToolCurve::draw(KisCurve::iterator inf, bool pivotonly, bool minimal) return; } for (KisCurve::iterator i = sel.begin(); i != sel.end(); i++) { - it = m_curve->find(*i).previousPivot(); - finish = m_curve->find(*i).nextPivot(); + it = m_curve->tqfind(*i).previousPivot(); + finish = m_curve->tqfind(*i).nextPivot(); if ((*finish).isSelected()) finish = finish.previousPivot(); while (it != finish) { @@ -374,8 +374,8 @@ KisCurve::iterator KisToolCurve::drawPoint(KisCanvasPainter& gc, KisCurve::itera { KisCanvasController *controller = m_subject->canvasController(); - QPoint pos1, pos2; - pos1 = controller->windowToView((*point).point().toQPoint()); + TQPoint pos1, pos2; + pos1 = controller->windowToView((*point).point().toTQPoint()); switch ((*point).hint()) { case POINTHINT: @@ -385,7 +385,7 @@ KisCurve::iterator KisToolCurve::drawPoint(KisCanvasPainter& gc, KisCurve::itera case LINEHINT: gc.drawPoint(pos1); if (++point != m_curve->end() && (*point).hint() <= LINEHINT) { - pos2 = controller->windowToView((*point).point().toQPoint()); + pos2 = controller->windowToView((*point).point().toTQPoint()); gc.drawLine(pos1,pos2); } break; @@ -401,7 +401,7 @@ void KisToolCurve::drawPivotHandle(KisCanvasPainter& gc, KisCurve::iterator poin KisCanvasController *controller = m_subject->canvasController(); if (m_drawPivots) { - QPoint pos = controller->windowToView((*point).point().toQPoint()); + TQPoint pos = controller->windowToView((*point).point().toTQPoint()); if ((*point).isSelected()) { gc.setPen(m_selectedPivotPen); gc.drawRoundRect(selectedPivotRect(pos),m_selectedPivotRounding,m_selectedPivotRounding); @@ -418,7 +418,7 @@ void KisToolCurve::paint(KisCanvasPainter&) draw(false); } -void KisToolCurve::paint(KisCanvasPainter&, const QRect&) +void KisToolCurve::paint(KisCanvasPainter&, const TQRect&) { draw(false); } @@ -487,9 +487,9 @@ KisCurve::iterator KisToolCurve::paintPoint (KisPainter& painter, KisCurve::iter return point; } -QValueVector<KisPoint> KisToolCurve::convertCurve() +TQValueVector<KisPoint> KisToolCurve::convertCurve() { - QValueVector<KisPoint> points; + TQValueVector<KisPoint> points; for (KisCurve::iterator i = m_curve->begin(); i != m_curve->end(); i++) if ((*i).hint() != NOHINTS) @@ -500,7 +500,7 @@ QValueVector<KisPoint> KisToolCurve::convertCurve() void KisToolCurve::selectCurve() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisPaintDeviceSP dev = m_currentImage->activeDevice(); bool hasSelection = dev->hasSelection(); KisSelectedTransaction *t = 0; @@ -513,7 +513,7 @@ void KisToolCurve::selectCurve() KisPainter painter(selection.data()); - painter.setPaintColor(KisColor(Qt::black, selection->colorSpace())); + painter.setPaintColor(KisColor(TQt::black, selection->colorSpace())); painter.setFillStyle(KisPainter::FillStyleForegroundColor); painter.setStrokeStyle(KisPainter::StrokeStyleNone); painter.setBrush(m_subject->currentBrush()); @@ -536,7 +536,7 @@ void KisToolCurve::selectCurve() if(hasSelection) { - QRect dirty(painter.dirtyRect()); + TQRect dirty(painter.dirtyRect()); dev->setDirty(dirty); dev->emitSelectionChanged(dirty); } else { @@ -547,17 +547,17 @@ void KisToolCurve::selectCurve() if (m_currentImage->undo()) m_currentImage->undoAdapter()->addCommand(t); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); draw(false); } -QWidget* KisToolCurve::createOptionWidget(QWidget* parent) +TQWidget* KisToolCurve::createOptionWidget(TQWidget* tqparent) { if (toolType() == TOOL_SHAPE || toolType() == TOOL_FREEHAND) - return super::createOptionWidget(parent); + return super::createOptionWidget(tqparent); else if (toolType() == TOOL_SELECT) - return createSelectionOptionWidget(parent); + return createSelectionOptionWidget(tqparent); else kdDebug(0) << "NO SUPPORT FOR THIS TOOL TYPE" << endl; return 0; @@ -568,21 +568,21 @@ void KisToolCurve::slotSetAction(int action) { m_selectAction =(enumSelectionMode)action; } -QWidget* KisToolCurve::createSelectionOptionWidget(QWidget* parent) +TQWidget* KisToolCurve::createSelectionOptionWidget(TQWidget* tqparent) { - m_optWidget = new KisSelectionOptions(parent, m_subject); + m_optWidget = new KisSelectionOptions(tqparent, m_subject); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(m_UIName); - connect (m_optWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_optWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolCurve::optionWidget() +TQWidget* KisToolCurve::optionWidget() { if (toolType() == TOOL_SELECT) return m_optWidget; diff --git a/krita/plugins/tools/tool_curves/kis_tool_curve.h b/krita/plugins/tools/tool_curves/kis_tool_curve.h index 17a0c418..d6552d47 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_curve.h +++ b/krita/plugins/tools/tool_curves/kis_tool_curve.h @@ -21,8 +21,8 @@ #ifndef KIS_TOOL_CURVE_H_ #define KIS_TOOL_CURVE_H_ -#include <qpen.h> -#include <qcursor.h> +#include <tqpen.h> +#include <tqcursor.h> #include "kis_selection.h" #include "kis_tool_paint.h" @@ -31,11 +31,11 @@ #include "kis_curve_framework.h" -class QRect; +class TQRect; class KisPainter; class KisSelectionOptions; -typedef QPair<KisCurve::iterator,bool> PointPair; +typedef TQPair<KisCurve::iterator,bool> PointPair; const double MAXDISTANCE = 2.5; double pointToSegmentDistance(const KisPoint& p, const KisPoint& l0, const KisPoint& l1); @@ -44,20 +44,21 @@ class KisToolCurve : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: - KisToolCurve(const QString& UIName); + KisToolCurve(const TQString& UIName); virtual ~KisToolCurve(); virtual void update (KisCanvasSubject *subject); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); virtual void doubleClick(KisDoubleClickEvent *event); - virtual void keyPress(QKeyEvent *event); - virtual void keyRelease(QKeyEvent *event); + virtual void keyPress(TQKeyEvent *event); + virtual void keyRelease(TQKeyEvent *event); public slots: @@ -66,7 +67,7 @@ public slots: protected: virtual void paint(KisCanvasPainter&); - virtual void paint(KisCanvasPainter&, const QRect&); + virtual void paint(KisCanvasPainter&, const TQRect&); /* ********************** * * KisToolCurve interface * @@ -77,8 +78,8 @@ protected: */ virtual int updateOptions(int); - virtual PointPair pointUnderMouse(const QPoint& pos); - virtual KisCurve::iterator handleUnderMouse(const QPoint& pos); + virtual PointPair pointUnderMouse(const TQPoint& pos); + virtual KisCurve::iterator handleUnderMouse(const TQPoint& pos); /* * Select the needed points; called after pointUnderMouse @@ -108,7 +109,7 @@ protected: /* * Called by selectCurve(), this convert m_curve to a vector of KisPoint in order to be used by paintPolygon() */ - virtual QValueVector<KisPoint> convertCurve(); + virtual TQValueVector<KisPoint> convertCurve(); /* * Called by paintCurve(), it behaves essentially like drawPoint(), but this uses a KisPainter @@ -133,12 +134,12 @@ protected: /* * Return the rect around a given point, assuming that that point is an unselected pivot */ - QRect pivotRect (const QPoint&); + TQRect pivotRect (const TQPoint&); /* * Same as above for selected pivots */ - QRect selectedPivotRect (const QPoint&); + TQRect selectedPivotRect (const TQPoint&); protected: @@ -151,9 +152,9 @@ protected: bool m_dragging; bool m_drawPivots; - QPen m_drawingPen; - QPen m_pivotPen; - QPen m_selectedPivotPen; + TQPen m_drawingPen; + TQPen m_pivotPen; + TQPen m_selectedPivotPen; int m_pivotRounding; int m_selectedPivotRounding; @@ -161,12 +162,12 @@ protected: bool m_supportMinimalDraw; bool m_draggingCursor; - QString m_transactionMessage; - QString m_cursor; + TQString m_transactionMessage; + TQString m_cursor; private: - QString m_UIName; + TQString m_UIName; /* ********************************** * @@ -178,12 +179,12 @@ public: /* * This initializes our Option Widget (called by createOptionWidget()) */ - virtual QWidget* createSelectionOptionWidget(QWidget* parent); + virtual TQWidget* createSelectionOptionWidget(TQWidget* tqparent); /* * This return our internal KisSelectionOptions if toolType() returns TOOL_SELECT */ - virtual QWidget* optionWidget(); + virtual TQWidget* optionWidget(); public slots: diff --git a/krita/plugins/tools/tool_curves/kis_tool_example.cc b/krita/plugins/tools/tool_curves/kis_tool_example.cc index 9fcc5d01..9458d966 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_example.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_example.cc @@ -19,9 +19,9 @@ */ -#include <qpainter.h> -#include <qlayout.h> -#include <qrect.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqrect.h> #include <kaction.h> #include <kdebug.h> @@ -88,13 +88,13 @@ void KisToolExample::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Example"), "tool_example", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_example.h b/krita/plugins/tools/tool_curves/kis_tool_example.h index af1d3574..ec1e8f8e 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_example.h +++ b/krita/plugins/tools/tool_curves/kis_tool_example.h @@ -37,6 +37,7 @@ class KisToolExample : public KisToolCurve { typedef KisToolCurve super; Q_OBJECT + TQ_OBJECT public: KisToolExample(); @@ -59,7 +60,7 @@ public: t->setup(ac); return t; } - virtual KisID id() { return KisID("exampleshape", i18n("Example Tool")); } + virtual KisID id() { return KisID("exampletqshape", i18n("Example Tool")); } }; diff --git a/krita/plugins/tools/tool_curves/kis_tool_moutline.cc b/krita/plugins/tools/tool_curves/kis_tool_moutline.cc index 75ab0205..1f0c4ac2 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_moutline.cc +++ b/krita/plugins/tools/tool_curves/kis_tool_moutline.cc @@ -21,12 +21,12 @@ #include <math.h> #include <set> -#include <qpainter.h> -#include <qlayout.h> -#include <qrect.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qslider.h> +#include <tqpainter.h> +#include <tqlayout.h> +#include <tqrect.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqslider.h> #include <kaction.h> #include <kdebug.h> @@ -77,18 +77,18 @@ const int PAGESTEP = 5; class Node { - QPoint m_pos; + TQPoint m_pos; int m_gCost; int m_hCost; int m_tCost; bool m_malus; - QPoint m_parent; + TQPoint m_parent; public: Node() { - m_pos = m_parent = QPoint(-1,-1); + m_pos = m_parent = TQPoint(-1,-1); m_gCost = m_hCost = m_tCost = 0; m_malus = false; } @@ -100,14 +100,14 @@ public: m_hCost = node.hCost(); m_tCost = node.tCost(); m_malus = node.malus(); - m_parent = node.parent(); + m_parent = node.tqparent(); } - Node(const QPoint& parent, const QPoint& pos, int g, int h, bool malus) + Node(const TQPoint& tqparent, const TQPoint& pos, int g, int h, bool malus) : m_pos(pos), m_hCost(h), m_malus(malus) { setGCost(g); - m_parent = parent; + m_parent = tqparent; } ~Node () { @@ -117,10 +117,10 @@ public: int hCost () const {return m_hCost;} int tCost () const {return m_tCost;} bool malus () const {return m_malus;} - QPoint pos () const {return m_pos;} + TQPoint pos () const {return m_pos;} int col () const {return m_pos.x();} int row () const {return m_pos.y();} - QPoint parent () const {return m_parent;} + TQPoint tqparent () const {return m_parent;} void setGCost (int g) { @@ -132,7 +132,7 @@ public: m_hCost = h; m_tCost = m_gCost+m_hCost; } - void setPos (const QPoint& pos) + void setPos (const TQPoint& pos) { m_pos = pos; } @@ -142,7 +142,7 @@ public: } void clear () { - m_pos = QPoint(-1,-1); + m_pos = TQPoint(-1,-1); } bool operator== (const Node& n2) const @@ -153,11 +153,11 @@ public: { return m_pos != n2.pos(); } - bool operator== (const QPoint& n2) const + bool operator== (const TQPoint& n2) const { return m_pos == n2; } - bool operator!= (const QPoint& n2) const + bool operator!= (const TQPoint& n2) const { return m_pos != n2; } @@ -170,10 +170,10 @@ public: return m_tCost > n2.tCost(); } - QValueList<Node> getNeighbor(const GrayMatrix& src, const Node& end) + TQValueList<Node> getNeighbor(const GrayMatrix& src, const Node& end) { - QPoint tmpdist; - QValueList<Node> temp; + TQPoint tmpdist; + TQValueList<Node> temp; int dcol, drow; int g, h; bool malus; @@ -183,7 +183,7 @@ public: for (int i = 0; i < 8; i++) { dcol = m_pos.x() + x[i]; drow = m_pos.y() + y[i]; - tmpdist = QPoint(dcol,drow) - end.pos(); + tmpdist = TQPoint(dcol,drow) - end.pos(); // I use src[0] here because all cols have same number of rows if (dcol == (int)src.count() || dcol < 0 || drow == (int)src[0].count() || drow < 0) @@ -197,17 +197,17 @@ public: else g = m_gCost + ORTHOGONAL_COST; h = ORTHOGONAL_COST * (abs(tmpdist.x()) + abs(tmpdist.y())); - temp.append(Node(m_pos,QPoint(dcol,drow),g,h,malus)); + temp.append(Node(m_pos,TQPoint(dcol,drow),g,h,malus)); } return temp; } }; -KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, - Q_INT32 i3, Q_INT32 i4, Q_INT32 i5, - Q_INT32 i6, Q_INT32 i7, Q_INT32 i8, - Q_INT32 factor, Q_INT32 offset ) +KisKernelSP createKernel( TQ_INT32 i0, TQ_INT32 i1, TQ_INT32 i2, + TQ_INT32 i3, TQ_INT32 i4, TQ_INT32 i5, + TQ_INT32 i6, TQ_INT32 i7, TQ_INT32 i8, + TQ_INT32 factor, TQ_INT32 offset ) { KisKernelSP kernel = new KisKernel(); kernel->width = 3; @@ -216,7 +216,7 @@ KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, kernel->factor = factor; kernel->offset = offset; - kernel->data = new Q_INT32[9]; + kernel->data = new TQ_INT32[9]; kernel->data[0] = i0; kernel->data[1] = i1; kernel->data[2] = i2; @@ -230,8 +230,8 @@ KisKernelSP createKernel( Q_INT32 i0, Q_INT32 i1, Q_INT32 i2, return kernel; } -KisCurveMagnetic::KisCurveMagnetic (KisToolMagnetic *parent) - : m_parent(parent) +KisCurveMagnetic::KisCurveMagnetic (KisToolMagnetic *tqparent) + : m_parent(tqparent) { m_standardkeepselected = false; } @@ -263,11 +263,11 @@ void KisCurveMagnetic::calculateCurve (KisCurve::iterator p1, KisCurve::iterator return; if (m_parent->editingMode()) return; - QPoint start = (*p1).point().roundQPoint(); - QPoint end = (*p2).point().roundQPoint(); - QRect rc = QRect(start,end).normalize(); - rc.setTopLeft(rc.topLeft()+QPoint(-8,-8)); // Enlarge the view, so problems with gaussian blur can be removed - rc.setBottomRight(rc.bottomRight()+QPoint(8,8)); // and we are able to find paths that go beyond the rect. + TQPoint start = (*p1).point().roundTQPoint(); + TQPoint end = (*p2).point().roundTQPoint(); + TQRect rc = TQRect(start,end).normalize(); + rc.setTopLeft(rc.topLeft()+TQPoint(-8,-8)); // Enlarge the view, so problems with gaussian blur can be removed + rc.setBottomRight(rc.bottomRight()+TQPoint(8,8)); // and we are able to find paths that go beyond the rect. KisPaintDeviceSP src = m_parent->m_currentImage->activeDevice(); GrayMatrix dst = GrayMatrix(rc.width(),GrayCol(rc.height())); @@ -280,7 +280,7 @@ void KisCurveMagnetic::calculateCurve (KisCurve::iterator p1, KisCurve::iterator NodeMatrix openMatrix = NodeMatrix(rc.width(),NodeCol(rc.height())); NodeMatrix closedMatrix = NodeMatrix(rc.width(),NodeCol(rc.height())); - QPoint tl(rc.topLeft().x(),rc.topLeft().y()); + TQPoint tl(rc.topLeft().x(),rc.topLeft().y()); start -= tl; // Relative to the matrix end -= tl; // Relative to the matrix @@ -294,28 +294,28 @@ void KisCurveMagnetic::calculateCurve (KisCurve::iterator p1, KisCurve::iterator openSet.erase(openSet.begin()); openMatrix[current.col()][current.row()].clear(); - QValueList<Node> successors = current.getNeighbor(dst,endNode); - for (QValueList<Node>::iterator i = successors.begin(); i != successors.end(); i++) { + TQValueList<Node> successors = current.getNeighbor(dst,endNode); + for (TQValueList<Node>::iterator i = successors.begin(); i != successors.end(); i++) { int col = (*i).col(); int row = (*i).row(); if ((*i) == endNode) { - while (current.parent() != QPoint(-1,-1)) { + while (current.tqparent() != TQPoint(-1,-1)) { it = addPoint(it,tl+current.pos(),false,false,LINEHINT); - current = closedMatrix[current.parent().x()][current.parent().y()]; + current = closedMatrix[current.tqparent().x()][current.tqparent().y()]; } return; } Node *openNode = &openMatrix[col][row]; - if (*openNode != QPoint(-1,-1)) { + if (*openNode != TQPoint(-1,-1)) { if (*i > *openNode) continue; else { - openSet.erase(qFind(openSet.begin(),openSet.end(),*openNode)); + openSet.erase(tqFind(openSet.begin(),openSet.end(),*openNode)); openNode->clear(); // Clear the Node } } Node *closedNode = &closedMatrix[col][row]; - if (*closedNode != QPoint(-1,-1)) { + if (*closedNode != TQPoint(-1,-1)) { if ((*i) > (*closedNode)) continue; else { @@ -352,13 +352,13 @@ void KisCurveMagnetic::findEdge (int col, int row, const GrayMatrix& src, Node& x = (int)(col + mindist.x()); y = (int)(row + mindist.y()); - node.setPos(QPoint(x,y)); + node.setPos(TQPoint(x,y)); } -void KisCurveMagnetic::reduceMatrix (QRect& rc, GrayMatrix& m, int top, int right, int bottom, int left) +void KisCurveMagnetic::reduceMatrix (TQRect& rc, GrayMatrix& m, int top, int right, int bottom, int left) { - QPoint topleft(top, left); - QPoint bottomright(bottom, right); + TQPoint topleft(top, left); + TQPoint bottomright(bottom, right); rc.setTopLeft(rc.topLeft()+topleft); rc.setBottomRight(rc.bottomRight()-bottomright); @@ -377,7 +377,7 @@ void KisCurveMagnetic::reduceMatrix (QRect& rc, GrayMatrix& m, int top, int righ } } -void KisCurveMagnetic::detectEdges (const QRect & rect, KisPaintDeviceSP src, GrayMatrix& dst) +void KisCurveMagnetic::detectEdges (const TQRect & rect, KisPaintDeviceSP src, GrayMatrix& dst) { GrayMatrix graysrc(rect.width(),GrayCol(rect.height())); GrayMatrix xdeltas(rect.width(),GrayCol(rect.height())); @@ -392,7 +392,7 @@ void KisCurveMagnetic::detectEdges (const QRect & rect, KisPaintDeviceSP src, Gr nonMaxSupp(magnitude, xdeltas, ydeltas, dst); } -void KisCurveMagnetic::gaussianBlur (const QRect& rect, KisPaintDeviceSP src, KisPaintDeviceSP dst) +void KisCurveMagnetic::gaussianBlur (const TQRect& rect, KisPaintDeviceSP src, KisPaintDeviceSP dst) { int grectx = rect.x(); int grecty = rect.y(); @@ -410,20 +410,20 @@ void KisCurveMagnetic::gaussianBlur (const QRect& rect, KisPaintDeviceSP src, Ki painter.applyMatrix(kernel, grectx, grecty, grectw, grecth, BORDER_AVOID); } -void KisCurveMagnetic::toGrayScale (const QRect& rect, KisPaintDeviceSP src, GrayMatrix& dst) +void KisCurveMagnetic::toGrayScale (const TQRect& rect, KisPaintDeviceSP src, GrayMatrix& dst) { int grectx = rect.x(); int grecty = rect.y(); int grectw = rect.width(); int grecth = rect.height(); - QColor c; + TQColor c; KisColorSpace *cs = src->colorSpace(); for (int row = 0; row < grecth; row++) { KisHLineIteratorPixel srcIt = src->createHLineIterator(grectx, grecty+row, grectw, false); for (int col = 0; col < grectw; col++) { - cs->toQColor(srcIt.rawData(),&c); - dst[col][row] = qGray(c.rgb()); + cs->toTQColor(srcIt.rawData(),&c); + dst[col][row] = tqGray(c.rgb()); ++srcIt; } } @@ -432,7 +432,7 @@ void KisCurveMagnetic::toGrayScale (const QRect& rect, KisPaintDeviceSP src, Gra void KisCurveMagnetic::getDeltas (const GrayMatrix& src, GrayMatrix& xdelta, GrayMatrix& ydelta) { uint start = 1, xend = src[0].count()-1, yend = src.count()-1; - Q_INT16 deri; + TQ_INT16 deri; for (uint col = 0; col < src.count(); col++) { for (uint row = 0; row < src[col].count(); row++) { if (row >= start && row < xend) { @@ -453,7 +453,7 @@ void KisCurveMagnetic::getMagnitude (const GrayMatrix& xdelta, const GrayMatrix& { for (uint col = 0; col < xdelta.count(); col++) { for (uint row = 0; row < xdelta[col].count(); row++) - gradient[col][row] = (Q_INT16)(ROUND(RMS(xdelta[col][row],ydelta[col][row]))); + gradient[col][row] = (TQ_INT16)(ROUND(RMS(xdelta[col][row],ydelta[col][row]))); } } @@ -471,12 +471,12 @@ void KisCurveMagnetic::nonMaxSupp (const GrayMatrix& magnitude, const GrayMatrix // For this reason: first direction is relative to Gy only and third direction to Gx only double theta; // theta = invtan (|Gy| / |Gx|) This give the direction relative to a quadrant - Q_INT16 mag; // Current magnitude - Q_INT16 lmag; // Magnitude at the left (So this pixel is "more internal" than the current - Q_INT16 rmag; // Magnitude at the right (So this pixel is "more external") + TQ_INT16 mag; // Current magnitude + TQ_INT16 lmag; // Magnitude at the left (So this pixel is "more internal" than the current + TQ_INT16 rmag; // Magnitude at the right (So this pixel is "more external") double xdel; // Current xdelta double ydel; // Current ydelta - Q_INT16 result; + TQ_INT16 result; for (uint col = 0; col < magnitude.count(); col++) { for (uint row = 0; row < magnitude[col].count(); row++) { @@ -590,9 +590,9 @@ void KisToolMagnetic::deactivate () m_drawPivots = true; } -void KisToolMagnetic::keyPress(QKeyEvent *event) +void KisToolMagnetic::keyPress(TQKeyEvent *event) { - if (event->key() == Qt::Key_Control) { + if (event->key() == TQt::Key_Control) { draw(false); if (m_editingMode) { m_editingMode = false; @@ -604,7 +604,7 @@ void KisToolMagnetic::keyPress(QKeyEvent *event) m_mode->setText(i18n("Manual Mode")); } draw(false); - } else if (event->key() == Qt::Key_Delete && m_curve->count()) { + } else if (event->key() == TQt::Key_Delete && m_curve->count()) { draw(false); m_dragging = false; if (m_curve->pivots().count() == 2) @@ -648,7 +648,7 @@ void KisToolMagnetic::buttonPress(KisButtonPressEvent *event) m_currentPoint = event->pos(); PointPair temp(m_curve->end(),false); if (m_editingMode) - temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toQPoint())); + temp = pointUnderMouse (m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !(m_actionOptions)) { if (m_editingMode) { draw(true, true); @@ -691,10 +691,10 @@ void KisToolMagnetic::buttonPress(KisButtonPressEvent *event) void KisToolMagnetic::move(KisMoveEvent *event) { updateOptions(event->state()); - if (m_currentPoint == event->pos().floorQPoint()) + if (m_currentPoint == event->pos().floorTQPoint()) return; if (m_editingMode) { - PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toQPoint())); + PointPair temp = pointUnderMouse(m_subject->canvasController()->windowToView(event->pos().toTQPoint())); if (temp.first == m_curve->end() && !m_dragging) { if (m_editingCursor || m_draggingCursor) { setCursor(KisCursor::load("tool_moutline_cursor.png", 6, 6)); @@ -736,7 +736,7 @@ void KisToolMagnetic::move(KisMoveEvent *event) else draw(m_current); m_curve->movePivot(m_current,event->pos()); - m_currentPoint = event->pos().floorQPoint(); + m_currentPoint = event->pos().floorTQPoint(); draw(m_current); } @@ -759,22 +759,22 @@ void KisToolMagnetic::slotSetDistance (int dist) m_distance = dist; } -QWidget* KisToolMagnetic::createOptionWidget(QWidget* parent) +TQWidget* KisToolMagnetic::createOptionWidget(TQWidget* tqparent) { - m_optWidget = super::createOptionWidget(parent); - QVBoxLayout * l = dynamic_cast<QVBoxLayout*>(m_optWidget->layout()); - QGridLayout *box = new QGridLayout(l, 2, 2, 3); + m_optWidget = super::createOptionWidget(tqparent); + TQVBoxLayout * l = dynamic_cast<TQVBoxLayout*>(m_optWidget->tqlayout()); + TQGridLayout *box = new TQGridLayout(l, 2, 2, 3); box->setColStretch(0, 1); box->setColStretch(1, 1); Q_CHECK_PTR(box); - m_mode = new QLabel(i18n("Automatic mode"), m_optWidget); - m_lbDistance = new QLabel(i18n("Distance: "), m_optWidget); - QPushButton *finish = new QPushButton(i18n("To Selection"), m_optWidget); - m_slDistance = new QSlider(MINDIST, MAXDIST, PAGESTEP, m_distance, Qt::Horizontal, m_optWidget); + m_mode = new TQLabel(i18n("Automatic mode"), m_optWidget); + m_lbDistance = new TQLabel(i18n("Distance: "), m_optWidget); + TQPushButton *finish = new TQPushButton(i18n("To Selection"), m_optWidget); + m_slDistance = new TQSlider(MINDIST, MAXDIST, PAGESTEP, m_distance, Qt::Horizontal, m_optWidget); - connect(m_slDistance, SIGNAL(valueChanged(int)), this, SLOT(slotSetDistance(int))); - connect(finish, SIGNAL(clicked()), this, SLOT(slotCommitCurve())); + connect(m_slDistance, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetDistance(int))); + connect(finish, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCommitCurve())); box->addWidget(m_lbDistance, 0, 0); box->addWidget(m_slDistance, 0, 1); @@ -789,13 +789,13 @@ void KisToolMagnetic::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("Magnetic Outline"), "tool_moutline", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_curves/kis_tool_moutline.h b/krita/plugins/tools/tool_curves/kis_tool_moutline.h index 43a140be..e5ff62a1 100644 --- a/krita/plugins/tools/tool_curves/kis_tool_moutline.h +++ b/krita/plugins/tools/tool_curves/kis_tool_moutline.h @@ -25,15 +25,15 @@ #include "kis_curve_framework.h" #include "kis_tool_curve.h" -class QSlider; +class TQSlider; class KisToolMagnetic; class KisVector2D; class Node; -typedef QValueVector<Node> NodeCol; -typedef QValueVector<NodeCol> NodeMatrix; -typedef QValueVector<Q_INT16> GrayCol; -typedef QValueVector<GrayCol> GrayMatrix; +typedef TQValueVector<Node> NodeCol; +typedef TQValueVector<NodeCol> NodeMatrix; +typedef TQValueVector<TQ_INT16> GrayCol; +typedef TQValueVector<GrayCol> GrayMatrix; class KisCurveMagnetic : public KisCurve { @@ -41,19 +41,19 @@ class KisCurveMagnetic : public KisCurve { KisToolMagnetic *m_parent; - void reduceMatrix (QRect&, GrayMatrix&, int, int, int, int); + void reduceMatrix (TQRect&, GrayMatrix&, int, int, int, int); void findEdge (int, int, const GrayMatrix&, Node&); - void detectEdges (const QRect&, KisPaintDeviceSP, GrayMatrix&); + void detectEdges (const TQRect&, KisPaintDeviceSP, GrayMatrix&); - void gaussianBlur (const QRect&, KisPaintDeviceSP, KisPaintDeviceSP); - void toGrayScale (const QRect&, KisPaintDeviceSP, GrayMatrix&); + void gaussianBlur (const TQRect&, KisPaintDeviceSP, KisPaintDeviceSP); + void toGrayScale (const TQRect&, KisPaintDeviceSP, GrayMatrix&); void getDeltas (const GrayMatrix&, GrayMatrix&, GrayMatrix&); void getMagnitude (const GrayMatrix&, const GrayMatrix&, GrayMatrix&); void nonMaxSupp (const GrayMatrix&, const GrayMatrix&, const GrayMatrix&, GrayMatrix&); public: - KisCurveMagnetic (KisToolMagnetic *parent); + KisCurveMagnetic (KisToolMagnetic *tqparent); ~KisCurveMagnetic (); virtual KisCurve::iterator addPivot (iterator, const KisPoint&); @@ -66,6 +66,7 @@ class KisToolMagnetic : public KisToolCurve { typedef KisToolCurve super; Q_OBJECT + TQ_OBJECT friend class KisCurveMagnetic; @@ -77,9 +78,9 @@ public: virtual void update (KisCanvasSubject*); virtual void setup (KActionCollection*); virtual enumToolType toolType() { return TOOL_SELECT; } - virtual Q_UINT32 priority() { return 9; } + virtual TQ_UINT32 priority() { return 9; } - virtual void keyPress(QKeyEvent*); + virtual void keyPress(TQKeyEvent*); virtual void buttonPress(KisButtonPressEvent*); virtual void buttonRelease(KisButtonReleaseEvent*); virtual void move(KisMoveEvent*); @@ -87,7 +88,7 @@ public: virtual KisCurve::iterator selectByMouse(KisCurve::iterator it); bool editingMode() {return m_editingMode;} - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: @@ -100,10 +101,10 @@ public slots: private: KisCurveMagnetic *m_derived; - QWidget* m_optWidget; - QLabel* m_mode; - QLabel* m_lbDistance; - QSlider* m_slDistance; + TQWidget* m_optWidget; + TQLabel* m_mode; + TQLabel* m_lbDistance; + TQSlider* m_slDistance; bool m_editingMode; bool m_editingCursor; bool m_draggingCursor; diff --git a/krita/plugins/tools/tool_curves/tool_curves.cc b/krita/plugins/tools/tool_curves/tool_curves.cc index bb4b2736..c25ed941 100644 --- a/krita/plugins/tools/tool_curves/tool_curves.cc +++ b/krita/plugins/tools/tool_curves/tool_curves.cc @@ -21,7 +21,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -45,14 +45,14 @@ typedef KGenericFactory<ToolCurves> ToolCurvesFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolcurves, ToolCurvesFactory( "krita" ) ) -ToolCurves::ToolCurves(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolCurves::ToolCurves(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolCurvesFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( parent ); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( tqparent ); r->add(new KisToolBezierPaintFactory()); r->add(new KisToolBezierSelectFactory()); r->add(new KisToolMagneticFactory()); diff --git a/krita/plugins/tools/tool_curves/tool_curves.h b/krita/plugins/tools/tool_curves/tool_curves.h index 7a097d46..db6d5a7f 100644 --- a/krita/plugins/tools/tool_curves/tool_curves.h +++ b/krita/plugins/tools/tool_curves/tool_curves.h @@ -26,8 +26,9 @@ class ToolCurves : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolCurves(QObject *parent, const char *name, const QStringList &); + ToolCurves(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolCurves(); }; diff --git a/krita/plugins/tools/tool_curves/wdg_tool_example.ui b/krita/plugins/tools/tool_curves/wdg_tool_example.ui index 3841185f..eac06e2b 100644 --- a/krita/plugins/tools/tool_curves/wdg_tool_example.ui +++ b/krita/plugins/tools/tool_curves/wdg_tool_example.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgToolExample</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgToolExample</cstring> </property> @@ -22,15 +22,15 @@ <property name="margin"> <number>0</number> </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</cstring> </property> @@ -57,15 +57,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -120,7 +120,7 @@ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/krita/plugins/tools/tool_filter/kis_filterop.cc b/krita/plugins/tools/tool_filter/kis_filterop.cc index a2ca604a..1f2200b3 100644 --- a/krita/plugins/tools/tool_filter/kis_filterop.cc +++ b/krita/plugins/tools/tool_filter/kis_filterop.cc @@ -20,7 +20,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qrect.h> +#include <tqrect.h> #include <kdebug.h> @@ -74,22 +74,22 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Split the coordinates into integer plus fractional parts. The integer // is where the dab will be positioned and the fractional part determines // the sub-pixel positioning. - Q_INT32 x; + TQ_INT32 x; double xFraction; - Q_INT32 y; + TQ_INT32 y; double yFraction; splitCoordinate(pt.x(), &x, &xFraction); splitCoordinate(pt.y(), &y, &yFraction); - // Filters always work with a mask, never with an image; that + // Filters always work with a tqmask, never with an image; that // wouldn't be useful at all. - KisAlphaMaskSP mask = brush->mask(info, xFraction, yFraction); + KisAlphaMaskSP tqmask = brush->tqmask(info, xFraction, yFraction); m_painter->setPressure(info.pressure); - Q_INT32 maskWidth = mask->width(); - Q_INT32 maskHeight = mask->height(); + TQ_INT32 tqmaskWidth = tqmask->width(); + TQ_INT32 tqmaskHeight = tqmask->height(); // Create a temporary paint device KisPaintDeviceSP tmpDev = new KisPaintDevice(colorSpace, "filterop tmpdev"); @@ -98,21 +98,21 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) // Copy the layer data onto the new paint device KisPainter p( tmpDev ); - p.bitBlt( 0, 0, COMPOSITE_COPY, m_source, OPACITY_OPAQUE, x, y, maskWidth, maskHeight ); + p.bitBlt( 0, 0, COMPOSITE_COPY, m_source, OPACITY_OPAQUE, x, y, tqmaskWidth, tqmaskHeight ); // Filter the paint device filter->disableProgress(); - filter->process( tmpDev, tmpDev, m_filterConfiguration, QRect( 0, 0, maskWidth, maskHeight )); + filter->process( tmpDev, tmpDev, m_filterConfiguration, TQRect( 0, 0, tqmaskWidth, tqmaskHeight )); filter->enableProgress(); - // Apply the mask on the paint device (filter before mask because edge pixels may be important) - for (int y = 0; y < maskHeight; y++) + // Apply the tqmask on the paint device (filter before tqmask because edge pixels may be important) + for (int y = 0; y < tqmaskHeight; y++) { - KisHLineIterator hiter = tmpDev->createHLineIterator(0, y, maskWidth, false); + KisHLineIterator hiter = tmpDev->createHLineIterator(0, y, tqmaskWidth, false); int x=0; while(! hiter.isDone()) { - Q_UINT8 alpha = mask->alphaAt( x++, y ); + TQ_UINT8 alpha = tqmask->alphaAt( x++, y ); colorSpace->setAlpha(hiter.rawData(), alpha, 1); ++hiter; @@ -120,8 +120,8 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) } // Blit the paint device onto the layer - QRect dabRect = QRect(0, 0, maskWidth, maskHeight); - QRect dstRect = QRect(x, y, dabRect.width(), dabRect.height()); + TQRect dabRect = TQRect(0, 0, tqmaskWidth, tqmaskHeight); + TQRect dstRect = TQRect(x, y, dabRect.width(), dabRect.height()); KisImage * image = m_painter->device()->image(); @@ -131,10 +131,10 @@ void KisFilterOp::paintAt(const KisPoint &pos, const KisPaintInformation& info) if (dstRect.isNull() || dstRect.isEmpty() || !dstRect.isValid()) return; - Q_INT32 sx = dstRect.x() - x; - Q_INT32 sy = dstRect.y() - y; - Q_INT32 sw = dstRect.width(); - Q_INT32 sh = dstRect.height(); + TQ_INT32 sx = dstRect.x() - x; + TQ_INT32 sy = dstRect.y() - y; + TQ_INT32 sw = dstRect.width(); + TQ_INT32 sh = dstRect.height(); if (m_source->hasSelection()) { m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), tmpDev.data(), diff --git a/krita/plugins/tools/tool_filter/kis_tool_filter.cc b/krita/plugins/tools/tool_filter/kis_tool_filter.cc index 1cc1240f..bb303862 100644 --- a/krita/plugins/tools/tool_filter/kis_tool_filter.cc +++ b/krita/plugins/tools/tool_filter/kis_tool_filter.cc @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qbitmap.h> -#include <qpainter.h> -#include <qcombobox.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqbitmap.h> +#include <tqpainter.h> +#include <tqcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kaction.h> #include <kdebug.h> @@ -67,7 +67,7 @@ void KisToolFilter::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Filter Brush"), "tool_filter", 0, this, - SLOT(activate()), collection, + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Paint with filters")); @@ -96,14 +96,14 @@ void KisToolFilter::initPaint(KisEvent *e) dynamic_cast<KisFilterOp *>(op)->setFilterConfiguration( m_filter->configuration( m_filterConfigurationWidget) ); } -QWidget* KisToolFilter::createOptionWidget(QWidget* parent) +TQWidget* KisToolFilter::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); m_cbFilter = new KisCmbIDList(widget); Q_CHECK_PTR(m_cbFilter); - QLabel* lbFilter = new QLabel(i18n("Filter:"), widget); + TQLabel* lbFilter = new TQLabel(i18n("Filter:"), widget); Q_CHECK_PTR(lbFilter); // Check which filters support painting @@ -120,11 +120,11 @@ QWidget* KisToolFilter::createOptionWidget(QWidget* parent) addOptionWidgetOption(m_cbFilter, lbFilter); - m_optionLayout = new QGridLayout(widget, 1, 1, 0, 6); + m_optionLayout = new TQGridLayout(widget, 1, 1, 0, 6); Q_CHECK_PTR(m_optionLayout); super::addOptionWidgetLayout(m_optionLayout); - connect(m_cbFilter, SIGNAL(activated ( const KisID& )), this, SLOT( changeFilter( const KisID& ) ) ); + connect(m_cbFilter, TQT_SIGNAL(activated ( const KisID& )), this, TQT_SLOT( changeFilter( const KisID& ) ) ); changeFilter( m_cbFilter->currentItem () ); return widget; diff --git a/krita/plugins/tools/tool_filter/kis_tool_filter.h b/krita/plugins/tools/tool_filter/kis_tool_filter.h index 631c1355..d8335f74 100644 --- a/krita/plugins/tools/tool_filter/kis_tool_filter.h +++ b/krita/plugins/tools/tool_filter/kis_tool_filter.h @@ -24,8 +24,8 @@ #include "kis_tool_freehand.h" #include "kis_tool_factory.h" -class QComboBox; -class QGridLayout; +class TQComboBox; +class TQGridLayout; class KisEvent; class KisFilterConfigurationWidget; class KisButtonPressEvent; @@ -36,6 +36,7 @@ class KisCmbIDList; class KisToolFilter : public KisToolFreehand { Q_OBJECT + TQ_OBJECT typedef KisToolFreehand super; public: @@ -44,8 +45,8 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_FREEHAND; } - virtual Q_UINT32 priority() { return 1; } - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQ_UINT32 priority() { return 1; } + virtual TQWidget* createOptionWidget(TQWidget* tqparent); public slots: void changeFilter( const KisID & filter); @@ -55,8 +56,8 @@ protected: private: KisFilterSP m_filter; - QWidget* m_filterConfigurationWidget; - QGridLayout* m_optionLayout; + TQWidget* m_filterConfigurationWidget; + TQGridLayout* m_optionLayout; KisCmbIDList * m_cbFilter; }; diff --git a/krita/plugins/tools/tool_filter/tool_filter.cc b/krita/plugins/tools/tool_filter/tool_filter.cc index 2102dfdb..f03ffbca 100644 --- a/krita/plugins/tools/tool_filter/tool_filter.cc +++ b/krita/plugins/tools/tool_filter/tool_filter.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -44,14 +44,14 @@ typedef KGenericFactory<ToolFilter> ToolFilterFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolfilter, ToolFilterFactory( "krita" ) ) -ToolFilter::ToolFilter(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolFilter::ToolFilter(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolFilterFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add( new KisToolFilterFactory()); // XXX: Put this in a separate plugin? diff --git a/krita/plugins/tools/tool_filter/tool_filter.h b/krita/plugins/tools/tool_filter/tool_filter.h index 2eee589a..7bf33dca 100644 --- a/krita/plugins/tools/tool_filter/tool_filter.h +++ b/krita/plugins/tools/tool_filter/tool_filter.h @@ -29,8 +29,9 @@ class KisView; class ToolFilter : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolFilter(QObject *parent, const char *name, const QStringList &); + ToolFilter(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolFilter(); private: diff --git a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc index 944807eb..04524e48 100644 --- a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc +++ b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.cc @@ -19,11 +19,11 @@ */ #include <kis_tool_perspectivegrid.h> -#include <qapplication.h> -#include <qpainter.h> -#include <qregion.h> -#include <qwidget.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqregion.h> +#include <tqwidget.h> +#include <tqlayout.h> #include <kaction.h> #include <kdebug.h> @@ -95,9 +95,9 @@ void KisToolPerspectiveGrid::update (KisCanvasSubject *subject) super::update(m_subject); } -bool KisToolPerspectiveGrid::mouseNear(const QPoint& mousep, const QPoint point) +bool KisToolPerspectiveGrid::mouseNear(const TQPoint& mousep, const TQPoint point) { - return (QRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).contains(mousep) ); + return (TQRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).tqcontains(mousep) ); } void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) @@ -128,40 +128,40 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) return; KisCanvasController *controller = m_subject->canvasController(); Q_ASSERT(controller); - QPoint mousep = controller->windowToView( event->pos().roundQPoint() ); + TQPoint mousep = controller->windowToView( event->pos().roundTQPoint() ); - for( QValueList<KisSubPerspectiveGrid*>::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) + for( TQValueList<KisSubPerspectiveGrid*>::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) { KisSubPerspectiveGrid* grid = *it; - if( mouseNear( mousep, controller->windowToView(grid->topLeft()->roundQPoint() ) ) ) + if( mouseNear( mousep, controller->windowToView(grid->topLeft()->roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPLEFT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->topLeft(); break; } - else if( mouseNear( mousep, controller->windowToView(grid->topRight()->roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(grid->topRight()->roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPRIGHT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->topRight(); break; } - else if( mouseNear( mousep, controller->windowToView(grid->bottomLeft()->roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(grid->bottomLeft()->roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMLEFT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->bottomLeft(); break; } - else if( mouseNear( mousep, controller->windowToView(grid->bottomRight()->roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(grid->bottomRight()->roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMRIGHT HANDLE " << endl; m_mode = MODE_DRAGING_NODE; m_selectedNode1 = grid->bottomRight(); break; } - else if( !grid->leftGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->bottomLeft() )*0.5) ).roundQPoint() ) ) + else if( !grid->leftGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->bottomLeft() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS LEFT HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -176,7 +176,7 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) drawGrid(); break; } - else if( !grid->rightGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topRight() + *grid->bottomRight() )*0.5) ).roundQPoint() ) ) + else if( !grid->rightGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topRight() + *grid->bottomRight() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS RIGHT HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -191,7 +191,7 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) drawGrid(); break; } - else if( !grid->topGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->topRight() )*0.5) ).roundQPoint() ) ) + else if( !grid->topGrid() && mouseNear( mousep, controller->windowToView( ((*grid->topLeft() + *grid->topRight() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS TOP HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -206,7 +206,7 @@ void KisToolPerspectiveGrid::buttonPress(KisButtonPressEvent *event) drawGrid(); break; } - else if( !grid->bottomGrid() && mouseNear( mousep, controller->windowToView( ((*grid->bottomLeft() + *grid->bottomRight() )*0.5) ).roundQPoint() ) ) + else if( !grid->bottomGrid() && mouseNear( mousep, controller->windowToView( ((*grid->bottomLeft() + *grid->bottomRight() )*0.5) ).roundTQPoint() ) ) { kdDebug() << " PRESS BOTTOM HANDLE " << endl; m_mode = MODE_DRAGING_TRANSLATING_TWONODES; @@ -297,7 +297,7 @@ void KisToolPerspectiveGrid::paint(KisCanvasPainter& gc) } } -void KisToolPerspectiveGrid::paint(KisCanvasPainter& gc, const QRect&) +void KisToolPerspectiveGrid::paint(KisCanvasPainter& gc, const TQRect&) { if( m_mode == MODE_CREATION ) { @@ -324,19 +324,19 @@ void KisToolPerspectiveGrid::drawGridCreation(KisCanvasPainter& gc) if (!m_subject) return; - QPen pen(Qt::white); + TQPen pen(TQt::white); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -347,8 +347,8 @@ void KisToolPerspectiveGrid::drawGridCreation(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -358,7 +358,7 @@ void KisToolPerspectiveGrid::drawGridCreation(KisCanvasPainter& gc) } } -void KisToolPerspectiveGrid::drawSmallRectangle(KisCanvasPainter& gc, QPoint p) +void KisToolPerspectiveGrid::drawSmallRectangle(KisCanvasPainter& gc, TQPoint p) { gc.drawRect( p.x() - m_handleHalfSize - 1, p.y() - m_handleHalfSize - 1, m_handleSize, m_handleSize); } @@ -371,15 +371,15 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) KisCanvasController *controller = m_subject->canvasController(); - QPen pen(Qt::white); - QPoint startPos; - QPoint endPos; + TQPen pen(TQt::white); + TQPoint startPos; + TQPoint endPos; gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisPerspectiveGrid* pGrid = m_subject->currentImg()->perspectiveGrid(); - for( QValueList<KisSubPerspectiveGrid*>::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) + for( TQValueList<KisSubPerspectiveGrid*>::const_iterator it = pGrid->begin(); it != pGrid->end(); ++it) { KisSubPerspectiveGrid* grid = *it; int index = grid->index(); @@ -388,8 +388,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) bool drawTop = !(grid->topGrid() && (index > grid->topGrid()->index() ) ); bool drawBottom = !(grid->bottomGrid() && (index > grid->bottomGrid()->index() ) ); if(drawTop) { - startPos = controller->windowToView(grid->topLeft()->roundQPoint()); - endPos = controller->windowToView(grid->topRight()->roundQPoint()); + startPos = controller->windowToView(grid->topLeft()->roundTQPoint()); + endPos = controller->windowToView(grid->topRight()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->topGrid() ) { @@ -403,8 +403,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) } } if(drawRight) { - startPos = controller->windowToView(grid->topRight()->roundQPoint()); - endPos = controller->windowToView(grid->bottomRight()->roundQPoint()); + startPos = controller->windowToView(grid->topRight()->roundTQPoint()); + endPos = controller->windowToView(grid->bottomRight()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->rightGrid() ) { @@ -412,8 +412,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) } } if(drawBottom) { - startPos = controller->windowToView(grid->bottomRight()->roundQPoint()); - endPos = controller->windowToView(grid->bottomLeft()->roundQPoint()); + startPos = controller->windowToView(grid->bottomRight()->roundTQPoint()); + endPos = controller->windowToView(grid->bottomLeft()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->bottomGrid() ) { @@ -427,8 +427,8 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) } } if(drawLeft) { - startPos = controller->windowToView(grid->bottomLeft()->roundQPoint()); - endPos = controller->windowToView(grid->topLeft()->roundQPoint()); + startPos = controller->windowToView(grid->bottomLeft()->roundTQPoint()); + endPos = controller->windowToView(grid->topLeft()->roundTQPoint()); gc.drawLine( startPos, endPos ); if( !grid->leftGrid() ) { @@ -438,14 +438,14 @@ void KisToolPerspectiveGrid::drawGrid(KisCanvasPainter& gc) KisPoint tbVpf = grid->topBottomVanishingPoint(); if( fabs(tbVpf.x()) < 30000000. && fabs(tbVpf.y()) < 30000000.) { - QPoint tbVp = controller->windowToView(tbVpf.roundQPoint()); + TQPoint tbVp = controller->windowToView(tbVpf.roundTQPoint()); gc.drawLine( tbVp.x() - m_handleHalfSize, tbVp.y() - m_handleHalfSize, tbVp.x() + m_handleHalfSize, tbVp.y() + m_handleHalfSize); gc.drawLine( tbVp.x() - m_handleHalfSize, tbVp.y() + m_handleHalfSize, tbVp.x() + m_handleHalfSize, tbVp.y() - m_handleHalfSize); } KisPoint lrVpf = grid->leftRightVanishingPoint(); if( fabs(lrVpf.x()) < 30000000. && fabs(lrVpf.y()) < 30000000.) { // Don't display it, if it is too far, or you get funny results - QPoint lrVp = controller->windowToView(lrVpf.roundQPoint()); + TQPoint lrVp = controller->windowToView(lrVpf.roundTQPoint()); gc.drawLine( lrVp.x() - m_handleHalfSize, lrVp.y() - m_handleHalfSize, lrVp.x() + m_handleHalfSize, lrVp.y() + m_handleHalfSize); gc.drawLine( lrVp.x() - m_handleHalfSize, lrVp.y() + m_handleHalfSize, lrVp.x() + m_handleHalfSize, lrVp.y() - m_handleHalfSize); } @@ -474,7 +474,7 @@ void KisToolPerspectiveGrid::setup(KActionCollection *collection) "tool_perspectivegrid" , 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -485,12 +485,12 @@ void KisToolPerspectiveGrid::setup(KActionCollection *collection) } -// QWidget* KisToolPerspectiveGrid::createOptionWidget(QWidget* parent) +// TQWidget* KisToolPerspectiveGrid::createOptionWidget(TQWidget* tqparent) // { // return 0; // } // -// QWidget* KisToolPerspectiveGrid::optionWidget() +// TQWidget* KisToolPerspectiveGrid::optionWidget() // { // return 0; // } diff --git a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h index b6318c7d..2b5467d4 100644 --- a/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h +++ b/krita/plugins/tools/tool_perspectivegrid/kis_tool_perspectivegrid.h @@ -28,6 +28,7 @@ class KisToolPerspectiveGrid : public KisToolNonPaint { Q_OBJECT + TQ_OBJECT enum PerspectiveGridEditionMode { MODE_CREATION, // This is the mode when there is not yet a perspective grid MODE_EDITING, // This is the mode when the grid has been created, and we are waiting for the user to click on a control box @@ -49,14 +50,14 @@ public: // virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } virtual enumToolType toolType() { return TOOL_VIEW; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); -// QWidget* createOptionWidget(QWidget* parent); -// virtual QWidget* optionWidget(); +// TQWidget* createOptionWidget(TQWidget* tqparent); +// virtual TQWidget* optionWidget(); public slots: virtual void activate(); @@ -64,15 +65,15 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void drawGridCreation(KisCanvasPainter& gc); void drawGridCreation(); void drawGrid(KisCanvasPainter& gc); void drawGrid(); private: - void drawSmallRectangle(KisCanvasPainter& gc, QPoint p); - bool mouseNear(const QPoint& mousep, const QPoint point); + void drawSmallRectangle(KisCanvasPainter& gc, TQPoint p); + bool mouseNear(const TQPoint& mousep, const TQPoint point); protected: KisPoint m_dragStart; @@ -80,11 +81,11 @@ protected: bool m_dragging; private: - typedef QValueVector<KisPoint> KisPointVector; + typedef TQValueVector<KisPoint> KisPointVector; KisCanvasSubject *m_subject; KisPointVector m_points; PerspectiveGridEditionMode m_mode; - Q_INT32 m_handleSize, m_handleHalfSize; + TQ_INT32 m_handleSize, m_handleHalfSize; KisPerspectiveGridNodeSP m_selectedNode1, m_selectedNode2; }; diff --git a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc index 157a7457..54a39f0f 100644 --- a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc +++ b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -42,14 +42,14 @@ typedef KGenericFactory<ToolPerspectiveGrid> ToolPerspectiveGridFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolperspectivegrid, ToolPerspectiveGridFactory( "krita" ) ) -ToolPerspectiveGrid::ToolPerspectiveGrid(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPerspectiveGrid::ToolPerspectiveGrid(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPerspectiveGridFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolPerspectiveGridFactory()); } diff --git a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h index e98cbf09..aed4a60c 100644 --- a/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h +++ b/krita/plugins/tools/tool_perspectivegrid/tool_perspectivegrid.h @@ -29,8 +29,9 @@ class KisView; class ToolPerspectiveGrid : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPerspectiveGrid(QObject *parent, const char *name, const QStringList &); + ToolPerspectiveGrid(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPerspectiveGrid(); private: diff --git a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc index f334c429..b662c940 100644 --- a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc +++ b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.cc @@ -24,13 +24,13 @@ #include "kis_tool_perspectivetransform.h" -#include <qpainter.h> -#include <qpen.h> -#include <qpushbutton.h> -#include <qobject.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qapplication.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpushbutton.h> +#include <tqobject.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqapplication.h> #include <kdebug.h> #include <kaction.h> @@ -65,19 +65,19 @@ namespace { typedef KisSelectedTransaction super; public: - PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, QRect initialRect); + PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, TQRect initialRect); virtual ~PerspectiveTransformCmd(); public: virtual void execute(); virtual void unexecute(); void transformArgs(KisPoint &topleft, KisPoint &topright, KisPoint &bottomleft, KisPoint& bottomright) const; - KisSelectionSP origSelection(QRect& initialRect) const; + KisSelectionSP origSelection(TQRect& initialRect) const; KisPaintDeviceSP theDevice(); KisPaintDeviceSP origDevice(); private: - QRect m_initialRect; + TQRect m_initialRect; KisPoint m_topleft, m_topright, m_bottomleft, m_bottomright; KisToolPerspectiveTransform *m_tool; KisSelectionSP m_origSelection; @@ -85,7 +85,7 @@ namespace { KisPaintDeviceSP m_origDevice; }; - PerspectiveTransformCmd::PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, QRect initialRect) : + PerspectiveTransformCmd::PerspectiveTransformCmd(KisToolPerspectiveTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, KisPoint topleft, KisPoint topright, KisPoint bottomleft, KisPoint bottomright, KisSelectionSP origSel, TQRect initialRect) : super(i18n("Perspective Transform"), device), m_initialRect(initialRect) , m_topleft(topleft), m_topright(topright), m_bottomleft(bottomleft), m_bottomright(bottomright) , m_tool(tool), m_origSelection(origSel), m_device(device), m_origDevice(origDevice) @@ -104,7 +104,7 @@ namespace { bottomright = m_bottomright; } - KisSelectionSP PerspectiveTransformCmd::origSelection(QRect& initialRect) const + KisSelectionSP PerspectiveTransformCmd::origSelection(TQRect& initialRect) const { initialRect = m_initialRect; return m_origSelection; @@ -157,7 +157,7 @@ void KisToolPerspectiveTransform::deactivate() paintOutline(); - disconnect(m_subject->currentImg().data(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + disconnect(m_subject->currentImg().data(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolPerspectiveTransform::activate() @@ -196,12 +196,12 @@ void KisToolPerspectiveTransform::activate() initHandles(); } } - connect(m_subject->currentImg(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + connect(m_subject->currentImg(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolPerspectiveTransform::initHandles() { -// Q_INT32 x,y,w,h; +// TQ_INT32 x,y,w,h; KisImageSP img = m_subject->currentImg(); KisPaintDeviceSP dev = img->activeDevice(); @@ -230,17 +230,17 @@ void KisToolPerspectiveTransform::initHandles() void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc) { - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolPerspectiveTransform::paint(KisCanvasPainter& gc, const TQRect& rc) { paintOutline(gc, rc); } -bool KisToolPerspectiveTransform::mouseNear(const QPoint& mousep, const QPoint point) +bool KisToolPerspectiveTransform::mouseNear(const TQPoint& mousep, const TQPoint point) { - return (QRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).contains(mousep) ); + return (TQRect( (point.x() - m_handleHalfSize), (point.y() - m_handleHalfSize), m_handleSize, m_handleSize).tqcontains(mousep) ); } void KisToolPerspectiveTransform::buttonPress(KisButtonPressEvent *event) @@ -272,43 +272,43 @@ void KisToolPerspectiveTransform::buttonPress(KisButtonPressEvent *event) m_actualyMoveWhileSelected = false; m_dragEnd = event->pos(); KisCanvasController *controller = m_subject->canvasController(); - QPoint mousep = controller->windowToView( event->pos().roundQPoint() ); - if( mouseNear( mousep, controller->windowToView(m_topleft.roundQPoint() ) ) ) + TQPoint mousep = controller->windowToView( event->pos().roundTQPoint() ); + if( mouseNear( mousep, controller->windowToView(m_topleft.roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPLEFT HANDLE " << endl; m_currentSelectedPoint = &m_topleft; } - else if( mouseNear( mousep, controller->windowToView(m_topright.roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(m_topright.roundTQPoint() ) ) ) { kdDebug() << " PRESS TOPRIGHT HANDLE " << endl; m_currentSelectedPoint = &m_topright; } - else if( mouseNear( mousep, controller->windowToView(m_bottomleft.roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(m_bottomleft.roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMLEFT HANDLE " << endl; m_currentSelectedPoint = &m_bottomleft; } - else if( mouseNear( mousep, controller->windowToView(m_bottomright.roundQPoint() ) ) ) + else if( mouseNear( mousep, controller->windowToView(m_bottomright.roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOMRIGHT HANDLE " << endl; m_currentSelectedPoint = &m_bottomright; - } else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_topright)*0.5).roundQPoint() ) ) ) + } else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_topright)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS TOP HANDLE " << endl; m_handleSelected = TOPHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft)*0.5).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS LEFT HANDLE " << endl; m_handleSelected = LEFTHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomleft+m_bottomright)*0.5).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomleft+m_bottomright)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS BOTTOM HANDLE " << endl; m_handleSelected = BOTTOMHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomright+m_topright)*0.5).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_bottomright+m_topright)*0.5).roundTQPoint() ) ) ) { kdDebug() << " PRESS RIGHT HANDLE " << endl; m_handleSelected = RIGHTHANDLE; - }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft + m_bottomright+m_topright)*0.25).roundQPoint() ) ) ) + }else if( mouseNear( mousep, controller->windowToView(KisPoint((m_topleft+m_bottomleft + m_bottomright+m_topright)*0.25).roundTQPoint() ) ) ) { kdDebug() << " PRESS MIDDLE HANDLE " << endl; m_handleSelected = MIDDLEHANDLE; @@ -368,7 +368,7 @@ void KisToolPerspectiveTransform::move(KisMoveEvent *event) KisPoint topRight = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.topRight() ); KisPoint bottomLeft = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.bottomLeft() ); KisPoint bottomRight = KisPerspectiveMath::matProd(matrixFrom, m_initialRect.bottomRight() ); - QRect dstRect = m_initialRect; + TQRect dstRect = m_initialRect; switch(m_handleSelected) { case TOPHANDLE: @@ -458,9 +458,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event) m_bottomright = KisPerspectiveMath::matProd(matrix, m_initialRect.bottomRight()); m_interractionMode = EDITRECTINTERRACTION; paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } else { paintOutline(); } @@ -475,9 +475,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event) if(m_actualyMoveWhileSelected) { paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } if(m_handleSelected != NOHANDLE) @@ -486,9 +486,9 @@ void KisToolPerspectiveTransform::buttonRelease(KisButtonReleaseEvent * event) if(m_actualyMoveWhileSelected) { // paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } } @@ -503,19 +503,19 @@ void KisToolPerspectiveTransform::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } } -void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); pen.setWidth(1); Q_ASSERT(controller); @@ -525,8 +525,8 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect { kdDebug() << "DRAWRECTINTERRACTION paintOutline " << m_points.size() << endl; KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { if (it == m_points.begin()) @@ -535,8 +535,8 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -547,12 +547,12 @@ void KisToolPerspectiveTransform::paintOutline(KisCanvasPainter& gc, const QRect break; case EDITRECTINTERRACTION: { - QPoint topleft = controller->windowToView(m_topleft ).roundQPoint(); - QPoint topright = controller->windowToView(m_topright).roundQPoint(); - QPoint bottomleft = controller->windowToView(m_bottomleft).roundQPoint(); - QPoint bottomright = controller->windowToView(m_bottomright).roundQPoint(); + TQPoint topleft = controller->windowToView(m_topleft ).roundTQPoint(); + TQPoint topright = controller->windowToView(m_topright).roundTQPoint(); + TQPoint bottomleft = controller->windowToView(m_bottomleft).roundTQPoint(); + TQPoint bottomright = controller->windowToView(m_bottomright).roundTQPoint(); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); gc.drawRect(topleft.x()-4, topleft.y()-4, 8, 8); gc.drawLine(topleft.x(), topleft.y(), (topleft.x()+topright.x())/2, (topleft.y()+topright.y())/2); @@ -593,7 +593,7 @@ void KisToolPerspectiveTransform::transform() m_topleft, m_topright, m_bottomleft, m_bottomright, m_origSelection, m_initialRect); // Copy the original state back. - QRect rc = m_origDevice->extent(); + TQRect rc = m_origDevice->extent(); rc = rc.normalize(); img->activeDevice()->clear(); KisPainter gc(img->activeDevice()); @@ -603,7 +603,7 @@ void KisToolPerspectiveTransform::transform() // Also restore the original selection. if(m_origSelection) { - QRect rc = m_origSelection->selectedRect(); + TQRect rc = m_origSelection->selectedRect(); rc = rc.normalize(); img->activeDevice()->selection()->clear(); KisPainter sgc(img->activeDevice()->selection().data()); @@ -681,27 +681,27 @@ void KisToolPerspectiveTransform::slotLayerActivated(KisLayerSP) } -QWidget* KisToolPerspectiveTransform::createOptionWidget(QWidget* /*parent*/) +TQWidget* KisToolPerspectiveTransform::createOptionWidget(TQWidget* /*tqparent*/) { #if 0 - m_optWidget = new WdgToolPerspectiveTransform(parent); + m_optWidget = new WdgToolPerspectiveTransform(tqparent); Q_CHECK_PTR(m_optWidget); m_optWidget->cmbFilter->clear(); m_optWidget->cmbFilter->setIDList(KisFilterStrategyRegistry::instance()->listKeys()); m_optWidget->cmbFilter->setCurrentText("Mitchell"); - connect(m_optWidget->cmbFilter, SIGNAL(activated(const KisID &)), - this, SLOT(slotSetFilter(const KisID &))); + connect(m_optWidget->cmbFilter, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(slotSetFilter(const KisID &))); KisID filterID = m_optWidget->cmbFilter->currentItem(); m_filter = KisFilterStrategyRegistry::instance()->get(filterID); /* - connect(m_optWidget->intStartX, SIGNAL(valueChanged(int)), this, SLOT(setStartX(int))); - connect(m_optWidget->intStartY, SIGNAL(valueChanged(int)), this, SLOT(setStartY(int))); - connect(m_optWidget->intEndX, SIGNAL(valueChanged(int)), this, SLOT(setEndX(int))); - connect(m_optWidget->intEndY, SIGNAL(valueChanged(int)), this, SLOT(setEndY(int))); + connect(m_optWidget->intStartX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartX(int))); + connect(m_optWidget->intStartY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartY(int))); + connect(m_optWidget->intEndX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndX(int))); + connect(m_optWidget->intEndY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndY(int))); */ m_optWidget->intStartX->hide(); m_optWidget->intStartY->hide(); @@ -715,7 +715,7 @@ QWidget* KisToolPerspectiveTransform::createOptionWidget(QWidget* /*parent*/) return 0; } -QWidget* KisToolPerspectiveTransform::optionWidget() +TQWidget* KisToolPerspectiveTransform::optionWidget() { return 0; } @@ -729,7 +729,7 @@ void KisToolPerspectiveTransform::setup(KActionCollection *collection) "tool_perspectivetransform", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h index e2600cfc..94b808c2 100644 --- a/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h +++ b/krita/plugins/tools/tool_perspectivetransform/kis_tool_perspectivetransform.h @@ -24,7 +24,7 @@ #ifndef KIS_TOOL_PERSPECTIVETRANSFORM_H_ #define KIS_TOOL_PERSPECTIVETRANSFORM_H_ -#include <qpoint.h> +#include <tqpoint.h> #include <kis_layer.h> #include <kis_point.h> @@ -46,20 +46,21 @@ class KisToolPerspectiveTransform : public KisToolNonPaint, KisCommandHistoryLis typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT enum InterractionMode { DRAWRECTINTERRACTION, EDITRECTINTERRACTION }; enum HandleSelected { NOHANDLE, TOPHANDLE, BOTTOMHANDLE, RIGHTHANDLE, LEFTHANDLE, MIDDLEHANDLE }; public: KisToolPerspectiveTransform(); virtual ~KisToolPerspectiveTransform(); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 4; } + virtual TQ_UINT32 priority() { return 4; } 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); @@ -75,8 +76,8 @@ public: private: - bool mouseNear(const QPoint& mousep, const QPoint point); - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + bool mouseNear(const TQPoint& mousep, const TQPoint point); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); void transform(); void initHandles(); @@ -89,7 +90,7 @@ protected slots: private: bool m_dragging; InterractionMode m_interractionMode; - QRect m_initialRect; + TQRect m_initialRect; KisPoint m_dragStart, m_dragEnd; KisPoint m_topleft, m_topright, m_bottomleft, m_bottomright; KisPoint* m_currentSelectedPoint; @@ -102,7 +103,7 @@ private: int m_handleHalfSize, m_handleSize; // The following variables are used in during the draw rect interraction mode - typedef QValueVector<KisPoint> KisPointVector; + typedef TQValueVector<KisPoint> KisPointVector; KisPointVector m_points; // The following variables are used when moving a middle handle HandleSelected m_handleSelected; diff --git a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc index 3fdbe3bb..9102bb0c 100644 --- a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc +++ b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -42,15 +42,15 @@ typedef KGenericFactory<ToolPerspectiveTransform> ToolPerspectiveTransformFactor K_EXPORT_COMPONENT_FACTORY( kritatoolperspectivetransform, ToolPerspectiveTransformFactory( "krita" ) ) -ToolPerspectiveTransform::ToolPerspectiveTransform(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPerspectiveTransform::ToolPerspectiveTransform(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPerspectiveTransformFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { kdDebug() << " add perspective transform tool to the registry" << endl; - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolPerspectiveTransformFactory()); } diff --git a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h index 6cc6370f..1cbeadee 100644 --- a/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h +++ b/krita/plugins/tools/tool_perspectivetransform/tool_perspectivetransform.h @@ -29,8 +29,9 @@ class KisView; class ToolPerspectiveTransform : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPerspectiveTransform(QObject *parent, const char *name, const QStringList &); + ToolPerspectiveTransform(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPerspectiveTransform(); private: diff --git a/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc b/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc index 9589e19f..35ffd5ed 100644 --- a/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc +++ b/krita/plugins/tools/tool_polygon/kis_tool_polygon.cc @@ -21,8 +21,8 @@ #include <math.h> -#include <qpainter.h> -#include <qspinbox.h> +#include <tqpainter.h> +#include <tqspinbox.h> #include <kaction.h> #include <kdebug.h> @@ -159,7 +159,7 @@ void KisToolPolygon::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolPolygon::paint(KisCanvasPainter& gc, const QRect&) +void KisToolPolygon::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -180,19 +180,19 @@ void KisToolPolygon::draw(KisCanvasPainter& gc) if (!m_subject || !m_currentImage) return; - QPen pen(Qt::white, 0, Qt::SolidLine); + TQPen pen(TQt::white, 0, TQt::SolidLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -203,8 +203,8 @@ void KisToolPolygon::draw(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -221,13 +221,13 @@ void KisToolPolygon::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Polygon"), "tool_polygon", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -238,9 +238,9 @@ void KisToolPolygon::setup(KActionCollection *collection) } } -void KisToolPolygon::keyPress(QKeyEvent *e) +void KisToolPolygon::keyPress(TQKeyEvent *e) { - if (e->key()==Qt::Key_Escape) { + if (e->key()==TQt::Key_Escape) { // erase old lines on canvas draw(); m_dragging = false; diff --git a/krita/plugins/tools/tool_polygon/kis_tool_polygon.h b/krita/plugins/tools/tool_polygon/kis_tool_polygon.h index 7ca24914..f68cae64 100644 --- a/krita/plugins/tools/tool_polygon/kis_tool_polygon.h +++ b/krita/plugins/tools/tool_polygon/kis_tool_polygon.h @@ -21,7 +21,7 @@ #ifndef KIS_TOOL_POLYGON_H_ #define KIS_TOOL_POLYGON_H_ -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "kis_tool_shape.h" @@ -35,6 +35,7 @@ class KisToolPolygon : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolPolygon(); @@ -52,22 +53,22 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 4; } + virtual TQ_UINT32 priority() { return 4; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); - virtual QString quickHelp() const { + virtual TQString quickHelp() const { return i18n("Shift-click will end the polygon."); } virtual void doubleClick(KisDoubleClickEvent * event); protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); void finish(); - virtual void keyPress(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); protected: KisPoint m_dragStart; KisPoint m_dragEnd; @@ -75,7 +76,7 @@ protected: bool m_dragging; KisImageSP m_currentImage; private: - typedef QValueVector<KisPoint> KisPointVector; + typedef TQValueVector<KisPoint> KisPointVector; KisPointVector m_points; }; diff --git a/krita/plugins/tools/tool_polygon/tool_polygon.cc b/krita/plugins/tools/tool_polygon/tool_polygon.cc index a1fec49c..81abbb95 100644 --- a/krita/plugins/tools/tool_polygon/tool_polygon.cc +++ b/krita/plugins/tools/tool_polygon/tool_polygon.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -42,14 +42,14 @@ typedef KGenericFactory<ToolPolygon> ToolPolygonFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolpolygon, ToolPolygonFactory( "krita" ) ) -ToolPolygon::ToolPolygon(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPolygon::ToolPolygon(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPolygonFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( parent ); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( tqparent ); r->add(new KisToolPolygonFactory()); } diff --git a/krita/plugins/tools/tool_polygon/tool_polygon.h b/krita/plugins/tools/tool_polygon/tool_polygon.h index 6249d935..ec816736 100644 --- a/krita/plugins/tools/tool_polygon/tool_polygon.h +++ b/krita/plugins/tools/tool_polygon/tool_polygon.h @@ -27,10 +27,11 @@ class ToolPolygon : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPolygon(QObject *parent, const char *name, const QStringList &); + ToolPolygon(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPolygon(); }; diff --git a/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc b/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc index 2f7a8e59..baeb946d 100644 --- a/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc +++ b/krita/plugins/tools/tool_polyline/kis_tool_polyline.cc @@ -21,8 +21,8 @@ #include <math.h> -#include <qpainter.h> -#include <qspinbox.h> +#include <tqpainter.h> +#include <tqspinbox.h> #include <kaction.h> #include <kdebug.h> @@ -68,7 +68,7 @@ void KisToolPolyline::update (KisCanvasSubject *subject) void KisToolPolyline::buttonPress(KisButtonPressEvent *event) { if (m_currentImage) { - if (event->button() == LeftButton && event->state() != Qt::ShiftButton ) { + if (event->button() == LeftButton && event->state() != TQt::ShiftButton ) { m_dragging = true; @@ -82,7 +82,7 @@ void KisToolPolyline::buttonPress(KisButtonPressEvent *event) m_dragEnd = event->pos(); draw(); } - } else if (event->button() == LeftButton && event->state() == Qt::ShiftButton ) { + } else if (event->button() == LeftButton && event->state() == TQt::ShiftButton ) { finish(); } } @@ -176,7 +176,7 @@ void KisToolPolyline::paint(KisCanvasPainter& gc) draw(gc); } -void KisToolPolyline::paint(KisCanvasPainter& gc, const QRect&) +void KisToolPolyline::paint(KisCanvasPainter& gc, const TQRect&) { draw(gc); } @@ -197,19 +197,19 @@ void KisToolPolyline::draw(KisCanvasPainter& gc) if (!m_subject || !m_currentImage) return; - QPen pen(Qt::white, 0, Qt::SolidLine); + TQPen pen(TQt::white, 0, TQt::SolidLine); gc.setPen(pen); - gc.setRasterOp(Qt::XorROP); + gc.setRasterOp(TQt::XorROP); KisCanvasController *controller = m_subject->canvasController(); KisPoint start, end; - QPoint startPos; - QPoint endPos; + TQPoint startPos; + TQPoint endPos; if (m_dragging) { - startPos = controller->windowToView(m_dragStart.floorQPoint()); - endPos = controller->windowToView(m_dragEnd.floorQPoint()); + startPos = controller->windowToView(m_dragStart.floorTQPoint()); + endPos = controller->windowToView(m_dragEnd.floorTQPoint()); gc.drawLine(startPos, endPos); } else { for (KisPointVector::iterator it = m_points.begin(); it != m_points.end(); ++it) { @@ -220,8 +220,8 @@ void KisToolPolyline::draw(KisCanvasPainter& gc) } else { end = (*it); - startPos = controller->windowToView(start.floorQPoint()); - endPos = controller->windowToView(end.floorQPoint()); + startPos = controller->windowToView(start.floorTQPoint()); + endPos = controller->windowToView(end.floorTQPoint()); gc.drawLine(startPos, endPos); @@ -236,13 +236,13 @@ void KisToolPolyline::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Polyline"), "polyline", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -253,14 +253,14 @@ void KisToolPolyline::setup(KActionCollection *collection) } } -QString KisToolPolyline::quickHelp() const +TQString KisToolPolyline::quickHelp() const { return i18n("Press shift-mouseclick to end the polyline."); } -void KisToolPolyline::keyPress(QKeyEvent *e) +void KisToolPolyline::keyPress(TQKeyEvent *e) { - if (e->key()==Qt::Key_Escape) { + if (e->key()==TQt::Key_Escape) { // erase old lines on canvas draw(); m_dragging = false; diff --git a/krita/plugins/tools/tool_polyline/kis_tool_polyline.h b/krita/plugins/tools/tool_polyline/kis_tool_polyline.h index 5dfff695..b234c53b 100644 --- a/krita/plugins/tools/tool_polyline/kis_tool_polyline.h +++ b/krita/plugins/tools/tool_polyline/kis_tool_polyline.h @@ -21,8 +21,8 @@ #ifndef KIS_TOOL_POLYLINE_H_ #define KIS_TOOL_POLYLINE_H_ -#include <qvaluevector.h> -#include <qstring.h> +#include <tqvaluevector.h> +#include <tqstring.h> #include "kis_tool_paint.h" #include "kis_point.h" @@ -38,6 +38,7 @@ class KisToolPolyline : public KisToolPaint { typedef KisToolPaint super; Q_OBJECT + TQ_OBJECT public: KisToolPolyline(); @@ -55,15 +56,15 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 5; } + virtual TQ_UINT32 priority() { return 5; } virtual void buttonPress(KisButtonPressEvent *event); virtual void doubleClick(KisDoubleClickEvent *e); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; void finish(); - virtual void keyPress(QKeyEvent *e); + virtual void keyPress(TQKeyEvent *e); public slots: @@ -71,7 +72,7 @@ public slots: protected: virtual void paint(KisCanvasPainter& gc); - virtual void paint(KisCanvasPainter& gc, const QRect& rc); + virtual void paint(KisCanvasPainter& gc, const TQRect& rc); void draw(KisCanvasPainter& gc); void draw(); @@ -82,7 +83,7 @@ protected: bool m_dragging; KisImageSP m_currentImage; private: - typedef QValueVector<KisPoint> KisPointVector; + typedef TQValueVector<KisPoint> KisPointVector; KisPointVector m_points; }; diff --git a/krita/plugins/tools/tool_polyline/tool_polyline.cc b/krita/plugins/tools/tool_polyline/tool_polyline.cc index ae1fdda5..830a2d22 100644 --- a/krita/plugins/tools/tool_polyline/tool_polyline.cc +++ b/krita/plugins/tools/tool_polyline/tool_polyline.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -43,14 +43,14 @@ typedef KGenericFactory<ToolPolyline> ToolPolylineFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolpolyline, ToolPolylineFactory( "krita" ) ) -ToolPolyline::ToolPolyline(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolPolyline::ToolPolyline(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolPolylineFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolPolylineFactory()); } diff --git a/krita/plugins/tools/tool_polyline/tool_polyline.h b/krita/plugins/tools/tool_polyline/tool_polyline.h index 14987487..9f483363 100644 --- a/krita/plugins/tools/tool_polyline/tool_polyline.h +++ b/krita/plugins/tools/tool_polyline/tool_polyline.h @@ -29,8 +29,9 @@ class KisView; class ToolPolyline : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolPolyline(QObject *parent, const char *name, const QStringList &); + ToolPolyline(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolPolyline(); private: diff --git a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc index cdb38cb3..bfac2a5d 100644 --- a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc +++ b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.cc @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qpoint.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qtimer.h> +#include <tqpoint.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqtimer.h> #include <kapplication.h> #include <kaction.h> @@ -47,10 +47,10 @@ #include "kis_tool_selectsimilar.h" -void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const Q_UINT8 * c, int fuzziness, enumSelectionMode mode) +void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const TQ_UINT8 * c, int fuzziness, enumSelectionMode mode) { // XXX: Multithread this! - Q_INT32 x, y, w, h; + TQ_INT32 x, y, w, h; dev->exactBounds(x, y, w, h); @@ -63,7 +63,7 @@ void selectByColor(KisPaintDeviceSP dev, KisSelectionSP selection, const Q_UINT8 //if (dev->colorSpace()->hasAlpha()) // opacity = dev->colorSpace()->getAlpha(hiter.rawData()); - Q_UINT8 match = cs->difference(c, hiter.rawData()); + TQ_UINT8 match = cs->difference(c, hiter.rawData()); if (mode == SELECTION_ADD) { if (match <= fuzziness) { @@ -96,8 +96,8 @@ KisToolSelectSimilar::KisToolSelectSimilar() m_selectionOptionsWidget = 0; m_fuzziness = 20; m_currentSelectAction = m_defaultSelectAction = SELECTION_ADD; - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), SLOT(slotTimer()) ); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimer()) ); } KisToolSelectSimilar::~KisToolSelectSimilar() @@ -124,13 +124,13 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) { if (m_subject) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); KisImageSP img; KisPaintDeviceSP dev; - QPoint pos; - Q_UINT8 opacity = OPACITY_OPAQUE; + TQPoint pos; + TQ_UINT8 opacity = OPACITY_OPAQUE; - if (e->button() != QMouseEvent::LeftButton && e->button() != QMouseEvent::RightButton) + if (e->button() != TQMouseEvent::LeftButton && e->button() != TQMouseEvent::RightButton) return; if (!(img = m_subject->currentImg())) @@ -141,7 +141,7 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) if (!dev || !img->activeLayer()->visible()) return; - pos = QPoint(e->pos().floorX(), e->pos().floorY()); + pos = TQPoint(e->pos().floorX(), e->pos().floorY()); KisSelectedTransaction *t = 0; if (img->undo()) t = new KisSelectedTransaction(i18n("Similar Selection"),dev); @@ -159,23 +159,23 @@ void KisToolSelectSimilar::buttonPress(KisButtonPressEvent *e) img->undoAdapter()->addCommand(t); m_subject->canvasController()->updateCanvas(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } void KisToolSelectSimilar::slotTimer() { #if KDE_IS_VERSION(3,4,0) - int state = kapp->keyboardMouseState() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton); + int state = kapp->keyboardMouseState() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton); #else int state = kapp->keyboardModifiers() & (KApplication::ShiftModifier |KApplication::ControlModifier|KApplication::Modifier1); #endif enumSelectionMode action; - if (state == Qt::ShiftButton) + if (state == TQt::ShiftButton) action = SELECTION_ADD; - else if (state == Qt::ControlButton) + else if (state == TQt::ControlButton) action = SELECTION_SUBTRACT; else action = m_defaultSelectAction; @@ -202,7 +202,7 @@ void KisToolSelectSimilar::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - m_action = new KRadioAction(i18n("&Similar Selection"), "tool_similar_selection", "Ctrl+E", this, SLOT(activate()), collection, name()); + m_action = new KRadioAction(i18n("&Similar Selection"), "tool_similar_selection", "Ctrl+E", this, TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); m_action->setToolTip(i18n("Select similar colors")); m_action->setExclusiveGroup("tools"); @@ -226,26 +226,26 @@ void KisToolSelectSimilar::slotSetAction(int action) m_defaultSelectAction = (enumSelectionMode)action; } -QWidget* KisToolSelectSimilar::createOptionWidget(QWidget* parent) +TQWidget* KisToolSelectSimilar::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new QWidget(parent); + m_optWidget = new TQWidget(tqparent); Q_CHECK_PTR(m_optWidget); m_optWidget->setCaption(i18n("Similar Selection")); - QVBoxLayout * l = new QVBoxLayout(m_optWidget, 0, 6); + TQVBoxLayout * l = new TQVBoxLayout(m_optWidget, 0, 6); Q_CHECK_PTR(l); m_selectionOptionsWidget = new KisSelectionOptions(m_optWidget, m_subject); Q_CHECK_PTR(m_selectionOptionsWidget); l->addWidget(m_selectionOptionsWidget); - connect (m_selectionOptionsWidget, SIGNAL(actionChanged(int)), this, SLOT(slotSetAction(int))); + connect (m_selectionOptionsWidget, TQT_SIGNAL(actionChanged(int)), this, TQT_SLOT(slotSetAction(int))); - QHBoxLayout * hbox = new QHBoxLayout(l); + TQHBoxLayout * hbox = new TQHBoxLayout(l); Q_CHECK_PTR(hbox); - QLabel * lbl = new QLabel(i18n("Fuzziness: "), m_optWidget); + TQLabel * lbl = new TQLabel(i18n("Fuzziness: "), m_optWidget); Q_CHECK_PTR(lbl); hbox->addWidget(lbl); @@ -256,14 +256,14 @@ QWidget* KisToolSelectSimilar::createOptionWidget(QWidget* parent) input->setRange(0, 200, 10, true); input->setValue(20); hbox->addWidget(input); - connect(input, SIGNAL(valueChanged(int)), this, SLOT(slotSetFuzziness(int))); + connect(input, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetFuzziness(int))); - l->addItem(new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding)); + l->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Fixed, TQSizePolicy::Expanding)); return m_optWidget; } -QWidget* KisToolSelectSimilar::optionWidget() +TQWidget* KisToolSelectSimilar::optionWidget() { return m_optWidget; } diff --git a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h index 10a57dd3..d98659d0 100644 --- a/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h +++ b/krita/plugins/tools/tool_selectsimilar/kis_tool_selectsimilar.h @@ -23,9 +23,9 @@ #include <kis_selection.h> class KisCanvasSubject; -class QWidget; -class QVBoxLayout; -class QCheckBox; +class TQWidget; +class TQVBoxLayout; +class TQCheckBox; class KisIntSpinbox; /** @@ -40,6 +40,7 @@ class KisSelectionOptions; class KisToolSelectSimilar : public KisToolNonPaint { Q_OBJECT + TQ_OBJECT typedef KisToolNonPaint super; public: @@ -48,7 +49,7 @@ public: virtual void update(KisCanvasSubject *subject); virtual void setup(KActionCollection *collection); - virtual Q_UINT32 priority() { return 8; } + virtual TQ_UINT32 priority() { return 8; } virtual enumToolType toolType() { return TOOL_SELECT; } public slots: @@ -60,22 +61,22 @@ public slots: virtual void slotSetAction(int); private: - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void buttonPress(KisButtonPressEvent *e); void setPickerCursor(enumSelectionMode); KisCanvasSubject *m_subject; - QWidget *m_optWidget; + TQWidget *m_optWidget; KisSelectionOptions *m_selectionOptionsWidget; int m_fuzziness; enumSelectionMode m_defaultSelectAction; enumSelectionMode m_currentSelectAction; - QTimer *m_timer; - QCursor m_addCursor; - QCursor m_subtractCursor; + TQTimer *m_timer; + TQCursor m_addCursor; + TQCursor m_subtractCursor; private slots: void slotTimer(); diff --git a/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc b/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc index fc6b0c41..2b1cb867 100644 --- a/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc +++ b/krita/plugins/tools/tool_selectsimilar/selectsimilar.cc @@ -21,8 +21,8 @@ #include <stdlib.h> -#include <qslider.h> -#include <qpoint.h> +#include <tqslider.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -41,14 +41,14 @@ typedef KGenericFactory<SelectSimilar> SelectSimilarFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolselectsimilar, SelectSimilarFactory( "krita" ) ) -SelectSimilar::SelectSimilar(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +SelectSimilar::SelectSimilar(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(SelectSimilarFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); r->add(new KisToolSelectSimilarFactory()); } } diff --git a/krita/plugins/tools/tool_selectsimilar/selectsimilar.h b/krita/plugins/tools/tool_selectsimilar/selectsimilar.h index ca181bcc..c3287a4c 100644 --- a/krita/plugins/tools/tool_selectsimilar/selectsimilar.h +++ b/krita/plugins/tools/tool_selectsimilar/selectsimilar.h @@ -24,8 +24,9 @@ class SelectSimilar : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - SelectSimilar(QObject *parent, const char *name, const QStringList &); + SelectSimilar(TQObject *tqparent, const char *name, const TQStringList &); virtual ~SelectSimilar(); diff --git a/krita/plugins/tools/tool_star/kis_tool_star.cc b/krita/plugins/tools/tool_star/kis_tool_star.cc index 22e890ac..3ba619de 100644 --- a/krita/plugins/tools/tool_star/kis_tool_star.cc +++ b/krita/plugins/tools/tool_star/kis_tool_star.cc @@ -21,9 +21,9 @@ #include <math.h> -#include <qpainter.h> -#include <qspinbox.h> -#include <qlayout.h> +#include <tqpainter.h> +#include <tqspinbox.h> +#include <tqlayout.h> #include <kaction.h> #include <kdebug.h> @@ -88,7 +88,7 @@ void KisToolStar::move(KisMoveEvent *event) // erase old lines on canvas draw(m_dragStart, m_dragEnd); // move (alt) or resize star - if (event->state() & Qt::AltButton) { + if (event->state() & TQt::AltButton) { KisPoint trans = event->pos() - m_dragEnd; m_dragStart += trans; m_dragEnd += trans; @@ -154,21 +154,21 @@ void KisToolStar::draw(const KisPoint& start, const KisPoint& end ) KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter p (canvas); - QPen pen(Qt::SolidLine); + TQPen pen(TQt::SolidLine); KisPoint startPos; KisPoint endPos; startPos = controller->windowToView(start); endPos = controller->windowToView(end); - p.setRasterOp(Qt::NotROP); + p.setRasterOp(TQt::NotROP); vKisPoint points = starCoordinates(m_vertices, startPos.x(), startPos.y(), endPos.x(), endPos.y()); for (uint i = 0; i < points.count() - 1; i++) { - p.drawLine(points[i].floorQPoint(), points[i + 1].floorQPoint()); + p.drawLine(points[i].floorTQPoint(), points[i + 1].floorTQPoint()); } - p.drawLine(points[points.count() - 1].floorQPoint(), points[0].floorQPoint()); + p.drawLine(points[points.count() - 1].floorTQPoint(), points[0].floorTQPoint()); p.end (); } @@ -178,13 +178,13 @@ void KisToolStar::setup(KActionCollection *collection) m_action = static_cast<KRadioAction *>(collection->action(name())); if (m_action == 0) { - KShortcut shortcut(Qt::Key_Plus); - shortcut.append(KShortcut(Qt::Key_F9)); + KShortcut shortcut(TQt::Key_Plus); + shortcut.append(KShortcut(TQt::Key_F9)); m_action = new KRadioAction(i18n("&Star"), "tool_star", shortcut, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); @@ -198,7 +198,7 @@ void KisToolStar::setup(KActionCollection *collection) vKisPoint KisToolStar::starCoordinates(int N, double mx, double my, double x, double y) { double R=0, r=0; - Q_INT32 n=0; + TQ_INT32 n=0; double angle; vKisPoint starCoordinatesArray(2*N); @@ -225,16 +225,16 @@ vKisPoint KisToolStar::starCoordinates(int N, double mx, double my, double x, do return starCoordinatesArray; } -QWidget* KisToolStar::createOptionWidget(QWidget* parent) +TQWidget* KisToolStar::createOptionWidget(TQWidget* tqparent) { - QWidget *widget = super::createOptionWidget(parent); + TQWidget *widget = super::createOptionWidget(tqparent); m_optWidget = new WdgToolStar(widget); Q_CHECK_PTR(m_optWidget); m_optWidget->ratioSpinBox->setValue(m_innerOuterRatio); - QGridLayout *optionLayout = new QGridLayout(widget, 1, 1); + TQGridLayout *optionLayout = new TQGridLayout(widget, 1, 1); super::addOptionWidgetLayout(optionLayout); optionLayout->addWidget(m_optWidget, 0, 0); diff --git a/krita/plugins/tools/tool_star/kis_tool_star.h b/krita/plugins/tools/tool_star/kis_tool_star.h index e922aa6c..2637ffd5 100644 --- a/krita/plugins/tools/tool_star/kis_tool_star.h +++ b/krita/plugins/tools/tool_star/kis_tool_star.h @@ -34,6 +34,7 @@ class KisToolStar : public KisToolShape { typedef KisToolShape super; Q_OBJECT + TQ_OBJECT public: KisToolStar(); @@ -45,7 +46,7 @@ public: virtual void update (KisCanvasSubject *subject); - virtual QWidget* createOptionWidget(QWidget* parent); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); // // KisToolPaint interface @@ -53,28 +54,28 @@ public: virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_SHAPE; } - virtual Q_UINT32 priority() { return 6; } + virtual TQ_UINT32 priority() { return 6; } virtual void buttonPress(KisButtonPressEvent *event); virtual void move(KisMoveEvent *event); virtual void buttonRelease(KisButtonReleaseEvent *event); protected: virtual void draw(const KisPoint& start, const KisPoint& stop); - //virtual void draw(KisPainter *gc, const QRect& rc); + //virtual void draw(KisPainter *gc, const TQRect& rc); protected: int m_lineThickness; KisPoint m_dragStart; KisPoint m_dragEnd; - QRect m_final_lines; + TQRect m_final_lines; bool m_dragging; KisImageSP m_currentImage; private: vKisPoint starCoordinates(int N, double mx, double my, double x, double y); - Q_INT32 m_innerOuterRatio; - Q_INT32 m_vertices; + TQ_INT32 m_innerOuterRatio; + TQ_INT32 m_vertices; WdgToolStar* m_optWidget; }; @@ -93,7 +94,7 @@ public: t->setup(ac); return t; } - virtual KisID id() { return KisID("starshape", i18n("Star Tool")); } + virtual KisID id() { return KisID("startqshape", i18n("Star Tool")); } }; diff --git a/krita/plugins/tools/tool_star/tool_star.cc b/krita/plugins/tools/tool_star/tool_star.cc index b264cbde..52c4187c 100644 --- a/krita/plugins/tools/tool_star/tool_star.cc +++ b/krita/plugins/tools/tool_star/tool_star.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -42,14 +42,14 @@ typedef KGenericFactory<ToolStar> ToolStarFactory; K_EXPORT_COMPONENT_FACTORY( kritatoolstar, ToolStarFactory( "krita" ) ) -ToolStar::ToolStar(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolStar::ToolStar(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolStarFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( parent ); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>( tqparent ); r->add(new KisToolStarFactory()); } diff --git a/krita/plugins/tools/tool_star/tool_star.h b/krita/plugins/tools/tool_star/tool_star.h index 28a44f5c..36172dd6 100644 --- a/krita/plugins/tools/tool_star/tool_star.h +++ b/krita/plugins/tools/tool_star/tool_star.h @@ -29,8 +29,9 @@ class KisView; class ToolStar : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolStar(QObject *parent, const char *name, const QStringList &); + ToolStar(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolStar(); private: diff --git a/krita/plugins/tools/tool_star/wdg_tool_star.ui b/krita/plugins/tools/tool_star/wdg_tool_star.ui index db7c0e4b..b342a927 100644 --- a/krita/plugins/tools/tool_star/wdg_tool_star.ui +++ b/krita/plugins/tools/tool_star/wdg_tool_star.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgToolStar</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgToolStar</cstring> </property> @@ -22,15 +22,15 @@ <property name="margin"> <number>0</number> </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</cstring> </property> @@ -57,15 +57,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -120,7 +120,7 @@ <data format="PNG" length="1002">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000003b149444154388dad945f4c5b551cc73fe7dc4b7b4bcba0762d45c43114323599ee6192609c51d883892ce083f1718b3ebb185f8dc91e972cf39d2d2a2f1af664b6f1e0fe3863a0718969700eb0c52142da0242a1bd6d696f7bcff101585203ceb8fd9ece39f99dcff9fe7edf939f88c562ec465f5f9fe609442c161362173c3e3eae7b7a7ac8e7f36432196cdbfe4f907c3e4f2291201e8fe338cec3737357e9e8e828aded1e229d650e1f2d51754b082110124c13a4dc5ea341eb9dc284c0558a853f3ce8cb0677ef500fde7d39d2596679e326597b8e9abb85d7a770ab16ab6983ec5a05b487a70e36f0f4e10afe408d6a558310980108478dba4a1e8233990c5d474b64ed39aa3a8fe5f3317fbf81dbd70bccfeb205947632fd74f6589c1c6ea2f70d03a58ba0c1f2c9bdc1b66de3b8256a6e11cbe7e3ee1d181b590124fe2693aeee08d223c82c3a2c24b7b874bec8f26288774f7bd054504aef0dde6e99c0eb83f9fb266323cb80a27fb0958141836044605a2ee5523393371cc646fee2da37195aa35d0c0c5b4859ac03d7e91712dcaac5adab3650a3ff9d08ef7dd8404bb48869e5d958b5b87dadc4c9a1464e9f0d0326df7ebd86bd2e310cb1bf62d384d59441f2d70a070e1c60e09489929b988681bdd9cc97170bcc4c65595f71f8e0e3301337fc24a7732467831875a47f289652b0be5e4151e6d07316c1b0c0340d8ab92023e76d66a6b2840e36d2fb7a13fee632475e6edc367ea98a90fb98b7dd6310ca0328a44761582e1bab41befabcc0ec940d28bc5e93b68e064cab84e1d9beaeb48934eac1f53b01c1b000fca496aa54b61a99fcde61662a4b4b4b23d1680be9d426173e4df3602a48ea411989a4fd590f52a8fd156b05ed9d350e3defe3cfdf4b4c7ce770ea7d3fb9f520afbe1620daeee5c26735d20b9b9cfb6811a754a439e4e5c5639a4caa1e5caf586bfc0197b78702005cb9b4cae4cd3267ce8638fe964bd72b393e39d74928d242617303a756a37f284447770dcdbffc6384a05a85de1306e9a52057c7527c7131c3c42d3f475eb2303c82d4fc3276d6811db37efeb148723082d9b08f79f97c1e5729109a9a28307cc622d2d6cdf52b2b24efe548dedb00142009862cfa879ee1a71f6cec928353511472fbf4389148b0b0e0c108081412458dfe21c9f11351e67e7358595468246d1d1e5e38a6e9e851bc39d84ab502a669331dafec0d8ec7e3e8cb06e1a881d727d1ae40180a434a8c9db129a54126ad48a7358c2b4c5352c8c374bcccdab2bb37d8719cba79fab8211f9df218e0582c261e95f8bfc04f1a1e8bc5c4dfe0a190172af6a9690000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/krita/plugins/tools/tool_transform/kis_tool_transform.cc b/krita/plugins/tools/tool_transform/kis_tool_transform.cc index 05cdfd44..593ad450 100644 --- a/krita/plugins/tools/tool_transform/kis_tool_transform.cc +++ b/krita/plugins/tools/tool_transform/kis_tool_transform.cc @@ -20,13 +20,13 @@ */ -#include <qpainter.h> -#include <qpen.h> -#include <qpushbutton.h> -#include <qobject.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qapplication.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpushbutton.h> +#include <tqobject.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqapplication.h> #include <kdebug.h> #include <kaction.h> @@ -62,14 +62,14 @@ namespace { typedef KisSelectedTransaction super; public: - TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, QPoint startPos, QPoint endPos); + TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, TQPoint startPos, TQPoint endPos); virtual ~TransformCmd(); public: virtual void execute(); virtual void unexecute(); void transformArgs(double &sx, double &sy, double &tx, double &ty, double &a); - KisSelectionSP origSelection(QPoint &startPos, QPoint &endPos); + KisSelectionSP origSelection(TQPoint &startPos, TQPoint &endPos); KisPaintDeviceSP theDevice(); KisPaintDeviceSP origDevice(); @@ -81,13 +81,13 @@ namespace { double m_a; KisToolTransform *m_tool; KisSelectionSP m_origSelection; - QPoint m_startPos; - QPoint m_endPos; + TQPoint m_startPos; + TQPoint m_endPos; KisPaintDeviceSP m_device; KisPaintDeviceSP m_origDevice; }; - TransformCmd::TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, QPoint startPos, QPoint endPos) : + TransformCmd::TransformCmd(KisToolTransform *tool, KisPaintDeviceSP device, KisPaintDeviceSP origDevice, double scaleX, double scaleY, double tX, double tY, double a, KisSelectionSP origSel, TQPoint startPos, TQPoint endPos) : super(i18n("Transform"), device) , m_scaleX(scaleX) , m_scaleY(scaleY) @@ -116,7 +116,7 @@ namespace { a = m_a; } - KisSelectionSP TransformCmd::origSelection(QPoint &startPos, QPoint &endPos) + KisSelectionSP TransformCmd::origSelection(TQPoint &startPos, TQPoint &endPos) { startPos = m_startPos; endPos = m_endPos; @@ -152,8 +152,8 @@ KisToolTransform::KisToolTransform() setCursor(KisCursor::selectCursor()); m_subject = 0; m_selecting = false; - m_startPos = QPoint(0, 0); - m_endPos = QPoint(0, 0); + m_startPos = TQPoint(0, 0); + m_endPos = TQPoint(0, 0); m_optWidget = 0; m_sizeCursors[0] = KisCursor::sizeVerCursor(); m_sizeCursors[1] = KisCursor::sizeBDiagCursor(); @@ -181,7 +181,7 @@ void KisToolTransform::deactivate() paintOutline(); - disconnect(m_subject->currentImg().data(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + disconnect(m_subject->currentImg().data(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolTransform::activate() @@ -222,12 +222,12 @@ void KisToolTransform::activate() initHandles(); } } - connect(m_subject->currentImg(), SIGNAL(sigLayerActivated(KisLayerSP)), this, SLOT(slotLayerActivated(KisLayerSP))); + connect(m_subject->currentImg(), TQT_SIGNAL(sigLayerActivated(KisLayerSP)), this, TQT_SLOT(slotLayerActivated(KisLayerSP))); } void KisToolTransform::initHandles() { - Q_INT32 x,y,w,h; + TQ_INT32 x,y,w,h; KisImageSP img = m_subject->currentImg(); KisPaintDeviceSP dev = img->activeDevice(); @@ -241,15 +241,15 @@ void KisToolTransform::initHandles() { KisSelectionSP sel = dev->selection(); m_origSelection = new KisSelection(*sel.data()); - QRect r = sel->selectedExactRect(); + TQRect r = sel->selectedExactRect(); r.rect(&x, &y, &w, &h); } else { dev->exactBounds(x,y,w,h); m_origSelection = 0; } - m_startPos = QPoint(x, y); - m_endPos = QPoint(x+w-1, y+h-1); + m_startPos = TQPoint(x, y); + m_endPos = TQPoint(x+w-1, y+h-1); m_org_cenX = (m_startPos.x() + m_endPos.x()) / 2.0; m_org_cenY = (m_startPos.y() + m_endPos.y()) / 2.0; @@ -264,10 +264,10 @@ void KisToolTransform::initHandles() void KisToolTransform::paint(KisCanvasPainter& gc) { - paintOutline(gc, QRect()); + paintOutline(gc, TQRect()); } -void KisToolTransform::paint(KisCanvasPainter& gc, const QRect& rc) +void KisToolTransform::paint(KisCanvasPainter& gc, const TQRect& rc) { paintOutline(gc, rc); } @@ -275,7 +275,7 @@ void KisToolTransform::paint(KisCanvasPainter& gc, const QRect& rc) void KisToolTransform::buttonPress(KisButtonPressEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { m_wasPressed = true; } @@ -286,42 +286,42 @@ void KisToolTransform::buttonPress(KisButtonPressEvent *e) switch(m_function) { case ROTATE: - m_clickoffset = e->pos().floorQPoint() - - QPoint(static_cast<int>(m_translateX),static_cast<int>(m_translateY)); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint(static_cast<int>(m_translateX),static_cast<int>(m_translateY)); m_clickangle = -m_a - atan2(m_clickoffset.x(),m_clickoffset.y()); - m_clickoffset = QPoint(0, 0); + m_clickoffset = TQPoint(0, 0); break; case MOVE: - m_clickoffset = e->pos().floorQPoint() - - QPoint(static_cast<int>(m_translateX),static_cast<int>(m_translateY)); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint(static_cast<int>(m_translateX),static_cast<int>(m_translateY)); break; case TOPSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_topleft + m_topright)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_topleft + m_topright)/2); break; case TOPRIGHTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_topright; + m_clickoffset = e->pos().floorTQPoint() - m_topright; break; case RIGHTSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_topright + m_bottomright)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_topright + m_bottomright)/2); break; case BOTTOMRIGHTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_bottomright; + m_clickoffset = e->pos().floorTQPoint() - m_bottomright; break; case BOTTOMSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_bottomleft + m_bottomright)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_bottomleft + m_bottomright)/2); break; case BOTTOMLEFTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_bottomleft; + m_clickoffset = e->pos().floorTQPoint() - m_bottomleft; break; case LEFTSCALE: - m_clickoffset = e->pos().floorQPoint() - - QPoint((m_topleft + m_bottomleft)/2); + m_clickoffset = e->pos().floorTQPoint() + - TQPoint((m_topleft + m_bottomleft)/2); break; case TOPLEFTSCALE: - m_clickoffset = e->pos().floorQPoint() - m_topleft; + m_clickoffset = e->pos().floorTQPoint() - m_topleft; break; } m_selecting = true; @@ -330,11 +330,11 @@ void KisToolTransform::buttonPress(KisButtonPressEvent *e) } } -int KisToolTransform::det(QPoint v,QPoint w) +int KisToolTransform::det(TQPoint v,TQPoint w) { return v.x()*w.y()-v.y()*w.x(); } -int KisToolTransform::distsq(QPoint v,QPoint w) +int KisToolTransform::distsq(TQPoint v,TQPoint w) { v -= w; return v.x()*v.x() + v.y()*v.y(); @@ -391,12 +391,12 @@ void KisToolTransform::move(KisMoveEvent *e) KisCanvasController *controller = m_subject->canvasController(); Q_ASSERT(controller); - QPoint topleft = m_topleft; - QPoint topright = m_topright; - QPoint bottomleft = m_bottomleft; - QPoint bottomright = m_bottomright; + TQPoint topleft = m_topleft; + TQPoint topright = m_topright; + TQPoint bottomleft = m_bottomleft; + TQPoint bottomright = m_bottomright; - QPoint mousePos = e->pos().floorQPoint(); + TQPoint mousePos = e->pos().floorTQPoint(); if (m_subject && m_selecting) { paintOutline(); @@ -428,7 +428,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_startPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX>0) // handle the mirrored cases m_scaleX = fabs(m_scaleY); @@ -446,7 +446,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_startPos.y() - m_org_cenY); // enforce same aspect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -473,7 +473,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleX = (newX - dx) / (m_endPos.x() - m_org_cenX); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleY>0) // handle the mirrored cases m_scaleY = fabs(m_scaleX); @@ -491,7 +491,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_endPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -518,7 +518,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_endPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX>0) // handle the mirrored cases m_scaleX = fabs(m_scaleY); @@ -536,7 +536,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_endPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -563,7 +563,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleX = (newX - dx) / (m_startPos.x() - m_org_cenX); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleY>0) // handle the mirrored cases m_scaleY = fabs(m_scaleX); @@ -581,7 +581,7 @@ void KisToolTransform::move(KisMoveEvent *e) m_scaleY = (newY - dy) / (m_startPos.y() - m_org_cenY); // enforce same acpect if shift button is pressed - if(e->state() & Qt::ShiftButton) + if(e->state() & TQt::ShiftButton) { if(m_scaleX < m_scaleY) { @@ -646,7 +646,7 @@ void KisToolTransform::move(KisMoveEvent *e) void KisToolTransform::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { + if (m_subject && e->button() == TQMouseEvent::LeftButton) { if(!m_wasPressed) return; m_wasPressed = false; @@ -660,9 +660,9 @@ void KisToolTransform::buttonRelease(KisButtonReleaseEvent *e) if(m_actualyMoveWhileSelected) { paintOutline(); - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); transform(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } } @@ -673,7 +673,7 @@ void KisToolTransform::paintOutline() KisCanvasController *controller = m_subject->canvasController(); KisCanvas *canvas = controller->kiscanvas(); KisCanvasPainter gc(canvas); - QRect rc; + TQRect rc; paintOutline(gc, rc); } @@ -688,38 +688,38 @@ void KisToolTransform::recalcOutline() x = (m_startPos.x() - m_org_cenX) * m_scaleX; y = (m_startPos.y() - m_org_cenY) * m_scaleY; - m_topleft = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_topleft = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); x = (m_endPos.x() - m_org_cenX) * m_scaleX; y = (m_startPos.y() - m_org_cenY) * m_scaleY; - m_topright = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_topright = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); x = (m_startPos.x() - m_org_cenX) * m_scaleX; y = (m_endPos.y() - m_org_cenY) * m_scaleY; - m_bottomleft = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_bottomleft = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); x = (m_endPos.x() - m_org_cenX) * m_scaleX; y = (m_endPos.y() - m_org_cenY) * m_scaleY; - m_bottomright = QPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); + m_bottomright = TQPoint(int(rotX(x,y) + m_translateX+0.5), int(rotY(x,y) + m_translateY+0.5)); } -void KisToolTransform::paintOutline(KisCanvasPainter& gc, const QRect&) +void KisToolTransform::paintOutline(KisCanvasPainter& gc, const TQRect&) { if (m_subject) { KisCanvasController *controller = m_subject->canvasController(); RasterOp op = gc.rasterOp(); - QPen old = gc.pen(); - QPen pen(Qt::SolidLine); + TQPen old = gc.pen(); + TQPen pen(TQt::SolidLine); pen.setWidth(1); Q_ASSERT(controller); recalcOutline(); - QPoint topleft = controller->windowToView(m_topleft); - QPoint topright = controller->windowToView(m_topright); - QPoint bottomleft = controller->windowToView(m_bottomleft); - QPoint bottomright = controller->windowToView(m_bottomright); + TQPoint topleft = controller->windowToView(m_topleft); + TQPoint topright = controller->windowToView(m_topright); + TQPoint bottomleft = controller->windowToView(m_bottomleft); + TQPoint bottomright = controller->windowToView(m_bottomright); - gc.setRasterOp(Qt::NotROP); + gc.setRasterOp(TQt::NotROP); gc.setPen(pen); gc.drawRect(topleft.x()-4, topleft.y()-4, 8, 8); gc.drawLine(topleft.x(), topleft.y(), (topleft.x()+topright.x())/2, (topleft.y()+topright.y())/2); @@ -759,7 +759,7 @@ void KisToolTransform::transform() m_scaleX, m_scaleY, m_translateX, m_translateY, m_a, m_origSelection, m_startPos, m_endPos); // Copy the original state back. - QRect rc = m_origDevice->extent(); + TQRect rc = m_origDevice->extent(); rc = rc.normalize(); img->activeDevice()->clear(); KisPainter gc(img->activeDevice()); @@ -769,8 +769,8 @@ void KisToolTransform::transform() // Also restore the original selection. if(m_origSelection) { - //QRect rc = m_origSelection->extent(); - QRect rc = m_origSelection->selectedRect(); + //TQRect rc = m_origSelection->extent(); + TQRect rc = m_origSelection->selectedRect(); rc = rc.normalize(); img->activeDevice()->selection()->clear(); KisPainter sgc(img->activeDevice()->selection().data()); @@ -856,27 +856,27 @@ void KisToolTransform::slotLayerActivated(KisLayerSP) } -QWidget* KisToolTransform::createOptionWidget(QWidget* parent) +TQWidget* KisToolTransform::createOptionWidget(TQWidget* tqparent) { - m_optWidget = new WdgToolTransform(parent); + m_optWidget = new WdgToolTransform(tqparent); Q_CHECK_PTR(m_optWidget); m_optWidget->cmbFilter->clear(); m_optWidget->cmbFilter->setIDList(KisFilterStrategyRegistry::instance()->listKeys()); m_optWidget->cmbFilter->setCurrentText("Mitchell"); - connect(m_optWidget->cmbFilter, SIGNAL(activated(const KisID &)), - this, SLOT(slotSetFilter(const KisID &))); + connect(m_optWidget->cmbFilter, TQT_SIGNAL(activated(const KisID &)), + this, TQT_SLOT(slotSetFilter(const KisID &))); KisID filterID = m_optWidget->cmbFilter->currentItem(); m_filter = KisFilterStrategyRegistry::instance()->get(filterID); /* - connect(m_optWidget->intStartX, SIGNAL(valueChanged(int)), this, SLOT(setStartX(int))); - connect(m_optWidget->intStartY, SIGNAL(valueChanged(int)), this, SLOT(setStartY(int))); - connect(m_optWidget->intEndX, SIGNAL(valueChanged(int)), this, SLOT(setEndX(int))); - connect(m_optWidget->intEndY, SIGNAL(valueChanged(int)), this, SLOT(setEndY(int))); + connect(m_optWidget->intStartX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartX(int))); + connect(m_optWidget->intStartY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setStartY(int))); + connect(m_optWidget->intEndX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndX(int))); + connect(m_optWidget->intEndY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setEndY(int))); */ m_optWidget->intStartX->hide(); m_optWidget->intStartY->hide(); @@ -889,7 +889,7 @@ QWidget* KisToolTransform::createOptionWidget(QWidget* parent) return m_optWidget; } -QWidget* KisToolTransform::optionWidget() +TQWidget* KisToolTransform::optionWidget() { return m_optWidget; } @@ -903,7 +903,7 @@ void KisToolTransform::setup(KActionCollection *collection) "tool_transform", 0, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); Q_CHECK_PTR(m_action); diff --git a/krita/plugins/tools/tool_transform/kis_tool_transform.h b/krita/plugins/tools/tool_transform/kis_tool_transform.h index 9ae4f4da..3d5ff8b3 100644 --- a/krita/plugins/tools/tool_transform/kis_tool_transform.h +++ b/krita/plugins/tools/tool_transform/kis_tool_transform.h @@ -22,7 +22,7 @@ #ifndef KIS_TOOL_TRANSFORM_H_ #define KIS_TOOL_TRANSFORM_H_ -#include <qpoint.h> +#include <tqpoint.h> #include <kis_tool_non_paint.h> #include <kis_tool_factory.h> @@ -42,19 +42,20 @@ class KisToolTransform : public KisToolNonPaint, KisCommandHistoryListener { typedef KisToolNonPaint super; Q_OBJECT + TQ_OBJECT public: KisToolTransform(); virtual ~KisToolTransform(); - virtual QWidget* createOptionWidget(QWidget* parent); - virtual QWidget* optionWidget(); + virtual TQWidget* createOptionWidget(TQWidget* tqparent); + virtual TQWidget* optionWidget(); virtual void setup(KActionCollection *collection); virtual enumToolType toolType() { return TOOL_TRANSFORM; } - virtual Q_UINT32 priority() { return 3; } + virtual TQ_UINT32 priority() { return 3; } 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); @@ -75,15 +76,15 @@ public: private: - void paintOutline(KisCanvasPainter& gc, const QRect& rc); + void paintOutline(KisCanvasPainter& gc, const TQRect& rc); void transform(); void recalcOutline(); double rotX(double x, double y) { return m_cosa*x - m_sina*y;}; double rotY(double x, double y) { return m_sina*x + m_cosa*y;}; double invrotX(double x, double y) { return m_cosa*x + m_sina*y;}; double invrotY(double x, double y) { return -m_sina*x + m_cosa*y;}; - int det(QPoint v,QPoint w); - int distsq(QPoint v,QPoint w); + int det(TQPoint v,TQPoint w); + int distsq(TQPoint v,TQPoint w); void setFunctionalCursor(); void initHandles(); @@ -102,21 +103,21 @@ protected slots: private: enum function {ROTATE,MOVE,TOPLEFTSCALE,TOPSCALE,TOPRIGHTSCALE,RIGHTSCALE, BOTTOMRIGHTSCALE, BOTTOMSCALE,BOTTOMLEFTSCALE, LEFTSCALE}; - QCursor m_sizeCursors[8]; + TQCursor m_sizeCursors[8]; function m_function; - QPoint m_startPos; - QPoint m_endPos; + TQPoint m_startPos; + TQPoint m_endPos; bool m_selecting; bool m_actualyMoveWhileSelected; - QPoint m_topleft; - QPoint m_topright; - QPoint m_bottomleft; - QPoint m_bottomright; + TQPoint m_topleft; + TQPoint m_topright; + TQPoint m_bottomleft; + TQPoint m_bottomright; double m_scaleX; double m_scaleY; double m_translateX; double m_translateY; - QPoint m_clickoffset; + TQPoint m_clickoffset; double m_org_cenX; double m_org_cenY; double m_cosa; diff --git a/krita/plugins/tools/tool_transform/tool_transform.cc b/krita/plugins/tools/tool_transform/tool_transform.cc index e8c77aa7..b91ab784 100644 --- a/krita/plugins/tools/tool_transform/tool_transform.cc +++ b/krita/plugins/tools/tool_transform/tool_transform.cc @@ -20,7 +20,7 @@ #include <stdlib.h> #include <vector> -#include <qpoint.h> +#include <tqpoint.h> #include <klocale.h> #include <kiconloader.h> @@ -42,14 +42,14 @@ typedef KGenericFactory<ToolTransform> ToolTransformFactory; K_EXPORT_COMPONENT_FACTORY( kritatooltransform, ToolTransformFactory( "krita" ) ) -ToolTransform::ToolTransform(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ToolTransform::ToolTransform(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ToolTransformFactory::instance()); - if ( parent->inherits("KisToolRegistry") ) + if ( tqparent->inherits("KisToolRegistry") ) { - KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(parent); + KisToolRegistry * r = dynamic_cast<KisToolRegistry*>(tqparent); KisToolTransformFactory * f = new KisToolTransformFactory(); Q_CHECK_PTR(f); r->add(f); diff --git a/krita/plugins/tools/tool_transform/tool_transform.h b/krita/plugins/tools/tool_transform/tool_transform.h index 42eba788..04bfbaa9 100644 --- a/krita/plugins/tools/tool_transform/tool_transform.h +++ b/krita/plugins/tools/tool_transform/tool_transform.h @@ -29,8 +29,9 @@ class KisView; class ToolTransform : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ToolTransform(QObject *parent, const char *name, const QStringList &); + ToolTransform(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ToolTransform(); private: diff --git a/krita/plugins/tools/tool_transform/wdg_tool_transform.ui b/krita/plugins/tools/tool_transform/wdg_tool_transform.ui index b9307451..2f41e1b3 100644 --- a/krita/plugins/tools/tool_transform/wdg_tool_transform.ui +++ b/krita/plugins/tools/tool_transform/wdg_tool_transform.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>WdgToolTransform</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WdgToolTransform</cstring> </property> @@ -25,31 +25,31 @@ <property name="spacing"> <number>3</number> </property> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <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="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> @@ -70,15 +70,15 @@ </widget> </hbox> </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>textLabel2</cstring> </property> @@ -101,23 +101,23 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -138,15 +138,15 @@ </widget> </hbox> </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="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -171,14 +171,14 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>Filter:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -197,7 +197,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -235,7 +235,7 @@ <tabstop>intEndX</tabstop> <tabstop>intEndY</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>kis_cmb_idlist.h</includehint> |