summaryrefslogtreecommitdiffstats
path: root/krita/plugins/tools/tool_star/kis_tool_star.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/tool_star/kis_tool_star.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/tool_star/kis_tool_star.cc')
-rw-r--r--krita/plugins/tools/tool_star/kis_tool_star.cc30
1 files changed, 15 insertions, 15 deletions
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);