diff options
Diffstat (limited to 'doc/html/mdi-example.html')
-rw-r--r-- | doc/html/mdi-example.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html index 09489ad9b..118552fd1 100644 --- a/doc/html/mdi-example.html +++ b/doc/html/mdi-example.html @@ -67,7 +67,7 @@ public: MDIWindow( <a href="tqwidget.html">TQWidget</a>* parent, const char* name, int wflags ); ~MDIWindow(); - void load( const <a href="ntqstring.html">TQString</a>& fn ); + void load( const <a href="tqstring.html">TQString</a>& fn ); void save(); void saveAs(); void print( <a href="ntqprinter.html">TQPrinter</a>* ); @@ -76,12 +76,12 @@ protected: void closeEvent( <a href="qcloseevent.html">TQCloseEvent</a> * ); signals: - void message(const <a href="ntqstring.html">TQString</a>&, int ); + void message(const <a href="tqstring.html">TQString</a>&, int ); private: <a href="ntqtextedit.html">TQTextEdit</a>* medit; <a href="ntqmovie.html">TQMovie</a> * mmovie; - <a href="ntqstring.html">TQString</a> filename; + <a href="tqstring.html">TQString</a> filename; }; @@ -187,7 +187,7 @@ const char * filePrintText = "Click this button to print the file you " openIcon = TQPixmap( fileopen ); TQToolButton * fileOpen - = new <a href="ntqtoolbutton.html">TQToolButton</a>( openIcon, "Open File", <a href="ntqstring.html#TQString-null">TQString::null</a>, + = new <a href="ntqtoolbutton.html">TQToolButton</a>( openIcon, "Open File", <a href="tqstring.html#TQString-null">TQString::null</a>, this, TQ_SLOT(load()), fileTools, "open file" ); saveIcon = TQPixmap( filesave ); @@ -272,7 +272,7 @@ ApplicationWindow::~ApplicationWindow() MDIWindow* <a name="f536"></a>ApplicationWindow::newDoc() { MDIWindow* w = new MDIWindow( ws, 0, WDestructiveClose ); - <a href="tqobject.html#connect">connect</a>( w, TQ_SIGNAL( message(const <a href="ntqstring.html">TQString</a>&, int) ), statusBar(), TQ_SLOT( message(const <a href="ntqstring.html">TQString</a>&, int )) ); + <a href="tqobject.html#connect">connect</a>( w, TQ_SIGNAL( message(const <a href="tqstring.html">TQString</a>&, int) ), statusBar(), TQ_SLOT( message(const <a href="tqstring.html">TQString</a>&, int )) ); w-><a href="tqwidget.html#setCaption">setCaption</a>("unnamed document"); <a name="x2085"></a> w-><a href="tqwidget.html#setIcon">setIcon</a>( TQPixmap("document.xpm") ); // show the very first window in maximized mode @@ -285,8 +285,8 @@ MDIWindow* <a name="f536"></a>ApplicationWindow::newDoc() void <a name="f537"></a>ApplicationWindow::load() { - <a href="ntqstring.html">TQString</a> fn = TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( TQString::null, TQString::null, this ); - if ( !fn.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) { + <a href="tqstring.html">TQString</a> fn = TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( TQString::null, TQString::null, this ); + if ( !fn.<a href="tqstring.html#isEmpty">isEmpty</a>() ) { MDIWindow* w = newDoc(); w->load( fn ); } else { @@ -449,14 +449,14 @@ void MDIWindow::<a href="tqwidget.html#closeEvent">closeEvent</a>( <a href="qclo } } -void <a name="f548"></a>MDIWindow::load( const <a href="ntqstring.html">TQString</a>& fn ) +void <a name="f548"></a>MDIWindow::load( const <a href="tqstring.html">TQString</a>& fn ) { filename = fn; <a href="ntqfile.html">TQFile</a> f( filename ); if ( !f.<a href="ntqfile.html#open">open</a>( <a href="ntqfile.html#open">IO_ReadOnly</a> ) ) return; -<a name="x2064"></a> if(fn.<a href="ntqstring.html#contains">contains</a>(".gif")) { +<a name="x2064"></a> if(fn.<a href="tqstring.html#contains">contains</a>(".gif")) { <a href="tqwidget.html">TQWidget</a> * tmp=new <a href="tqwidget.html">TQWidget</a>(this); <a href="tqwidget.html#setFocusProxy">setFocusProxy</a>(tmp); <a href="ntqmainwindow.html#setCentralWidget">setCentralWidget</a>(tmp); @@ -473,7 +473,7 @@ void <a name="f548"></a>MDIWindow::load( const <a href="ntqstring.html">TQString mmovie = 0; <a href="ntqtextstream.html">TQTextStream</a> t(&f); -<a name="x2074"></a> <a href="ntqstring.html">TQString</a> s = t.<a href="ntqtextstream.html#read">read</a>(); +<a name="x2074"></a> <a href="tqstring.html">TQString</a> s = t.<a href="ntqtextstream.html#read">read</a>(); medit-><a href="ntqtextedit.html#setText">setText</a>( s ); <a name="x2023"></a> f.<a href="ntqfile.html#close">close</a>(); @@ -490,7 +490,7 @@ void <a name="f549"></a>MDIWindow::save() return; } -<a name="x2073"></a> <a href="ntqstring.html">TQString</a> text = medit-><a href="ntqtextedit.html#text">text</a>(); +<a name="x2073"></a> <a href="tqstring.html">TQString</a> text = medit-><a href="ntqtextedit.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> ) ) { emit message( TQString("Could not write to %1").arg(filename), @@ -509,8 +509,8 @@ void <a name="f549"></a>MDIWindow::save() void <a name="f550"></a>MDIWindow::saveAs() { - <a href="ntqstring.html">TQString</a> fn = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>( filename, TQString::null, this ); - if ( !fn.<a href="ntqstring.html#isEmpty">isEmpty</a>() ) { + <a href="tqstring.html">TQString</a> fn = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>( filename, TQString::null, this ); + if ( !fn.<a href="tqstring.html#isEmpty">isEmpty</a>() ) { filename = fn; save(); } else { @@ -545,12 +545,12 @@ void <a name="f551"></a>MDIWindow::print( <a href="ntqprinter.html">TQPrinter</a <a name="x2061"></a> richText.<a href="ntqsimplerichtext.html#draw">draw</a>( &p, margin, margin, view, colorGroup() ); <a name="x2057"></a> view.<a href="ntqrect.html#moveBy">moveBy</a>( 0, view.<a href="ntqrect.html#height">height</a>() ); p.<a href="ntqpainter.html#translate">translate</a>( 0 , -view.<a href="ntqrect.html#height">height</a>() ); -<a name="x2066"></a><a name="x2046"></a> p.<a href="ntqpainter.html#drawText">drawText</a>( view.<a href="ntqrect.html#right">right</a>() - p.<a href="ntqpainter.html#fontMetrics">fontMetrics</a>().width( TQString::<a href="ntqstring.html#number">number</a>( page ) ), +<a name="x2066"></a><a name="x2046"></a> p.<a href="ntqpainter.html#drawText">drawText</a>( view.<a href="ntqrect.html#right">right</a>() - p.<a href="ntqpainter.html#fontMetrics">fontMetrics</a>().width( TQString::<a href="tqstring.html#number">number</a>( page ) ), view.<a href="ntqrect.html#bottom">bottom</a>() + p.<a href="ntqpainter.html#fontMetrics">fontMetrics</a>().ascent() + 5, TQString::number( page ) ); <a name="x2062"></a> if ( view.<a href="ntqrect.html#top">top</a>() - margin >= richText.<a href="ntqsimplerichtext.html#height">height</a>() ) break; - <a href="ntqstring.html">TQString</a> msg( "Printing (page " ); - msg += TQString::<a href="ntqstring.html#number">number</a>( ++pageNo ); + <a href="tqstring.html">TQString</a> msg( "Printing (page " ); + msg += TQString::<a href="tqstring.html#number">number</a>( ++pageNo ); msg += ")..."; emit message( msg, 0 ); <a name="x2050"></a> printer-><a href="ntqprinter.html#newPage">newPage</a>(); |