summaryrefslogtreecommitdiffstats
path: root/lib/kotext/tests/kobordertest.cpp
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 /lib/kotext/tests/kobordertest.cpp
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 'lib/kotext/tests/kobordertest.cpp')
-rw-r--r--lib/kotext/tests/kobordertest.cpp60
1 files changed, 30 insertions, 30 deletions
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 <KoZoomHandler.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
-#include <qpainter.h>
-#include <qwidget.h>
-#include <qgrid.h>
+#include <tqpainter.h>
+#include <tqwidget.h>
+#include <tqgrid.h>
-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();