summaryrefslogtreecommitdiffstats
path: root/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'krita/plugins/tools/defaulttools/kis_tool_rectangle.cc')
-rw-r--r--krita/plugins/tools/defaulttools/kis_tool_rectangle.cc20
1 files changed, 10 insertions, 10 deletions
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"));