diff options
Diffstat (limited to 'doc/html/simple-application.html')
-rw-r--r-- | doc/html/simple-application.html | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/html/simple-application.html b/doc/html/simple-application.html index f6350d392..6fbc7a621 100644 --- a/doc/html/simple-application.html +++ b/doc/html/simple-application.html @@ -83,7 +83,7 @@ private slots: private: <a href="ntqprinter.html">TQPrinter</a> *printer; - <a href="ntqtextedit.html">TQTextEdit</a> *e; + <a href="tqtextedit.html">TQTextEdit</a> *e; <a href="tqstring.html">TQString</a> filename; }; @@ -92,10 +92,10 @@ private: </pre> <p> It declares a class that inherits <a href="ntqmainwindow.html">TQMainWindow</a>, with slots and private -variables. The class pre-declaration of <a href="ntqtextedit.html">TQTextEdit</a> at the beginning +variables. The class pre-declaration of <a href="tqtextedit.html">TQTextEdit</a> at the beginning (instead of an include) helps to speed up compilation. With this trick, <tt>make depend</tt> won't insist on recompiling every <tt>.cpp</tt> file that -includes <tt>application.h</tt> when <a href="qtextedit-h.html">ntqtextedit.h</a> changes. +includes <tt>application.h</tt> when <a href="tqtextedit-h.html">tqtextedit.h</a> changes. <p> <a name="simplemain"></a> <h2> A simple main() </h2> @@ -319,7 +319,7 @@ will be aligned to the right if the windows system style requires it. <p> We create a <em>Help</em> menu, add it to the menu bar, and insert a few commands. Depending on the style it will appear on the right hand side of the menu bar or not. -<p> <pre> e = new <a href="ntqtextedit.html">TQTextEdit</a>( this, "editor" ); +<p> <pre> e = new <a href="tqtextedit.html">TQTextEdit</a>( this, "editor" ); e-><a href="tqwidget.html#setFocus">setFocus</a>(); <a href="ntqmainwindow.html#setCentralWidget">setCentralWidget</a>( e ); </pre> @@ -382,9 +382,9 @@ error message in the statusbar. if ( !f.<a href="ntqfile.html#open">open</a>( <a href="ntqfile.html#open">IO_ReadOnly</a> ) ) return; - <a href="ntqtextstream.html">TQTextStream</a> ts( &f ); - e-><a href="ntqtextedit.html#setText">setText</a>( ts.<a href="ntqtextstream.html#read">read</a>() ); - e-><a href="ntqtextedit.html#setModified">setModified</a>( FALSE ); + <a href="tqtextstream.html">TQTextStream</a> ts( &f ); + e-><a href="tqtextedit.html#setText">setText</a>( ts.<a href="tqtextstream.html#read">read</a>() ); + e-><a href="tqtextedit.html#setModified">setModified</a>( FALSE ); <a href="tqwidget.html#setCaption">setCaption</a>( fileName ); <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( "Loaded document " + fileName, 2000 ); } @@ -401,7 +401,7 @@ readable, nothing happens. return; } - <a href="tqstring.html">TQString</a> text = e-><a href="ntqtextedit.html#text">text</a>(); + <a href="tqstring.html">TQString</a> text = e-><a href="tqtextedit.html#text">text</a>(); <a href="ntqfile.html">TQFile</a> f( filename ); if ( !f.<a href="ntqfile.html#open">open</a>( <a href="ntqfile.html#open">IO_WriteOnly</a> ) ) { <a href="ntqmainwindow.html#statusBar">statusBar</a>()->message( TQString("Could not write to %1").arg(filename), @@ -409,7 +409,7 @@ readable, nothing happens. return; } - <a href="ntqtextstream.html">TQTextStream</a> t( &f ); + <a href="tqtextstream.html">TQTextStream</a> t( &f ); t << text; f.<a href="ntqfile.html#close">close</a>(); </pre> @@ -418,7 +418,7 @@ filename has been specified so far, the <a href="#saveAs()">saveAs()</a> functio Note that there is more than one way to do this: compare the above <tt>statusBar()->message()</tt> line with the equivalent code in the <tt>load()</tt> function. -<p> <pre> e-><a href="ntqtextedit.html#setModified">setModified</a>( FALSE ); +<p> <pre> e-><a href="tqtextedit.html#setModified">setModified</a>( FALSE ); </pre> <p> Tell the editor that the contents haven't been edited since the last save. When the user does some further editing and wishes to close the @@ -463,11 +463,11 @@ and implicitly changes the window system caption to the new name. int dpiy = metrics.<a href="ntqpaintdevicemetrics.html#logicalDpiY">logicalDpiY</a>(); int margin = (int) ( (2/2.54)*dpiy ); // 2 cm margins <a href="ntqrect.html">TQRect</a> view( margin, margin, metrics.<a href="ntqpaintdevicemetrics.html#width">width</a>() - 2*margin, metrics.<a href="ntqpaintdevicemetrics.html#height">height</a>() - 2*margin ); - <a href="ntqsimplerichtext.html">TQSimpleRichText</a> richText( TQStyleSheet::<a href="ntqstylesheet.html#convertFromPlainText">convertFromPlainText</a>(e-><a href="ntqtextedit.html#text">text</a>()), + <a href="ntqsimplerichtext.html">TQSimpleRichText</a> richText( TQStyleSheet::<a href="ntqstylesheet.html#convertFromPlainText">convertFromPlainText</a>(e-><a href="tqtextedit.html#text">text</a>()), TQFont(), - e-><a href="ntqtextedit.html#context">context</a>(), - e-><a href="ntqtextedit.html#styleSheet">styleSheet</a>(), - e-><a href="ntqtextedit.html#mimeSourceFactory">mimeSourceFactory</a>(), + e-><a href="tqtextedit.html#context">context</a>(), + e-><a href="tqtextedit.html#styleSheet">styleSheet</a>(), + e-><a href="tqtextedit.html#mimeSourceFactory">mimeSourceFactory</a>(), view.<a href="ntqrect.html#height">height</a>() ); richText.<a href="ntqsimplerichtext.html#setWidth">setWidth</a>( &p, view.<a href="ntqrect.html#width">width</a>() ); int page = 1; @@ -506,7 +506,7 @@ an <em>ApplicationWindow</em>. <p> This event gets to process window system close events. A close event is subtly different from a hide event: hide often means "iconify" whereas close means that the window is going away for good. -<p> <pre> if ( !e-><a href="ntqtextedit.html#isModified">isModified</a>() ) { +<p> <pre> if ( !e-><a href="tqtextedit.html#isModified">isModified</a>() ) { ce-><a href="qcloseevent.html#accept">accept</a>(); return; } |