diff options
Diffstat (limited to 'doc/html/xform-example.html')
-rw-r--r-- | doc/html/xform-example.html | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/doc/html/xform-example.html b/doc/html/xform-example.html index 772cf2572..9ca9ae8c8 100644 --- a/doc/html/xform-example.html +++ b/doc/html/xform-example.html @@ -59,12 +59,12 @@ arbitrarily. #include <<a href="qlcdnumber-h.html">ntqlcdnumber.h</a>> #include <<a href="qslider-h.html">ntqslider.h</a>> #include <<a href="tqmenubar-h.html">tqmenubar.h</a>> -#include <<a href="qfontdialog-h.html">ntqfontdialog.h</a>> +#include <<a href="tqfontdialog-h.html">tqfontdialog.h</a>> #include <<a href="qlayout-h.html">ntqlayout.h</a>> #include <<a href="qvbox-h.html">ntqvbox.h</a>> #include <<a href="tqwidgetstack-h.html">tqwidgetstack.h</a>> -#include <<a href="qpainter-h.html">ntqpainter.h</a>> +#include <<a href="tqpainter-h.html">tqpainter.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> #include <<a href="qpicture-h.html">ntqpicture.h</a>> @@ -81,7 +81,7 @@ class XFormControl : public <a href="ntqvbox.html">TQVBox</a>, public ModeNames { <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> public: - XFormControl( const <a href="ntqfont.html">TQFont</a> &initialFont, TQWidget *parent=0, const char *name=0 ); + XFormControl( const <a href="tqfont.html">TQFont</a> &initialFont, TQWidget *parent=0, const char *name=0 ); ~XFormControl() {} <a href="ntqwmatrix.html">TQWMatrix</a> matrix(); @@ -89,13 +89,13 @@ public: signals: void newMatrix( <a href="ntqwmatrix.html">TQWMatrix</a> ); void newText( const <a href="tqstring.html">TQString</a>& ); - void newFont( const <a href="ntqfont.html">TQFont</a> & ); + void newFont( const <a href="tqfont.html">TQFont</a> & ); void newMode( int ); private slots: void newMtx(); void newTxt(const <a href="tqstring.html">TQString</a>&); void selectFont(); - void fontSelected( const <a href="ntqfont.html">TQFont</a> & ); + void fontSelected( const <a href="tqfont.html">TQFont</a> & ); void changeMode(int); void timerEvent(TQTimerEvent*); private: @@ -113,7 +113,7 @@ private: <a href="ntqradiobutton.html">TQRadioButton</a> *rb_txt; // Radio button for text <a href="ntqradiobutton.html">TQRadioButton</a> *rb_img; // Radio button for image <a href="ntqradiobutton.html">TQRadioButton</a> *rb_pic; // Radio button for picture - <a href="ntqfont.html">TQFont</a> currentFont; + <a href="tqfont.html">TQFont</a> currentFont; }; /* @@ -125,7 +125,7 @@ class ShowXForm : public <a href="tqwidget.html">TQWidget</a>, public ModeNames { TQ_OBJECT public: - ShowXForm( const <a href="ntqfont.html">TQFont</a> &f, TQWidget *parent=0, const char *name=0 ); + ShowXForm( const <a href="tqfont.html">TQFont</a> &f, TQWidget *parent=0, const char *name=0 ); ~ShowXForm() {} void showIt(); // (Re)displays text or pixmap @@ -133,14 +133,14 @@ public: public slots: void setText( const <a href="tqstring.html">TQString</a>& ); void setMatrix( <a href="ntqwmatrix.html">TQWMatrix</a> ); - void setFont( const <a href="ntqfont.html">TQFont</a> &f ); + void setFont( const <a href="tqfont.html">TQFont</a> &f ); void setPixmap( <a href="ntqpixmap.html">TQPixmap</a> ); void setPicture( const <a href="ntqpicture.html">TQPicture</a>& ); void setMode( int ); private: <a href="tqsizepolicy.html">TQSizePolicy</a> sizePolicy() const; <a href="tqsize.html">TQSize</a> sizeHint() const; - void paintEvent( <a href="qpaintevent.html">TQPaintEvent</a> * ); + void paintEvent( <a href="tqpaintevent.html">TQPaintEvent</a> * ); void resizeEvent( <a href="qresizeevent.html">TQResizeEvent</a> * ); <a href="ntqwmatrix.html">TQWMatrix</a> mtx; // coordinate transform matrix <a href="tqstring.html">TQString</a> text; // text to be displayed @@ -150,7 +150,7 @@ private: Mode m; }; -<a name="f397"></a>XFormControl::XFormControl( const <a href="ntqfont.html">TQFont</a> &initialFont, +<a name="f397"></a>XFormControl::XFormControl( const <a href="tqfont.html">TQFont</a> &initialFont, <a href="tqwidget.html">TQWidget</a> *parent, const char *name ) : <a href="ntqvbox.html">TQVBox</a>( parent, name ) { @@ -294,14 +294,14 @@ TQWMatrix <a name="f400"></a>XFormControl::matrix() void <a name="f401"></a>XFormControl::selectFont() { bool ok; -<a name="x1224"></a> <a href="ntqfont.html">TQFont</a> f = TQFontDialog::<a href="ntqfontdialog.html#getFont">getFont</a>( &ok, currentFont ); +<a name="x1224"></a> <a href="tqfont.html">TQFont</a> f = TQFontDialog::<a href="tqfontdialog.html#getFont">getFont</a>( &ok, currentFont ); if ( ok ) { currentFont = f; fontSelected( f ); } } -void <a name="f402"></a>XFormControl::fontSelected( const <a href="ntqfont.html">TQFont</a> &font ) +void <a name="f402"></a>XFormControl::fontSelected( const <a href="tqfont.html">TQFont</a> &font ) { emit newFont( font ); changeMode(Text); @@ -330,7 +330,7 @@ void <a name="f403"></a>XFormControl::changeMode(int m) <a name="x1217"></a> tqApp-><a href="ntqapplication.html#flushX">flushX</a>(); } -<a name="f388"></a>ShowXForm::ShowXForm( const <a href="ntqfont.html">TQFont</a> &initialFont, +<a name="f388"></a>ShowXForm::ShowXForm( const <a href="tqfont.html">TQFont</a> &initialFont, <a href="tqwidget.html">TQWidget</a> *parent, const char *name ) : <a href="tqwidget.html">TQWidget</a>( parent, name, WResizeNoErase ) { @@ -350,7 +350,7 @@ void <a name="f403"></a>XFormControl::changeMode(int m) return TQSize(400,400); } -void ShowXForm::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * ) +void ShowXForm::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="tqpaintevent.html">TQPaintEvent</a> * ) { showIt(); } @@ -373,7 +373,7 @@ void <a name="f390"></a>ShowXForm::setMatrix( <a href="ntqwmatrix.html">TQWMatri showIt(); } -<a name="x1272"></a>void ShowXForm::<a href="tqwidget.html#setFont">setFont</a>( const <a href="ntqfont.html">TQFont</a> &f ) +<a name="x1272"></a>void ShowXForm::<a href="tqwidget.html#setFont">setFont</a>( const <a href="tqfont.html">TQFont</a> &f ) { m = Text; TQWidget::<a href="tqwidget.html#setFont">setFont</a>( f ); @@ -400,16 +400,16 @@ void <a name="f393"></a>ShowXForm::setMode( int mode ) void <a name="f394"></a>ShowXForm::showIt() { - <a href="ntqpainter.html">TQPainter</a> p; + <a href="tqpainter.html">TQPainter</a> p; <a href="ntqrect.html">TQRect</a> r; // rectangle covering new text/pixmap in virtual coordinates <a href="ntqwmatrix.html">TQWMatrix</a> um; // copy user specified transform int textYPos = 0; // distance from boundingRect y pos to baseline int textXPos = 0; // distance from boundingRect x pos to text start <a href="ntqrect.html">TQRect</a> br; - <a href="ntqfontmetrics.html">TQFontMetrics</a> fm( <a href="tqwidget.html#fontMetrics">fontMetrics</a>() ); // get widget font metrics + <a href="tqfontmetrics.html">TQFontMetrics</a> fm( <a href="tqwidget.html#fontMetrics">fontMetrics</a>() ); // get widget font metrics switch ( mode() ) { case Text: -<a name="x1225"></a> br = fm.<a href="ntqfontmetrics.html#boundingRect">boundingRect</a>( text ); // rectangle covering text +<a name="x1225"></a> br = fm.<a href="tqfontmetrics.html#boundingRect">boundingRect</a>( text ); // rectangle covering text r = br; textYPos = -r.<a href="ntqrect.html#y">y</a>(); textXPos = -r.<a href="ntqrect.html#x">x</a>(); @@ -435,29 +435,29 @@ void <a name="f394"></a>ShowXForm::showIt() <a href="ntqpixmap.html">TQPixmap</a> pm( pw, ph ); // off-screen drawing pixmap <a name="x1245"></a> pm.<a href="ntqpixmap.html#fill">fill</a>( <a href="tqwidget.html#backgroundColor">backgroundColor</a>() ); -<a name="x1233"></a> p.<a href="ntqpainter.html#begin">begin</a>( &pm ); +<a name="x1233"></a> p.<a href="tqpainter.html#begin">begin</a>( &pm ); <a name="x1283"></a> um.<a href="ntqwmatrix.html#translate">translate</a>( pw/2, ph/2 ); // 0,0 is center um = mtx * um; -<a name="x1242"></a> p.<a href="ntqpainter.html#setWorldMatrix">setWorldMatrix</a>( um ); +<a name="x1242"></a> p.<a href="tqpainter.html#setWorldMatrix">setWorldMatrix</a>( um ); switch ( mode() ) { case Text: -<a name="x1240"></a> p.<a href="ntqpainter.html#setFont">setFont</a>( <a href="tqwidget.html#font">font</a>() ); // use widget font -<a name="x1256"></a><a name="x1252"></a> p.<a href="ntqpainter.html#drawText">drawText</a>( r.<a href="ntqrect.html#left">left</a>() + textXPos, r.<a href="ntqrect.html#top">top</a>() + textYPos, text ); +<a name="x1240"></a> p.<a href="tqpainter.html#setFont">setFont</a>( <a href="tqwidget.html#font">font</a>() ); // use widget font +<a name="x1256"></a><a name="x1252"></a> p.<a href="tqpainter.html#drawText">drawText</a>( r.<a href="ntqrect.html#left">left</a>() + textXPos, r.<a href="ntqrect.html#top">top</a>() + textYPos, text ); #if 0 - p.<a href="ntqpainter.html#setPen">setPen</a>( red ); - p.<a href="ntqpainter.html#drawRect">drawRect</a>( br ); + p.<a href="tqpainter.html#setPen">setPen</a>( red ); + p.<a href="tqpainter.html#drawRect">drawRect</a>( br ); #endif break; case Image: -<a name="x1235"></a> p.<a href="ntqpainter.html#drawPixmap">drawPixmap</a>( -pix.<a href="ntqpixmap.html#width">width</a>()/2, -pix.<a href="ntqpixmap.html#height">height</a>()/2, pix ); +<a name="x1235"></a> p.<a href="tqpainter.html#drawPixmap">drawPixmap</a>( -pix.<a href="ntqpixmap.html#width">width</a>()/2, -pix.<a href="ntqpixmap.html#height">height</a>()/2, pix ); break; case Picture: // ### need TQPicture::boundingRect() -<a name="x1239"></a> p.<a href="ntqpainter.html#scale">scale</a>(0.25,0.25); -<a name="x1243"></a> p.<a href="ntqpainter.html#translate">translate</a>(-230,-180); -<a name="x1234"></a> p.<a href="ntqpainter.html#drawPicture">drawPicture</a>( picture ); +<a name="x1239"></a> p.<a href="tqpainter.html#scale">scale</a>(0.25,0.25); +<a name="x1243"></a> p.<a href="tqpainter.html#translate">translate</a>(-230,-180); +<a name="x1234"></a> p.<a href="tqpainter.html#drawPicture">drawPicture</a>( picture ); } -<a name="x1238"></a> p.<a href="ntqpainter.html#end">end</a>(); +<a name="x1238"></a> p.<a href="tqpainter.html#end">end</a>(); int xpos = <a href="tqwidget.html#width">width</a>()/2 - pw/2; int ypos = <a href="tqwidget.html#height">height</a>()/2 - ph/2; @@ -478,7 +478,7 @@ class XFormCenter : public <a href="ntqhbox.html">TQHBox</a>, public ModeNames public: XFormCenter( <a href="tqwidget.html">TQWidget</a> *parent=0, const char *name=0 ); public slots: - void setFont( const <a href="ntqfont.html">TQFont</a> &f ) { sx-><a href="tqwidget.html#setFont">setFont</a>( f ); } + void setFont( const <a href="tqfont.html">TQFont</a> &f ) { sx-><a href="tqwidget.html#setFont">setFont</a>( f ); } void newMode( int ); private: ShowXForm *sx; @@ -512,7 +512,7 @@ void <a name="f395"></a>XFormCenter::newMode( int m ) <a name="f396"></a>XFormCenter::XFormCenter( <a href="tqwidget.html">TQWidget</a> *parent, const char *name ) : <a href="ntqhbox.html">TQHBox</a>( parent, name ) { - <a href="ntqfont.html">TQFont</a> f( "Charter", 36, TQFont::Bold ); + <a href="tqfont.html">TQFont</a> f( "Charter", 36, TQFont::Bold ); xc = new XFormControl( f, this ); sx = new ShowXForm( f, this ); @@ -523,8 +523,8 @@ void <a name="f395"></a>XFormCenter::newMode( int m ) TQ_SLOT(setText(const <a href="tqstring.html">TQString</a>&)) ); <a href="tqobject.html#connect">connect</a>( xc, TQ_SIGNAL(newMatrix(TQWMatrix)), sx, TQ_SLOT(setMatrix(TQWMatrix)) ); - <a href="tqobject.html#connect">connect</a>( xc, TQ_SIGNAL(newFont(const <a href="ntqfont.html">TQFont</a>&)), sx, - TQ_SLOT(<a href="tqwidget.html#setFont">setFont</a>(const <a href="ntqfont.html">TQFont</a>&)) ); + <a href="tqobject.html#connect">connect</a>( xc, TQ_SIGNAL(newFont(const <a href="tqfont.html">TQFont</a>&)), sx, + TQ_SLOT(<a href="tqwidget.html#setFont">setFont</a>(const <a href="tqfont.html">TQFont</a>&)) ); <a href="tqobject.html#connect">connect</a>( xc, TQ_SIGNAL(newMode(int)), TQ_SLOT(newMode(int)) ); sx->setText( "Troll" ); newMode( Image ); |