diff options
Diffstat (limited to 'doc/html/mdi-example.html')
-rw-r--r-- | doc/html/mdi-example.html | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/doc/html/mdi-example.html b/doc/html/mdi-example.html index 681eebc78..7abea925d 100644 --- a/doc/html/mdi-example.html +++ b/doc/html/mdi-example.html @@ -64,7 +64,7 @@ class MDIWindow: public <a href="ntqmainwindow.html">TQMainWindow</a> { <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> public: - MDIWindow( <a href="ntqwidget.html">TQWidget</a>* parent, const char* name, int wflags ); + MDIWindow( <a href="tqwidget.html">TQWidget</a>* parent, const char* name, int wflags ); ~MDIWindow(); void load( const <a href="ntqstring.html">TQString</a>& fn ); @@ -273,13 +273,13 @@ 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 )) ); - w-><a href="ntqwidget.html#setCaption">setCaption</a>("unnamed document"); -<a name="x2085"></a> w-><a href="ntqwidget.html#setIcon">setIcon</a>( TQPixmap("document.xpm") ); + 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 <a name="x2094"></a> if ( ws-><a href="ntqworkspace.html#windowList">windowList</a>().isEmpty() ) -<a name="x2087"></a> w-><a href="ntqwidget.html#showMaximized">showMaximized</a>(); +<a name="x2087"></a> w-><a href="tqwidget.html#showMaximized">showMaximized</a>(); else - w-><a href="ntqwidget.html#show">show</a>(); + w-><a href="tqwidget.html#show">show</a>(); return w; } @@ -324,7 +324,7 @@ void <a name="f541"></a>ApplicationWindow::closeWindow() { MDIWindow* m = (MDIWindow*)ws-><a href="ntqworkspace.html#activeWindow">activeWindow</a>(); if ( m ) -<a name="x2076"></a> m-><a href="ntqwidget.html#close">close</a>(); +<a name="x2076"></a> m-><a href="tqwidget.html#close">close</a>(); } void <a name="f542"></a>ApplicationWindow::about() @@ -364,10 +364,10 @@ void <a name="f544"></a>ApplicationWindow::windowsMenuAboutToShow() void <a name="f545"></a>ApplicationWindow::windowsMenuActivated( int id ) { - <a href="ntqwidget.html">TQWidget</a>* w = ws-><a href="ntqworkspace.html#windowList">windowList</a>().at( id ); + <a href="tqwidget.html">TQWidget</a>* w = ws-><a href="ntqworkspace.html#windowList">windowList</a>().at( id ); if ( w ) -<a name="x2088"></a> w-><a href="ntqwidget.html#showNormal">showNormal</a>(); -<a name="x2084"></a> w-><a href="ntqwidget.html#setFocus">setFocus</a>(); +<a name="x2088"></a> w-><a href="tqwidget.html#showNormal">showNormal</a>(); +<a name="x2084"></a> w-><a href="tqwidget.html#setFocus">setFocus</a>(); } void <a name="f546"></a>ApplicationWindow::tileHorizontal() @@ -380,40 +380,40 @@ void <a name="f546"></a>ApplicationWindow::tileHorizontal() if (ws-><a href="ntqworkspace.html#activeWindow">activeWindow</a>()) ws-><a href="ntqworkspace.html#activeWindow">activeWindow</a>()->showNormal(); -<a name="x2078"></a> int heightForEach = ws-><a href="ntqwidget.html#height">height</a>() / windows.count(); +<a name="x2078"></a> int heightForEach = ws-><a href="tqwidget.html#height">height</a>() / windows.count(); int y = 0; for ( int i = 0; i < int(windows.count()); ++i ) { - <a href="ntqwidget.html">TQWidget</a> *window = windows.at(i); -<a name="x2081"></a><a name="x2080"></a> int preferredHeight = window-><a href="ntqwidget.html#minimumHeight">minimumHeight</a>()+window-><a href="ntqwidget.html#parentWidget">parentWidget</a>()->baseSize().height(); + <a href="tqwidget.html">TQWidget</a> *window = windows.at(i); +<a name="x2081"></a><a name="x2080"></a> int preferredHeight = window-><a href="tqwidget.html#minimumHeight">minimumHeight</a>()+window-><a href="tqwidget.html#parentWidget">parentWidget</a>()->baseSize().height(); int actHeight = TQMAX(heightForEach, preferredHeight); -<a name="x2089"></a> window-><a href="ntqwidget.html#parentWidget">parentWidget</a>()->setGeometry( 0, y, ws-><a href="ntqwidget.html#width">width</a>(), actHeight ); +<a name="x2089"></a> window-><a href="tqwidget.html#parentWidget">parentWidget</a>()->setGeometry( 0, y, ws-><a href="tqwidget.html#width">width</a>(), actHeight ); y += actHeight; } } -<a name="x2077"></a>void ApplicationWindow::<a href="ntqwidget.html#closeEvent">closeEvent</a>( <a href="qcloseevent.html">TQCloseEvent</a> *e ) +<a name="x2077"></a>void ApplicationWindow::<a href="tqwidget.html#closeEvent">closeEvent</a>( <a href="qcloseevent.html">TQCloseEvent</a> *e ) { TQWidgetList windows = ws-><a href="ntqworkspace.html#windowList">windowList</a>(); if ( windows.count() ) { for ( int i = 0; i < int(windows.count()); ++i ) { - <a href="ntqwidget.html">TQWidget</a> *window = windows.at( i ); - if ( !window-><a href="ntqwidget.html#close">close</a>() ) { + <a href="tqwidget.html">TQWidget</a> *window = windows.at( i ); + if ( !window-><a href="tqwidget.html#close">close</a>() ) { <a name="x2022"></a> e-><a href="qcloseevent.html#ignore">ignore</a>(); return; } } } - TQMainWindow::<a href="ntqwidget.html#closeEvent">closeEvent</a>( e ); + TQMainWindow::<a href="tqwidget.html#closeEvent">closeEvent</a>( e ); } -<a name="f547"></a>MDIWindow::MDIWindow( <a href="ntqwidget.html">TQWidget</a>* parent, const char* name, int wflags ) +<a name="f547"></a>MDIWindow::MDIWindow( <a href="tqwidget.html">TQWidget</a>* parent, const char* name, int wflags ) : <a href="ntqmainwindow.html">TQMainWindow</a>( parent, name, wflags ) { mmovie = 0; medit = new <a href="ntqtextedit.html">TQTextEdit</a>( this ); - <a href="ntqwidget.html#setFocusProxy">setFocusProxy</a>( medit ); + <a href="tqwidget.html#setFocusProxy">setFocusProxy</a>( medit ); <a href="ntqmainwindow.html#setCentralWidget">setCentralWidget</a>( medit ); } @@ -422,11 +422,11 @@ MDIWindow::~MDIWindow() delete mmovie; } -void MDIWindow::<a href="ntqwidget.html#closeEvent">closeEvent</a>( <a href="qcloseevent.html">TQCloseEvent</a> *e ) +void MDIWindow::<a href="tqwidget.html#closeEvent">closeEvent</a>( <a href="qcloseevent.html">TQCloseEvent</a> *e ) { <a name="x2069"></a> if ( medit-><a href="ntqtextedit.html#isModified">isModified</a>() ) { switch( TQMessageBox::<a href="ntqmessagebox.html#warning">warning</a>( this, "Save Changes", - <a href="tqobject.html#tr">tr</a>("Save changes to %1?").arg( <a href="ntqwidget.html#caption">caption</a>() ), + <a href="tqobject.html#tr">tr</a>("Save changes to %1?").arg( <a href="tqwidget.html#caption">caption</a>() ), <a href="tqobject.html#tr">tr</a>("Yes"), tr("No"), tr("Cancel") ) ) { case 0: { @@ -457,17 +457,17 @@ void <a name="f548"></a>MDIWindow::load( const <a href="ntqstring.html">TQString return; <a name="x2064"></a> if(fn.<a href="ntqstring.html#contains">contains</a>(".gif")) { - <a href="ntqwidget.html">TQWidget</a> * tmp=new <a href="ntqwidget.html">TQWidget</a>(this); - <a href="ntqwidget.html#setFocusProxy">setFocusProxy</a>(tmp); + <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); -<a name="x2079"></a> medit-><a href="ntqwidget.html#hide">hide</a>(); +<a name="x2079"></a> medit-><a href="tqwidget.html#hide">hide</a>(); delete medit; <a href="ntqmovie.html">TQMovie</a> * qm=new <a href="ntqmovie.html">TQMovie</a>(fn); #ifdef TQ_WS_QWS // temporary speed-test hack <a name="x2039"></a> qm->setDisplayWidget(tmp); #endif -<a name="x2082"></a> tmp-><a href="ntqwidget.html#setBackgroundMode">setBackgroundMode</a>(TQWidget::NoBackground); - tmp-><a href="ntqwidget.html#show">show</a>(); +<a name="x2082"></a> tmp-><a href="tqwidget.html#setBackgroundMode">setBackgroundMode</a>(TQWidget::NoBackground); + tmp-><a href="tqwidget.html#show">show</a>(); mmovie=qm; } else { mmovie = 0; @@ -479,7 +479,7 @@ void <a name="f548"></a>MDIWindow::load( const <a href="ntqstring.html">TQString } - <a href="ntqwidget.html#setCaption">setCaption</a>( filename ); + <a href="tqwidget.html#setCaption">setCaption</a>( filename ); emit message( TQString("Loaded document %1").arg(filename), 2000 ); } @@ -502,7 +502,7 @@ void <a name="f549"></a>MDIWindow::save() t << text; f.<a href="ntqfile.html#close">close</a>(); - <a href="ntqwidget.html#setCaption">setCaption</a>( filename ); + <a href="tqwidget.html#setCaption">setCaption</a>( filename ); emit message( TQString( "File %1 saved" ).arg( filename ), 2000 ); } @@ -580,8 +580,8 @@ int main( int argc, char ** argv ) { <a href="ntqapplication.html">TQApplication</a> a( argc, argv ); ApplicationWindow * mw = new ApplicationWindow(); a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>(mw); - mw-><a href="ntqwidget.html#setCaption">setCaption</a>( "TQt Example - Multiple Documents Interface (MDI)" ); - mw-><a href="ntqwidget.html#show">show</a>(); + mw-><a href="tqwidget.html#setCaption">setCaption</a>( "TQt Example - Multiple Documents Interface (MDI)" ); + mw-><a href="tqwidget.html#show">show</a>(); <a name="x2097"></a><a name="x2096"></a> a.<a href="tqobject.html#connect">connect</a>( &a, TQ_SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), &a, TQ_SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); int res = a.<a href="ntqapplication.html#exec">exec</a>(); return res; |