diff options
Diffstat (limited to 'doc/html/clientserver-example.html')
-rw-r--r-- | doc/html/clientserver-example.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/doc/html/clientserver-example.html b/doc/html/clientserver-example.html index b66a1f1e4..d44930b68 100644 --- a/doc/html/clientserver-example.html +++ b/doc/html/clientserver-example.html @@ -59,10 +59,10 @@ specified. You can send single lines to the server. #include <<a href="qserversocket-h.html">ntqserversocket.h</a>> #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="qvbox-h.html">ntqvbox.h</a>> -#include <<a href="qtextview-h.html">ntqtextview.h</a>> +#include <<a href="tqtextview-h.html">tqtextview.h</a>> #include <<a href="qlabel-h.html">ntqlabel.h</a>> #include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> -#include <<a href="qtextstream-h.html">ntqtextstream.h</a>> +#include <<a href="tqtextstream-h.html">tqtextstream.h</a>> #include <stdlib.h> @@ -97,9 +97,9 @@ signals: private slots: void readClient() { - <a href="ntqtextstream.html">TQTextStream</a> ts( this ); + <a href="tqtextstream.html">TQTextStream</a> ts( this ); while ( canReadLine() ) { -<a name="x787"></a> <a href="tqstring.html">TQString</a> str = ts.<a href="ntqtextstream.html#readLine">readLine</a>(); +<a name="x787"></a> <a href="tqstring.html">TQString</a> str = ts.<a href="tqtextstream.html#readLine">readLine</a>(); emit logText( tr("Read: '%1'\n").arg(str) ); ts << line << ": " << str << endl; @@ -165,7 +165,7 @@ public: ); <a href="ntqlabel.html">TQLabel</a> *lb = new <a href="ntqlabel.html">TQLabel</a>( itext, this ); <a name="x784"></a> lb-><a href="ntqlabel.html#setAlignment">setAlignment</a>( AlignHCenter ); - infoText = new <a href="ntqtextview.html">TQTextView</a>( this ); + infoText = new <a href="tqtextview.html">TQTextView</a>( this ); <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( tr("Quit") , this ); connect( server, TQ_SIGNAL(newConnect(ClientSocket*)), @@ -181,20 +181,20 @@ public: private slots: void newConnect( ClientSocket *s ) { -<a name="x786"></a> infoText-><a href="ntqtextedit.html#append">append</a>( tr("New connection\n") ); +<a name="x786"></a> infoText-><a href="tqtextedit.html#append">append</a>( tr("New connection\n") ); connect( s, TQ_SIGNAL(logText(const <a href="tqstring.html">TQString</a>&)), - infoText, TQ_SLOT(<a href="ntqtextedit.html#append">append</a>(const <a href="tqstring.html">TQString</a>&)) ); + infoText, TQ_SLOT(<a href="tqtextedit.html#append">append</a>(const <a href="tqstring.html">TQString</a>&)) ); <a name="x785"></a> connect( s, TQ_SIGNAL(<a href="ntqsocket.html#connectionClosed">connectionClosed</a>()), TQ_SLOT(connectionClosed()) ); } void connectionClosed() { - infoText-><a href="ntqtextedit.html#append">append</a>( tr("Client closed connection\n") ); + infoText-><a href="tqtextedit.html#append">append</a>( tr("Client closed connection\n") ); } private: - <a href="ntqtextview.html">TQTextView</a> *infoText; + <a href="tqtextview.html">TQTextView</a> *infoText; }; @@ -226,11 +226,11 @@ int main( int argc, char** argv ) #include <<a href="qapplication-h.html">ntqapplication.h</a>> #include <<a href="qvbox-h.html">ntqvbox.h</a>> #include <<a href="qhbox-h.html">ntqhbox.h</a>> -#include <<a href="qtextview-h.html">ntqtextview.h</a>> +#include <<a href="tqtextview-h.html">tqtextview.h</a>> #include <<a href="qlineedit-h.html">ntqlineedit.h</a>> #include <<a href="qlabel-h.html">ntqlabel.h</a>> #include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> -#include <<a href="qtextstream-h.html">ntqtextstream.h</a>> +#include <<a href="tqtextstream-h.html">tqtextstream.h</a>> class Client : public <a href="ntqvbox.html">TQVBox</a> @@ -240,7 +240,7 @@ public: Client( const <a href="tqstring.html">TQString</a> &host, TQ_UINT16 port ) { // GUI layout - infoText = new <a href="ntqtextview.html">TQTextView</a>( this ); + infoText = new <a href="tqtextview.html">TQTextView</a>( this ); <a href="ntqhbox.html">TQHBox</a> *hb = new <a href="ntqhbox.html">TQHBox</a>( this ); inputText = new <a href="ntqlineedit.html">TQLineEdit</a>( hb ); <a href="ntqpushbutton.html">TQPushButton</a> *send = new <a href="ntqpushbutton.html">TQPushButton</a>( tr("Send") , hb ); @@ -263,7 +263,7 @@ public: TQ_SLOT(socketError(int)) ); // connect to the server -<a name="x805"></a> infoText-><a href="ntqtextedit.html#append">append</a>( tr("Trying to connect to the server\n") ); +<a name="x805"></a> infoText-><a href="tqtextedit.html#append">append</a>( tr("Trying to connect to the server\n") ); <a name="x797"></a> socket-><a href="ntqsocket.html#connectToHost">connectToHost</a>( host, port ); } @@ -288,7 +288,7 @@ private slots: void sendToServer() { // write to the server - <a href="ntqtextstream.html">TQTextStream</a> os(socket); + <a href="tqtextstream.html">TQTextStream</a> os(socket); <a name="x794"></a> os << inputText-><a href="ntqlineedit.html#text">text</a>() << "\n"; <a name="x793"></a> inputText-><a href="ntqlineedit.html#setText">setText</a>( "" ); } @@ -297,33 +297,33 @@ private slots: { // read from the server <a name="x795"></a> while ( socket-><a href="ntqsocket.html#canReadLine">canReadLine</a>() ) { -<a name="x802"></a> infoText-><a href="ntqtextedit.html#append">append</a>( socket-><a href="ntqsocket.html#readLine">readLine</a>() ); +<a name="x802"></a> infoText-><a href="tqtextedit.html#append">append</a>( socket-><a href="ntqsocket.html#readLine">readLine</a>() ); } } void socketConnected() { - infoText-><a href="ntqtextedit.html#append">append</a>( tr("Connected to server\n") ); + infoText-><a href="tqtextedit.html#append">append</a>( tr("Connected to server\n") ); } void socketConnectionClosed() { - infoText-><a href="ntqtextedit.html#append">append</a>( tr("Connection closed by the server\n") ); + infoText-><a href="tqtextedit.html#append">append</a>( tr("Connection closed by the server\n") ); } void socketClosed() { - infoText-><a href="ntqtextedit.html#append">append</a>( tr("Connection closed\n") ); + infoText-><a href="tqtextedit.html#append">append</a>( tr("Connection closed\n") ); } void socketError( int e ) { - infoText-><a href="ntqtextedit.html#append">append</a>( tr("Error number %1 occurred\n").arg(e) ); + infoText-><a href="tqtextedit.html#append">append</a>( tr("Error number %1 occurred\n").arg(e) ); } private: <a href="ntqsocket.html">TQSocket</a> *socket; - <a href="ntqtextview.html">TQTextView</a> *infoText; + <a href="tqtextview.html">TQTextView</a> *infoText; <a href="ntqlineedit.html">TQLineEdit</a> *inputText; }; |