summaryrefslogtreecommitdiffstats
path: root/krita/plugins/tools/defaulttools/kis_tool_rectangle.cc
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/kis_tool_rectangle.cc
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/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"));