diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-10 18:56:16 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-10 18:56:16 +0900 |
commit | 252a2ec8b0f0f9cf20c947737087b24a8185b588 (patch) | |
tree | b48be8863db3bc1c223ac270a258b5c1124cb0e3 /doc/html/ftpclient-example.html | |
parent | 87d29563e3ccdeb7fea0197e262e667ef323ff9c (diff) | |
download | tqt-252a2ec8.tar.gz tqt-252a2ec8.zip |
Rename IO and network class nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/ftpclient-example.html')
-rw-r--r-- | doc/html/ftpclient-example.html | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/doc/html/ftpclient-example.html b/doc/html/ftpclient-example.html index d2e93aa74..3e13ae338 100644 --- a/doc/html/ftpclient-example.html +++ b/doc/html/ftpclient-example.html @@ -33,7 +33,7 @@ body { background: #ffffff; color: black; } <p> -<p> This example implements a FTP client. It uses <a href="ntqftp.html">TQFtp</a> to perform its FTP +<p> This example implements a FTP client. It uses <a href="tqftp.html">TQFtp</a> to perform its FTP commands. The GUI parts are done in the Designer. <p> <hr> <p> The implementation of the FTP commands (ftpmainwindow.ui.h): @@ -58,12 +58,12 @@ commands. The GUI parts are done in the Designer. ** *****************************************************************************/ -#include <<a href="qftp-h.html">ntqftp.h</a>> +#include <<a href="tqftp-h.html">tqftp.h</a>> #include <<a href="qlineedit-h.html">ntqlineedit.h</a>> #include <<a href="qspinbox-h.html">ntqspinbox.h</a>> #include <<a href="tqstatusbar-h.html">tqstatusbar.h</a>> #include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> -#include <<a href="qfiledialog-h.html">ntqfiledialog.h</a>> +#include <<a href="tqfiledialog-h.html">tqfiledialog.h</a>> #include <<a href="qprogressdialog-h.html">ntqprogressdialog.h</a>> #include <<a href="qapplication-h.html">ntqapplication.h</a>> @@ -75,30 +75,30 @@ void FtpMainWindow::init() stateFtp = new <a href="ntqlabel.html">TQLabel</a>( tr("Unconnected"), statusBar() ); statusBar()->addWidget( stateFtp, 0, TRUE ); - ftp = new <a href="ntqftp.html">TQFtp</a>( this ); -<a name="x748"></a> connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#commandStarted">commandStarted</a>(int)), + ftp = new <a href="tqftp.html">TQFtp</a>( this ); +<a name="x748"></a> connect( ftp, TQ_SIGNAL(<a href="tqftp.html#commandStarted">commandStarted</a>(int)), TQ_SLOT(ftp_commandStarted()) ); -<a name="x747"></a> connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#commandFinished">commandFinished</a>(int,bool)), +<a name="x747"></a> connect( ftp, TQ_SIGNAL(<a href="tqftp.html#commandFinished">commandFinished</a>(int,bool)), TQ_SLOT(ftp_commandFinished()) ); -<a name="x753"></a> connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#done">done</a>(bool)), +<a name="x753"></a> connect( ftp, TQ_SIGNAL(<a href="tqftp.html#done">done</a>(bool)), TQ_SLOT(ftp_done(bool)) ); -<a name="x764"></a> connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#stateChanged">stateChanged</a>(int)), +<a name="x764"></a> connect( ftp, TQ_SIGNAL(<a href="tqftp.html#stateChanged">stateChanged</a>(int)), TQ_SLOT(ftp_stateChanged(int)) ); -<a name="x757"></a> connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#listInfo">listInfo</a>(const <a href="ntqurlinfo.html">TQUrlInfo</a> &)), - TQ_SLOT(ftp_listInfo(const <a href="ntqurlinfo.html">TQUrlInfo</a> &)) ); -<a name="x761"></a> connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#rawCommandReply">rawCommandReply</a>(int, const <a href="tqstring.html">TQString</a> &)), +<a name="x757"></a> connect( ftp, TQ_SIGNAL(<a href="tqftp.html#listInfo">listInfo</a>(const <a href="tqurlinfo.html">TQUrlInfo</a> &)), + TQ_SLOT(ftp_listInfo(const <a href="tqurlinfo.html">TQUrlInfo</a> &)) ); +<a name="x761"></a> connect( ftp, TQ_SIGNAL(<a href="tqftp.html#rawCommandReply">rawCommandReply</a>(int, const <a href="tqstring.html">TQString</a> &)), TQ_SLOT(ftp_rawCommandReply(int, const <a href="tqstring.html">TQString</a> &)) ); } void FtpMainWindow::destroy() { -<a name="x763"></a> if ( ftp-><a href="ntqftp.html#state">state</a>() != TQFtp::Unconnected ) -<a name="x746"></a> ftp-><a href="ntqftp.html#close">close</a>(); +<a name="x763"></a> if ( ftp-><a href="tqftp.html#state">state</a>() != TQFtp::Unconnected ) +<a name="x746"></a> ftp-><a href="tqftp.html#close">close</a>(); } void FtpMainWindow::uploadFile() { -<a name="x741"></a> <a href="tqstring.html">TQString</a> fileName = TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( +<a name="x741"></a> <a href="tqstring.html">TQString</a> fileName = TQFileDialog::<a href="tqfiledialog.html#getOpenFileName">getOpenFileName</a>( <a href="tqstring.html#TQString-null">TQString::null</a>, TQString::null, this, @@ -107,8 +107,8 @@ void FtpMainWindow::uploadFile() <a name="x771"></a> if ( fileName.<a href="tqstring.html#isNull">isNull</a>() ) return; - <a href="ntqfile.html">TQFile</a> *file = new <a href="ntqfile.html">TQFile</a>( fileName ); - if ( !file-><a href="ntqfile.html#open">open</a>( <a href="ntqfile.html#open">IO_ReadOnly</a> ) ) { + <a href="tqfile.html">TQFile</a> *file = new <a href="tqfile.html">TQFile</a>( fileName ); + if ( !file-><a href="tqfile.html#open">open</a>( <a href="tqfile.html#open">IO_ReadOnly</a> ) ) { <a name="x767"></a> TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>( this, tr("Upload error"), tr("Can't open file '%1' for reading.").arg(fileName) ); delete file; @@ -122,18 +122,18 @@ void FtpMainWindow::uploadFile() this, "upload progress dialog", TRUE ); -<a name="x752"></a> connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#dataTransferProgress">dataTransferProgress</a>(int,int)), +<a name="x752"></a> connect( ftp, TQ_SIGNAL(<a href="tqftp.html#dataTransferProgress">dataTransferProgress</a>(int,int)), <a name="x770"></a> &progress, TQ_SLOT(<a href="ntqprogressdialog.html#setProgress">setProgress</a>(int,int)) ); - connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#commandFinished">commandFinished</a>(int,bool)), + connect( ftp, TQ_SIGNAL(<a href="tqftp.html#commandFinished">commandFinished</a>(int,bool)), <a name="x769"></a> &progress, TQ_SLOT(<a href="ntqprogressdialog.html#reset">reset</a>()) ); <a name="x768"></a> connect( &progress, TQ_SIGNAL(<a href="ntqprogressdialog.html#cancelled">cancelled</a>()), -<a name="x744"></a> ftp, TQ_SLOT(<a href="ntqftp.html#abort">abort</a>()) ); +<a name="x744"></a> ftp, TQ_SLOT(<a href="tqftp.html#abort">abort</a>()) ); - <a href="ntqfileinfo.html">TQFileInfo</a> fi( fileName ); -<a name="x759"></a><a name="x743"></a> ftp-><a href="ntqftp.html#put">put</a>( file, fi.<a href="ntqfileinfo.html#fileName">fileName</a>() ); + <a href="tqfileinfo.html">TQFileInfo</a> fi( fileName ); +<a name="x759"></a><a name="x743"></a> ftp-><a href="tqftp.html#put">put</a>( file, fi.<a href="tqfileinfo.html#fileName">fileName</a>() ); <a name="x739"></a> progress.<a href="ntqdialog.html#exec">exec</a>(); // ### takes a lot of time!!! -<a name="x756"></a> ftp-><a href="ntqftp.html#list">list</a>(); +<a name="x756"></a> ftp-><a href="tqftp.html#list">list</a>(); } void FtpMainWindow::downloadFile() @@ -142,7 +142,7 @@ void FtpMainWindow::downloadFile() if ( !item || item->isDir() ) return; -<a name="x742"></a> <a href="tqstring.html">TQString</a> fileName = TQFileDialog::<a href="ntqfiledialog.html#getSaveFileName">getSaveFileName</a>( +<a name="x742"></a> <a href="tqstring.html">TQString</a> fileName = TQFileDialog::<a href="tqfiledialog.html#getSaveFileName">getSaveFileName</a>( <a name="x766"></a> item-><a href="qlistviewitem.html#text">text</a>(0), TQString::null, this, @@ -153,8 +153,8 @@ void FtpMainWindow::downloadFile() // create file on the heap because it has to be valid throughout the whole // asynchronous download operation - <a href="ntqfile.html">TQFile</a> *file = new <a href="ntqfile.html">TQFile</a>( fileName ); - if ( !file-><a href="ntqfile.html#open">open</a>( <a href="ntqfile.html#open">IO_WriteOnly</a> ) ) { + <a href="tqfile.html">TQFile</a> *file = new <a href="tqfile.html">TQFile</a>( fileName ); + if ( !file-><a href="tqfile.html#open">open</a>( <a href="tqfile.html#open">IO_WriteOnly</a> ) ) { TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>( this, tr("Download error"), tr("Can't open file '%1' for writing.").arg(fileName) ); delete file; @@ -168,14 +168,14 @@ void FtpMainWindow::downloadFile() this, "download progress dialog", TRUE ); - connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#dataTransferProgress">dataTransferProgress</a>(int,int)), + connect( ftp, TQ_SIGNAL(<a href="tqftp.html#dataTransferProgress">dataTransferProgress</a>(int,int)), &progress, TQ_SLOT(<a href="ntqprogressdialog.html#setProgress">setProgress</a>(int,int)) ); - connect( ftp, TQ_SIGNAL(<a href="ntqftp.html#commandFinished">commandFinished</a>(int,bool)), + connect( ftp, TQ_SIGNAL(<a href="tqftp.html#commandFinished">commandFinished</a>(int,bool)), &progress, TQ_SLOT(<a href="ntqprogressdialog.html#reset">reset</a>()) ); connect( &progress, TQ_SIGNAL(<a href="ntqprogressdialog.html#cancelled">cancelled</a>()), - ftp, TQ_SLOT(<a href="ntqftp.html#abort">abort</a>()) ); + ftp, TQ_SLOT(<a href="tqftp.html#abort">abort</a>()) ); -<a name="x755"></a> ftp-><a href="ntqftp.html#get">get</a>( item-><a href="qlistviewitem.html#text">text</a>(0), file ); +<a name="x755"></a> ftp-><a href="tqftp.html#get">get</a>( item-><a href="qlistviewitem.html#text">text</a>(0), file ); progress.<a href="ntqdialog.html#exec">exec</a>(); // ### takes a lot of time!!! } @@ -185,8 +185,8 @@ void FtpMainWindow::removeFile() if ( !item || item->isDir() ) return; -<a name="x762"></a> ftp-><a href="ntqftp.html#remove">remove</a>( item-><a href="qlistviewitem.html#text">text</a>(0) ); - ftp-><a href="ntqftp.html#list">list</a>(); +<a name="x762"></a> ftp-><a href="tqftp.html#remove">remove</a>( item-><a href="qlistviewitem.html#text">text</a>(0) ); + ftp-><a href="tqftp.html#list">list</a>(); } void FtpMainWindow::connectToHost() @@ -198,22 +198,22 @@ void FtpMainWindow::connectToHost() remotePath->clear(); remoteView->clear(); - if ( ftp-><a href="ntqftp.html#state">state</a>() != TQFtp::Unconnected ) - ftp-><a href="ntqftp.html#close">close</a>(); + if ( ftp-><a href="tqftp.html#state">state</a>() != TQFtp::Unconnected ) + ftp-><a href="tqftp.html#close">close</a>(); -<a name="x749"></a> ftp-><a href="ntqftp.html#connectToHost">connectToHost</a>( connectDialog.host->text(), connectDialog.port->value() ); -<a name="x758"></a> ftp-><a href="ntqftp.html#login">login</a>( connectDialog.username->text(), connectDialog.password->text() ); -<a name="x760"></a> ftp-><a href="ntqftp.html#rawCommand">rawCommand</a>( "PWD" ); - ftp-><a href="ntqftp.html#list">list</a>(); +<a name="x749"></a> ftp-><a href="tqftp.html#connectToHost">connectToHost</a>( connectDialog.host->text(), connectDialog.port->value() ); +<a name="x758"></a> ftp-><a href="tqftp.html#login">login</a>( connectDialog.username->text(), connectDialog.password->text() ); +<a name="x760"></a> ftp-><a href="tqftp.html#rawCommand">rawCommand</a>( "PWD" ); + ftp-><a href="tqftp.html#list">list</a>(); } // This slot is connected to the TQComboBox::activated() signal of the // remotePath. void FtpMainWindow::changePath( const <a href="tqstring.html">TQString</a> &newPath ) { -<a name="x745"></a> ftp-><a href="ntqftp.html#cd">cd</a>( newPath ); - ftp-><a href="ntqftp.html#rawCommand">rawCommand</a>( "PWD" ); - ftp-><a href="ntqftp.html#list">list</a>(); +<a name="x745"></a> ftp-><a href="tqftp.html#cd">cd</a>( newPath ); + ftp-><a href="tqftp.html#rawCommand">rawCommand</a>( "PWD" ); + ftp-><a href="tqftp.html#list">list</a>(); } // This slot is connected to the TQListView::doubleClicked() and @@ -235,7 +235,7 @@ void FtpMainWindow::changePathOrDownload( <a href="qlistviewitem.html">TQListVie void FtpMainWindow::ftp_commandStarted() { <a name="x738"></a> TQApplication::<a href="ntqapplication.html#setOverrideCursor">setOverrideCursor</a>( TQCursor(TQt::WaitCursor) ); -<a name="x750"></a> if ( ftp-><a href="ntqftp.html#currentCommand">currentCommand</a>() == TQFtp::List ) { +<a name="x750"></a> if ( ftp-><a href="tqftp.html#currentCommand">currentCommand</a>() == TQFtp::List ) { remoteView->clear(); if ( currentFtpDir != "/" ) new FtpViewItem( remoteView, FtpViewItem::Directory, "..", "", "" ); @@ -245,19 +245,19 @@ void FtpMainWindow::ftp_commandStarted() void FtpMainWindow::ftp_commandFinished() { <a name="x737"></a> TQApplication::<a href="ntqapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>(); -<a name="x751"></a> delete ftp-><a href="ntqftp.html#currentDevice">currentDevice</a>(); +<a name="x751"></a> delete ftp-><a href="tqftp.html#currentDevice">currentDevice</a>(); } void FtpMainWindow::ftp_done( bool error ) { if ( error ) { -<a name="x754"></a> TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>( this, tr("FTP Error"), ftp-><a href="ntqftp.html#errorString">errorString</a>() ); +<a name="x754"></a> TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>( this, tr("FTP Error"), ftp-><a href="tqftp.html#errorString">errorString</a>() ); // If we are connected, but not logged in, it is not meaningful to stay // connected to the server since the error is a really fatal one (login // failed). - if ( ftp-><a href="ntqftp.html#state">state</a>() == TQFtp::Connected ) - ftp-><a href="ntqftp.html#close">close</a>(); + if ( ftp-><a href="tqftp.html#state">state</a>() == TQFtp::Connected ) + ftp-><a href="tqftp.html#close">close</a>(); } } @@ -285,16 +285,16 @@ void FtpMainWindow::ftp_stateChanged( int state ) } } -void FtpMainWindow::ftp_listInfo( const <a href="ntqurlinfo.html">TQUrlInfo</a> &i ) +void FtpMainWindow::ftp_listInfo( const <a href="tqurlinfo.html">TQUrlInfo</a> &i ) { FtpViewItem::Type type; -<a name="x773"></a> if ( i.<a href="ntqurlinfo.html#isDir">isDir</a>() ) +<a name="x773"></a> if ( i.<a href="tqurlinfo.html#isDir">isDir</a>() ) type = FtpViewItem::Directory; else type = FtpViewItem::File; new FtpViewItem( remoteView, type, -<a name="x776"></a><a name="x775"></a><a name="x774"></a> i.<a href="ntqurlinfo.html#name">name</a>(), TQString::number(i.<a href="ntqurlinfo.html#size">size</a>()), i.<a href="ntqurlinfo.html#lastModified">lastModified</a>().toString() ); +<a name="x776"></a><a name="x775"></a><a name="x774"></a> i.<a href="tqurlinfo.html#name">name</a>(), TQString::number(i.<a href="tqurlinfo.html#size">size</a>()), i.<a href="tqurlinfo.html#lastModified">lastModified</a>().toString() ); } void FtpMainWindow::ftp_rawCommandReply( int code, const <a href="tqstring.html">TQString</a> &text ) |