summaryrefslogtreecommitdiffstats
path: root/krita/plugins/tools/defaulttools
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/plugins/tools/defaulttools
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/plugins/tools/defaulttools')
-rw-r--r--krita/plugins/tools/defaulttools/default_tools.cc10
-rw-r--r--krita/plugins/tools/defaulttools/default_tools.h3
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_brush.cc40
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_brush.h27
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_colorpicker.cc68
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_colorpicker.h11
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_duplicate.cc64
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_duplicate.h13
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_ellipse.cc22
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_ellipse.h3
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_fill.cc38
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_fill.h25
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_gradient.cc62
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_gradient.h29
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_line.cc38
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_line.h13
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_move.cc64
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_move.h17
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_pan.cc2
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_pan.h11
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_rectangle.cc20
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_rectangle.h9
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_text.cc90
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_text.h19
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_zoom.cc46
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_zoom.h19
-rw-r--r--krita/plugins/tools/defaulttools/wdgcolorpicker.ui32
27 files changed, 404 insertions, 391 deletions
diff --git a/krita/plugins/tools/defaulttools/default_tools.cc b/krita/plugins/tools/defaulttools/default_tools.cc
index c4edcfb38..a281a52cf 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 0088263d6..b4c6d4de7 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 a65795d16..3a931bfb3 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 0024213d8..a23e8d12a 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 ae5539528..77020342f 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 2834b8c68..ab59ef172 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 71678e6f7..bd03245da 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 758542b8a..2201baddf 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 dd8867c6a..bae8ae044 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 a7bd595c8..4f79fbd69 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 3edd4f17d..6e2ae99c0 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 2b121d9c1..411d711e2 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 6c35de4e9..20ea5aa17 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 c80529e39..59d78ad30 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 cbdf54487..a335f9184 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 8a84a8192..4ce0ff384 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 810bda37f..643c29c82 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 128a96613..274cc3c71 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 56da211db..f7a92dcba 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 d0f376694..36ed9dccb 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 13b81c7f1..741b5051b 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 d9f1bf213..cc6c08534 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 b75f1b1ba..853ff3229 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 b7bc857cc..b2aa7e186 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 a5567f83c..f866e5e29 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 235c3a744..3faa5bf13 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 4a26c53f8..a2b9d7d37 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>