summaryrefslogtreecommitdiffstats
path: root/doc/html/archivesearch-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/archivesearch-example.html')
-rw-r--r--doc/html/archivesearch-example.html46
1 files changed, 23 insertions, 23 deletions
diff --git a/doc/html/archivesearch-example.html b/doc/html/archivesearch-example.html
index 32dba910c..176357bf5 100644
--- a/doc/html/archivesearch-example.html
+++ b/doc/html/archivesearch-example.html
@@ -34,7 +34,7 @@ body { background: #ffffff; color: black; }
<p>
<p> This example does a search on the qt-interest mailinglist archives. It uses
-<a href="qhttp.html">TQHttp</a> to issue the search command and to fetch the results. The GUI parts
+<a href="ntqhttp.html">TQHttp</a> to issue the search command and to fetch the results. The GUI parts
were done using <a href="designer-manual.html">TQt Designer</a>.
<p> <hr>
<p> The implementation of the HTTP requests (archivedialog.ui.h):
@@ -69,15 +69,15 @@ void ArchiveDialog::init()
void ArchiveDialog::fetch( <a href="qlistviewitem.html">TQListViewItem</a> *it )
{
-<a name="x477"></a> <a href="qurl.html">TQUrl</a> u(it-&gt;<a href="qlistviewitem.html#text">text</a>(1));
-<a name="x485"></a> articleFetcher.setHost(u.<a href="qurl.html#host">host</a>());
+<a name="x477"></a> <a href="ntqurl.html">TQUrl</a> u(it-&gt;<a href="qlistviewitem.html#text">text</a>(1));
+<a name="x485"></a> articleFetcher.setHost(u.<a href="ntqurl.html#host">host</a>());
articleFetcher.get(it-&gt;<a href="qlistviewitem.html#text">text</a>(1));
}
void ArchiveDialog::fetchDone( bool error )
{
if (error) {
-<a name="x478"></a> TQMessageBox::<a href="qmessagebox.html#critical">critical</a>(this, "Error fetching",
+<a name="x478"></a> TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>(this, "Error fetching",
"An error occurred when fetching this document: "
+ articleFetcher.errorString(),
TQMessageBox::Ok, TQMessageBox::NoButton);
@@ -96,11 +96,11 @@ void ArchiveDialog::search()
}
if (myLineEdit-&gt;text() == "") {
- TQMessageBox::<a href="qmessagebox.html#critical">critical</a>(this, "Empty query",
+ TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>(this, "Empty query",
"Please type a search string.",
TQMessageBox::Ok, TQMessageBox::NoButton);
} else {
-<a name="x474"></a> TQApplication::<a href="qapplication.html#setOverrideCursor">setOverrideCursor</a>(TQCursor(TQt::WaitCursor));
+<a name="x474"></a> TQApplication::<a href="ntqapplication.html#setOverrideCursor">setOverrideCursor</a>(TQCursor(TQt::WaitCursor));
articleSearcher.setHost("lists.trolltech.com");
@@ -108,11 +108,11 @@ void ArchiveDialog::search()
<a name="x476"></a> header.<a href="qhttpheader.html#setValue">setValue</a>("Host", "lists.trolltech.com");
<a name="x475"></a> header.<a href="qhttpheader.html#setContentType">setContentType</a>("application/x-www-form-urlencoded");
- <a href="qstring.html">TQString</a> encodedTopic = myLineEdit-&gt;text();
-<a name="x484"></a> TQUrl::<a href="qurl.html#encode">encode</a>(encodedTopic);
- <a href="qstring.html">TQString</a> searchString = "qt-interest=on&amp;search=" + encodedTopic;
+ <a href="ntqstring.html">TQString</a> encodedTopic = myLineEdit-&gt;text();
+<a name="x484"></a> TQUrl::<a href="ntqurl.html#encode">encode</a>(encodedTopic);
+ <a href="ntqstring.html">TQString</a> searchString = "qt-interest=on&amp;search=" + encodedTopic;
-<a name="x483"></a> articleSearcher.request(header, searchString.<a href="qstring.html#utf8">utf8</a>());
+<a name="x483"></a> articleSearcher.request(header, searchString.<a href="ntqstring.html#utf8">utf8</a>());
}
}
@@ -120,26 +120,26 @@ void ArchiveDialog::search()
void ArchiveDialog::searchDone( bool error )
{
if (error) {
- TQMessageBox::<a href="qmessagebox.html#critical">critical</a>(this, "Error searching",
+ TQMessageBox::<a href="ntqmessagebox.html#critical">critical</a>(this, "Error searching",
"An error occurred when searching: "
+ articleSearcher.errorString(),
TQMessageBox::Ok, TQMessageBox::NoButton);
} else {
- <a href="qstring.html">TQString</a> result(articleSearcher.readAll());
+ <a href="ntqstring.html">TQString</a> result(articleSearcher.readAll());
- <a href="qregexp.html">TQRegExp</a> rx("&lt;a href=\"(http://lists\\.trolltech\\.com/qt-interest/.*)\"&gt;(.*)&lt;/a&gt;");
-<a name="x482"></a> rx.<a href="qregexp.html#setMinimal">setMinimal</a>(TRUE);
+ <a href="ntqregexp.html">TQRegExp</a> rx("&lt;a href=\"(http://lists\\.trolltech\\.com/qt-interest/.*)\"&gt;(.*)&lt;/a&gt;");
+<a name="x482"></a> rx.<a href="ntqregexp.html#setMinimal">setMinimal</a>(TRUE);
int pos = 0;
while (pos &gt;= 0) {
-<a name="x481"></a> pos = rx.<a href="qregexp.html#search">search</a>(result, pos);
+<a name="x481"></a> pos = rx.<a href="ntqregexp.html#search">search</a>(result, pos);
if (pos &gt; -1) {
-<a name="x480"></a> pos += rx.<a href="qregexp.html#matchedLength">matchedLength</a>();
-<a name="x479"></a> new <a href="qlistviewitem.html">TQListViewItem</a>(myListView, rx.<a href="qregexp.html#cap">cap</a>(2), rx.<a href="qregexp.html#cap">cap</a>(1));
+<a name="x480"></a> pos += rx.<a href="ntqregexp.html#matchedLength">matchedLength</a>();
+<a name="x479"></a> new <a href="qlistviewitem.html">TQListViewItem</a>(myListView, rx.<a href="ntqregexp.html#cap">cap</a>(2), rx.<a href="ntqregexp.html#cap">cap</a>(1));
}
}
}
-<a name="x473"></a> TQApplication::<a href="qapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>();
+<a name="x473"></a> TQApplication::<a href="ntqapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>();
}
</pre>
@@ -156,18 +156,18 @@ void ArchiveDialog::searchDone( bool error )
*****************************************************************************/
#include "archivedialog.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
int main(int argc, char **argv)
{
- <a href="qapplication.html">TQApplication</a> a( argc, argv );
+ <a href="ntqapplication.html">TQApplication</a> a( argc, argv );
ArchiveDialog ad;
ad.show();
-<a name="x489"></a><a name="x487"></a> TQObject::<a href="qobject.html#connect">connect</a>( &amp;a, SIGNAL(<a href="qapplication.html#lastWindowClosed">lastWindowClosed</a>()),
-<a name="x488"></a> &amp;a, SLOT(<a href="qapplication.html#quit">quit</a>()) );
+<a name="x489"></a><a name="x487"></a> TQObject::<a href="ntqobject.html#connect">connect</a>( &amp;a, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()),
+<a name="x488"></a> &amp;a, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
-<a name="x486"></a> return a.<a href="qapplication.html#exec">exec</a>();
+<a name="x486"></a> return a.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>