diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kformula/kformulawidget.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-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 'lib/kformula/kformulawidget.cc')
-rw-r--r-- | lib/kformula/kformulawidget.cc | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/kformula/kformulawidget.cc b/lib/kformula/kformulawidget.cc index 15295392..0de1ad7c 100644 --- a/lib/kformula/kformulawidget.cc +++ b/lib/kformula/kformulawidget.cc @@ -20,7 +20,7 @@ #include <iostream> -#include <qpainter.h> +#include <tqpainter.h> #include <kapplication.h> #include <kdebug.h> @@ -35,19 +35,19 @@ #include "kformulawidget.h" -KFormulaWidget::KFormulaWidget(Container* doc, QWidget* parent, const char* name, WFlags f) - : QWidget(parent, name, f | WRepaintNoErase | WResizeNoErase), +KFormulaWidget::KFormulaWidget(Container* doc, TQWidget* tqparent, const char* name, WFlags f) + : TQWidget(tqparent, name, f | WRepaintNoErase | WResizeNoErase), formulaView(doc) { - connect(doc, SIGNAL(formulaChanged(int, int)), - this, SLOT(slotFormulaChanged(int, int))); - connect(&formulaView, SIGNAL(cursorChanged(bool, bool)), - this, SLOT(slotCursorChanged(bool, bool))); + connect(doc, TQT_SIGNAL(formulaChanged(int, int)), + this, TQT_SLOT(slotFormulaChanged(int, int))); + connect(&formulaView, TQT_SIGNAL(cursorChanged(bool, bool)), + this, TQT_SLOT(slotCursorChanged(bool, bool))); - setFocusPolicy(QWidget::StrongFocus); - setBackgroundMode(NoBackground/*QWidget::PaletteBase*/); + setFocusPolicy(TQ_StrongFocus); + setBackgroundMode(NoBackground/*TQWidget::PaletteBase*/); - QRect rect = doc->boundingRect(); + TQRect rect = doc->boundingRect(); slotFormulaChanged(rect.width(), rect.height()); } @@ -56,7 +56,7 @@ KFormulaWidget::~KFormulaWidget() } -QPoint KFormulaWidget::getCursorPoint() const +TQPoint KFormulaWidget::getCursorPoint() const { return formulaView.getCursorPoint(); } @@ -67,58 +67,58 @@ void KFormulaWidget::setReadOnly(bool ro) } -void KFormulaWidget::paintEvent(QPaintEvent* event) +void KFormulaWidget::paintEvent(TQPaintEvent* event) { - // Always repaint the buffer. This is not so much more work - // than it seems to be as each cursor movement requires a repaint. - QPainter p( &buffer ); + // Always tqrepaint the buffer. This is not so much more work + // than it seems to be as each cursor movement requires a tqrepaint. + TQPainter p( &buffer ); //p.translate( -fr.x(), -fr.y() ); - formulaView.draw( p, event->rect(), colorGroup() ); + formulaView.draw( p, event->rect(), tqcolorGroup() ); - QPainter painter; + TQPainter painter; painter.begin(this); painter.drawPixmap( event->rect().x(), event->rect().y(), buffer, event->rect().x(), event->rect().y(), event->rect().width(), event->rect().height() ); painter.end(); } -void KFormulaWidget::keyPressEvent(QKeyEvent* event) +void KFormulaWidget::keyPressEvent(TQKeyEvent* event) { formulaView.keyPressEvent(event); } -void KFormulaWidget::focusInEvent(QFocusEvent* event) +void KFormulaWidget::focusInEvent(TQFocusEvent* event) { formulaView.focusInEvent(event); } -void KFormulaWidget::focusOutEvent(QFocusEvent* event) +void KFormulaWidget::focusOutEvent(TQFocusEvent* event) { formulaView.focusOutEvent(event); } -void KFormulaWidget::mousePressEvent(QMouseEvent* event) +void KFormulaWidget::mousePressEvent(TQMouseEvent* event) { formulaView.mousePressEvent(event); } -void KFormulaWidget::mouseReleaseEvent(QMouseEvent* event) +void KFormulaWidget::mouseReleaseEvent(TQMouseEvent* event) { formulaView.mouseReleaseEvent(event); } -void KFormulaWidget::mouseDoubleClickEvent(QMouseEvent* event) +void KFormulaWidget::mouseDoubleClickEvent(TQMouseEvent* event) { formulaView.mouseDoubleClickEvent(event); } -void KFormulaWidget::mouseMoveEvent(QMouseEvent* event) +void KFormulaWidget::mouseMoveEvent(TQMouseEvent* event) { formulaView.mouseMoveEvent(event); } -void KFormulaWidget::wheelEvent(QWheelEvent* event) +void KFormulaWidget::wheelEvent(TQWheelEvent* event) { formulaView.wheelEvent(event); } @@ -128,7 +128,7 @@ void KFormulaWidget::slotFormulaChanged(int width, int height) // Magic numbers just to see the cursor. resize(width + 5, height + 5); buffer.resize(width + 5, height + 5); - // repaint is needed even if the size doesn't change. + // tqrepaint is needed even if the size doesn't change. //update(); } |