From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- lib/kotext/tests/kobordertest.cpp | 60 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'lib/kotext/tests/kobordertest.cpp') diff --git a/lib/kotext/tests/kobordertest.cpp b/lib/kotext/tests/kobordertest.cpp index cce43179..36169272 100644 --- a/lib/kotext/tests/kobordertest.cpp +++ b/lib/kotext/tests/kobordertest.cpp @@ -2,23 +2,23 @@ #include #include #include -#include -#include -#include +#include +#include +#include -class MyWidget : public QWidget +class MyWidget : public TQWidget { public: - MyWidget( KoZoomHandler* _zh, QWidget* parent ) - : QWidget( parent ), m_zh(_zh) { - setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + MyWidget( KoZoomHandler* _zh, TQWidget* tqparent ) + : TQWidget( tqparent ), m_zh(_zh) { + tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); } - QSize sizeHint() const { - return QSize( 150, 150 ); + TQSize tqsizeHint() const { + return TQSize( 150, 150 ); } - QSize minimumSizeHint() const { - return sizeHint(); + TQSize tqminimumSizeHint() const { + return tqsizeHint(); } KoBorder m_leftBorder; @@ -27,13 +27,13 @@ public: KoBorder m_bottomBorder; protected: - virtual void paintEvent( QPaintEvent* ) + virtual void paintEvent( TQPaintEvent* ) { - QPainter p( this ); - QRect rect( 10, 10, 100, 100 ); + TQPainter p( this ); + TQRect rect( 10, 10, 100, 100 ); KoBorder::drawBorders( p, m_zh, rect, m_leftBorder, m_rightBorder, m_topBorder, m_bottomBorder, - 0, QPen() ); + 0, TQPen() ); // Show the corners of the rect - they must apppear _inside_ the borders. p.setPen( black ); p.drawPoint( rect.topLeft() ); @@ -53,30 +53,30 @@ int main (int argc, char ** argv) KoZoomHandler* zh = new KoZoomHandler(); - QGrid* grid = new QGrid(2, Qt::Horizontal, 0L); // 2 columns + TQGrid* grid = new TQGrid(2, Qt::Horizontal, 0L); // 2 columns { // First square MyWidget* w = new MyWidget(zh, grid); w->m_leftBorder.setPenWidth( 6 ); - w->m_leftBorder.color = Qt::red; + w->m_leftBorder.color = TQt::red; w->m_rightBorder.setPenWidth( 9 ); - w->m_rightBorder.color = Qt::red; + w->m_rightBorder.color = TQt::red; w->m_topBorder.setPenWidth( 11 ); - w->m_topBorder.color = Qt::blue; + w->m_topBorder.color = TQt::blue; w->m_bottomBorder.setPenWidth( 13 ); - w->m_bottomBorder.color = Qt::green; + w->m_bottomBorder.color = TQt::green; } { // Second square, with opposite (odd/even-wise) widths MyWidget* w = new MyWidget(zh, grid); w->m_leftBorder.setPenWidth( 7 ); - w->m_leftBorder.color = Qt::red; + w->m_leftBorder.color = TQt::red; w->m_rightBorder.setPenWidth( 8 ); - w->m_rightBorder.color = Qt::red; + w->m_rightBorder.color = TQt::red; w->m_topBorder.setPenWidth( 10 ); - w->m_topBorder.color = Qt::blue; + w->m_topBorder.color = TQt::blue; w->m_bottomBorder.setPenWidth( 12 ); - w->m_bottomBorder.color = Qt::green; + w->m_bottomBorder.color = TQt::green; } { // Third square, with double borders @@ -84,13 +84,13 @@ int main (int argc, char ** argv) w2->m_leftBorder.setPenWidth( 2 ); w2->m_leftBorder.setStyle( KoBorder::DOUBLE_LINE ); w2->m_rightBorder.setPenWidth( 6 ); - w2->m_rightBorder.color = Qt::red; + w2->m_rightBorder.color = TQt::red; w2->m_rightBorder.setStyle( KoBorder::DOUBLE_LINE ); w2->m_topBorder.setPenWidth( 4 ); - w2->m_topBorder.color = Qt::blue; + w2->m_topBorder.color = TQt::blue; w2->m_topBorder.setStyle( KoBorder::DOUBLE_LINE ); w2->m_bottomBorder.setPenWidth( 6 ); - w2->m_bottomBorder.color = Qt::green; + w2->m_bottomBorder.color = TQt::green; w2->m_bottomBorder.setStyle( KoBorder::DOUBLE_LINE ); } { @@ -99,13 +99,13 @@ int main (int argc, char ** argv) w2->m_leftBorder.setPenWidth( 1 ); w2->m_leftBorder.setStyle( KoBorder::DOUBLE_LINE ); w2->m_rightBorder.setPenWidth( 5 ); - w2->m_rightBorder.color = Qt::red; + w2->m_rightBorder.color = TQt::red; w2->m_rightBorder.setStyle( KoBorder::DOUBLE_LINE ); w2->m_topBorder.setPenWidth( 3 ); - w2->m_topBorder.color = Qt::blue; + w2->m_topBorder.color = TQt::blue; w2->m_topBorder.setStyle( KoBorder::DOUBLE_LINE ); w2->m_bottomBorder.setPenWidth( 5 ); - w2->m_bottomBorder.color = Qt::green; + w2->m_bottomBorder.color = TQt::green; w2->m_bottomBorder.setStyle( KoBorder::DOUBLE_LINE ); } grid->show(); -- cgit v1.2.1