diff options
Diffstat (limited to 'krita/plugins/tools/defaulttools/kis_tool_gradient.cc')
-rw-r--r-- | krita/plugins/tools/defaulttools/kis_tool_gradient.cc | 62 |
1 files changed, 31 insertions, 31 deletions
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"); |