summaryrefslogtreecommitdiffstats
path: root/doc/html/distributor-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/distributor-example.html')
-rw-r--r--doc/html/distributor-example.html152
1 files changed, 76 insertions, 76 deletions
diff --git a/doc/html/distributor-example.html b/doc/html/distributor-example.html
index b7d034202..53abca50c 100644
--- a/doc/html/distributor-example.html
+++ b/doc/html/distributor-example.html
@@ -62,22 +62,22 @@ distributed with TQt.
** place of a destructor.
*****************************************************************************/
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
-#include &lt;<a href="qcursor-h.html">qcursor.h</a>&gt;
-#include &lt;<a href="qeventloop-h.html">qeventloop.h</a>&gt;
-#include &lt;<a href="qfile-h.html">qfile.h</a>&gt;
-#include &lt;<a href="qfiledialog-h.html">qfiledialog.h</a>&gt;
-#include &lt;<a href="qfileinfo-h.html">qfileinfo.h</a>&gt;
-#include &lt;<a href="qlineedit-h.html">qlineedit.h</a>&gt;
-#include &lt;<a href="qmessagebox-h.html">qmessagebox.h</a>&gt;
-#include &lt;<a href="qpushbutton-h.html">qpushbutton.h</a>&gt;
-#include &lt;<a href="qtimer-h.html">qtimer.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+#include &lt;<a href="qcursor-h.html">ntqcursor.h</a>&gt;
+#include &lt;<a href="qeventloop-h.html">ntqeventloop.h</a>&gt;
+#include &lt;<a href="qfile-h.html">ntqfile.h</a>&gt;
+#include &lt;<a href="qfiledialog-h.html">ntqfiledialog.h</a>&gt;
+#include &lt;<a href="qfileinfo-h.html">ntqfileinfo.h</a>&gt;
+#include &lt;<a href="qlineedit-h.html">ntqlineedit.h</a>&gt;
+#include &lt;<a href="qmessagebox-h.html">ntqmessagebox.h</a>&gt;
+#include &lt;<a href="qpushbutton-h.html">ntqpushbutton.h</a>&gt;
+#include &lt;<a href="qtimer-h.html">ntqtimer.h</a>&gt;
void Distributor::init()
{
- timer = new <a href="qtimer.html">TQTimer</a>( this );
-<a name="x2672"></a> connect( timer, SIGNAL(<a href="qtimer.html#timeout">timeout</a>()), SLOT(checkLibData()) );
+ timer = new <a href="ntqtimer.html">TQTimer</a>( this );
+<a name="x2672"></a> connect( timer, SIGNAL(<a href="ntqtimer.html#timeout">timeout</a>()), SLOT(checkLibData()) );
cancelButton()-&gt;setAutoDefault( FALSE );
backButton()-&gt;setAutoDefault( FALSE );
@@ -91,7 +91,7 @@ void Distributor::init()
setFinishEnabled( verifyMods, TRUE );
}
-void Distributor::showPage( <a href="qwidget.html">TQWidget</a> *page )
+void Distributor::showPage( <a href="ntqwidget.html">TQWidget</a> *page )
{
if ( page == selectLibrary ) {
nextButton()-&gt;setDefault( TRUE );
@@ -104,7 +104,7 @@ void Distributor::showPage( <a href="qwidget.html">TQWidget</a> *page )
finishButton()-&gt;setDefault( TRUE );
finishButton()-&gt;setFocus();
- <a href="qstring.html">TQString</a> labeltext =
+ <a href="ntqstring.html">TQString</a> labeltext =
tr("&lt;p&gt;&lt;b&gt;Current Library File:&lt;/b&gt; %1&lt;/p&gt;"
"&lt;table border=0&gt;"
"&lt;tr&gt;&lt;td&gt;&lt;b&gt;New Installation Prefix:&lt;/b&gt;&lt;/td&gt;&lt;td&gt;%2&lt;/td&gt;&lt;/tr&gt;"
@@ -131,24 +131,24 @@ void Distributor::showPage( <a href="qwidget.html">TQWidget</a> *page )
textLabel4-&gt;setText( labeltext );
}
-<a name="x2673"></a> TQWizard::<a href="qwizard.html#showPage">showPage</a>( page );
+<a name="x2673"></a> TQWizard::<a href="ntqwizard.html#showPage">showPage</a>( page );
}
-void Distributor::checkLibFilename( const <a href="qstring.html">TQString</a> &amp;filename )
+void Distributor::checkLibFilename( const <a href="ntqstring.html">TQString</a> &amp;filename )
{
setNextEnabled( selectLibrary, FALSE );
- <a href="qfileinfo.html">TQFileInfo</a> fileinfo( filename );
-<a name="x2661"></a> if ( ! filename.<a href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; fileinfo.<a href="qfileinfo.html#exists">exists</a>() &amp;&amp;
-<a name="x2665"></a><a name="x2663"></a> fileinfo.<a href="qfileinfo.html#isReadable">isReadable</a>() &amp;&amp; fileinfo.<a href="qfileinfo.html#isWritable">isWritable</a>() &amp;&amp;
-<a name="x2664"></a><a name="x2662"></a> fileinfo.<a href="qfileinfo.html#isFile">isFile</a>() &amp;&amp; !fileinfo.<a href="qfileinfo.html#isSymLink">isSymLink</a>() )
-<a name="x2671"></a> timer-&gt;<a href="qtimer.html#start">start</a>( 500, TRUE );
+ <a href="ntqfileinfo.html">TQFileInfo</a> fileinfo( filename );
+<a name="x2661"></a> if ( ! filename.<a href="ntqstring.html#isEmpty">isEmpty</a>() &amp;&amp; fileinfo.<a href="ntqfileinfo.html#exists">exists</a>() &amp;&amp;
+<a name="x2665"></a><a name="x2663"></a> fileinfo.<a href="ntqfileinfo.html#isReadable">isReadable</a>() &amp;&amp; fileinfo.<a href="ntqfileinfo.html#isWritable">isWritable</a>() &amp;&amp;
+<a name="x2664"></a><a name="x2662"></a> fileinfo.<a href="ntqfileinfo.html#isFile">isFile</a>() &amp;&amp; !fileinfo.<a href="ntqfileinfo.html#isSymLink">isSymLink</a>() )
+<a name="x2671"></a> timer-&gt;<a href="ntqtimer.html#start">start</a>( 500, TRUE );
}
void Distributor::browseLibFilename()
{
- <a href="qstring.html">TQString</a> filename =
-<a name="x2660"></a> TQFileDialog::<a href="qfiledialog.html#getOpenFileName">getOpenFileName</a>( <a href="qstring.html#TQString-null">TQString::null</a>, TQString::null, this );
+ <a href="ntqstring.html">TQString</a> filename =
+<a name="x2660"></a> TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( <a href="ntqstring.html#TQString-null">TQString::null</a>, TQString::null, this );
libFilename-&gt;setText( filename );
}
@@ -176,7 +176,7 @@ static char *find_pattern( char *h, const char *n, ulong hlen )
if ( nlen &gt; hlen )
return 0;
- } while ( <a href="qcstring.html#qstrncmp">qstrncmp</a>( h, n, nlen ) != 0 );
+ } while ( <a href="ntqcstring.html#qstrncmp">qstrncmp</a>( h, n, nlen ) != 0 );
return h + nlen;
}
@@ -184,7 +184,7 @@ void Distributor::checkLibData()
{
struct step {
const char *key;
- <a href="qcstring.html">TQCString</a> value;
+ <a href="ntqcstring.html">TQCString</a> value;
bool done;
} steps[7];
@@ -212,18 +212,18 @@ void Distributor::checkLibData()
uint completed = 0;
uint total_steps = sizeof(steps) / sizeof(step);
- <a href="qfile.html">TQFile</a> file( libFilename-&gt;text() );
-<a name="x2659"></a> if ( file.<a href="qfile.html#open">open</a>( <a href="qfile.html#open">IO_ReadOnly</a> ) ) {
-<a name="x2653"></a> TQApplication::<a href="qapplication.html#setOverrideCursor">setOverrideCursor</a>( WaitCursor );
+ <a href="ntqfile.html">TQFile</a> file( libFilename-&gt;text() );
+<a name="x2659"></a> if ( file.<a href="ntqfile.html#open">open</a>( <a href="ntqfile.html#open">IO_ReadOnly</a> ) ) {
+<a name="x2653"></a> TQApplication::<a href="ntqapplication.html#setOverrideCursor">setOverrideCursor</a>( WaitCursor );
// instead of reading in the entire file, do the search in chunks
char data[60000];
ulong offset = 0;
-<a name="x2655"></a> while ( ! file.<a href="qfile.html#atEnd">atEnd</a>() &amp;&amp; completed &lt; total_steps ) {
-<a name="x2651"></a> TQApplication::<a href="qapplication.html#eventLoop">eventLoop</a>()-&gt;processEvents( TQEventLoop::ExcludeUserInput );
+<a name="x2655"></a> while ( ! file.<a href="ntqfile.html#atEnd">atEnd</a>() &amp;&amp; completed &lt; total_steps ) {
+<a name="x2651"></a> TQApplication::<a href="ntqapplication.html#eventLoop">eventLoop</a>()-&gt;processEvents( TQEventLoop::ExcludeUserInput );
-<a name="x2667"></a> ulong len = file.<a href="qiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
+<a name="x2667"></a> ulong len = file.<a href="ntqiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
if ( len &lt; 267 ) {
// not enough room to make any modifications... stop
break;
@@ -240,8 +240,8 @@ void Distributor::checkLibData()
// path... move the file pointer back to just
// before the pattern and continue
offset += where - 11;
-<a name="x2666"></a> file.<a href="qiodevice.html#at">at</a>( offset );
- len = file.<a href="qiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
+<a name="x2666"></a> file.<a href="ntqiodevice.html#at">at</a>( offset );
+ len = file.<a href="ntqiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
--x; // retry the current step
continue;
}
@@ -255,33 +255,33 @@ void Distributor::checkLibData()
// move to the new read position
offset += len - 11;
- file.<a href="qiodevice.html#at">at</a>( offset );
+ file.<a href="ntqiodevice.html#at">at</a>( offset );
}
-<a name="x2656"></a> file.<a href="qfile.html#close">close</a>();
+<a name="x2656"></a> file.<a href="ntqfile.html#close">close</a>();
-<a name="x2652"></a> TQApplication::<a href="qapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>();
+<a name="x2652"></a> TQApplication::<a href="ntqapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>();
}
if ( completed == total_steps ) {
setNextEnabled( selectLibrary, TRUE );
-<a name="x2657"></a> <a href="qstring.html">TQString</a> prefix = TQFile::<a href="qfile.html#decodeName">decodeName</a>( steps[0].value );
+<a name="x2657"></a> <a href="ntqstring.html">TQString</a> prefix = TQFile::<a href="ntqfile.html#decodeName">decodeName</a>( steps[0].value );
prefixPath-&gt;setText( prefix );
- <a href="qstring.html">TQString</a> def_bin = prefix + TQString::fromLatin1( "/bin" );
- <a href="qstring.html">TQString</a> def_doc = prefix + TQString::fromLatin1( "/doc" );
- <a href="qstring.html">TQString</a> def_hdr = prefix + TQString::fromLatin1( "/include" );
- <a href="qstring.html">TQString</a> def_lib = prefix + TQString::fromLatin1( "/lib" );
- <a href="qstring.html">TQString</a> def_plg = prefix + TQString::fromLatin1( "/plugins" );
- <a href="qstring.html">TQString</a> def_dat = prefix;
+ <a href="ntqstring.html">TQString</a> def_bin = prefix + TQString::fromLatin1( "/bin" );
+ <a href="ntqstring.html">TQString</a> def_doc = prefix + TQString::fromLatin1( "/doc" );
+ <a href="ntqstring.html">TQString</a> def_hdr = prefix + TQString::fromLatin1( "/include" );
+ <a href="ntqstring.html">TQString</a> def_lib = prefix + TQString::fromLatin1( "/lib" );
+ <a href="ntqstring.html">TQString</a> def_plg = prefix + TQString::fromLatin1( "/plugins" );
+ <a href="ntqstring.html">TQString</a> def_dat = prefix;
- <a href="qstring.html">TQString</a> bin = TQFile::<a href="qfile.html#decodeName">decodeName</a>( steps[1].value );
- <a href="qstring.html">TQString</a> doc = TQFile::<a href="qfile.html#decodeName">decodeName</a>( steps[2].value );
- <a href="qstring.html">TQString</a> hdr = TQFile::<a href="qfile.html#decodeName">decodeName</a>( steps[3].value );
- <a href="qstring.html">TQString</a> lib = TQFile::<a href="qfile.html#decodeName">decodeName</a>( steps[4].value );
- <a href="qstring.html">TQString</a> plg = TQFile::<a href="qfile.html#decodeName">decodeName</a>( steps[5].value );
- <a href="qstring.html">TQString</a> dat = TQFile::<a href="qfile.html#decodeName">decodeName</a>( steps[6].value );
+ <a href="ntqstring.html">TQString</a> bin = TQFile::<a href="ntqfile.html#decodeName">decodeName</a>( steps[1].value );
+ <a href="ntqstring.html">TQString</a> doc = TQFile::<a href="ntqfile.html#decodeName">decodeName</a>( steps[2].value );
+ <a href="ntqstring.html">TQString</a> hdr = TQFile::<a href="ntqfile.html#decodeName">decodeName</a>( steps[3].value );
+ <a href="ntqstring.html">TQString</a> lib = TQFile::<a href="ntqfile.html#decodeName">decodeName</a>( steps[4].value );
+ <a href="ntqstring.html">TQString</a> plg = TQFile::<a href="ntqfile.html#decodeName">decodeName</a>( steps[5].value );
+ <a href="ntqstring.html">TQString</a> dat = TQFile::<a href="ntqfile.html#decodeName">decodeName</a>( steps[6].value );
autoSet-&gt;setChecked( def_bin == bin &amp;&amp;
def_doc == doc &amp;&amp;
@@ -301,7 +301,7 @@ void Distributor::checkLibData()
}
}
-void Distributor::checkInstallationPrefix( const <a href="qstring.html">TQString</a> &amp;prefix )
+void Distributor::checkInstallationPrefix( const <a href="ntqstring.html">TQString</a> &amp;prefix )
{
if ( autoSet-&gt;isChecked() ) {
binPath-&gt;setText( prefix + TQString::fromLatin1( "/bin" ) );
@@ -315,8 +315,8 @@ void Distributor::checkInstallationPrefix( const <a href="qstring.html">TQString
void Distributor::browseInstallationPrefix()
{
- <a href="qstring.html">TQString</a> prefix =
- TQFileDialog::<a href="qfiledialog.html#getOpenFileName">getOpenFileName</a>( TQString::null, TQString::null, this );
+ <a href="ntqstring.html">TQString</a> prefix =
+ TQFileDialog::<a href="ntqfiledialog.html#getOpenFileName">getOpenFileName</a>( TQString::null, TQString::null, this );
prefixPath-&gt;setText( prefix );
}
@@ -330,53 +330,53 @@ void Distributor::accept()
{
struct step {
const char *key;
- <a href="qcstring.html">TQCString</a> value;
+ <a href="ntqcstring.html">TQCString</a> value;
bool done;
} steps[7];
steps[0].key = "qt_nstpath=";
-<a name="x2658"></a> steps[0].value = TQFile::<a href="qfile.html#encodeName">encodeName</a>( prefixPath-&gt;text() );
+<a name="x2658"></a> steps[0].value = TQFile::<a href="ntqfile.html#encodeName">encodeName</a>( prefixPath-&gt;text() );
steps[0].done = FALSE;
steps[1].key = "qt_binpath=";
- steps[1].value = TQFile::<a href="qfile.html#encodeName">encodeName</a>( binPath-&gt;text() );
+ steps[1].value = TQFile::<a href="ntqfile.html#encodeName">encodeName</a>( binPath-&gt;text() );
steps[1].done = FALSE;
steps[2].key = "qt_docpath=";
- steps[2].value = TQFile::<a href="qfile.html#encodeName">encodeName</a>( docPath-&gt;text() );
+ steps[2].value = TQFile::<a href="ntqfile.html#encodeName">encodeName</a>( docPath-&gt;text() );
steps[2].done = FALSE;
steps[3].key = "qt_hdrpath=";
- steps[3].value = TQFile::<a href="qfile.html#encodeName">encodeName</a>( hdrPath-&gt;text() );
+ steps[3].value = TQFile::<a href="ntqfile.html#encodeName">encodeName</a>( hdrPath-&gt;text() );
steps[3].done = FALSE;
steps[4].key = "qt_libpath=";
- steps[4].value = TQFile::<a href="qfile.html#encodeName">encodeName</a>( libPath-&gt;text() );
+ steps[4].value = TQFile::<a href="ntqfile.html#encodeName">encodeName</a>( libPath-&gt;text() );
steps[4].done = FALSE;
steps[5].key = "qt_plgpath=";
- steps[5].value = TQFile::<a href="qfile.html#encodeName">encodeName</a>( plgPath-&gt;text() );
+ steps[5].value = TQFile::<a href="ntqfile.html#encodeName">encodeName</a>( plgPath-&gt;text() );
steps[5].done = FALSE;
steps[6].key = "qt_datpath=";
- steps[6].value = TQFile::<a href="qfile.html#encodeName">encodeName</a>( datPath-&gt;text() );
+ steps[6].value = TQFile::<a href="ntqfile.html#encodeName">encodeName</a>( datPath-&gt;text() );
steps[6].done = FALSE;
uint completed = 0;
uint total_steps = sizeof(steps) / sizeof(step);
- <a href="qfile.html">TQFile</a> file( libFilename-&gt;text() );
- if ( file.<a href="qfile.html#open">open</a>( <a href="qfile.html#open">IO_ReadWrite</a> ) ) {
- TQApplication::<a href="qapplication.html#setOverrideCursor">setOverrideCursor</a>( WaitCursor );
+ <a href="ntqfile.html">TQFile</a> file( libFilename-&gt;text() );
+ if ( file.<a href="ntqfile.html#open">open</a>( <a href="ntqfile.html#open">IO_ReadWrite</a> ) ) {
+ TQApplication::<a href="ntqapplication.html#setOverrideCursor">setOverrideCursor</a>( WaitCursor );
// instead of reading in the entire file, do the search in chunks
char data[60000];
ulong offset = 0;
- while ( ! file.<a href="qfile.html#atEnd">atEnd</a>() &amp;&amp; completed &lt; total_steps ) {
- TQApplication::<a href="qapplication.html#eventLoop">eventLoop</a>()-&gt;processEvents( TQEventLoop::ExcludeUserInput );
+ while ( ! file.<a href="ntqfile.html#atEnd">atEnd</a>() &amp;&amp; completed &lt; total_steps ) {
+ TQApplication::<a href="ntqapplication.html#eventLoop">eventLoop</a>()-&gt;processEvents( TQEventLoop::ExcludeUserInput );
- ulong len = file.<a href="qiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
+ ulong len = file.<a href="ntqiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
if ( len &lt; 267 ) {
// not enough room to make any modifications... stop
break;
@@ -394,13 +394,13 @@ void Distributor::accept()
// path... move the file pointer back to just
// before the pattern and continue
offset += where - 11;
- file.<a href="qiodevice.html#at">at</a>( offset );
- len = file.<a href="qiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
+ file.<a href="ntqiodevice.html#at">at</a>( offset );
+ len = file.<a href="ntqiodevice.html#readBlock">readBlock</a>( data, sizeof(data) );
--x; // retry the current step
continue;
}
- <a href="qcstring.html#qstrcpy">qstrcpy</a>( s, steps[x].value );
+ <a href="ntqcstring.html#qstrcpy">qstrcpy</a>( s, steps[x].value );
steps[x].done = TRUE;
++completed;
@@ -410,22 +410,22 @@ void Distributor::accept()
if ( completed != completed_save ) {
// something changed... move file pointer back to
// where the data was read and write the new data
- file.<a href="qiodevice.html#at">at</a>( offset );
-<a name="x2668"></a> file.<a href="qiodevice.html#writeBlock">writeBlock</a>( data, len );
+ file.<a href="ntqiodevice.html#at">at</a>( offset );
+<a name="x2668"></a> file.<a href="ntqiodevice.html#writeBlock">writeBlock</a>( data, len );
}
// move to the new read position
offset += len - 11;
- file.<a href="qiodevice.html#at">at</a>( offset );
+ file.<a href="ntqiodevice.html#at">at</a>( offset );
}
- file.<a href="qfile.html#close">close</a>();
+ file.<a href="ntqfile.html#close">close</a>();
- TQApplication::<a href="qapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>();
+ TQApplication::<a href="ntqapplication.html#restoreOverrideCursor">restoreOverrideCursor</a>();
}
if ( completed != total_steps ) {
- TQMessageBox::<a href="qmessagebox.html#information">information</a>( this,
+ TQMessageBox::<a href="ntqmessagebox.html#information">information</a>( this,
tr("TQt Distribution Wizard"),
tr("&lt;p&gt;&lt;h3&gt;Modifications failed.&lt;/h3&gt;&lt;/p&gt;"
"&lt;p&gt;Please make sure that you have permission "
@@ -434,7 +434,7 @@ void Distributor::accept()
return;
}
-<a name="x2654"></a> TQWizard::<a href="qdialog.html#accept">accept</a>();
+<a name="x2654"></a> TQWizard::<a href="ntqdialog.html#accept">accept</a>();
}
</pre>