From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/richtext-example.html | 92 +++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 46 deletions(-) (limited to 'doc/html/richtext-example.html') diff --git a/doc/html/richtext-example.html b/doc/html/richtext-example.html index 8276b17f4..2540895f9 100644 --- a/doc/html/richtext-example.html +++ b/doc/html/richtext-example.html @@ -51,21 +51,21 @@ Unix "fortune" are displayed nicely formatted. #ifndef RICHTEXT_H #define RICHTEXT_H -#include <qvbox.h> +#include <ntqvbox.h> class TQTextView; class TQPushButton; -class MyRichText : public TQVBox +class MyRichText : public TQVBox { Q_OBJECT public: - MyRichText( TQWidget *parent = 0, const char *name = 0 ); + MyRichText( TQWidget *parent = 0, const char *name = 0 ); protected: - TQTextView *view; - TQPushButton *bClose, *bNext, *bPrev; + TQTextView *view; + TQPushButton *bClose, *bNext, *bPrev; int num; protected slots: @@ -91,12 +91,12 @@ protected slots: #include "richtext.h" -#include <qhbox.h> -#include <qhbox.h> -#include <qpushbutton.h> -#include <qtextview.h> -#include <qbrush.h> -#include <qapplication.h> +#include <ntqhbox.h> +#include <ntqhbox.h> +#include <ntqpushbutton.h> +#include <ntqtextview.h> +#include <ntqbrush.h> +#include <ntqapplication.h> static const char* sayings[] = { "<b>Saying 1:</b><br>" @@ -156,35 +156,35 @@ static const char* sayings[] = { }; -MyRichText::MyRichText( TQWidget *parent, const char *name ) - : TQVBox( parent, name ) +MyRichText::MyRichText( TQWidget *parent, const char *name ) + : TQVBox( parent, name ) { - setMargin( 5 ); - - view = new TQTextView( this ); - view->setText( "This is a <b>Test</b> with <i>italic</i> <u>stuff</u>" ); - TQBrush paper; - paper.setPixmap( TQPixmap( "../richtext/marble.png" ) ); - if ( paper.pixmap() != 0 ) - view->setPaper( paper ); + setMargin( 5 ); + + view = new TQTextView( this ); + view->setText( "This is a <b>Test</b> with <i>italic</i> <u>stuff</u>" ); + TQBrush paper; + paper.setPixmap( TQPixmap( "../richtext/marble.png" ) ); + if ( paper.pixmap() != 0 ) + view->setPaper( paper ); else - view->setPaper( white ); + view->setPaper( white ); - view->setText( sayings[0] ); - view->setMinimumSize( 450, 250 ); + view->setText( sayings[0] ); + view->setMinimumSize( 450, 250 ); - TQHBox *buttons = new TQHBox( this ); - buttons->setMargin( 5 ); + TQHBox *buttons = new TQHBox( this ); + buttons->setMargin( 5 ); - bClose = new TQPushButton( "&Close", buttons ); - bPrev = new TQPushButton( "<< &Prev", buttons ); - bNext = new TQPushButton( "&Next >>", buttons ); + bClose = new TQPushButton( "&Close", buttons ); + bPrev = new TQPushButton( "<< &Prev", buttons ); + bNext = new TQPushButton( "&Next >>", buttons ); - bPrev->setEnabled( FALSE ); + bPrev->setEnabled( FALSE ); - connect( bClose, SIGNAL( clicked() ), qApp, SLOT( quit() ) ); - connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) ); - connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) ); + connect( bClose, SIGNAL( clicked() ), qApp, SLOT( quit() ) ); + connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) ); + connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) ); num = 0; } @@ -196,12 +196,12 @@ void MyRichText::prev() num--; - view->setText( sayings[num] ); + view->setText( sayings[num] ); if ( num == 0 ) - bPrev->setEnabled( FALSE ); + bPrev->setEnabled( FALSE ); - bNext->setEnabled( TRUE ); + bNext->setEnabled( TRUE ); } void MyRichText::next() @@ -209,12 +209,12 @@ void MyRichText::next() if ( !sayings[++num] ) return; - view->setText( sayings[num] ); + view->setText( sayings[num] ); if ( !sayings[num + 1] ) - bNext->setEnabled( FALSE ); + bNext->setEnabled( FALSE ); - bPrev->setEnabled( TRUE ); + bPrev->setEnabled( TRUE ); } @@ -236,19 +236,19 @@ void MyRichText::next() *****************************************************************************/ #include "richtext.h" -#include <qapplication.h> +#include <ntqapplication.h> int main( int argc, char **argv ) { - TQApplication a( argc, argv ); + TQApplication a( argc, argv ); MyRichText richtext; - richtext.resize( 450, 350 ); - richtext.setCaption( "TQt Example - Richtext" ); - a.setMainWidget( &richtext ); - richtext.show(); + richtext.resize( 450, 350 ); + richtext.setCaption( "TQt Example - Richtext" ); + a.setMainWidget( &richtext ); + richtext.show(); - return a.exec(); + return a.exec(); } -- cgit v1.2.3