summaryrefslogtreecommitdiffstats
path: root/doc/html/simple-font-demo-example.html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
commitea318d1431c89e647598c510c4245c6571aa5f46 (patch)
tree996d29b80c30d453dda86d1a23162d441628f169 /doc/html/simple-font-demo-example.html
parentaaf89d4b48f69c9293feb187db26362e550b5561 (diff)
downloadtqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz
tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/simple-font-demo-example.html')
-rw-r--r--doc/html/simple-font-demo-example.html158
1 files changed, 79 insertions, 79 deletions
diff --git a/doc/html/simple-font-demo-example.html b/doc/html/simple-font-demo-example.html
index eacba8f37..748a65343 100644
--- a/doc/html/simple-font-demo-example.html
+++ b/doc/html/simple-font-demo-example.html
@@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }
<p>
<p> This example demonstrates the use of various
-<a href="qfont.html">TQFont</a> member functions.
+<a href="ntqfont.html">TQFont</a> member functions.
<p> <hr>
<p> The main window API (viewer.h):
<p> <pre>/* $Id: qt/viewer.h 3.3.8 edited May 27 2003 $ */
@@ -43,13 +43,13 @@ body { background: #ffffff; color: black; }
#define VIEWER_H
-#include &lt;<a href="qwidget-h.html">qwidget.h</a>&gt;
-#include &lt;<a href="qfont-h.html">qfont.h</a>&gt;
+#include &lt;<a href="qwidget-h.html">ntqwidget.h</a>&gt;
+#include &lt;<a href="qfont-h.html">ntqfont.h</a>&gt;
class TQTextView;
class TQPushButton;
-class Viewer : public <a href="qwidget.html">TQWidget</a>
+class Viewer : public <a href="ntqwidget.html">TQWidget</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
@@ -64,14 +64,14 @@ private slots:
private:
void setFontSubstitutions();
void layout();
- void showFontInfo( <a href="qfont.html">TQFont</a> &amp; );
+ void showFontInfo( <a href="ntqfont.html">TQFont</a> &amp; );
- <a href="qtextview.html">TQTextView</a> * greetings;
- <a href="qtextview.html">TQTextView</a> * fontInfo;
+ <a href="ntqtextview.html">TQTextView</a> * greetings;
+ <a href="ntqtextview.html">TQTextView</a> * fontInfo;
- <a href="qpushbutton.html">TQPushButton</a> * defaultButton;
- <a href="qpushbutton.html">TQPushButton</a> * sansSerifButton;
- <a href="qpushbutton.html">TQPushButton</a> * italicsButton;
+ <a href="ntqpushbutton.html">TQPushButton</a> * defaultButton;
+ <a href="ntqpushbutton.html">TQPushButton</a> * sansSerifButton;
+ <a href="ntqpushbutton.html">TQPushButton</a> * italicsButton;
};
#endif
@@ -82,128 +82,128 @@ private:
<p> <pre>/* $Id: qt/viewer.cpp 3.3.8 edited May 27 2003 $ */
#include "viewer.h"
-#include &lt;<a href="qstring-h.html">qstring.h</a>&gt;
-#include &lt;<a href="qstringlist-h.html">qstringlist.h</a>&gt;
-#include &lt;<a href="qtextview-h.html">qtextview.h</a>&gt;
-#include &lt;<a href="qpushbutton-h.html">qpushbutton.h</a>&gt;
-#include &lt;<a href="qlayout-h.html">qlayout.h</a>&gt;
+#include &lt;<a href="qstring-h.html">ntqstring.h</a>&gt;
+#include &lt;<a href="qstringlist-h.html">ntqstringlist.h</a>&gt;
+#include &lt;<a href="qtextview-h.html">ntqtextview.h</a>&gt;
+#include &lt;<a href="qpushbutton-h.html">ntqpushbutton.h</a>&gt;
+#include &lt;<a href="qlayout-h.html">ntqlayout.h</a>&gt;
<a name="f590"></a>Viewer::Viewer()
- :<a href="qwidget.html">TQWidget</a>()
+ :<a href="ntqwidget.html">TQWidget</a>()
{
setFontSubstitutions();
-<a name="x2850"></a> <a href="qstring.html">TQString</a> greeting_heb = TQString::<a href="qstring.html#fromUtf8">fromUtf8</a>( "\327\251\327\234\327\225\327\235" );
- <a href="qstring.html">TQString</a> greeting_ru = TQString::<a href="qstring.html#fromUtf8">fromUtf8</a>( "\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265" );
- <a href="qstring.html">TQString</a> greeting_en( "Hello" );
+<a name="x2850"></a> <a href="ntqstring.html">TQString</a> greeting_heb = TQString::<a href="ntqstring.html#fromUtf8">fromUtf8</a>( "\327\251\327\234\327\225\327\235" );
+ <a href="ntqstring.html">TQString</a> greeting_ru = TQString::<a href="ntqstring.html#fromUtf8">fromUtf8</a>( "\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271\321\202\320\265" );
+ <a href="ntqstring.html">TQString</a> greeting_en( "Hello" );
- greetings = new <a href="qtextview.html">TQTextView</a>( this, "textview" );
+ greetings = new <a href="ntqtextview.html">TQTextView</a>( this, "textview" );
- greetings-&gt;<a href="qtextedit.html#setText">setText</a>( greeting_en + "\n" +
+ greetings-&gt;<a href="ntqtextedit.html#setText">setText</a>( greeting_en + "\n" +
greeting_ru + "\n" +
greeting_heb );
- fontInfo = new <a href="qtextview.html">TQTextView</a>( this, "fontinfo" );
+ fontInfo = new <a href="ntqtextview.html">TQTextView</a>( this, "fontinfo" );
setDefault();
- defaultButton = new <a href="qpushbutton.html">TQPushButton</a>( "Default", this,
+ defaultButton = new <a href="ntqpushbutton.html">TQPushButton</a>( "Default", this,
"pushbutton1" );
-<a name="x2860"></a> defaultButton-&gt;<a href="qwidget.html#setFont">setFont</a>( TQFont( "times" ) );
- <a href="qobject.html#connect">connect</a>( defaultButton, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ),
+<a name="x2860"></a> defaultButton-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "times" ) );
+ <a href="ntqobject.html#connect">connect</a>( defaultButton, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ),
this, SLOT( setDefault() ) );
- sansSerifButton = new <a href="qpushbutton.html">TQPushButton</a>( "Sans Serif", this,
+ sansSerifButton = new <a href="ntqpushbutton.html">TQPushButton</a>( "Sans Serif", this,
"pushbutton2" );
- sansSerifButton-&gt;<a href="qwidget.html#setFont">setFont</a>( TQFont( "Helvetica", 12 ) );
- <a href="qobject.html#connect">connect</a>( sansSerifButton, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ),
+ sansSerifButton-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Helvetica", 12 ) );
+ <a href="ntqobject.html#connect">connect</a>( sansSerifButton, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ),
this, SLOT( setSansSerif() ) );
- italicsButton = new <a href="qpushbutton.html">TQPushButton</a>( "Italics", this,
+ italicsButton = new <a href="ntqpushbutton.html">TQPushButton</a>( "Italics", this,
"pushbutton3" );
- italicsButton-&gt;<a href="qwidget.html#setFont">setFont</a>( TQFont( "lucida", 12, TQFont::Bold, TRUE ) );
- <a href="qobject.html#connect">connect</a>( italicsButton, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ),
+ italicsButton-&gt;<a href="ntqwidget.html#setFont">setFont</a>( TQFont( "lucida", 12, TQFont::Bold, TRUE ) );
+ <a href="ntqobject.html#connect">connect</a>( italicsButton, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ),
this, SLOT( setItalics() ) );
- <a href="qwidget.html#layout">layout</a>();
+ <a href="ntqwidget.html#layout">layout</a>();
}
void <a name="f591"></a>Viewer::setDefault()
{
- <a href="qfont.html">TQFont</a> font( "Bavaria" );
-<a name="x2843"></a> font.<a href="qfont.html#setPointSize">setPointSize</a>( 24 );
+ <a href="ntqfont.html">TQFont</a> font( "Bavaria" );
+<a name="x2843"></a> font.<a href="ntqfont.html#setPointSize">setPointSize</a>( 24 );
-<a name="x2846"></a> font.<a href="qfont.html#setWeight">setWeight</a>( TQFont::Bold );
-<a name="x2845"></a> font.<a href="qfont.html#setUnderline">setUnderline</a>( TRUE );
+<a name="x2846"></a> font.<a href="ntqfont.html#setWeight">setWeight</a>( TQFont::Bold );
+<a name="x2845"></a> font.<a href="ntqfont.html#setUnderline">setUnderline</a>( TRUE );
- greetings-&gt;<a href="qwidget.html#setFont">setFont</a>( font );
+ greetings-&gt;<a href="ntqwidget.html#setFont">setFont</a>( font );
showFontInfo( font );
}
void <a name="f592"></a>Viewer::setSansSerif()
{
- <a href="qfont.html">TQFont</a> font( "Newyork", 18 );
-<a name="x2844"></a> font.<a href="qfont.html#setStyleHint">setStyleHint</a>( TQFont::SansSerif );
- greetings-&gt;<a href="qwidget.html#setFont">setFont</a>( font );
+ <a href="ntqfont.html">TQFont</a> font( "Newyork", 18 );
+<a name="x2844"></a> font.<a href="ntqfont.html#setStyleHint">setStyleHint</a>( TQFont::SansSerif );
+ greetings-&gt;<a href="ntqwidget.html#setFont">setFont</a>( font );
showFontInfo( font );
}
void <a name="f593"></a>Viewer::setItalics()
{
- <a href="qfont.html">TQFont</a> font( "Tokyo" );
- font.<a href="qfont.html#setPointSize">setPointSize</a>( 32 );
- font.<a href="qfont.html#setWeight">setWeight</a>( TQFont::Bold );
-<a name="x2842"></a> font.<a href="qfont.html#setItalic">setItalic</a>( TRUE );
+ <a href="ntqfont.html">TQFont</a> font( "Tokyo" );
+ font.<a href="ntqfont.html#setPointSize">setPointSize</a>( 32 );
+ font.<a href="ntqfont.html#setWeight">setWeight</a>( TQFont::Bold );
+<a name="x2842"></a> font.<a href="ntqfont.html#setItalic">setItalic</a>( TRUE );
- greetings-&gt;<a href="qwidget.html#setFont">setFont</a>( font );
+ greetings-&gt;<a href="ntqwidget.html#setFont">setFont</a>( font );
showFontInfo( font );
}
-void <a name="f594"></a>Viewer::showFontInfo( <a href="qfont.html">TQFont</a> &amp; font )
+void <a name="f594"></a>Viewer::showFontInfo( <a href="ntqfont.html">TQFont</a> &amp; font )
{
- <a href="qfontinfo.html">TQFontInfo</a> info( font );
+ <a href="ntqfontinfo.html">TQFontInfo</a> info( font );
- <a href="qstring.html">TQString</a> messageText;
+ <a href="ntqstring.html">TQString</a> messageText;
messageText = "Font requested: \"" +
-<a name="x2838"></a> font.<a href="qfont.html#family">family</a>() + "\" " +
-<a name="x2851"></a><a name="x2841"></a> TQString::<a href="qstring.html#number">number</a>( font.<a href="qfont.html#pointSize">pointSize</a>() ) + "pt&lt;BR&gt;" +
+<a name="x2838"></a> font.<a href="ntqfont.html#family">family</a>() + "\" " +
+<a name="x2851"></a><a name="x2841"></a> TQString::<a href="ntqstring.html#number">number</a>( font.<a href="ntqfont.html#pointSize">pointSize</a>() ) + "pt&lt;BR&gt;" +
"Font used: \"" +
-<a name="x2848"></a> info.<a href="qfontinfo.html#family">family</a>() + "\" " +
-<a name="x2849"></a> TQString::<a href="qstring.html#number">number</a>( info.<a href="qfontinfo.html#pointSize">pointSize</a>() ) + "pt&lt;P&gt;";
+<a name="x2848"></a> info.<a href="ntqfontinfo.html#family">family</a>() + "\" " +
+<a name="x2849"></a> TQString::<a href="ntqstring.html#number">number</a>( info.<a href="ntqfontinfo.html#pointSize">pointSize</a>() ) + "pt&lt;P&gt;";
-<a name="x2847"></a> <a href="qstringlist.html">TQStringList</a> substitutions = TQFont::<a href="qfont.html#substitutes">substitutes</a>( font.<a href="qfont.html#family">family</a>() );
+<a name="x2847"></a> <a href="ntqstringlist.html">TQStringList</a> substitutions = TQFont::<a href="ntqfont.html#substitutes">substitutes</a>( font.<a href="ntqfont.html#family">family</a>() );
-<a name="x2856"></a> if ( ! substitutions.<a href="qvaluelist.html#isEmpty">isEmpty</a>() ){
+<a name="x2856"></a> if ( ! substitutions.<a href="ntqvaluelist.html#isEmpty">isEmpty</a>() ){
messageText += "The following substitutions exist for " + \
- font.<a href="qfont.html#family">family</a>() + ":&lt;UL&gt;";
+ font.<a href="ntqfont.html#family">family</a>() + ":&lt;UL&gt;";
- TQStringList::Iterator i = substitutions.<a href="qvaluelist.html#begin">begin</a>();
- while ( i != substitutions.<a href="qvaluelist.html#end">end</a>() ){
+ TQStringList::Iterator i = substitutions.<a href="ntqvaluelist.html#begin">begin</a>();
+ while ( i != substitutions.<a href="ntqvaluelist.html#end">end</a>() ){
messageText += "&lt;LI&gt;\"" + (* i) + "\"";
i++;
}
messageText += "&lt;/UL&gt;";
} else {
messageText += "No substitutions exist for " + \
- font.<a href="qfont.html#family">family</a>() + ".";
+ font.<a href="ntqfont.html#family">family</a>() + ".";
}
- fontInfo-&gt;<a href="qtextedit.html#setText">setText</a>( messageText );
+ fontInfo-&gt;<a href="ntqtextedit.html#setText">setText</a>( messageText );
}
void <a name="f595"></a>Viewer::setFontSubstitutions()
{
- <a href="qstringlist.html">TQStringList</a> substitutes;
-<a name="x2853"></a> substitutes.<a href="qvaluelist.html#append">append</a>( "Times" );
+ <a href="ntqstringlist.html">TQStringList</a> substitutes;
+<a name="x2853"></a> substitutes.<a href="ntqvaluelist.html#append">append</a>( "Times" );
substitutes += "Mincho",
substitutes &lt;&lt; "Arabic Newspaper" &lt;&lt; "crox";
-<a name="x2840"></a> TQFont::<a href="qfont.html#insertSubstitutions">insertSubstitutions</a>( "Bavaria", substitutes );
+<a name="x2840"></a> TQFont::<a href="ntqfont.html#insertSubstitutions">insertSubstitutions</a>( "Bavaria", substitutes );
-<a name="x2839"></a> TQFont::<a href="qfont.html#insertSubstitution">insertSubstitution</a>( "Tokyo", "Lucida" );
+<a name="x2839"></a> TQFont::<a href="ntqfont.html#insertSubstitution">insertSubstitution</a>( "Tokyo", "Lucida" );
}
@@ -211,7 +211,7 @@ void <a name="f595"></a>Viewer::setFontSubstitutions()
// the following function might not be of particular interest:
// all it does is creating the widget layout.
-<a name="x2858"></a>void Viewer::<a href="qwidget.html#layout">layout</a>()
+<a name="x2858"></a>void Viewer::<a href="ntqwidget.html#layout">layout</a>()
{
<a href="qhboxlayout.html">TQHBoxLayout</a> * textViewContainer = new <a href="qhboxlayout.html">TQHBoxLayout</a>();
textViewContainer-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( greetings );
@@ -223,22 +223,22 @@ void <a name="f595"></a>Viewer::setFontSubstitutions()
buttonContainer-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( sansSerifButton );
buttonContainer-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>( italicsButton );
-<a name="x2857"></a> int maxButtonHeight = defaultButton-&gt;<a href="qwidget.html#height">height</a>();
+<a name="x2857"></a> int maxButtonHeight = defaultButton-&gt;<a href="ntqwidget.html#height">height</a>();
- if ( sansSerifButton-&gt;<a href="qwidget.html#height">height</a>() &gt; maxButtonHeight )
- maxButtonHeight = sansSerifButton-&gt;<a href="qwidget.html#height">height</a>();
- if ( italicsButton-&gt;<a href="qwidget.html#height">height</a>() &gt; maxButtonHeight )
- maxButtonHeight = italicsButton-&gt;<a href="qwidget.html#height">height</a>();
+ if ( sansSerifButton-&gt;<a href="ntqwidget.html#height">height</a>() &gt; maxButtonHeight )
+ maxButtonHeight = sansSerifButton-&gt;<a href="ntqwidget.html#height">height</a>();
+ if ( italicsButton-&gt;<a href="ntqwidget.html#height">height</a>() &gt; maxButtonHeight )
+ maxButtonHeight = italicsButton-&gt;<a href="ntqwidget.html#height">height</a>();
-<a name="x2859"></a> defaultButton-&gt;<a href="qwidget.html#setFixedHeight">setFixedHeight</a>( maxButtonHeight );
- sansSerifButton-&gt;<a href="qwidget.html#setFixedHeight">setFixedHeight</a>( maxButtonHeight );
- italicsButton-&gt;<a href="qwidget.html#setFixedHeight">setFixedHeight</a>( maxButtonHeight );
+<a name="x2859"></a> defaultButton-&gt;<a href="ntqwidget.html#setFixedHeight">setFixedHeight</a>( maxButtonHeight );
+ sansSerifButton-&gt;<a href="ntqwidget.html#setFixedHeight">setFixedHeight</a>( maxButtonHeight );
+ italicsButton-&gt;<a href="ntqwidget.html#setFixedHeight">setFixedHeight</a>( maxButtonHeight );
<a href="qvboxlayout.html">TQVBoxLayout</a> * container = new <a href="qvboxlayout.html">TQVBoxLayout</a>( this );
<a name="x2835"></a> container-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>( textViewContainer );
container-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>( buttonContainer );
- <a href="qwidget.html#resize">resize</a>( 700, 250 );
+ <a href="ntqwidget.html#resize">resize</a>( 700, 250 );
}
</pre>
@@ -248,16 +248,16 @@ void <a name="f595"></a>Viewer::setFontSubstitutions()
#include "viewer.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
int main( int argc, char **argv )
{
- <a href="qapplication.html">TQApplication</a> app( argc, argv );
+ <a href="ntqapplication.html">TQApplication</a> app( argc, argv );
Viewer * textViewer = new Viewer();
- textViewer-&gt;<a href="qwidget.html#setCaption">setCaption</a>( "TQt Example - Simple TQFont Demo" );
- app.<a href="qapplication.html#setMainWidget">setMainWidget</a>( textViewer );
- textViewer-&gt;<a href="qwidget.html#show">show</a>();
- return app.<a href="qapplication.html#exec">exec</a>();
+ textViewer-&gt;<a href="ntqwidget.html#setCaption">setCaption</a>( "TQt Example - Simple TQFont Demo" );
+ app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( textViewer );
+ textViewer-&gt;<a href="ntqwidget.html#show">show</a>();
+ return app.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>