Darrell Anderson 12 years ago
commit 992df30f3c

@ -94,7 +94,7 @@
* src/kernel/ntqinputcontext.h
- (identifierName, language): Change return type from QCString to QString
- (addMenusTo): Make Qt3 specific
- (addMenusTo): Make TQt3 specific
* src/kernel/qinputcontext.cpp
- (identifierName):
* Change return type from QCString to QString
@ -126,7 +126,7 @@
defined(Q_WS_X11)
* src/input/qinputcontextinterface_p.h
- Modify a coding style to follow Trolltech's one for Qt3
- Modify a coding style to follow Trolltech's one for TQt3
* src/input/ntqinputcontextplugin.h
- Fix typos in comment
@ -357,7 +357,7 @@
- Add '-im' option to enable immodule feature (default yes).
- Add '-im-ext' option to enable more immodule extensions (default
no). Specify this option 'no' to keep binary compatibility with
standard Qt3
standard TQt3
* src/kernel/qt_x11.pri
- Add conditional QT_NO_IM and QT_NO_IM_EXTENSIONS definition in
@ -489,7 +489,7 @@
2004-08-10 YamaKen <yamaken@bp.iij4u.or.jp>
* plugins/src/inputmethods/simple/qsimpleinputcontext.h
- Follow Trolltech's coding style for Qt3
- Follow Trolltech's coding style for TQt3
- Remove unnecessary headers
- (UNITIZE): Moved from qsimpleinputcontext.cpp. QT_ prefix is not
required since a macro does not pollute symbol space
@ -507,7 +507,7 @@
- Separate composing table definition to composetable.cpp
- Remove unnecessary headers
- Replace 'true' and 'false' with 'TRUE' and 'FALSE' to follow
Trolltech's coding style for Qt3
Trolltech's coding style for TQt3
- Replace _ComposeTableElement with QComposeTableElement to follow
the renaming
- Replace ComposeTable with QComposeTable to follow the renaming
@ -685,7 +685,7 @@
* src/kernel/ntqinputcontext.h
- (QInputContextMenu::Action): New enum
- (menus): Restrict to use with Qt3 only
- (menus): Restrict to use with TQt3 only
- (qt4menus): Remove to replace with actions()
- (actions): New function for Qt4
@ -1315,7 +1315,7 @@
4. Rename QInputContext::name() to identifierName() to avoid
conflicting with QObject::name()
This patch does not break binary compatibility from vanilla Qt3.
This patch does not break binary compatibility from vanilla TQt3.
But it costs immodule developer small modification.
* src/kernel/ntqinputcontext.h

@ -1,5 +1,5 @@
Qt 3.4 is a new feature release. It is not backwards compatible with any
prior Qt3 version due to changes in the QWidget definition.
prior TQt3 version due to changes in the QWidget definition.
****************************************************************************
* General *

@ -10,7 +10,7 @@ General Improvements
- Technical
* Modify TQStyle API to work without requiring direct access to TQt-specific objects
* Modify TQStyle API to work without retquiring direct access to Qt-specific objects
See "TQStyle API Change" section below
TQStyle API Change

@ -105,7 +105,7 @@ General
pluggable popup menu requires #ifdef'ed different code. In addition,
be careful about use of classes that is deprecated in Qt4.
- Our two development tree for Qt3 'Binary Compatible' and 'ALL' have
- Our two development tree for TQt3 'Binary Compatible' and 'ALL' have
been merged into this unified source tree. The source tree is called
'Unified' patch.

31
configure vendored

@ -143,6 +143,8 @@ CFG_USER_BUILD_KEY=
CFG_ACCESSIBILITY=auto
CFG_DLOPEN_OPENGL=no
CFG_ENDIAN=auto
CFG_GLIBMAINLOOP=no
CFG_LIBGLIBMAINLOOP=
D_FLAGS=
I_FLAGS=
L_FLAGS=
@ -224,7 +226,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style yes options
-incremental|-qvfb|-profile|-shared|-static|-sm|-thread|-xinerama|-xshape|-tablet|-pch|-stl|-ipv6|-freetype|-big-codecs|-xcursor|-xrandr|-xrender|-xft|-xkb|-nis|-cups|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-version-script|-dlopen-opengl)
-incremental|-qvfb|-profile|-shared|-static|-sm|-thread|-xinerama|-xshape|-tablet|-pch|-stl|-ipv6|-freetype|-big-codecs|-xcursor|-xrandr|-xrender|-xft|-xkb|-nis|-cups|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-version-script|-dlopen-opengl|-glibmainloop)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
VAL=yes
;;
@ -729,6 +731,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
glibmainloop)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_GLIBMAINLOOP="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
nis)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_NIS="$VAL"
@ -2153,7 +2162,7 @@ Qt/X11 only:
$IXN -no-inputmethod-ext Do not compile more immodule extensions support.
$IXY -inputmethod-ext ... Compile more immodule extensions support.
(breaks ABI with standard Qt3).
(breaks ABI with standard TQt3).
EOF
fi
@ -2626,6 +2635,19 @@ if [ "$CFG_PNG" = "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG no-png"
elif [ "$CFG_PNG" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG png"
fi
if [ "$CFG_GLIBMAINLOOP" = "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG no-glibmainloop"
elif [ "$CFG_GLIBMAINLOOP" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG glibmainloop"
GLIB_CFLAGS="`pkg-config --cflags glib-2.0`"
QMAKE_VARS="$QMAKE_VARS \"QMAKE_CFLAGS_GLIB=$GLIB_CFLAGS\""
GLIB_LINKFLAG="`pkg-config --libs glib-2.0`"
QMAKE_VARS="$QMAKE_VARS \"QMAKE_LIBS_GLIB=$GLIB_LINKFLAG\""
fi
if [ "$CFG_GIF" = "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG no-gif"
@ -3192,6 +3214,11 @@ if [ "$CFG_PNG" = "no" ]; then
else
echo "PNG support ......... $CFG_PNG ($CFG_LIBPNG)"
fi
if [ "$CFG_GLIBMAINLOOP" = "no" ]; then
echo "Glib main loop support ......... $CFG_GLIBMAINLOOP"
else
echo "Glib main loop support ......... $CFG_GLIBMAINLOOP ($CFG_LIBGLIBMAINLOOP)"
fi
echo "zlib support ........ $CFG_ZLIB"
if [ "$PLATFORM_QWS" = "yes" ]; then
echo "Embedded support .... $CFG_EMBEDDED"

@ -127,7 +127,7 @@ public:
<a href="ntqserversocket.html">TQServerSocket</a>( 4242, 1, parent )
{
if ( !ok() ) {
<a href="ntqapplication.html#qWarning">qWarning</a>("Failed to bind to port 4242");
<a href="ntqapplication.html#qWarning">tqWarning</a>("Failed to bind to port 4242");
exit(1);
}
}

@ -59,10 +59,10 @@ option is only valid for the X11 version of TQt.
<a name="2"></a><p> TQt includes three global functions for writing out warning and debug
text.
<ul>
<li> <a href="ntqapplication.html#qDebug">qDebug()</a> for writing debug output for testing etc.
<li> <a href="ntqapplication.html#qWarning">qWarning()</a> for writing warning output when program
<li> <a href="ntqapplication.html#qDebug">tqDebug()</a> for writing debug output for testing etc.
<li> <a href="ntqapplication.html#qWarning">tqWarning()</a> for writing warning output when program
errors occur.
<li> <a href="ntqapplication.html#qFatal">qFatal()</a> for writing fatal error messages
<li> <a href="ntqapplication.html#qFatal">tqFatal()</a> for writing fatal error messages
and exiting.
</ul>
<p> The TQt implementation of these functions prints the text to the <tt>stderr</tt>
@ -141,12 +141,12 @@ define QT_NO_CHECK.
{
#if defined(QT_CHECK_NULL)
if ( p == 0 )
<a href="ntqapplication.html#qWarning">qWarning</a>( "f: Null pointer not allowed" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "f: Null pointer not allowed" );
#endif
#if defined(QT_CHECK_RANGE)
if ( i &lt; 0 )
<a href="ntqapplication.html#qWarning">qWarning</a>( "f: The index cannot be negative" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "f: The index cannot be negative" );
#endif
}
</pre>

@ -176,7 +176,7 @@ static char *find_pattern( char *h, const char *n, ulong hlen )
if ( nlen &gt; hlen )
return 0;
} while ( <a href="ntqcstring.html#qstrncmp">qstrncmp</a>( h, n, nlen ) != 0 );
} while ( <a href="ntqcstring.html#qstrncmp">tqstrncmp</a>( h, n, nlen ) != 0 );
return h + nlen;
}

@ -319,7 +319,7 @@ void MyWidget::dragMoveEvent(TQDragMoveEvent* event)
feedback as the drag progresses, to start timers, to scroll the
window, or whatever is appropriate (don't forget to stop the scrolling
and timers in a dragLeaveEvent() though).
<p> The <a href="ntqapplication.html">TQApplication</a> object (available as the <tt>qApp</tt> global) also
<p> The <a href="ntqapplication.html">TQApplication</a> object (available as the <tt>tqApp</tt> global) also
provides some drag and drop related functions:
<a href="ntqapplication.html#setStartDragTime">TQApplication::setStartDragTime</a>(),
<a href="ntqapplication.html#setStartDragDistance">TQApplication::setStartDragDistance</a>(), and their corresponding

@ -689,7 +689,7 @@ TQtFileIconViewItem::~TQtFileIconViewItem()
: <a href="ntqiconview.html">TQIconView</a>( parent, name ), viewDir( dir ), newFolderNum( 0 )
{
if ( !iconFolderLockedLarge ) {
<a href="ntqapplication.html#qAddPostRoutine">qAddPostRoutine</a>( cleanup );
<a href="ntqapplication.html#qAddPostRoutine">tqAddPostRoutine</a>( cleanup );
<a href="ntqwmatrix.html">TQWMatrix</a> m;
<a name="x876"></a> m.<a href="ntqwmatrix.html#scale">scale</a>( 0.6, 0.6 );
<a href="ntqpixmap.html">TQPixmap</a> iconpix( folder_locked_icon );

@ -2078,43 +2078,43 @@ packImage:
<a href="ntqpointarray.html#putPoints">TQPointArray</a><li>putch:
<a href="ntqfile.html#putch">TQFile</a> <a href="ntqiodevice.html#putch">TQIODevice</a> <a href="ntqsocket.html#putch">TQSocket</a><li><a name="q"></a>
tqAddPostRoutine:
<a href="ntqapplication.html#qAddPostRoutine">TQApplication</a><li>qAlpha:
<a href="ntqcolor.html#qAlpha">TQColor</a><li>qBlue:
<a href="ntqcolor.html#qBlue">TQColor</a><li>qChecksum:
<a href="ntqmemarray.html#qChecksum">TQMemArray</a><li>qCompress:
<a href="qbytearray.html#qCompress">TQByteArray</a><li>qDebug:
<a href="ntqapplication.html#qAddPostRoutine">TQApplication</a><li>tqAlpha:
<a href="ntqcolor.html#qAlpha">TQColor</a><li>tqBlue:
<a href="ntqcolor.html#qBlue">TQColor</a><li>tqChecksum:
<a href="ntqmemarray.html#qChecksum">TQMemArray</a><li>tqCompress:
<a href="qbytearray.html#qCompress">TQByteArray</a><li>tqDebug:
<a href="ntqapplication.html#qDebug">TQApplication</a><li>qDrawPlainRect:
<a href="ntqpainter.html#qDrawPlainRect">TQPainter</a><li>qDrawShadeLine:
<a href="ntqpainter.html#qDrawShadeLine">TQPainter</a><li>qDrawShadePanel:
<a href="ntqpainter.html#qDrawShadePanel">TQPainter</a><li>qDrawShadeRect:
<a href="ntqpainter.html#qDrawShadeRect">TQPainter</a><li>qDrawWinButton:
<a href="ntqpainter.html#qDrawWinButton">TQPainter</a><li>qDrawWinPanel:
<a href="ntqpainter.html#qDrawWinPanel">TQPainter</a><li>qFatal:
<a href="ntqapplication.html#qFatal">TQApplication</a><li>qGray:
<a href="ntqcolor.html#qGray">TQColor</a><li>qGreen:
<a href="ntqcolor.html#qGreen">TQColor</a><li>qInitNetworkProtocols:
<a href="ntqpainter.html#qDrawWinPanel">TQPainter</a><li>tqFatal:
<a href="ntqapplication.html#qFatal">TQApplication</a><li>tqGray:
<a href="ntqcolor.html#qGray">TQColor</a><li>tqGreen:
<a href="ntqcolor.html#qGreen">TQColor</a><li>tqInitNetworkProtocols:
<a href="ntqurloperator.html#qInitNetworkProtocols">TQUrlOperator</a><li>qInstallMsgHandler:
<a href="ntqapplication.html#qInstallMsgHandler">TQApplication</a><li>qMakePair:
<a href="ntqpair.html#qMakePair">TQPair</a><li>qName:
<a href="qxmlattributes.html#qName">TQXmlAttributes</a><li>qRed:
<a href="ntqcolor.html#qRed">TQColor</a><li>qRgb:
<a href="ntqcolor.html#qRgb">TQColor</a><li>qRgba:
<a href="ntqcolor.html#qRgba">TQColor</a><li>qSysInfo:
<a href="ntqapplication.html#qSysInfo">TQApplication</a><li>qSystemWarning:
<a href="ntqapplication.html#qSystemWarning">TQApplication</a><li>qUncompress:
<a href="qbytearray.html#qUncompress">TQByteArray</a><li>qVersion:
<a href="ntqapplication.html#qVersion">TQApplication</a><li>qWarning:
<a href="qxmlattributes.html#qName">TQXmlAttributes</a><li>tqRed:
<a href="ntqcolor.html#qRed">TQColor</a><li>tqRgb:
<a href="ntqcolor.html#qRgb">TQColor</a><li>tqRgba:
<a href="ntqcolor.html#qRgba">TQColor</a><li>tqSysInfo:
<a href="ntqapplication.html#qSysInfo">TQApplication</a><li>tqSystemWarning:
<a href="ntqapplication.html#qSystemWarning">TQApplication</a><li>tqUncompress:
<a href="qbytearray.html#qUncompress">TQByteArray</a><li>tqVersion:
<a href="ntqapplication.html#qVersion">TQApplication</a><li>tqWarning:
<a href="ntqapplication.html#qWarning">TQApplication</a><li>qglClearColor:
<a href="qglwidget.html#qglClearColor">TQGLWidget</a><li>qglColor:
<a href="qglwidget.html#qglColor">TQGLWidget</a><li>qmemmove:
<a href="qglwidget.html#qglColor">TQGLWidget</a><li>tqmemmove:
<a href="ntqcstring.html#qmemmove">TQCString</a><li>qstrcmp:
<a href="ntqcstring.html#qstrcmp">TQCString</a><li>qstrcpy:
<a href="ntqcstring.html#qstrcpy">TQCString</a><li>qstrdup:
<a href="ntqcstring.html#qstrdup">TQCString</a><li>qstricmp:
<a href="ntqcstring.html#qstricmp">TQCString</a><li>qstrlen:
<a href="ntqcstring.html#qstrlen">TQCString</a><li>qstrncmp:
<a href="ntqcstring.html#qstrncmp">TQCString</a><li>qstrncpy:
<a href="ntqcstring.html#qstrncpy">TQCString</a><li>qstrnicmp:
<a href="ntqcstring.html#qstrcpy">TQCString</a><li>tqstrdup:
<a href="ntqcstring.html#qstrdup">TQCString</a><li>tqstricmp:
<a href="ntqcstring.html#qstricmp">TQCString</a><li>tqstrlen:
<a href="ntqcstring.html#qstrlen">TQCString</a><li>tqstrncmp:
<a href="ntqcstring.html#qstrncmp">TQCString</a><li>tqstrncpy:
<a href="ntqcstring.html#qstrncpy">TQCString</a><li>tqstrnicmp:
<a href="ntqcstring.html#qstrnicmp">TQCString</a><li>qtHandler:
<a href="ntqerrormessage.html#qtHandler">TQErrorMessage</a><li>tqt_find_obj_child:
<a href="ntqobject.html#qt_find_obj_child">TQObject</a><li>qualifiedNames:

@ -232,7 +232,7 @@ Graph::~Graph()
void Graph::<a href="ntqwidget.html#setStyle">setStyle</a>(const char* stext)
{
for ( Style s = Pie; styleName[s]; s = Style(s+1) ) {
if ( <a href="ntqcstring.html#qstricmp">qstricmp</a>(stext,styleName[s])==0 ) {
if ( <a href="ntqcstring.html#qstricmp">tqstricmp</a>(stext,styleName[s])==0 ) {
<a href="ntqwidget.html#setStyle">setStyle</a>(s);
return;
}

@ -69,7 +69,7 @@ public:
<a href="ntqserversocket.html">TQServerSocket</a>(8080,1,parent)
{
if ( !ok() ) {
<a href="ntqapplication.html#qWarning">qWarning</a>("Failed to bind to port 8080");
<a href="ntqapplication.html#qWarning">tqWarning</a>("Failed to bind to port 8080");
exit( 1 );
}
}

@ -289,8 +289,8 @@ example:
<a href="ntqstring.html">TQString</a> s1 = "%1 of %2 files copied. Copying: %3";
<a href="ntqstring.html">TQString</a> s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert.";
<a href="ntqapplication.html#qDebug">qDebug</a>( s1.<a href="ntqstring.html#arg">arg</a>(5).arg(10).arg("somefile.txt").ascii() );
<a href="ntqapplication.html#qDebug">qDebug</a>( s2.<a href="ntqstring.html#arg">arg</a>(5).arg(10).arg("somefile.txt").ascii() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( s1.<a href="ntqstring.html#arg">arg</a>(5).arg(10).arg("somefile.txt").ascii() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( s2.<a href="ntqstring.html#arg">arg</a>(5).arg(10).arg("somefile.txt").ascii() );
</pre>
<p> produces the correct output in English and Norwegian:

@ -67,18 +67,18 @@ public:
public slots:
void dropped( <a href="qdropevent.html">TQDropEvent</a> *mime ) {
<a href="ntqapplication.html#qDebug">qDebug</a>( "Dropped Mimesource %p into the view %p", mime, view );
<a href="ntqapplication.html#qDebug">qDebug</a>( " Formats:" );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Dropped Mimesource %p into the view %p", mime, view );
<a href="ntqapplication.html#qDebug">tqDebug</a>( " Formats:" );
int i = 0;
<a name="x1454"></a> const char *str = mime-&gt;<a href="qdropevent.html#format">format</a>( i );
<a href="ntqapplication.html#qDebug">qDebug</a>( " %s", str );
<a href="ntqapplication.html#qDebug">tqDebug</a>( " %s", str );
while ( str ) {
<a href="ntqapplication.html#qDebug">qDebug</a>( " %s", str );
<a href="ntqapplication.html#qDebug">tqDebug</a>( " %s", str );
str = mime-&gt;<a href="qdropevent.html#format">format</a>( ++i );
}
};
void moved() {
<a href="ntqapplication.html#qDebug">qDebug</a>( "All selected items were moved to another widget" );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "All selected items were moved to another widget" );
}
protected:

@ -255,7 +255,7 @@ void <a name="f521"></a>LifeWidget::nextGeneration()
void usage()
{
<a href="ntqapplication.html#qWarning">qWarning</a>( "Usage: life [-scale scale]" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Usage: life [-scale scale]" );
}
int main( int argc, char **argv )

@ -204,7 +204,7 @@ do this:
kCFURLPOSIXPathStyle);
const char *pathPtr = CFStringGetCStringPtr(macPath,
CFStringGetSystemEncoding());
<a href="ntqapplication.html#qDebug">qDebug</a>("Path = %s", pathPtr);
<a href="ntqapplication.html#qDebug">tqDebug</a>("Path = %s", pathPtr);
CFRelease(pluginRef);
CFRelease(macPath);
</pre>

@ -51,12 +51,12 @@ us support for most of the written languages around the world. Our <tt>Page</tt
<p> <pre></pre>
<p> All functions that use the <tt>Page</tt> and <tt>Options</tt> structs need to be
updated to use TQString properly. Since TQString is also an <a href="shclass.html#implicitly-shared">implicitly shared</a> class, we no longer have to do any memory management with our
strings. We can remove all occurences of the <a href="ntqcstring.html#qstrdup">qstrdup</a>() function,
strings. We can remove all occurences of the <a href="ntqcstring.html#qstrdup">tqstrdup</a>() function,
and we never need to use <em>new</em> or <em>delete</em> when done with a string.
TQString will allocate and delete data when needed.
<p> Here are the <tt>MainWindow::fileOpen()</tt> and <tt>MainWindow::pageChange()</tt>
functions from <tt>mainwindow.ui.h</tt>. Notice that the code no longer
uses <em>delete</em> or <a href="ntqcstring.html#qstrdup">qstrdup</a>() when storing text.
uses <em>delete</em> or <a href="ntqcstring.html#qstrdup">tqstrdup</a>() when storing text.
<p>
<p> <pre></pre>

@ -82,7 +82,7 @@ contents of <tt>DoEditPage()</tt> to this point and remove the <tt>DoEditPage()<
arrays. Since the PageEditDialog and the data it contains will be
destroyed when we return from this function, we need to convert the
unicode <a href="ntqstring.html">TQString</a> data into a <a href="ntqcstring.html">TQCString</a> in the local encoding and
duplicate it with <a href="ntqcstring.html#qstrdup">qstrdup</a>().
duplicate it with <a href="ntqcstring.html#qstrdup">tqstrdup</a>().
<p> <pre></pre>
<p> The same process must be done for the minorTab text:
<p> <pre></pre>

@ -95,13 +95,13 @@ use <em>new</em> and <em>delete</em> when modifying members of the <tt>Page</tt>
<p>
<pre></pre>
<p> When storing the context of the <tt>XmText</tt> widget, we use <a href="ntqcstring.html#qstrdup">qstrdup</a>()
<p> When storing the context of the <tt>XmText</tt> widget, we use <a href="ntqcstring.html#qstrdup">tqstrdup</a>()
to make a copy of the string returned by the <tt>XmTextGetString()</tt>
function.
<p> <pre></pre>
<p> The <tt>ReadDB()</tt> function in <tt>io.cpp</tt> needs similar changes. We
replace all use of <tt>XtMalloc()</tt> and <tt>XtNewString()</tt> with <em>new</em> and
<a href="ntqcstring.html#qstrdup">qstrdup</a>(), respectively.
<a href="ntqcstring.html#qstrdup">tqstrdup</a>(), respectively.
<p> This needs to be done just after opening the file.
<p>

@ -127,7 +127,7 @@ number (with an indication that the page is invalid).
the new widgets in our <em>Main Window</em> widget.
<p> Note: <a href="ntqtextedit.html#text">TQTextEdit::text</a>() returns a <a href="ntqstring.html">TQString</a>, which needs to be converted
into a normal <tt>char*</tt> array. To do this we create a copy of the
string in the local encoding. We need to make the copy using <a href="ntqcstring.html#qstrdup">qstrdup</a>() because the data contained in the <a href="ntqcstring.html">TQCString</a> returned by
string in the local encoding. We need to make the copy using <a href="ntqcstring.html#qstrdup">tqstrdup</a>() because the data contained in the <a href="ntqcstring.html">TQCString</a> returned by
<a href="ntqstring.html#local8Bit">TQString::local8Bit</a>() is deallocated when the TQCString is destroyed.
<p> <pre></pre>
<p> The <tt>TextChanged()</tt> function does nothing more than set the <tt>modified</tt> variable to 1. Our new <tt>MainWindow::textChanged()</tt> function
@ -163,7 +163,7 @@ values.
currently displayed, so we use <a href="ntqtextedit.html#text">TQTextEdit::text</a>() instead of <tt>XmTextGetString()</tt>. Note: TQTextEdit::text() returns a <a href="ntqstring.html">TQString</a>, which
needs to be converted into a normal <tt>char*</tt> array. To do this we
create a copy of the string in the local encoding. We need to make
the copy using <a href="ntqcstring.html#qstrdup">qstrdup</a>() because the data contained in the <a href="ntqcstring.html">TQCString</a>
the copy using <a href="ntqcstring.html#qstrdup">tqstrdup</a>() because the data contained in the <a href="ntqcstring.html">TQCString</a>
returned by <a href="ntqstring.html#local8Bit">TQString::local8Bit</a>() is deallocated when the TQCString is
destroyed.
<p> <pre></pre>

@ -129,9 +129,9 @@ void MyClass::slotOperationFinished( <a href="qnetworkoperation.html">TQNetworkO
switch ( op-&gt;<a href="qnetworkoperation.html#operation">operation</a>() ) {
case TQNetworkProtocol::OpMkDir:
if ( op-&gt;<a href="qnetworkoperation.html#state">state</a>() == TQNetworkProtocol::StFailed )
<a href="ntqapplication.html#qDebug">qDebug</a>( "Couldn't create directory %s", op-&gt;<a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Couldn't create directory %s", op-&gt;<a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() );
else
<a href="ntqapplication.html#qDebug">qDebug</a>( "Successfully created directory %s", op-&gt;<a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Successfully created directory %s", op-&gt;<a href="qnetworkoperation.html#arg">arg</a>( 0 ).latin1() );
break;
// ... and so on
}
@ -159,24 +159,24 @@ void MyClass::slotInsertEntries( const <a href="ntqvaluelist.html">TQValueList</
TQValueList&lt;TQUrlInfo&gt;::ConstIterator it = info.<a href="ntqvaluelist.html#begin">begin</a>();
for ( ; it != info.<a href="ntqvaluelist.html#end">end</a>(); ++it ) {
const <a href="ntqurlinfo.html">TQUrlInfo</a> &amp;inf = *it;
<a href="ntqapplication.html#qDebug">qDebug</a>( "Name: %s, Size: %d, Last Modified: %s",
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Name: %s, Size: %d, Last Modified: %s",
inf.<a href="ntqurlinfo.html#name">name</a>().latin1(), inf.<a href="ntqurlinfo.html#size">size</a>(), inf.<a href="ntqurlinfo.html#lastModified">lastModified</a>().toString().latin1() );
}
}
void MyClass::slotStart( <a href="qnetworkoperation.html">TQNetworkOperation</a> * )
{
<a href="ntqapplication.html#qDebug">qDebug</a>( "Start reading '%s'", op.toString().latin1() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Start reading '%s'", op.toString().latin1() );
}
void MyClass::slotFinished( <a href="qnetworkoperation.html">TQNetworkOperation</a> *operation )
{
if ( operation-&gt;<a href="qnetworkoperation.html#operation">operation</a>() == TQNetworkProtocol::OpListChildren ) {
if ( operation-&gt;<a href="qnetworkoperation.html#state">state</a>() == TQNetworkProtocol::StFailed )
<a href="ntqapplication.html#qDebug">qDebug</a>( "Couldn't read '%s'! Following error occurred: %s",
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Couldn't read '%s'! Following error occurred: %s",
op.toString().latin1(), operation-&gt;<a href="qnetworkoperation.html#protocolDetail">protocolDetail</a>().latin1() );
else
<a href="ntqapplication.html#qDebug">qDebug</a>( "Finished reading '%s'!", op.toString().latin1() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Finished reading '%s'!", op.toString().latin1() );
}
}

@ -170,13 +170,13 @@ flow and main settings.
</ul>
<h2>Related Functions</h2>
<ul>
<li class=fn>void <a href="#qAddPostRoutine"><b>qAddPostRoutine</b></a> ( TQtCleanUpFunction&nbsp;p )</li>
<li class=fn>const char * <a href="#qVersion"><b>qVersion</b></a> ()</li>
<li class=fn>bool <a href="#qSysInfo"><b>qSysInfo</b></a> ( int&nbsp;*&nbsp;wordSize, bool&nbsp;*&nbsp;bigEndian )</li>
<li class=fn>void <a href="#qDebug"><b>qDebug</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, ... )</li>
<li class=fn>void <a href="#qWarning"><b>qWarning</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, ... )</li>
<li class=fn>void <a href="#qFatal"><b>qFatal</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, ... )</li>
<li class=fn>void <a href="#qSystemWarning"><b>qSystemWarning</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, int&nbsp;code )</li>
<li class=fn>void <a href="#qAddPostRoutine"><b>tqAddPostRoutine</b></a> ( TQtCleanUpFunction&nbsp;p )</li>
<li class=fn>const char * <a href="#qVersion"><b>tqVersion</b></a> ()</li>
<li class=fn>bool <a href="#qSysInfo"><b>tqSysInfo</b></a> ( int&nbsp;*&nbsp;wordSize, bool&nbsp;*&nbsp;bigEndian )</li>
<li class=fn>void <a href="#qDebug"><b>tqDebug</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, ... )</li>
<li class=fn>void <a href="#qWarning"><b>tqWarning</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, ... )</li>
<li class=fn>void <a href="#qFatal"><b>tqFatal</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, ... )</li>
<li class=fn>void <a href="#qSystemWarning"><b>tqSystemWarning</b></a> ( const&nbsp;char&nbsp;*&nbsp;msg, int&nbsp;code )</li>
<li class=fn>void <a href="#Q_ASSERT"><b>Q_ASSERT</b></a> ( bool&nbsp;test )</li>
<li class=fn>void <a href="#TQ_CHECK_PTR"><b>TQ_CHECK_PTR</b></a> ( void&nbsp;*&nbsp;p )</li>
<li class=fn>TQtMsgHandler <a href="#qInstallMsgHandler"><b>qInstallMsgHandler</b></a> ( TQtMsgHandler&nbsp;h )</li>
@ -196,7 +196,7 @@ application-wide settings.
<p> For any GUI application that uses TQt, there is precisely one
TQApplication object, no matter whether the application has 0, 1, 2
or more windows at any time.
<p> The TQApplication object is accessible through the global pointer <tt>qApp</tt>. Its main areas of responsibility are:
<p> The TQApplication object is accessible through the global pointer <tt>tqApp</tt>. Its main areas of responsibility are:
<ul>
<p> <li> It initializes the application with the user's desktop settings
such as <a href="#palette">palette</a>(), <a href="#font">font</a>() and <a href="#doubleClickInterval">doubleClickInterval</a>(). It keeps track
@ -390,13 +390,13 @@ arguments to <a href="#translate">translate</a>():
</h3>
Initializes the window system and constructs an application object
with <em>argc</em> command line arguments in <em>argv</em>.
<p> The global <tt>qApp</tt> pointer refers to this application object. Only
<p> The global <tt>tqApp</tt> pointer refers to this application object. Only
one application object should be created.
<p> This application object must be constructed before any <a href="ntqpaintdevice.html">paint devices</a> (including widgets, pixmaps, bitmaps
etc.).
<p> Note that <em>argc</em> and <em>argv</em> might be changed. TQt removes command
line arguments that it recognizes. The modified <em>argc</em> and <em>argv</em>
can also be accessed later with <tt>qApp-&gt;argc()</tt> and <tt>qApp-&gt;argv()</tt>.
can also be accessed later with <tt>tqApp-&gt;argc()</tt> and <tt>tqApp-&gt;argv()</tt>.
The documentation for <a href="#argv">argv</a>() contains a detailed description of how
to process command line arguments.
<p> TQt debugging options (not available if TQt was compiled with the
@ -517,7 +517,7 @@ bits-per-pixel.
<h3 class=fn><a name="~TQApplication"></a>TQApplication::~TQApplication ()<tt> [virtual]</tt>
</h3>
Cleans up any window system resources that were allocated by this
application. Sets the global variable <tt>qApp</tt> to 0.
application. Sets the global variable <tt>tqApp</tt> to 0.
<h3 class=fn>void <a name="aboutTQt"></a>TQApplication::aboutTQt ()<tt> [slot]</tt>
</h3>
@ -672,7 +672,7 @@ and a few more options.
<p> If you run <tt>showargs -display unix:0 -font 9x15bold hello world</tt>
under X11, the list box contains the three strings "showargs",
"hello" and "world".
<p> TQt provides a global pointer, <tt>qApp</tt>, that points to the
<p> TQt provides a global pointer, <tt>tqApp</tt>, that points to the
TQApplication object, and through which you can access <a href="#argc">argc</a>() and
<a href="#argv">argv</a>() in functions other than main().
<p> <p>See also <a href="#argc">argc</a>() and <a href="#TQApplication">TQApplication::TQApplication</a>().
@ -1801,12 +1801,12 @@ line number if <em>test</em> is FALSE.
</pre>
<p> If <tt>b</tt> is zero, the Q_ASSERT statement will output the following
message using the <a href="#qWarning">qWarning</a>() function:
message using the <a href="#qWarning">tqWarning</a>() function:
<pre>
ASSERT: "b != 0" in div.cpp (9)
</pre>
<p> <p>See also <a href="#qWarning">qWarning</a>() and <a href="debug.html">Debugging</a>.
<p> <p>See also <a href="#qWarning">tqWarning</a>() and <a href="debug.html">Debugging</a>.
<h3 class=fn>void <a name="TQ_CHECK_PTR"></a>TQ_CHECK_PTR ( void&nbsp;*&nbsp;p )
</h3>
@ -1825,9 +1825,9 @@ name and line number, saying that the program ran out of memory.
<a href="#TQ_CHECK_PTR">TQ_CHECK_PTR</a>( a );
</pre>
<p> <p>See also <a href="#qWarning">qWarning</a>() and <a href="debug.html">Debugging</a>.
<p> <p>See also <a href="#qWarning">tqWarning</a>() and <a href="debug.html">Debugging</a>.
<h3 class=fn>void <a name="qAddPostRoutine"></a>qAddPostRoutine ( TQtCleanUpFunction&nbsp;p )
<h3 class=fn>void <a name="qAddPostRoutine"></a>tqAddPostRoutine ( TQtCleanUpFunction&nbsp;p )
</h3>
<p> Adds a global routine that will be called from the TQApplication
@ -1847,12 +1847,12 @@ nothing, like this:
void init_ptr()
{
global_ptr = new int[100]; // allocate data
<a href="#qAddPostRoutine">qAddPostRoutine</a>( cleanup_ptr ); // delete later
<a href="#qAddPostRoutine">tqAddPostRoutine</a>( cleanup_ptr ); // delete later
}
</pre>
<p> Note that for an application- or module-wide cleanup,
<a href="#qAddPostRoutine">qAddPostRoutine</a>() is often not suitable. People have a tendency to
<a href="#qAddPostRoutine">tqAddPostRoutine</a>() is often not suitable. People have a tendency to
make such modules dynamically loaded, and then unload those modules
long before the TQApplication destructor is called, for example.
<p> For modules and libraries, using a reference-counted initialization
@ -1883,7 +1883,7 @@ to call a cleanup function at the right time:
<p> By selecting the right parent widget/object, this can often be made
to clean up the module's data at the exact right moment.
<h3 class=fn>void <a name="qDebug"></a>qDebug ( const&nbsp;char&nbsp;*&nbsp;msg, ... )
<h3 class=fn>void <a name="qDebug"></a>tqDebug ( const&nbsp;char&nbsp;*&nbsp;msg, ... )
</h3>
<p>
@ -1893,7 +1893,7 @@ has been installed).
similar to the C printf() function.
<p> Example:
<pre>
<a href="#qDebug">qDebug</a>( "my window handle = %x", myWidget-&gt;id() );
<a href="#qDebug">tqDebug</a>( "my window handle = %x", myWidget-&gt;id() );
</pre>
<p> Under X11, the text is printed to stderr. Under Windows, the text
@ -1902,9 +1902,9 @@ is sent to the debugger.
the '&#92;0'-terminator).
<p> <b>Warning:</b> Passing (const char *)0 as argument to tqDebug might lead
to crashes on certain platforms due to the platforms printf implementation.
<p> <p>See also <a href="#qWarning">qWarning</a>(), <a href="#qFatal">qFatal</a>(), <a href="#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging</a>.
<p> <p>See also <a href="#qWarning">tqWarning</a>(), <a href="#qFatal">tqFatal</a>(), <a href="#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging</a>.
<h3 class=fn>void <a name="qFatal"></a>qFatal ( const&nbsp;char&nbsp;*&nbsp;msg, ... )
<h3 class=fn>void <a name="qFatal"></a>tqFatal ( const&nbsp;char&nbsp;*&nbsp;msg, ... )
</h3>
<p>
@ -1917,7 +1917,7 @@ similar to the C printf() function.
int divide( int a, int b )
{
if ( b == 0 ) // program error
<a href="#qFatal">qFatal</a>( "divide: cannot divide by zero" );
<a href="#qFatal">tqFatal</a>( "divide: cannot divide by zero" );
return a/b;
}
</pre>
@ -1928,7 +1928,7 @@ is sent to the debugger.
the '&#92;0'-terminator).
<p> <b>Warning:</b> Passing (const char *)0 as argument to tqFatal might lead
to crashes on certain platforms due to the platforms printf implementation.
<p> <p>See also <a href="#qDebug">qDebug</a>(), <a href="#qWarning">qWarning</a>(), <a href="#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging</a>.
<p> <p>See also <a href="#qDebug">tqDebug</a>(), <a href="#qWarning">tqWarning</a>(), <a href="#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging</a>.
<h3 class=fn>TQtMsgHandler <a name="qInstallMsgHandler"></a>qInstallMsgHandler ( TQtMsgHandler&nbsp;h )
</h3>
@ -1977,19 +1977,19 @@ done on an application-wide basis to control debug output.
}
</pre>
<p> <p>See also <a href="#qDebug">qDebug</a>(), <a href="#qWarning">qWarning</a>(), <a href="#qFatal">qFatal</a>(), and <a href="debug.html">Debugging</a>.
<p> <p>See also <a href="#qDebug">tqDebug</a>(), <a href="#qWarning">tqWarning</a>(), <a href="#qFatal">tqFatal</a>(), and <a href="debug.html">Debugging</a>.
<h3 class=fn>bool <a name="qSysInfo"></a>qSysInfo ( int&nbsp;*&nbsp;wordSize, bool&nbsp;*&nbsp;bigEndian )
<h3 class=fn>bool <a name="qSysInfo"></a>tqSysInfo ( int&nbsp;*&nbsp;wordSize, bool&nbsp;*&nbsp;bigEndian )
</h3>
<p> Obtains information about the system.
<p> The system's word size in bits (typically 32) is returned in <em>*wordSize</em>. The <em>*bigEndian</em> is set to TRUE if this is a big-endian
machine, or to FALSE if this is a little-endian machine.
<p> In debug mode, this function calls <a href="#qFatal">qFatal</a>() with a message if the
<p> In debug mode, this function calls <a href="#qFatal">tqFatal</a>() with a message if the
computer is truly weird (i.e. different endianness for 16 bit and
32 bit integers); in release mode it returns FALSE.
<h3 class=fn>void <a name="qSystemWarning"></a>qSystemWarning ( const&nbsp;char&nbsp;*&nbsp;msg, int&nbsp;code )
<h3 class=fn>void <a name="qSystemWarning"></a>tqSystemWarning ( const&nbsp;char&nbsp;*&nbsp;msg, int&nbsp;code )
</h3>
<p> Prints the message <em>msg</em> and uses <em>code</em> to get a system specific
@ -1999,7 +1999,7 @@ failures in platform specific API calls.
<p> This function does nothing when TQt is built with <tt>QT_NO_DEBUG</tt>
defined.
<h3 class=fn>const char * <a name="qVersion"></a>qVersion ()
<h3 class=fn>const char * <a name="qVersion"></a>tqVersion ()
</h3>
<p> Returns the TQt version number as a string, for example, "2.3.0" or
@ -2008,7 +2008,7 @@ defined.
0xmmiibb (m = major, i = minor, b = bugfix). For example, TQt
3.0.5's <tt>TQT_VERSION</tt> is 0x030005.
<h3 class=fn>void <a name="qWarning"></a>qWarning ( const&nbsp;char&nbsp;*&nbsp;msg, ... )
<h3 class=fn>void <a name="qWarning"></a>tqWarning ( const&nbsp;char&nbsp;*&nbsp;msg, ... )
</h3>
<p>
@ -2021,7 +2021,7 @@ similar to the C printf() function.
void f( int c )
{
if ( c &gt; 200 )
<a href="#qWarning">qWarning</a>( "f: bad argument, c == %d", c );
<a href="#qWarning">tqWarning</a>( "f: bad argument, c == %d", c );
}
</pre>
@ -2031,7 +2031,7 @@ is sent to the debugger.
the '&#92;0'-terminator).
<p> <b>Warning:</b> Passing (const char *)0 as argument to tqWarning might lead
to crashes on certain platforms due to the platforms printf implementation.
<p> <p>See also <a href="#qDebug">qDebug</a>(), <a href="#qFatal">qFatal</a>(), <a href="#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging</a>.
<p> <p>See also <a href="#qDebug">tqDebug</a>(), <a href="#qFatal">tqFatal</a>(), <a href="#qInstallMsgHandler">qInstallMsgHandler</a>(), and <a href="debug.html">Debugging</a>.
<!-- eof -->
<hr><p>

@ -217,7 +217,7 @@ This should be a bit bigger than <a href="#count">count</a>() is likely to be.
</h3>
<p> A debug-only utility function. Prints out cache usage, hit/miss,
and distribution information using <a href="ntqapplication.html#qDebug">qDebug</a>(). This function does
and distribution information using <a href="ntqapplication.html#qDebug">tqDebug</a>(). This function does
nothing in the release library.
<h3 class=fn>type * <a name="take"></a>TQAsciiCache::take ( const&nbsp;char&nbsp;*&nbsp;k )

@ -290,7 +290,7 @@ constructor).
</h3>
<p> Debugging-only function that prints out the dictionary
distribution using <a href="ntqapplication.html#qDebug">qDebug</a>().
distribution using <a href="ntqapplication.html#qDebug">tqDebug</a>().
<h3 class=fn>type * <a name="take"></a>TQAsciiDict::take ( const&nbsp;char&nbsp;*&nbsp;key )
</h3>

@ -244,7 +244,7 @@ This should be a bit bigger than <a href="#count">count</a>() is likely to be.
</h3>
<p> A debug-only utility function. Prints out cache usage, hit/miss,
and distribution information using <a href="ntqapplication.html#qDebug">qDebug</a>(). This function does
and distribution information using <a href="ntqapplication.html#qDebug">tqDebug</a>(). This function does
nothing in the release library.
<h3 class=fn>type * <a name="take"></a>TQCache::take ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;k )

@ -91,7 +91,7 @@ access it using <a href="ntqapplication.html#clipboard">TQApplication::clipboard
// Copy text from the clipboard (paste)
<a href="ntqstring.html">TQString</a> text = cb-&gt;<a href="#text">text</a>(TQClipboard::<a href="#Mode-enum">Clipboard</a>);
if ( !text.<a href="ntqstring.html#isNull">isNull</a>() )
<a href="ntqapplication.html#qDebug">qDebug</a>( "The clipboard contains: " + text );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "The clipboard contains: " + text );
// Copy text into the clipboard
cb-&gt;<a href="#setText">setText</a>( "This text can be pasted by other programs",

@ -85,14 +85,14 @@ body { background: #ffffff; color: black; }
<ul>
<li class=fn>TQDataStream &amp; <a href="#operator-lt-lt"><b>operator&lt;&lt;</b></a> ( TQDataStream&nbsp;&amp;&nbsp;s, const&nbsp;TQColor&nbsp;&amp;&nbsp;c )</li>
<li class=fn>TQDataStream &amp; <a href="#operator-gt-gt"><b>operator&gt;&gt;</b></a> ( TQDataStream&nbsp;&amp;&nbsp;s, TQColor&nbsp;&amp;&nbsp;c )</li>
<li class=fn>int <a href="#qRed"><b>qRed</b></a> ( TQRgb&nbsp;rgb )</li>
<li class=fn>int <a href="#qGreen"><b>qGreen</b></a> ( TQRgb&nbsp;rgb )</li>
<li class=fn>int <a href="#qBlue"><b>qBlue</b></a> ( TQRgb&nbsp;rgb )</li>
<li class=fn>int <a href="#qAlpha"><b>qAlpha</b></a> ( TQRgb&nbsp;rgba )</li>
<li class=fn>TQRgb <a href="#qRgb"><b>qRgb</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li>
<li class=fn>TQRgb <a href="#qRgba"><b>qRgba</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b, int&nbsp;a )</li>
<li class=fn>int <a href="#qGray"><b>qGray</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li>
<li class=fn>int <a href="#qGray-2"><b>qGray</b></a> ( tqRgb&nbsp;rgb )</li>
<li class=fn>int <a href="#qRed"><b>tqRed</b></a> ( TQRgb&nbsp;rgb )</li>
<li class=fn>int <a href="#qGreen"><b>tqGreen</b></a> ( TQRgb&nbsp;rgb )</li>
<li class=fn>int <a href="#qBlue"><b>tqBlue</b></a> ( TQRgb&nbsp;rgb )</li>
<li class=fn>int <a href="#qAlpha"><b>tqAlpha</b></a> ( TQRgb&nbsp;rgba )</li>
<li class=fn>TQRgb <a href="#qRgb"><b>tqRgb</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li>
<li class=fn>TQRgb <a href="#qRgba"><b>tqRgba</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b, int&nbsp;a )</li>
<li class=fn>int <a href="#qGray"><b>tqGray</b></a> ( int&nbsp;r, int&nbsp;g, int&nbsp;b )</li>
<li class=fn>int <a href="#qGray-2"><b>tqGray</b></a> ( tqRgb&nbsp;rgb )</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
@ -490,7 +490,7 @@ but the value is an arbitrary 32-bit value.
<p> The return type <em>TQRgb</em> is equivalent to <tt>unsigned</tt> <tt>int</tt>.
<p> For an invalid color, the alpha value of the returned color is
unspecified.
<p> <p>See also <a href="#setRgb">setRgb</a>(), <a href="#hsv">hsv</a>(), <a href="#qRed">qRed</a>(), <a href="#qBlue">qBlue</a>(), <a href="#qGreen">qGreen</a>(), and <a href="#isValid">isValid</a>().
<p> <p>See also <a href="#setRgb">setRgb</a>(), <a href="#hsv">hsv</a>(), <a href="#qRed">tqRed</a>(), <a href="#qBlue">tqBlue</a>(), <a href="#qGreen">tqGreen</a>(), and <a href="#isValid">isValid</a>().
<h3 class=fn>void <a name="rgb-2"></a>TQColor::rgb ( int&nbsp;*&nbsp;r, int&nbsp;*&nbsp;g, int&nbsp;*&nbsp;b ) const
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
@ -548,20 +548,20 @@ Writes a color object, <em>c</em> to the stream, <em>s</em>.
Reads a color object, <em>c</em>, from the stream, <em>s</em>.
<p> <p>See also <a href="datastreamformat.html">Format of the TQDataStream operators</a>.
<h3 class=fn>int <a name="qAlpha"></a>qAlpha ( TQRgb&nbsp;rgba )
<h3 class=fn>int <a name="qAlpha"></a>tqAlpha ( TQRgb&nbsp;rgba )
</h3>
<p> Returns the alpha component of the RGBA quadruplet <em>rgba</em>.
<h3 class=fn>int <a name="qBlue"></a>qBlue ( TQRgb&nbsp;rgb )
<h3 class=fn>int <a name="qBlue"></a>tqBlue ( TQRgb&nbsp;rgb )
</h3>
<p> Returns the blue component of the RGB triplet <em>rgb</em>.
<p>See also <a href="#qRgb">qRgb</a>() and <a href="#blue">TQColor::blue</a>().
<p>See also <a href="#qRgb">tqRgb</a>() and <a href="#blue">TQColor::blue</a>().
<h3 class=fn>int <a name="qGray"></a>qGray ( int&nbsp;r, int&nbsp;g, int&nbsp;b )
<h3 class=fn>int <a name="qGray"></a>tqGray ( int&nbsp;r, int&nbsp;g, int&nbsp;b )
</h3>
@ -569,41 +569,41 @@ Reads a color object, <em>c</em>, from the stream, <em>s</em>.
<p> The gray value is calculated using the formula (r*11 + g*16 +
b*5)/32.
<h3 class=fn>int <a name="qGray-2"></a>qGray ( tqRgb&nbsp;rgb )
<h3 class=fn>int <a name="qGray-2"></a>tqGray ( tqRgb&nbsp;rgb )
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p>
<p> Returns a gray value 0..255 from the given <em>rgb</em> colour.
<h3 class=fn>int <a name="qGreen"></a>qGreen ( TQRgb&nbsp;rgb )
<h3 class=fn>int <a name="qGreen"></a>tqGreen ( TQRgb&nbsp;rgb )
</h3>
<p> Returns the green component of the RGB triplet <em>rgb</em>.
<p>See also <a href="#qRgb">qRgb</a>() and <a href="#green">TQColor::green</a>().
<p>See also <a href="#qRgb">tqRgb</a>() and <a href="#green">TQColor::green</a>().
<h3 class=fn>int <a name="qRed"></a>qRed ( TQRgb&nbsp;rgb )
<h3 class=fn>int <a name="qRed"></a>tqRed ( TQRgb&nbsp;rgb )
</h3>
<p> Returns the red component of the RGB triplet <em>rgb</em>.
<p>See also <a href="#qRgb">qRgb</a>() and <a href="#red">TQColor::red</a>().
<p>See also <a href="#qRgb">tqRgb</a>() and <a href="#red">TQColor::red</a>().
<h3 class=fn>TQRgb <a name="qRgb"></a>qRgb ( int&nbsp;r, int&nbsp;g, int&nbsp;b )
<h3 class=fn>TQRgb <a name="qRgb"></a>tqRgb ( int&nbsp;r, int&nbsp;g, int&nbsp;b )
</h3>
<p> Returns the RGB triplet <em>(r,g,b)</em>.
<p> The return type TQRgb is equivalent to <tt>unsigned</tt> <tt>int</tt>.
<p> <p>See also <a href="#qRgba">qRgba</a>(), <a href="#qRed">qRed</a>(), <a href="#qGreen">qGreen</a>(), and <a href="#qBlue">qBlue</a>().
<p> <p>See also <a href="#qRgba">tqRgba</a>(), <a href="#qRed">tqRed</a>(), <a href="#qGreen">tqGreen</a>(), and <a href="#qBlue">tqBlue</a>().
<h3 class=fn>TQRgb <a name="qRgba"></a>qRgba ( int&nbsp;r, int&nbsp;g, int&nbsp;b, int&nbsp;a )
<h3 class=fn>TQRgb <a name="qRgba"></a>tqRgba ( int&nbsp;r, int&nbsp;g, int&nbsp;b, int&nbsp;a )
</h3>
<p> Returns the RGBA quadruplet <em>(r,g,b,a)</em>.
<p> The return type TQRgba is equivalent to <tt>unsigned</tt> <tt>int</tt>.
<p> <p>See also <a href="#qRgb">qRgb</a>(), <a href="#qRed">qRed</a>(), <a href="#qGreen">qGreen</a>(), and <a href="#qBlue">qBlue</a>().
<p> <p>See also <a href="#qRgb">tqRgb</a>(), <a href="#qRed">tqRed</a>(), <a href="#qGreen">tqGreen</a>(), and <a href="#qBlue">tqBlue</a>().
<!-- eof -->
<hr><p>

@ -107,15 +107,15 @@ zero-terminated char array (char *).
</ul>
<h2>Related Functions</h2>
<ul>
<li class=fn>void * <a href="#qmemmove"><b>qmemmove</b></a> ( void&nbsp;*&nbsp;dst, const&nbsp;void&nbsp;*&nbsp;src, uint&nbsp;len )</li>
<li class=fn>char * <a href="#qstrdup"><b>qstrdup</b></a> ( const&nbsp;char&nbsp;*&nbsp;src )</li>
<li class=fn>void * <a href="#qmemmove"><b>tqmemmove</b></a> ( void&nbsp;*&nbsp;dst, const&nbsp;void&nbsp;*&nbsp;src, uint&nbsp;len )</li>
<li class=fn>char * <a href="#qstrdup"><b>tqstrdup</b></a> ( const&nbsp;char&nbsp;*&nbsp;src )</li>
<li class=fn>char * <a href="#qstrcpy"><b>qstrcpy</b></a> ( char&nbsp;*&nbsp;dst, const&nbsp;char&nbsp;*&nbsp;src )</li>
<li class=fn>char * <a href="#qstrncpy"><b>qstrncpy</b></a> ( char&nbsp;*&nbsp;dst, const&nbsp;char&nbsp;*&nbsp;src, uint&nbsp;len )</li>
<li class=fn>uint <a href="#qstrlen"><b>qstrlen</b></a> ( const&nbsp;char&nbsp;*&nbsp;str )</li>
<li class=fn>char * <a href="#qstrncpy"><b>tqstrncpy</b></a> ( char&nbsp;*&nbsp;dst, const&nbsp;char&nbsp;*&nbsp;src, uint&nbsp;len )</li>
<li class=fn>uint <a href="#qstrlen"><b>tqstrlen</b></a> ( const&nbsp;char&nbsp;*&nbsp;str )</li>
<li class=fn>int <a href="#qstrcmp"><b>qstrcmp</b></a> ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2 )</li>
<li class=fn>int <a href="#qstrncmp"><b>qstrncmp</b></a> ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )</li>
<li class=fn>int <a href="#qstricmp"><b>qstricmp</b></a> ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2 )</li>
<li class=fn>int <a href="#qstrnicmp"><b>qstrnicmp</b></a> ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )</li>
<li class=fn>int <a href="#qstrncmp"><b>tqstrncmp</b></a> ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )</li>
<li class=fn>int <a href="#qstricmp"><b>tqstricmp</b></a> ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2 )</li>
<li class=fn>int <a href="#qstrnicmp"><b>tqstrnicmp</b></a> ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )</li>
<li class=fn>TQDataStream &amp; <a href="#operator-lt-lt"><b>operator&lt;&lt;</b></a> ( TQDataStream&nbsp;&amp;&nbsp;s, const&nbsp;TQCString&nbsp;&amp;&nbsp;str )</li>
<li class=fn>TQDataStream &amp; <a href="#operator-gt-gt"><b>operator&gt;&gt;</b></a> ( TQDataStream&nbsp;&amp;&nbsp;s, TQCString&nbsp;&amp;&nbsp;str )</li>
<li class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;TQCString&nbsp;&amp;&nbsp;s1, const&nbsp;TQCString&nbsp;&amp;&nbsp;s2 )</li>
@ -1000,7 +1000,7 @@ returns FALSE.
<p> Reads a string into <em>str</em> from the stream <em>s</em>.
<p> <p>See also <a href="datastreamformat.html">Format of the TQDataStream operators</a>.
<h3 class=fn>void * <a name="qmemmove"></a>qmemmove ( void&nbsp;*&nbsp;dst, const&nbsp;void&nbsp;*&nbsp;src, uint&nbsp;len )
<h3 class=fn>void * <a name="qmemmove"></a>tqmemmove ( void&nbsp;*&nbsp;dst, const&nbsp;void&nbsp;*&nbsp;src, uint&nbsp;len )
</h3>
<p> This function is normally part of the C library. TQt implements
@ -1019,7 +1019,7 @@ positive value if <em>str1</em> is greater than <em>str2</em>.
<p> Special case I: Returns 0 if <em>str1</em> and <em>str2</em> are both 0.
<p> Special case II: Returns a random nonzero value if <em>str1</em> is 0
or <em>str2</em> is 0 (but not both).
<p> <p>See also <a href="#qstrncmp">qstrncmp</a>(), <a href="#qstricmp">qstricmp</a>(), <a href="#qstrnicmp">qstrnicmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<p> <p>See also <a href="#qstrncmp">tqstrncmp</a>(), <a href="#qstricmp">tqstricmp</a>(), <a href="#qstrnicmp">tqstrnicmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<h3 class=fn>char * <a name="qstrcpy"></a>qstrcpy ( char&nbsp;*&nbsp;dst, const&nbsp;char&nbsp;*&nbsp;src )
</h3>
@ -1029,7 +1029,7 @@ or <em>str2</em> is 0 (but not both).
<p> Copies all characters up to and including the '&#92;0' from <em>src</em>
into <em>dst</em> and returns a pointer to <em>dst</em>.
<h3 class=fn>char * <a name="qstrdup"></a>qstrdup ( const&nbsp;char&nbsp;*&nbsp;src )
<h3 class=fn>char * <a name="qstrdup"></a>tqstrdup ( const&nbsp;char&nbsp;*&nbsp;src )
</h3>
<p> Returns a duplicate string.
@ -1037,7 +1037,7 @@ into <em>dst</em> and returns a pointer to <em>dst</em>.
pointer to the copy. If <em>src</em> is 0, it immediately returns 0.
<p> The returned string must be deleted using <tt>delete[]</tt>.
<h3 class=fn>int <a name="qstricmp"></a>qstricmp ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2 )
<h3 class=fn>int <a name="qstricmp"></a>tqstricmp ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2 )
</h3>
<p> A safe stricmp() function.
@ -1047,9 +1047,9 @@ than <em>str2</em>.
<p> Special case I: Returns 0 if <em>str1</em> and <em>str2</em> are both 0.
<p> Special case II: Returns a random nonzero value if <em>str1</em> is 0
or <em>str2</em> is 0 (but not both).
<p> <p>See also <a href="#qstrcmp">qstrcmp</a>(), <a href="#qstrncmp">qstrncmp</a>(), <a href="#qstrnicmp">qstrnicmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<p> <p>See also <a href="#qstrcmp">qstrcmp</a>(), <a href="#qstrncmp">tqstrncmp</a>(), <a href="#qstrnicmp">tqstrnicmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<h3 class=fn>uint <a name="qstrlen"></a>qstrlen ( const&nbsp;char&nbsp;*&nbsp;str )
<h3 class=fn>uint <a name="qstrlen"></a>tqstrlen ( const&nbsp;char&nbsp;*&nbsp;str )
</h3>
<p>
@ -1057,7 +1057,7 @@ or <em>str2</em> is 0 (but not both).
<p> Returns the number of characters that precede the terminating '&#92;0'.
or 0 if <em>str</em> is 0.
<h3 class=fn>int <a name="qstrncmp"></a>qstrncmp ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )
<h3 class=fn>int <a name="qstrncmp"></a>tqstrncmp ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )
</h3>
<p>
@ -1068,9 +1068,9 @@ than <em>str2</em>.
<p> Special case I: Returns 0 if <em>str1</em> and <em>str2</em> are both 0.
<p> Special case II: Returns a random nonzero value if <em>str1</em> is 0
or <em>str2</em> is 0 (but not both).
<p> <p>See also <a href="#qstrcmp">qstrcmp</a>(), <a href="#qstricmp">qstricmp</a>(), <a href="#qstrnicmp">qstrnicmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<p> <p>See also <a href="#qstrcmp">qstrcmp</a>(), <a href="#qstricmp">tqstricmp</a>(), <a href="#qstrnicmp">tqstrnicmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<h3 class=fn>char * <a name="qstrncpy"></a>qstrncpy ( char&nbsp;*&nbsp;dst, const&nbsp;char&nbsp;*&nbsp;src, uint&nbsp;len )
<h3 class=fn>char * <a name="qstrncpy"></a>tqstrncpy ( char&nbsp;*&nbsp;dst, const&nbsp;char&nbsp;*&nbsp;src, uint&nbsp;len )
</h3>
<p> A safe strncpy() function.
@ -1080,7 +1080,7 @@ pointer to <em>dst</em>. Guarantees that <em>dst</em> is '&#92;0'-terminated. If
<em>src</em> or <em>dst</em> is 0, returns 0 immediately.
<p> <p>See also <a href="#qstrcpy">qstrcpy</a>().
<h3 class=fn>int <a name="qstrnicmp"></a>qstrnicmp ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )
<h3 class=fn>int <a name="qstrnicmp"></a>tqstrnicmp ( const&nbsp;char&nbsp;*&nbsp;str1, const&nbsp;char&nbsp;*&nbsp;str2, uint&nbsp;len )
</h3>
<p> A safe strnicmp() function.
@ -1090,7 +1090,7 @@ is equal to <em>str2</em> or a positive value if <em>str1</em> is greater than <
<p> Special case I: Returns 0 if <em>str1</em> and <em>str2</em> are both 0.
<p> Special case II: Returns a random nonzero value if <em>str1</em> is 0
or <em>str2</em> is 0 (but not both).
<p> <p>See also <a href="#qstrcmp">qstrcmp</a>(), <a href="#qstrncmp">qstrncmp</a>(), <a href="#qstricmp">qstricmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<p> <p>See also <a href="#qstrcmp">qstrcmp</a>(), <a href="#qstrncmp">tqstrncmp</a>(), <a href="#qstricmp">tqstricmp</a>(), and <a href="#asciinotion">Note on character comparisons</a>.
<!-- eof -->
<hr><p>

@ -245,7 +245,7 @@ is negative if <em>dt</em> is earlier than this datetime).
<pre>
TQDateTime dt = TQDateTime::<a href="#currentDateTime">currentDateTime</a>();
TQDateTime xmas( TQDate(dt.<a href="#date">date</a>().year(),12,24), TQTime(17,00) );
<a href="ntqapplication.html#qDebug">qDebug</a>( "There are %d seconds to Christmas", dt.<a href="#secsTo">secsTo</a>(xmas) );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "There are %d seconds to Christmas", dt.<a href="#secsTo">secsTo</a>(xmas) );
</pre>
<p> <p>See also <a href="#addSecs">addSecs</a>(), <a href="#daysTo">daysTo</a>(), and <a href="qtime.html#secsTo">TQTime::secsTo</a>().

@ -364,7 +364,7 @@ constructor).
</h3>
<p> Debugging-only function that prints out the dictionary
distribution using <a href="ntqapplication.html#qDebug">qDebug</a>().
distribution using <a href="ntqapplication.html#qDebug">tqDebug</a>().
<h3 class=fn>type * <a name="take"></a>TQDict::take ( const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;key )
</h3>

@ -166,18 +166,18 @@ for a function in the underlying operating system use
<pre>
TQDir d( "example" ); // "./example"
if ( !d.<a href="#exists">exists</a>() )
<a href="ntqapplication.html#qWarning">qWarning</a>( "Cannot find the example directory" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Cannot find the example directory" );
</pre>
<p> Traversing directories and reading a file.
<pre>
TQDir d = TQDir::<a href="#root">root</a>(); // "/"
if ( !d.<a href="#cd">cd</a>("tmp") ) { // "/tmp"
<a href="ntqapplication.html#qWarning">qWarning</a>( "Cannot find the \"/tmp\" directory" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Cannot find the \"/tmp\" directory" );
} else {
<a href="ntqfile.html">TQFile</a> f( d.<a href="#filePath">filePath</a>("ex1.txt") ); // "/tmp/ex1.txt"
if ( !f.<a href="ntqfile.html#open">open</a>(IO_ReadWrite) )
<a href="ntqapplication.html#qWarning">qWarning</a>( "Cannot create the file %s", f.<a href="ntqfile.html#name">name</a>() );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Cannot create the file %s", f.<a href="ntqfile.html#name">name</a>() );
}
</pre>
@ -584,7 +584,7 @@ this function returns FALSE. If you want to test for this use
TQDir d( "/tmp/root_link" );
d = d.<a href="#canonicalPath">canonicalPath</a>();
if ( d.<a href="#isRoot">isRoot</a>() )
<a href="ntqapplication.html#qWarning">qWarning</a>( "It is a root link" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "It is a root link" );
</pre>
<p> <p>See also <a href="#root">root</a>() and <a href="#rootDirPath">rootDirPath</a>().
@ -640,7 +640,7 @@ FALSE.
TQDir d1( "/usr/local/bin" );
TQDir d2( "bin" );
if ( d1 != d2 )
<a href="ntqapplication.html#qDebug">qDebug</a>( "They differ" );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "They differ" );
</pre>
@ -665,7 +665,7 @@ returns FALSE.
TQDir d2( "bin" );
d2.<a href="#convertToAbs">convertToAbs</a>();
if ( d1 == d2 )
<a href="ntqapplication.html#qDebug">qDebug</a>( "They're the same" );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "They're the same" );
</pre>

@ -64,7 +64,7 @@ TQErrorMessage like this, you create the dialog in the usual way and call the
<a href="#message">message</a>() slot, or connect signals to it.
<p> <li> For developers. In this context the static <a href="#qtHandler">qtHandler</a>() installs
a message handler using <a href="ntqapplication.html#qInstallMsgHandler">qInstallMsgHandler</a>() and creates a TQErrorMessage
that displays <a href="ntqapplication.html#qDebug">qDebug</a>(), <a href="ntqapplication.html#qWarning">qWarning</a>() and <a href="ntqapplication.html#qFatal">qFatal</a>() messages.
that displays <a href="ntqapplication.html#qDebug">tqDebug</a>(), <a href="ntqapplication.html#qWarning">tqWarning</a>() and <a href="ntqapplication.html#qFatal">tqFatal</a>() messages.
</ol>
<p> In both cases TQErrorMessage will queue pending messages, and display
them (or not) in order, as soon as the user presses Enter or clicks OK

@ -411,9 +411,9 @@ always returns TRUE.
<pre>
TQFileInfo fi( "/tmp/archive.tar.gz" );
if ( fi.<a href="#permission">permission</a>( TQFileInfo::<a href="#PermissionSpec-enum">WriteUser</a> | TQFileInfo::<a href="#PermissionSpec-enum">ReadGroup</a> ) )
<a href="ntqapplication.html#qWarning">qWarning</a>( "I can change the file; my group can read the file" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "I can change the file; my group can read the file" );
if ( fi.<a href="#permission">permission</a>( TQFileInfo::<a href="#PermissionSpec-enum">WriteGroup</a> | TQFileInfo::<a href="#PermissionSpec-enum">WriteOther</a> ) )
<a href="ntqapplication.html#qWarning">qWarning</a>( "The group or others can change the file" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "The group or others can change the file" );
</pre>
<p> <p>See also <a href="#isReadable">isReadable</a>(), <a href="#isWritable">isWritable</a>(), and <a href="#isExecutable">isExecutable</a>().

@ -115,7 +115,7 @@ int main( int argc, char **argv )
<a href="ntqstringlist.html">TQStringList</a> families = fdb.<a href="#families">families</a>();
for ( TQStringList::Iterator f = families.<a href="ntqvaluelist.html#begin">begin</a>(); f != families.<a href="ntqvaluelist.html#end">end</a>(); ++f ) {
<a href="ntqstring.html">TQString</a> family = *f;
<a href="ntqapplication.html#qDebug">qDebug</a>( family );
<a href="ntqapplication.html#qDebug">tqDebug</a>( family );
<a href="ntqstringlist.html">TQStringList</a> styles = fdb.<a href="#styles">styles</a>( family );
for ( TQStringList::Iterator s = styles.<a href="ntqvaluelist.html#begin">begin</a>(); s != styles.<a href="ntqvaluelist.html#end">end</a>(); ++s ) {
<a href="ntqstring.html">TQString</a> style = *s;
@ -126,7 +126,7 @@ int main( int argc, char **argv )
dstyle += TQString::<a href="ntqstring.html#number">number</a>( *points ) + " ";
}
dstyle = dstyle.<a href="ntqstring.html#left">left</a>( dstyle.<a href="ntqstring.html#length">length</a>() - 1 ) + ")";
<a href="ntqapplication.html#qDebug">qDebug</a>( dstyle );
<a href="ntqapplication.html#qDebug">tqDebug</a>( dstyle );
}
}
return 0;

@ -108,7 +108,7 @@ example:
</pre>
<p> This code will only work if the TQFtp class is registered; to
register the class, you must call <a href="ntqurloperator.html#qInitNetworkProtocols">qInitNetworkProtocols</a>() before
register the class, you must call <a href="ntqurloperator.html#qInitNetworkProtocols">tqInitNetworkProtocols</a>() before
using a TQUrlOperator with TQFtp.
<p> The rest of this descrption describes the direct interface to FTP.
<p> The class works asynchronously, so there are no blocking

@ -75,7 +75,7 @@ test the pointer for validity.
if ( label)
label-&gt;show();
else
<a href="ntqapplication.html#qDebug">qDebug</a>("The label has been destroyed");
<a href="ntqapplication.html#qDebug">tqDebug</a>("The label has been destroyed");
</pre>
<p> The program will output <tt>The label has been destroyed</tt> rather

@ -103,7 +103,7 @@ example:
</pre>
<p> This code will only work if the TQHttp class is registered; to
register the class, you must call <a href="ntqurloperator.html#qInitNetworkProtocols">qInitNetworkProtocols</a>() before
register the class, you must call <a href="ntqurloperator.html#qInitNetworkProtocols">tqInitNetworkProtocols</a>() before
using a TQUrlOperator with HTTP.
<p> The TQNetworkProtocol interface for HTTP only supports the
operations <a href="ntqnetworkprotocol.html#operationGet">operationGet</a>() and <a href="ntqnetworkprotocol.html#operationPut">operationPut</a>(), i.e.

@ -160,7 +160,7 @@ data. 1-bpp and 8-bpp images use a color lookup table; the pixel
value is a color table index.
<p> 32-bpp images encode an RGB value in 24 bits and ignore the color
table. The most significant byte is used for the <a href="#setAlphaBuffer">alpha buffer</a>.
<p> An entry in the color table is an RGB triplet encoded as a <tt>uint</tt>. Use the <a href="ntqcolor.html#qRed">qRed()</a>, <a href="ntqcolor.html#qGreen">qGreen()</a> and <a href="ntqcolor.html#qBlue">qBlue()</a> functions (<a href="qcolor-h.html">ntqcolor.h</a>) to access the components, and <a href="ntqcolor.html#qRgb">qRgb</a> to make an RGB triplet (see the <a href="ntqcolor.html">TQColor</a> class
<p> An entry in the color table is an RGB triplet encoded as a <tt>uint</tt>. Use the <a href="ntqcolor.html#qRed">tqRed()</a>, <a href="ntqcolor.html#qGreen">tqGreen()</a> and <a href="ntqcolor.html#qBlue">tqBlue()</a> functions (<a href="qcolor-h.html">ntqcolor.h</a>) to access the components, and <a href="ntqcolor.html#qRgb">tqRgb</a> to make an RGB triplet (see the <a href="ntqcolor.html">TQColor</a> class
documentation).
<p> 1-bpp (monochrome) images have a color table with a most two
colors. There are two different formats: big endian (MSB first) or
@ -194,7 +194,7 @@ significant byte is reserved for the alpha buffer.
TQImage image;
// sets 32 bit pixel at (x,y) to yellow.
uint *p = (uint *)image.<a href="#scanLine">scanLine</a>(y) + x;
*p = <a href="ntqcolor.html#qRgb">qRgb</a>(255,255,0);
*p = <a href="ntqcolor.html#qRgb">tqRgb</a>(255,255,0);
</pre>
<p> On TQt/Embedded, scanlines are aligned to the pixel depth and may
@ -384,7 +384,7 @@ to <a href="#numBytes">numBytes</a>()/height().
<p> Returns the color in the color table at index <em>i</em>. The first
color is at index 0.
<p> A color value is an RGB triplet. Use the <a href="ntqcolor.html#qRed">qRed()</a>, <a href="ntqcolor.html#qGreen">qGreen()</a> and <a href="ntqcolor.html#qBlue">qBlue()</a> functions (defined in <a href="qcolor-h.html">ntqcolor.h</a>) to
<p> A color value is an RGB triplet. Use the <a href="ntqcolor.html#qRed">tqRed()</a>, <a href="ntqcolor.html#qGreen">tqGreen()</a> and <a href="ntqcolor.html#qBlue">tqBlue()</a> functions (defined in <a href="qcolor-h.html">ntqcolor.h</a>) to
get the color value components.
<p> <p>See also <a href="#setColor">setColor</a>(), <a href="#numColors">numColors</a>(), and <a href="ntqcolor.html">TQColor</a>.
@ -768,7 +768,7 @@ output.
Returns the color of the pixel at the coordinates (<em>x</em>, <em>y</em>).
<p> If (<em>x</em>, <em>y</em>) is not <a href="#valid">on the image</a>, the
results are undefined.
<p> <p>See also <a href="#setPixel">setPixel</a>(), <a href="ntqcolor.html#qRed">qRed</a>(), <a href="ntqcolor.html#qGreen">qGreen</a>(), <a href="ntqcolor.html#qBlue">qBlue</a>(), and <a href="#valid">valid</a>().
<p> <p>See also <a href="#setPixel">setPixel</a>(), <a href="ntqcolor.html#qRed">tqRed</a>(), <a href="ntqcolor.html#qGreen">tqGreen</a>(), <a href="ntqcolor.html#qBlue">tqBlue</a>(), and <a href="#valid">valid</a>().
<p>Examples: <a href="canvas-example.html#x2933">canvas/canvas.cpp</a> and <a href="qmag-example.html#x1776">qmag/qmag.cpp</a>.
<h3 class=fn>int <a name="pixelIndex"></a>TQImage::pixelIndex ( int&nbsp;x, int&nbsp;y ) const
@ -869,8 +869,8 @@ returned.
pointer to <tt>TQRgb*</tt> (TQRgb has a 32-bit size) and use it to
read/write the pixel value. You cannot use the <tt>uchar*</tt> pointer
directly, because the pixel format depends on the byte order on
the underlying platform. Hint: use <a href="ntqcolor.html#qRed">qRed()</a>,
<a href="ntqcolor.html#qGreen">qGreen()</a> and <a href="ntqcolor.html#qBlue">qBlue()</a>, etc. (ntqcolor.h) to access the pixels.
the underlying platform. Hint: use <a href="ntqcolor.html#qRed">tqRed()</a>,
<a href="ntqcolor.html#qGreen">tqGreen()</a> and <a href="ntqcolor.html#qBlue">tqBlue()</a>, etc. (ntqcolor.h) to access the pixels.
<p> <b>Warning:</b> If you are accessing 16-bpp image data, you must handle
endianness yourself. (TQt/Embedded only)
<p> <p>See also <a href="#bytesPerLine">bytesPerLine</a>(), <a href="#bits">bits</a>(), and <a href="#jumpTable">jumpTable</a>().
@ -897,7 +897,7 @@ to a <a href="ntqpixmap.html">TQPixmap</a>.
</h3>
<p> Sets a color in the color table at index <em>i</em> to <em>c</em>.
<p> A color value is an RGB triplet. Use the <a href="ntqcolor.html#qRgb">qRgb()</a> function (defined in <a href="qcolor-h.html">ntqcolor.h</a>) to make RGB
<p> A color value is an RGB triplet. Use the <a href="ntqcolor.html#qRgb">tqRgb()</a> function (defined in <a href="qcolor-h.html">ntqcolor.h</a>) to make RGB
triplets.
<p> <p>See also <a href="#color">color</a>(), <a href="#setNumColors">setNumColors</a>(), and <a href="#numColors">numColors</a>().
@ -928,7 +928,7 @@ Sets the pixel index or color at the coordinates (<em>x</em>, <em>y</em>) to
<p> If (<em>x</em>, <em>y</em>) is not <a href="#valid">valid</a>, the result is
undefined.
<p> If the image is a paletted image (<a href="#depth">depth</a>() &lt;= 8) and <em>index_or_rgb</em> &gt;= <a href="#numColors">numColors</a>(), the result is undefined.
<p> <p>See also <a href="#pixelIndex">pixelIndex</a>(), <a href="#pixel">pixel</a>(), <a href="ntqcolor.html#qRgb">qRgb</a>(), <a href="ntqcolor.html#qRgba">qRgba</a>(), and <a href="#valid">valid</a>().
<p> <p>See also <a href="#pixelIndex">pixelIndex</a>(), <a href="#pixel">pixel</a>(), <a href="ntqcolor.html#qRgb">tqRgb</a>(), <a href="ntqcolor.html#qRgba">tqRgba</a>(), and <a href="#valid">valid</a>().
<h3 class=fn>void <a name="setText"></a>TQImage::setText ( const&nbsp;char&nbsp;*&nbsp;key, const&nbsp;char&nbsp;*&nbsp;lang, const&nbsp;<a href="ntqstring.html">TQString</a>&nbsp;&amp;&nbsp;s )
</h3>

@ -207,7 +207,7 @@ This should be a bit larger than <a href="#count">count</a>() is likely to be.
</h3>
<p> A debug-only utility function. Prints out cache usage, hit/miss,
and distribution information using <a href="ntqapplication.html#qDebug">qDebug</a>(). This function does
and distribution information using <a href="ntqapplication.html#qDebug">tqDebug</a>(). This function does
nothing in the release library.
<h3 class=fn>type * <a name="take"></a>TQIntCache::take ( long&nbsp;k )

@ -277,7 +277,7 @@ constructor).
</h3>
<p> Debugging-only function that prints out the dictionary
distribution using <a href="ntqapplication.html#qDebug">qDebug</a>().
distribution using <a href="ntqapplication.html#qDebug">tqDebug</a>().
<h3 class=fn>type * <a name="take"></a>TQIntDict::take ( long&nbsp;key )
</h3>

@ -58,7 +58,7 @@ example:
</pre>
<p> This code will only work if the TQLocalFs class is registered; to
register the class, you must call <a href="ntqurloperator.html#qInitNetworkProtocols">qInitNetworkProtocols</a>() before
register the class, you must call <a href="ntqurloperator.html#qInitNetworkProtocols">tqInitNetworkProtocols</a>() before
using a TQUrlOperator with TQLocalFs.
<p> If you really need to use TQLocalFs directly, don't forget
to set its TQUrlOperator with <a href="ntqnetworkprotocol.html#setUrl">setUrl</a>().

@ -84,7 +84,7 @@ body { background: #ffffff; color: black; }
</ul>
<h2>Related Functions</h2>
<ul>
<li class=fn>TQ_UINT16 <a href="#qChecksum"><b>qChecksum</b></a> ( const&nbsp;char&nbsp;*&nbsp;data, uint&nbsp;len )</li>
<li class=fn>TQ_UINT16 <a href="#qChecksum"><b>tqChecksum</b></a> ( const&nbsp;char&nbsp;*&nbsp;data, uint&nbsp;len )</li>
<li class=fn>TQDataStream &amp; <a href="#operator-lt-lt"><b>operator&lt;&lt;</b></a> ( TQDataStream&nbsp;&amp;&nbsp;s, const&nbsp;TQByteArray&nbsp;&amp;&nbsp;a )</li>
<li class=fn>TQDataStream &amp; <a href="#operator-gt-gt"><b>operator&gt;&gt;</b></a> ( TQDataStream&nbsp;&amp;&nbsp;s, TQByteArray&nbsp;&amp;&nbsp;a )</li>
</ul>
@ -136,10 +136,10 @@ constructor). TQValueVector provides an STL-compatible syntax and is
{
TQMemArray&lt;int&gt; a = fib( 6 ); // get first 6 fibonaccis
for ( int i = 0; i &lt; a.<a href="#size">size</a>(); i++ )
<a href="ntqapplication.html#qDebug">qDebug</a>( "%d: %d", i, a[i] );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "%d: %d", i, a[i] );
<a href="ntqapplication.html#qDebug">qDebug</a>( "1 is found %d times", a.<a href="#contains">contains</a>(1) );
<a href="ntqapplication.html#qDebug">qDebug</a>( "5 is found at index %d", a.<a href="#find">find</a>(5) );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "1 is found %d times", a.<a href="#contains">contains</a>(1) );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "5 is found at index %d", a.<a href="#find">find</a>(5) );
return 0;
}
@ -542,7 +542,7 @@ to the stream.
reference to the stream.
<p> <p>See also <a href="datastreamformat.html">Format of the TQDataStream operators</a>.
<h3 class=fn>TQ_UINT16 <a name="qChecksum"></a>qChecksum ( const&nbsp;char&nbsp;*&nbsp;data, uint&nbsp;len )
<h3 class=fn>TQ_UINT16 <a name="qChecksum"></a>tqChecksum ( const&nbsp;char&nbsp;*&nbsp;data, uint&nbsp;len )
</h3>
<p> Returns the CRC-16 checksum of <em>len</em> bytes starting at <em>data</em>.

@ -522,7 +522,7 @@ TRUE; otherwise return FALSE.
if ( obj == textEdit ) {
if ( e-&gt;type() == TQEvent::KeyPress ) {
<a href="qkeyevent.html">TQKeyEvent</a> *k = (TQKeyEvent*)ev;
<a href="ntqapplication.html#qDebug">qDebug</a>( "Ate key press %d", k-&gt;<a href="qkeyevent.html#key">key</a>() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Ate key press %d", k-&gt;<a href="qkeyevent.html#key">key</a>() );
return TRUE;
} else {
return FALSE;
@ -616,7 +616,7 @@ monitored objects:
if ( e-&gt;type() == TQEvent::KeyPress ) {
// special processing for key press
<a href="qkeyevent.html">TQKeyEvent</a> *k = (TQKeyEvent *)e;
<a href="ntqapplication.html#qDebug">qDebug</a>( "Ate key press %d", k-&gt;<a href="qkeyevent.html#key">key</a>() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Ate key press %d", k-&gt;<a href="qkeyevent.html#key">key</a>() );
return TRUE; // eat event
} else {
// standard event processing
@ -859,7 +859,7 @@ used to find out which timer was activated.
void MyObject::<a href="#timerEvent">timerEvent</a>( <a href="qtimerevent.html">TQTimerEvent</a> *e )
{
<a href="ntqapplication.html#qDebug">qDebug</a>( "timer event, id %d", e-&gt;<a href="qtimerevent.html#timerId">timerId</a>() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "timer event, id %d", e-&gt;<a href="qtimerevent.html#timerId">timerId</a>() );
}
</pre>
@ -920,11 +920,11 @@ function. The object name is not very useful in the current
version of TQt, but will become increasingly important in the
future.
<p> If the object does not have a name, the <a href="#name">name</a>() function returns
"unnamed", so printf() (used in <a href="ntqapplication.html#qDebug">qDebug</a>()) will not be asked to
"unnamed", so printf() (used in <a href="ntqapplication.html#qDebug">tqDebug</a>()) will not be asked to
output a null pointer. If you want a null pointer to be returned
for unnamed objects, you can call name( 0 ).
<p> <pre>
<a href="ntqapplication.html#qDebug">qDebug</a>( "MyClass::setPrecision(): (%s) invalid precision %f",
<a href="ntqapplication.html#qDebug">tqDebug</a>( "MyClass::setPrecision(): (%s) invalid precision %f",
<a href="#name">name</a>(), newPrecision );
</pre>

@ -281,7 +281,7 @@ constructor).
</h3>
<p> Debugging-only function that prints out the dictionary
distribution using <a href="ntqapplication.html#qDebug">qDebug</a>().
distribution using <a href="ntqapplication.html#qDebug">tqDebug</a>().
<h3 class=fn>type * <a name="take"></a>TQPtrDict::take ( void&nbsp;*&nbsp;key )
</h3>

@ -127,7 +127,7 @@ and the values returned by value() are undefined.
<pre> TQSqlCursor cur( "staff" ); // Specify the table/view name
<a name="x2178"></a> cur.<a href="#select">select</a>(); // We'll retrieve every record
while ( cur.<a href="ntqsqlquery.html#next">next</a>() ) {
<a name="x2179"></a> <a href="ntqapplication.html#qDebug">qDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
<a name="x2179"></a> <a href="ntqapplication.html#qDebug">tqDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
cur.<a href="ntqsqlquery.html#value">value</a>( "surname" ).toString() + " " +
cur.<a href="ntqsqlquery.html#value">value</a>( "salary" ).toString() );
}

@ -324,7 +324,7 @@ Returns a map of the bound values.
TQMap&lt;TQString, TQVariant&gt;::ConstIterator it;
<a href="ntqmap.html">TQMap</a>&lt;TQString, TQVariant&gt; vals = query.<a href="#boundValues">boundValues</a>();
for ( it = vals.<a href="ntqmap.html#begin">begin</a>(); it != vals.<a href="ntqmap.html#end">end</a>(); ++it )
<a href="ntqapplication.html#qWarning">qWarning</a>( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Placeholder: " + it.key() + ", Value: " + (*it).toString() );
...
// Examine the bound values - bound using positional binding
@ -332,7 +332,7 @@ Returns a map of the bound values.
<a href="ntqvaluelist.html">TQValueList</a>&lt;TQVariant&gt; list = query.<a href="#boundValues">boundValues</a>().values();
int i = 0;
for ( it = list.<a href="ntqvaluelist.html#begin">begin</a>(); it != list.<a href="ntqvaluelist.html#end">end</a>(); ++it )
<a href="ntqapplication.html#qWarning">qWarning</a>( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Placeholder pos: %d, Value: " + (*it).toString(), i++ );
...
</pre>

@ -467,7 +467,7 @@ natural language sentences does not usually translate well into
other languages because sentence structure and word order often
differ between languages.
<p> If there is no place marker (<tt>%1</tt>, <tt>%2</tt>, etc.), a warning
message (<a href="ntqapplication.html#qWarning">qWarning</a>()) is output and the result is undefined.
message (<a href="ntqapplication.html#qWarning">tqWarning</a>()) is output and the result is undefined.
<p> <b>Warning:</b> If any placeholder occurs more than once, the result is undefined.
<p>
<h3 class=fn><a href="ntqstring.html">TQString</a> <a name="arg-2"></a>TQString::arg ( long&nbsp;a, int&nbsp;fieldWidth = 0, int&nbsp;base = 10 ) const

@ -90,7 +90,7 @@ run() to include your code. For example:
{
for( int count = 0; count &lt; 20; count++ ) {
<a href="#sleep">sleep</a>( 1 );
<a href="ntqapplication.html#qDebug">qDebug</a>( "Ping!" );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Ping!" );
}
}

@ -78,7 +78,7 @@ body { background: #ffffff; color: black; }
</ul>
<h2>Related Functions</h2>
<ul>
<li class=fn>void <a href="#qInitNetworkProtocols"><b>qInitNetworkProtocols</b></a> ()</li>
<li class=fn>void <a href="#qInitNetworkProtocols"><b>tqInitNetworkProtocols</b></a> ()</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
@ -130,7 +130,7 @@ necessary network protocol is registered), the URL operator emits
errors. Not every protocol supports every operation, but error
handling deals with this problem.
<p> To register the available network protocols, use the
<a href="#qInitNetworkProtocols">qInitNetworkProtocols</a>() function. The protocols currently
<a href="#qInitNetworkProtocols">tqInitNetworkProtocols</a>() function. The protocols currently
supported are:
<ul>
<li> <a href="ntqftp.html">FTP</a>,
@ -492,7 +492,7 @@ Stops the current network operation and removes all this
TQUrlOperator's waiting network operations.
<hr><h2>Related Functions</h2>
<h3 class=fn>void <a name="qInitNetworkProtocols"></a>qInitNetworkProtocols ()
<h3 class=fn>void <a name="qInitNetworkProtocols"></a>tqInitNetworkProtocols ()
</h3>
<p> This function registers the network protocols for FTP and HTTP.

@ -213,7 +213,7 @@ list it belongs to, however it is <em>not</em> dereferenceable;
<a href="ntqsize.html#operator*-4">operator*</a>() will not return a well-defined value. If the list is
<a href="#empty">empty</a>(), the iterator returned by begin() will equal the iterator
returned by end().
<p> Another way to find an item in the list is by using the <a href="ntqtl.html#qFind">qFind()</a> algorithm. For example:
<p> Another way to find an item in the list is by using the <a href="ntqtl.html#qFind">tqFind()</a> algorithm. For example:
<p> <pre>
TQValueList&lt;int&gt; list;
...

@ -234,7 +234,7 @@ example:
therefore you can use them with many generic algorithms, for
example, algorithms provided by the STL or the <a href="ntqtl.html">TQTL</a>.
<p> Another way to find an element in the vector is by using the
std::find() or <a href="ntqtl.html#qFind">qFind()</a> algorithms.
std::find() or <a href="ntqtl.html#qFind">tqFind()</a> algorithms.
For example:
<p> <pre>
TQValueVector&lt;int&gt; vec;

@ -215,7 +215,7 @@ return a reference to the new contents of the variant.
<a href="ntqdatastream.html">TQDataStream</a> in(...); // (opening the previously written stream)
in &gt;&gt; v; // Reads an Int variant
int z = v.<a href="#toInt">toInt</a>(); // z = 123
<a href="ntqapplication.html#qDebug">qDebug</a>("Type is %s", // prints "Type is int"
<a href="ntqapplication.html#qDebug">tqDebug</a>("Type is %s", // prints "Type is int"
v.<a href="#typeName">typeName</a>());
v.<a href="#asInt">asInt</a>() += 100; // The variant now hold the value 223.
v = <a href="#TQVariant">TQVariant</a>( TQStringList() );

@ -2723,7 +2723,7 @@ explicitly disabled.
<p>Set this property's value with <a href="#setEnabled">setEnabled</a>() and get this property's value with <a href="#isEnabled">isEnabled</a>().
<h3 class=fn>bool <a name="focus-prop"></a>focus</h3>
<p>This property holds whether this widget (or its focus proxy) has the keyboard input focus.
<p>Effectively equivalent to <tt>qApp-&gt;focusWidget() == this</tt>.
<p>Effectively equivalent to <tt>tqApp-&gt;focusWidget() == this</tt>.
<p> <p>See also <a href="#setFocus">setFocus</a>(), <a href="#clearFocus">clearFocus</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, and <a href="ntqapplication.html#focusWidget">TQApplication::focusWidget</a>().
<p>Get this property's value with <a href="#hasFocus">hasFocus</a>().

@ -65,7 +65,7 @@ by default in the standard plugin directory.
run, TQt will first treat the application's executable directory as the
<tt>pluginsbase</tt>. For example if the application is in <tt>C:&#92;Program Files&#92;MyApp</tt> and has a style plugin, TQt will look in <tt>C:&#92;Program Files&#92;MyApp&#92;styles</tt>. (See <a href="ntqapplication.html#applicationDirPath">TQApplication::applicationDirPath</a>() for
how to find out where the application's executable is.) TQt will also
look in the directory given by <tt>qInstallPathPlugins()</tt>. If you want
look in the directory given by <tt>tqInstallPathPlugins()</tt>. If you want
TQt to look in additional places you can add as many paths as you need
with calls to <a href="ntqapplication.html#addLibraryPath">TQApplication::addLibraryPath</a>(). And if you want to
set your own path or paths you can use

@ -515,10 +515,10 @@ be in the more efficient order (for typical contemporary hardware). If your
code made assumptions about the order, you will get blue where you expect
red and vice versa (you'll not notice the problem if you use shades of
gray, green, or magenta). You should port your code to use the
creator function <a href="ntqcolor.html#qRgb">qRgb</a>(int r,int g,int b) and the
access functions <a href="ntqcolor.html#qRed">qRed</a>(TQRgb), <a href="ntqcolor.html#qBlue">qBlue</a>(TQRgb), and <a href="ntqcolor.html#qGreen">qGreen</a>(TQRgb).
creator function <a href="ntqcolor.html#qRgb">tqRgb</a>(int r,int g,int b) and the
access functions <a href="ntqcolor.html#qRed">tqRed</a>(TQRgb), <a href="ntqcolor.html#qBlue">tqBlue</a>(TQRgb), and <a href="ntqcolor.html#qGreen">tqGreen</a>(TQRgb).
If you are using the alpha channel, it hasn't moved, but you should use
the functions <a href="ntqcolor.html#qRgba">qRgba</a>(int,int,int,int) and <a href="ntqcolor.html#qAlpha">qAlpha</a>(TQRgb). Note also that
the functions <a href="ntqcolor.html#qRgba">tqRgba</a>(int,int,int,int) and <a href="ntqcolor.html#qAlpha">tqAlpha</a>(TQRgb). Note also that
<a href="ntqcolor.html#pixel">TQColor::pixel</a>() does <i>not</i> return a TQRgb (it never did on all platforms,
but your code may have assumed so on your platform) - this may also produce
strange color results - use <a href="ntqcolor.html#rgb">TQColor::rgb</a>() if you want a TQRgb.

@ -313,7 +313,7 @@ private:
{
if ( timer_driven ) {
if ( pb ) {
<a href="ntqapplication.html#qWarning">qWarning</a>("This cannot happen!");
<a href="ntqapplication.html#qWarning">tqWarning</a>("This cannot happen!");
return;
}
rects = n;

@ -69,7 +69,7 @@ appropriate to create and show the application interface.
<a href="ntqapplication.html">TQApplication</a> a(argc,argv);
if ( !TQGLFormat::hasOpenGL() ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "This system has no OpenGL support. Exiting." );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "This system has no OpenGL support. Exiting." );
return -1;
}

@ -45,10 +45,10 @@ body { background: #ffffff; color: black; }
</ul>
<h2>Related Functions</h2>
<ul>
<li class=fn>TQByteArray <a href="#qCompress"><b>qCompress</b></a> ( const&nbsp;TQByteArray&nbsp;&amp;&nbsp;data )</li>
<li class=fn>TQByteArray <a href="#qCompress-2"><b>qCompress</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )</li>
<li class=fn>TQByteArray <a href="#qUncompress"><b>qUncompress</b></a> ( const&nbsp;TQByteArray&nbsp;&amp;&nbsp;data )</li>
<li class=fn>TQByteArray <a href="#qUncompress-2"><b>qUncompress</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )</li>
<li class=fn>TQByteArray <a href="#qCompress"><b>tqCompress</b></a> ( const&nbsp;TQByteArray&nbsp;&amp;&nbsp;data )</li>
<li class=fn>TQByteArray <a href="#qCompress-2"><b>tqCompress</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )</li>
<li class=fn>TQByteArray <a href="#qUncompress"><b>tqUncompress</b></a> ( const&nbsp;TQByteArray&nbsp;&amp;&nbsp;data )</li>
<li class=fn>TQByteArray <a href="#qUncompress-2"><b>tqUncompress</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
@ -74,22 +74,22 @@ TQByteArray is implemented as a <a href="ntqmemarray.html">TQMemArray</a>&lt;cha
<p> Constructs a TQByteArray of size <em>size</em>.
<hr><h2>Related Functions</h2>
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qCompress"></a>qCompress ( const&nbsp;<a href="qbytearray.html">TQByteArray</a>&nbsp;&amp;&nbsp;data )
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qCompress"></a>tqCompress ( const&nbsp;<a href="qbytearray.html">TQByteArray</a>&nbsp;&amp;&nbsp;data )
</h3>
<p>
<p> Compresses the array <em>data</em> and returns the compressed byte
array using zlib.
<p> <p>See also <a href="#qUncompress">qUncompress</a>().
<p> <p>See also <a href="#qUncompress">tqUncompress</a>().
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qCompress-2"></a>qCompress ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qCompress-2"></a>tqCompress ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )
</h3>
<p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Compresses the array <em>data</em> which is <em>nbytes</em> long and returns the
compressed byte array.
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qUncompress"></a>qUncompress ( const&nbsp;<a href="qbytearray.html">TQByteArray</a>&nbsp;&amp;&nbsp;data )
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qUncompress"></a>tqUncompress ( const&nbsp;<a href="qbytearray.html">TQByteArray</a>&nbsp;&amp;&nbsp;data )
</h3>
<p>
@ -97,9 +97,9 @@ compressed byte array.
array.
<p> Returns an empty TQByteArray if the input data was corrupt.
<p> <p>See also <a href="#qCompress">qCompress</a>().
<p> <p>See also <a href="#qCompress">tqCompress</a>().
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qUncompress-2"></a>qUncompress ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )
<h3 class=fn><a href="qbytearray.html">TQByteArray</a> <a name="qUncompress-2"></a>tqUncompress ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;nbytes )
</h3>
<p> This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

@ -71,7 +71,7 @@ subclass TQCanvasView. You might then reimplement
<a href="qcanvasitemlist.html">TQCanvasItemList</a> l = <a href="#canvas">canvas</a>()-&gt;collisions(e-&gt;<a href="qmouseevent.html#pos">pos</a>());
for (TQCanvasItemList::Iterator it=l.<a href="ntqvaluelist.html#begin">begin</a>(); it!=l.<a href="ntqvaluelist.html#end">end</a>(); ++it) {
if ( (*it)-&gt;rtti() == TQCanvasRectangle::RTTI )
<a href="ntqapplication.html#qDebug">qDebug</a>("A TQCanvasRectangle lies somewhere at this point");
<a href="ntqapplication.html#qDebug">tqDebug</a>("A TQCanvasRectangle lies somewhere at this point");
}
}
</pre>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 150 KiB

@ -65,7 +65,7 @@ If this function is called with <em>on</em> set to TRUE, and <a href="#rewindabl
is TRUE, then the data source must take measures to allow the <a href="#rewind">rewind</a>()
function to subsequently operate as described. If rewindable() is FALSE,
the function should call <a href="#enableRewind">TQDataSource::enableRewind</a>(), which aborts with
a <a href="ntqapplication.html#qFatal">qFatal</a>() error.
a <a href="ntqapplication.html#qFatal">tqFatal</a>() error.
<p> For example, a network connection may choose to use a disk cache
of input only if rewinding is enabled before the first buffer-full of
data is discarded, returning FALSE in rewindable() if that first buffer

@ -345,7 +345,7 @@ int main( int argc, char ** argv )
else if ( arg == "-custom" )
custom = TRUE;
else if ( arg[0] == '-' ) {
<a href="ntqapplication.html#qDebug">qDebug</a>("Usage: qdir [-any | -dir | -custom] [-preview] [-default f] {-filter f} [caption ...]\n"
<a href="ntqapplication.html#qDebug">tqDebug</a>("Usage: qdir [-any | -dir | -custom] [-preview] [-default f] {-filter f} [caption ...]\n"
" -any Get any filename, need not exist.\n"
" -dir Return a directory rather than a file.\n"
" -custom Opens a customized TQFileDialog with \n"

@ -131,7 +131,7 @@ requested features the system was able to provide:
if ( !w-&gt;format().stereo() ) {
// ok, goggles off
if ( !w-&gt;format().hasOverlay() ) {
<a href="ntqapplication.html#qFatal">qFatal</a>( "Cool hardware required" );
<a href="ntqapplication.html#qFatal">tqFatal</a>( "Cool hardware required" );
}
}
</pre>
@ -172,9 +172,9 @@ in classes derived from <a href="qglwidget.html">TQGLWidget</a>, for example:
: <a href="qglwidget.html">TQGLWidget</a>( <a href="#TQGLFormat">TQGLFormat</a>( StencilBuffer | AlphaChannel ), parent, name )
{
if ( !format().stencil() )
<a href="ntqapplication.html#qWarning">qWarning</a>( "Could not get stencil buffer; results will be suboptimal" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Could not get stencil buffer; results will be suboptimal" );
if ( !format().alphaChannel() )
<a href="ntqapplication.html#qWarning">qWarning</a>( "Could not get alpha channel; results will be suboptimal" );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Could not get alpha channel; results will be suboptimal" );
...
}
</pre>

@ -379,8 +379,8 @@ void <a name="f490"></a>MagWidget::grabAround(TQPoint pos)
{
<a name="x1776"></a> TQRgb px = image.<a href="ntqimage.html#pixel">pixel</a>(x,y);
<a name="x1795"></a> pixelinfo.<a href="ntqstring.html#sprintf">sprintf</a>(" %3d,%3d,%3d #%02x%02x%02x",
<a href="ntqcolor.html#qRed">qRed</a>(px), tqGreen(px), tqBlue(px),
<a href="ntqcolor.html#qRed">qRed</a>(px), tqGreen(px), tqBlue(px));
<a href="ntqcolor.html#qRed">tqRed</a>(px), tqGreen(px), tqBlue(px),
<a href="ntqcolor.html#qRed">tqRed</a>(px), tqGreen(px), tqBlue(px));
}
<a href="ntqstring.html">TQString</a> label;
label.<a href="ntqstring.html#sprintf">sprintf</a>( "x=%d, y=%d %s",

@ -238,14 +238,14 @@
<keyword ref="ntqapplication.html#~QApplication">~QApplication</keyword>
<keyword ref="ntqapplication.html#Q_ASSERT">Q_ASSERT</keyword>
<keyword ref="ntqapplication.html#TQ_CHECK_PTR">TQ_CHECK_PTR</keyword>
<keyword ref="ntqapplication.html#qAddPostRoutine">qAddPostRoutine</keyword>
<keyword ref="ntqapplication.html#qDebug">qDebug</keyword>
<keyword ref="ntqapplication.html#qFatal">qFatal</keyword>
<keyword ref="ntqapplication.html#qAddPostRoutine">tqAddPostRoutine</keyword>
<keyword ref="ntqapplication.html#qDebug">tqDebug</keyword>
<keyword ref="ntqapplication.html#qFatal">tqFatal</keyword>
<keyword ref="ntqapplication.html#qInstallMsgHandler">qInstallMsgHandler</keyword>
<keyword ref="ntqapplication.html#qSysInfo">qSysInfo</keyword>
<keyword ref="ntqapplication.html#qSystemWarning">qSystemWarning</keyword>
<keyword ref="ntqapplication.html#qVersion">qVersion</keyword>
<keyword ref="ntqapplication.html#qWarning">qWarning</keyword>
<keyword ref="ntqapplication.html#qSysInfo">tqSysInfo</keyword>
<keyword ref="ntqapplication.html#qSystemWarning">tqSystemWarning</keyword>
<keyword ref="ntqapplication.html#qVersion">tqVersion</keyword>
<keyword ref="ntqapplication.html#qWarning">tqWarning</keyword>
<section ref="qapplication-members.html" title="List of All Member Functions"/>
<section ref="qapplication-h.html" title="Header File"/>
</section>
@ -673,8 +673,8 @@
</section>
<section ref="qbytearray.html" title="QByteArray Class Reference">
<keyword ref="qbytearray.html">QByteArray</keyword>
<keyword ref="qbytearray.html#qCompress">qCompress</keyword>
<keyword ref="qbytearray.html#qUncompress">qUncompress</keyword>
<keyword ref="qbytearray.html#qCompress">tqCompress</keyword>
<keyword ref="qbytearray.html#qUncompress">tqUncompress</keyword>
<section ref="qbytearray-members.html" title="List of All Member Functions"/>
<section ref="qcstring-h.html" title="Header File"/>
</section>
@ -1128,13 +1128,13 @@
<keyword ref="ntqcolor.html#setRgb">setRgb</keyword>
<keyword ref="ntqcolor.html#operator-lt-lt">operator&lt;&lt;</keyword>
<keyword ref="ntqcolor.html#operator-gt-gt">operator&gt;&gt;</keyword>
<keyword ref="ntqcolor.html#qAlpha">qAlpha</keyword>
<keyword ref="ntqcolor.html#qBlue">qBlue</keyword>
<keyword ref="ntqcolor.html#qGray">qGray</keyword>
<keyword ref="ntqcolor.html#qGreen">qGreen</keyword>
<keyword ref="ntqcolor.html#qRed">qRed</keyword>
<keyword ref="ntqcolor.html#qRgb">qRgb</keyword>
<keyword ref="ntqcolor.html#qRgba">qRgba</keyword>
<keyword ref="ntqcolor.html#qAlpha">tqAlpha</keyword>
<keyword ref="ntqcolor.html#qBlue">tqBlue</keyword>
<keyword ref="ntqcolor.html#qGray">tqGray</keyword>
<keyword ref="ntqcolor.html#qGreen">tqGreen</keyword>
<keyword ref="ntqcolor.html#qRed">tqRed</keyword>
<keyword ref="ntqcolor.html#qRgb">tqRgb</keyword>
<keyword ref="ntqcolor.html#qRgba">tqRgba</keyword>
<section ref="qcolor-members.html" title="List of All Member Functions"/>
<section ref="qcolor-h.html" title="Header File"/>
</section>
@ -1360,15 +1360,15 @@
<keyword ref="ntqcstring.html#operator-gt">operator&gt;</keyword>
<keyword ref="ntqcstring.html#operator-gt-eq">operator&gt;=</keyword>
<keyword ref="ntqcstring.html#operator-gt-gt">operator&gt;&gt;</keyword>
<keyword ref="ntqcstring.html#qmemmove">qmemmove</keyword>
<keyword ref="ntqcstring.html#qmemmove">tqmemmove</keyword>
<keyword ref="ntqcstring.html#qstrcmp">qstrcmp</keyword>
<keyword ref="ntqcstring.html#qstrcpy">qstrcpy</keyword>
<keyword ref="ntqcstring.html#qstrdup">qstrdup</keyword>
<keyword ref="ntqcstring.html#qstricmp">qstricmp</keyword>
<keyword ref="ntqcstring.html#qstrlen">qstrlen</keyword>
<keyword ref="ntqcstring.html#qstrncmp">qstrncmp</keyword>
<keyword ref="ntqcstring.html#qstrncpy">qstrncpy</keyword>
<keyword ref="ntqcstring.html#qstrnicmp">qstrnicmp</keyword>
<keyword ref="ntqcstring.html#qstrdup">tqstrdup</keyword>
<keyword ref="ntqcstring.html#qstricmp">tqstricmp</keyword>
<keyword ref="ntqcstring.html#qstrlen">tqstrlen</keyword>
<keyword ref="ntqcstring.html#qstrncmp">tqstrncmp</keyword>
<keyword ref="ntqcstring.html#qstrncpy">tqstrncpy</keyword>
<keyword ref="ntqcstring.html#qstrnicmp">tqstrnicmp</keyword>
<section ref="qcstring-members.html" title="List of All Member Functions"/>
<section ref="qcstring-h.html" title="Header File"/>
</section>
@ -4753,7 +4753,7 @@
<keyword ref="ntqmemarray.html#~QMemArray">~QMemArray</keyword>
<keyword ref="ntqmemarray.html#operator-lt-lt">operator&lt;&lt;</keyword>
<keyword ref="ntqmemarray.html#operator-gt-gt">operator&gt;&gt;</keyword>
<keyword ref="ntqmemarray.html#qChecksum">qChecksum</keyword>
<keyword ref="ntqmemarray.html#qChecksum">tqChecksum</keyword>
<section ref="qmemarray-members.html" title="List of All Member Functions"/>
<section ref="qmemarray-h.html" title="Header File"/>
</section>
@ -8585,7 +8585,7 @@
<keyword ref="ntqurloperator.html#startedNextCopy">startedNextCopy</keyword>
<keyword ref="ntqurloperator.html#stop">stop</keyword>
<keyword ref="ntqurloperator.html#~QUrlOperator">~QUrlOperator</keyword>
<keyword ref="ntqurloperator.html#qInitNetworkProtocols">qInitNetworkProtocols</keyword>
<keyword ref="ntqurloperator.html#qInitNetworkProtocols">tqInitNetworkProtocols</keyword>
<section ref="qurloperator-members.html" title="List of All Member Functions"/>
<section ref="qurloperator-h.html" title="Header File"/>
</section>

@ -316,7 +316,7 @@ Sets this time to the current time. This is practical for timing:
TQTime t;
t.<a href="#start">start</a>();
some_lengthy_task();
<a href="ntqapplication.html#qDebug">qDebug</a>( "Time elapsed: %d ms", t.<a href="#elapsed">elapsed</a>() );
<a href="ntqapplication.html#qDebug">tqDebug</a>( "Time elapsed: %d ms", t.<a href="#elapsed">elapsed</a>() );
</pre>
<p> <p>See also <a href="#restart">restart</a>(), <a href="#elapsed">elapsed</a>(), and <a href="#currentTime">currentTime</a>().

@ -68,7 +68,7 @@ int main( int argc, char *argv[] )
int id = cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toInt();
<a href="ntqstring.html">TQString</a> name = cur.<a href="ntqsqlquery.html#value">value</a>( "forename" ).toString() + " " +
cur.<a href="ntqsqlquery.html#value">value</a>( "surname" ).toString();
<a href="ntqapplication.html#qDebug">qDebug</a>( TQString::<a href="ntqstring.html#number">number</a>( id ) + ": " + name );
<a href="ntqapplication.html#qDebug">tqDebug</a>( TQString::<a href="ntqstring.html#number">number</a>( id ) + ": " + name );
}
}

@ -57,7 +57,7 @@ int main( int argc, char *argv[] )
<a href="ntqsqlindex.html">TQSqlIndex</a> order = cur.<a href="ntqsqlcursor.html#index">index</a>( fields );
cur.<a href="ntqsqlcursor.html#select">select</a>( order );
while ( cur.<a href="ntqsqlquery.html#next">next</a>() ) {
<a href="ntqapplication.html#qDebug">qDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
<a href="ntqapplication.html#qDebug">tqDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
cur.<a href="ntqsqlquery.html#value">value</a>( "surname" ).toString() + " " +
cur.<a href="ntqsqlquery.html#value">value</a>( "forename" ).toString() );
}

@ -59,7 +59,7 @@ int main( int argc, char *argv[] )
cur.<a href="ntqsqlrecord.html#setValue">setValue</a>( "surname", "Bloggs" );
cur.<a href="ntqsqlcursor.html#select">select</a>( filter, order );
while ( cur.<a href="ntqsqlquery.html#next">next</a>() ) {
<a href="ntqapplication.html#qDebug">qDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
<a href="ntqapplication.html#qDebug">tqDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
cur.<a href="ntqsqlquery.html#value">value</a>( "surname" ).toString() + " " +
cur.<a href="ntqsqlquery.html#value">value</a>( "forename" ).toString() );
}

@ -55,7 +55,7 @@ int main( int argc, char *argv[] )
<a href="ntqsqlquery.html">TQSqlQuery</a> query( "SELECT id, surname FROM staff" );
if ( query.<a href="ntqsqlquery.html#isActive">isActive</a>() ) {
while ( query.<a href="ntqsqlquery.html#next">next</a>() ) {
<a href="ntqapplication.html#qDebug">qDebug</a>( query.<a href="ntqsqlquery.html#value">value</a>(0).toString() + ": " +
<a href="ntqapplication.html#qDebug">tqDebug</a>( query.<a href="ntqsqlquery.html#value">value</a>(0).toString() + ": " +
query.<a href="ntqsqlquery.html#value">value</a>(1).toString() );
}
}

@ -55,7 +55,7 @@ int main( int argc, char *argv[] )
<a href="ntqsqlcursor.html">TQSqlCursor</a> cur( "staff" ); // Specify the table/view name
cur.<a href="ntqsqlcursor.html#select">select</a>(); // We'll retrieve every record
while ( cur.<a href="ntqsqlquery.html#next">next</a>() ) {
<a href="ntqapplication.html#qDebug">qDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
<a href="ntqapplication.html#qDebug">tqDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
cur.<a href="ntqsqlquery.html#value">value</a>( "surname" ).toString() + " " +
cur.<a href="ntqsqlquery.html#value">value</a>( "salary" ).toString() );
}

@ -314,7 +314,7 @@ function in <tt>connection.h</tt>.
<a name="x2152"></a> defaultDB-&gt;<a href="ntqsqldatabase.html#setPassword">setPassword</a>( DB_SALES_PASSWD );
<a name="x2151"></a> defaultDB-&gt;<a href="ntqsqldatabase.html#setHostName">setHostName</a>( DB_SALES_HOST );
<a name="x2149"></a> if ( ! defaultDB-&gt;<a href="ntqsqldatabase.html#open">open</a>() ) {
<a name="x2148"></a> <a href="ntqapplication.html#qWarning">qWarning</a>( "Failed to open sales database: " + defaultDB-&gt;<a href="ntqsqldatabase.html#lastError">lastError</a>().text() );
<a name="x2148"></a> <a href="ntqapplication.html#qWarning">tqWarning</a>( "Failed to open sales database: " + defaultDB-&gt;<a href="ntqsqldatabase.html#lastError">lastError</a>().text() );
return FALSE;
}
@ -324,7 +324,7 @@ function in <tt>connection.h</tt>.
oracle-&gt;<a href="ntqsqldatabase.html#setPassword">setPassword</a>( DB_ORDERS_PASSWD );
oracle-&gt;<a href="ntqsqldatabase.html#setHostName">setHostName</a>( DB_ORDERS_HOST );
if ( ! oracle-&gt;<a href="ntqsqldatabase.html#open">open</a>() ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "Failed to open orders database: " + oracle-&gt;<a href="ntqsqldatabase.html#lastError">lastError</a>().text() );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "Failed to open orders database: " + oracle-&gt;<a href="ntqsqldatabase.html#lastError">lastError</a>().text() );
return FALSE;
}
@ -570,7 +570,7 @@ retrieve data from it.
<a href="ntqsqlquery.html">TQSqlQuery</a> query( "SELECT id, surname FROM staff" );
<a name="x2175"></a> if ( query.<a href="ntqsqlquery.html#isActive">isActive</a>() ) {
<a name="x2176"></a> while ( query.<a href="ntqsqlquery.html#next">next</a>() ) {
<a href="ntqapplication.html#qDebug">qDebug</a>( query.<a href="ntqsqlquery.html#value">value</a>(0).toString() + ": " +
<a href="ntqapplication.html#qDebug">tqDebug</a>( query.<a href="ntqsqlquery.html#value">value</a>(0).toString() + ": " +
<a name="x2177"></a> query.<a href="ntqsqlquery.html#value">value</a>(1).toString() );
}
}
@ -641,7 +641,7 @@ discuss <a href="#Subclassing_QSqlCursor">subclassing TQSqlCursor</a>.
<a href="ntqsqlcursor.html">TQSqlCursor</a> cur( "staff" ); // Specify the table/view name
<a name="x2178"></a> cur.<a href="ntqsqlcursor.html#select">select</a>(); // We'll retrieve every record
while ( cur.<a href="ntqsqlquery.html#next">next</a>() ) {
<a name="x2179"></a> <a href="ntqapplication.html#qDebug">qDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
<a name="x2179"></a> <a href="ntqapplication.html#qDebug">tqDebug</a>( cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toString() + ": " +
cur.<a href="ntqsqlquery.html#value">value</a>( "surname" ).toString() + " " +
cur.<a href="ntqsqlquery.html#value">value</a>( "salary" ).toString() );
}
@ -780,7 +780,7 @@ setValue() to ensure that the value used is the one we want.
<a name="x2191"></a> int id = cur.<a href="ntqsqlquery.html#value">value</a>( "id" ).toInt();
<a href="ntqstring.html">TQString</a> name = cur.<a href="ntqsqlquery.html#value">value</a>( "forename" ).toString() + " " +
cur.<a href="ntqsqlquery.html#value">value</a>( "surname" ).toString();
<a name="x2193"></a> <a href="ntqapplication.html#qDebug">qDebug</a>( TQString::<a href="ntqstring.html#number">number</a>( id ) + ": " + name );
<a name="x2193"></a> <a href="ntqapplication.html#qDebug">tqDebug</a>( TQString::<a href="ntqstring.html#number">number</a>( id ) + ": " + name );
}
</pre><blockquote><p align="center"><em> From <a href="sql-overview-extract-main-cpp.html">sql/overview/extract/main.cpp</a>
</em></p>
@ -804,7 +804,7 @@ values ourselves with the setValue() calls. The order fields are used
in the <tt>ORDER BY</tt> clause.
<p> Now we iterate through each matching record (if any). We retrieve the
contents of the id, forename and surname fields and pass them on to
some processing function, in this example a simple <a href="ntqapplication.html#qDebug">qDebug</a>() call.
some processing function, in this example a simple <a href="ntqapplication.html#qDebug">tqDebug</a>() call.
<p> <a name="Manipulating_Records"></a>
<h3> Manipulating Records
</h3>

@ -71,7 +71,7 @@ void <a name="f46"></a>LCDRange::setValue( int value )
void <a name="f47"></a>LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );

@ -71,7 +71,7 @@ void <a name="f55"></a>LCDRange::setValue( int value )
void <a name="f56"></a>LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );

@ -101,7 +101,7 @@ void <a name="f71"></a>LCDRange::setValue( int value )
void <a name="f72"></a>LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );

@ -106,7 +106,7 @@ void <a name="f91"></a>LCDRange::setValue( int value )
void <a name="f92"></a>LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );

@ -106,7 +106,7 @@ void <a name="f118"></a>LCDRange::setValue( int value )
void <a name="f119"></a>LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );

@ -71,7 +71,7 @@ void <a name="f32"></a>LCDRange::setValue( int value )
void <a name="f33"></a>LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );

@ -71,7 +71,7 @@ void <a name="f39"></a>LCDRange::setValue( int value )
void <a name="f40"></a>LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );

@ -554,7 +554,7 @@ int main( int argc, char **argv )
if ( argc == 2 ) // get board size n
n = atoi(argv[1]);
if ( n &lt; 3 || n &gt; 10 ) { // out of range
<a href="ntqapplication.html#qWarning">qWarning</a>( "%s: Board size must be from 3x3 to 10x10", argv[0] );
<a href="ntqapplication.html#qWarning">tqWarning</a>( "%s: Board size must be from 3x3 to 10x10", argv[0] );
return 1;
}
TicTacToe ttt( n ); // create game

@ -136,7 +136,7 @@ previous chapters.
}
</pre>
<p> Because the MyWidget class doesn't know about the application object, it
has to connect to TQt's pointer to it, <tt>qApp</tt>.
has to connect to TQt's pointer to it, <tt>tqApp</tt>.
<p> A widget is a software component and should know as little as possible
about its environment in order to be as general and reusable as
possible.

@ -63,7 +63,7 @@ Until now, it has been fixed at 0..99.
<p> <pre> void LCDRange::setRange( int minVal, int maxVal )
{
if ( minVal &lt; 0 || maxVal &gt; 99 || minVal &gt; maxVal ) {
<a href="ntqapplication.html#qWarning">qWarning</a>( "LCDRange::setRange(%d,%d)\n"
<a href="ntqapplication.html#qWarning">tqWarning</a>( "LCDRange::setRange(%d,%d)\n"
"\tRange must be 0..99\n"
"\tand minVal must not be greater than maxVal",
minVal, maxVal );
@ -77,7 +77,7 @@ have set up the <a href="ntqlcdnumber.html">TQLCDNumber</a> to always display tw
limit the possible range of <tt>minVal</tt> and <tt>maxVal</tt> to 0..99 to avoid
overflow of the TQLCDNumber. (We could have allowed values down to -9
but chose not to.) If the arguments are illegal, we use TQt's
<a href="ntqapplication.html#qWarning">qWarning</a>() function to issue a warning to the user and return
<a href="ntqapplication.html#qWarning">tqWarning</a>() function to issue a warning to the user and return
immediately. tqWarning() is a printf-like function that by default
sends its output to <tt>stderr</tt>. If you want, you can install your own handler
function using <a href="ntqapplication.html#qInstallMsgHandler">::qInstallMsgHandler</a>().

@ -44,6 +44,10 @@
#include "ntqsocketnotifier.h"
#endif // QT_H
#if defined(QT_USE_GLIBMAINLOOP)
#include <glib.h>
#endif // QT_USE_GLIBMAINLOOP
class TQEventLoopPrivate;
class TQSocketNotifier;
class TQTimer;
@ -95,6 +99,22 @@ public:
virtual void wakeUp();
#if defined(QT_USE_GLIBMAINLOOP)
// glib main loop support
/* internal: used to fit glib-main-loop gsource concept */
bool gsourcePrepare(GSource *gs, int * timeout);
bool gsourceCheck(GSource * gs);
bool gsourceDispatch(GSource * gs);
bool processX11Events();
// end glib main loop support
#endif //QT_USE_GLIBMAINLOOP
signals:
void awake();
void aboutToBlock();

@ -0,0 +1,130 @@
/**
** TQt->glib main event loop integration by Norbert Frese 2005
** code based on qeventloop_p.h 3.3.5
**
*/
/****************************************************************************
** $Id: qt/qeventloop_glib_p.h
**
** Definition of TQEventLoop class
**
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
**
** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
** licenses for TQt/Embedded may use this file in accordance with the
** TQt Embedded Commercial License Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about TQt Commercial License Agreements.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef TQEVENTLOOP_GLIB_P_H
#define TQEVENTLOOP_GLIB_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the TQt API. This header file may
// change from version to version without notice, or even be
// removed.
//
// We mean it.
//
//
#ifndef QT_H
#include "qplatformdefs.h"
#endif // QT_H
// SCO OpenServer redefines raise -> kill
#if defined(raise)
# undef raise
#endif
#include "ntqeventloop.h"
#include "ntqwindowdefs.h"
class TQSocketNotifier;
#include "ntqptrlist.h"
#include <glib.h>
// uncomment this for main loop related debug-output
// #define DEBUG_QT_GLIBMAINLOOP 1
// Wrapper for TQSocketNotifier Object and GPollFD
struct TQSockNotGPollFD
{
TQSocketNotifier *obj;
GPollFD gPollFD;
gushort events; // save events
bool pending;
};
class TQEventLoopPrivate
{
public:
TQEventLoopPrivate()
{
reset();
}
void reset() {
looplevel = 0;
quitcode = 0;
quitnow = FALSE;
exitloop = FALSE;
shortcut = FALSE;
}
int looplevel;
int quitcode;
unsigned int quitnow : 1;
unsigned int exitloop : 1;
unsigned int shortcut : 1;
#if defined(Q_WS_X11)
int xfd;
GPollFD x_gPollFD;
#endif // Q_WS_X11
int thread_pipe[2];
GPollFD threadPipe_gPollFD;
TQPtrList<TQSockNotGPollFD> sn_list;
// pending socket notifiers list
TQPtrList<TQSockNotGPollFD> sn_pending_list;
// store flags for one iteration
uint pev_flags;
// My GSource
GSource * gSource;
};
#endif // TQEVENTLOOP_GLIB_P_H

@ -49,6 +49,10 @@
//
//
#if defined(QT_USE_GLIBMAINLOOP)
#include "qeventloop_glib_p.h" // use a different header file!!!
#else
#ifndef QT_H
#include "qplatformdefs.h"
#endif // QT_H
@ -147,4 +151,6 @@ public:
};
#endif // !QT_USE_GLIBMAINLOOP
#endif // TQEVENTLOOP_P_H

@ -0,0 +1,593 @@
/**
** TQt->glib main event loop integration by Norbert Frese 2005
** code based on qeventloop_unix.cpp 3.3.5
**
*/
/****************************************************************************
** $Id: qt/qeventloop_unix_glib.cpp
**
** Implementation of TQEventLoop class
**
** Copyright (C) 2000-2005 Trolltech AS. All rights reserved.
**
** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
** licenses for Unix/X11 or for TQt/Embedded may use this file in accordance
** with the TQt Commercial License Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about TQt Commercial License Agreements.
** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "qeventloop_glib_p.h" // includes qplatformdefs.h
#include "ntqeventloop.h"
#include "ntqapplication.h"
#include "ntqbitarray.h"
#include <stdlib.h>
#include <sys/types.h>
#include <glib.h>
/*****************************************************************************
Timer handling; UNIX has no application timer support so we'll have to
make our own from scratch.
NOTE: These functions are for internal use. TQObject::startTimer() and
TQObject::killTimer() are for public use.
The TQTimer class provides a high-level interface which translates
timer events into signals.
qStartTimer( interval, obj )
Starts a timer which will run until it is killed with qKillTimer()
Arguments:
int interval timer interval in milliseconds
TQObject *obj where to send the timer event
Returns:
int timer identifier, or zero if not successful
qKillTimer( timerId )
Stops a timer specified by a timer identifier.
Arguments:
int timerId timer identifier
Returns:
bool TRUE if successful
qKillTimer( obj )
Stops all timers that are sent to the specified object.
Arguments:
TQObject *obj object receiving timer events
Returns:
bool TRUE if successful
*****************************************************************************/
//
// Internal data structure for timers
//
struct TimerInfo { // internal timer info
int id; // - timer identifier
timeval interval; // - timer interval
timeval timeout; // - when to sent event
TQObject *obj; // - object to receive event
};
typedef TQPtrList<TimerInfo> TimerList; // list of TimerInfo structs
static TQBitArray *timerBitVec; // timer bit vector
static TimerList *timerList = 0; // timer list
static void initTimers();
void cleanupTimers();
static timeval watchtime; // watch if time is turned back
timeval *qt_wait_timer();
timeval *qt_wait_timer_max = 0;
//
// Internal operator functions for timevals
//
static inline bool operator<( const timeval &t1, const timeval &t2 )
{
return t1.tv_sec < t2.tv_sec ||
(t1.tv_sec == t2.tv_sec && t1.tv_usec < t2.tv_usec);
}
static inline bool operator==( const timeval &t1, const timeval &t2 )
{
return t1.tv_sec == t2.tv_sec && t1.tv_usec == t2.tv_usec;
}
static inline timeval &operator+=( timeval &t1, const timeval &t2 )
{
t1.tv_sec += t2.tv_sec;
if ( (t1.tv_usec += t2.tv_usec) >= 1000000 ) {
t1.tv_sec++;
t1.tv_usec -= 1000000;
}
return t1;
}
static inline timeval operator+( const timeval &t1, const timeval &t2 )
{
timeval tmp;
tmp.tv_sec = t1.tv_sec + t2.tv_sec;
if ( (tmp.tv_usec = t1.tv_usec + t2.tv_usec) >= 1000000 ) {
tmp.tv_sec++;
tmp.tv_usec -= 1000000;
}
return tmp;
}
static inline timeval operator-( const timeval &t1, const timeval &t2 )
{
timeval tmp;
tmp.tv_sec = t1.tv_sec - t2.tv_sec;
if ( (tmp.tv_usec = t1.tv_usec - t2.tv_usec) < 0 ) {
tmp.tv_sec--;
tmp.tv_usec += 1000000;
}
return tmp;
}
//
// Internal functions for manipulating timer data structures.
// The timerBitVec array is used for keeping track of timer identifiers.
//
static int allocTimerId() // find avail timer identifier
{
int i = timerBitVec->size()-1;
while ( i >= 0 && (*timerBitVec)[i] )
i--;
if ( i < 0 ) {
i = timerBitVec->size();
timerBitVec->resize( 4 * i );
for( int j=timerBitVec->size()-1; j > i; j-- )
timerBitVec->clearBit( j );
}
timerBitVec->setBit( i );
return i+1;
}
static void insertTimer( const TimerInfo *ti ) // insert timer info into list
{
TimerInfo *t = timerList->first();
int index = 0;
#if defined(QT_DEBUG)
int dangerCount = 0;
#endif
while ( t && t->timeout < ti->timeout ) { // list is sorted by timeout
#if defined(QT_DEBUG)
if ( t->obj == ti->obj )
dangerCount++;
#endif
t = timerList->next();
index++;
}
timerList->insert( index, ti ); // inserts sorted
#if defined(QT_DEBUG)
if ( dangerCount > 16 )
tqDebug( "TQObject: %d timers now exist for object %s::%s",
dangerCount, ti->obj->className(), ti->obj->name() );
#endif
}
static inline void getTime( timeval &t ) // get time of day
{
gettimeofday( &t, 0 );
while ( t.tv_usec >= 1000000 ) { // NTP-related fix
t.tv_usec -= 1000000;
t.tv_sec++;
}
while ( t.tv_usec < 0 ) {
if ( t.tv_sec > 0 ) {
t.tv_usec += 1000000;
t.tv_sec--;
} else {
t.tv_usec = 0;
break;
}
}
}
static void repairTimer( const timeval &time ) // repair broken timer
{
timeval diff = watchtime - time;
register TimerInfo *t = timerList->first();
while ( t ) { // repair all timers
t->timeout = t->timeout - diff;
t = timerList->next();
}
}
//
// Timer activation functions (called from the event loop)
//
/*
Returns the time to wait for the next timer, or null if no timers are
waiting.
The result is bounded to qt_wait_timer_max if this exists.
*/
timeval *qt_wait_timer()
{
static timeval tm;
bool first = TRUE;
timeval currentTime;
if ( timerList && timerList->count() ) { // there are waiting timers
getTime( currentTime );
if ( first ) {
if ( currentTime < watchtime ) // clock was turned back
repairTimer( currentTime );
first = FALSE;
watchtime = currentTime;
}
TimerInfo *t = timerList->first(); // first waiting timer
if ( currentTime < t->timeout ) { // time to wait
tm = t->timeout - currentTime;
} else {
tm.tv_sec = 0; // no time to wait
tm.tv_usec = 0;
}
if ( qt_wait_timer_max && *qt_wait_timer_max < tm )
tm = *qt_wait_timer_max;
return &tm;
}
if ( qt_wait_timer_max ) {
tm = *qt_wait_timer_max;
return &tm;
}
return 0; // no timers
}
// Timer initialization
static void initTimers() // initialize timers
{
timerBitVec = new TQBitArray( 128 );
TQ_CHECK_PTR( timerBitVec );
int i = timerBitVec->size();
while( i-- > 0 )
timerBitVec->clearBit( i );
timerList = new TimerList;
TQ_CHECK_PTR( timerList );
timerList->setAutoDelete( TRUE );
gettimeofday( &watchtime, 0 );
}
// Timer cleanup
void cleanupTimers()
{
delete timerList;
timerList = 0;
delete timerBitVec;
timerBitVec = 0;
}
// Main timer functions for starting and killing timers
int qStartTimer( int interval, TQObject *obj )
{
if ( !timerList ) // initialize timer data
initTimers();
int id = allocTimerId(); // get free timer id
if ( id <= 0 ||
id > (int)timerBitVec->size() || !obj )// cannot create timer
return 0;
timerBitVec->setBit( id-1 ); // set timer active
TimerInfo *t = new TimerInfo; // create timer
TQ_CHECK_PTR( t );
t->id = id;
t->interval.tv_sec = interval/1000;
t->interval.tv_usec = (interval%1000)*1000;
timeval currentTime;
getTime( currentTime );
t->timeout = currentTime + t->interval;
t->obj = obj;
insertTimer( t ); // put timer in list
return id;
}
bool qKillTimer( int id )
{
register TimerInfo *t;
if ( !timerList || id <= 0 ||
id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) )
return FALSE; // not init'd or invalid timer
t = timerList->first();
while ( t && t->id != id ) // find timer info in list
t = timerList->next();
if ( t ) { // id found
timerBitVec->clearBit( id-1 ); // set timer inactive
return timerList->remove();
}
else // id not found
return FALSE;
}
bool qKillTimer( TQObject *obj )
{
register TimerInfo *t;
if ( !timerList ) // not initialized
return FALSE;
t = timerList->first();
while ( t ) { // check all timers
if ( t->obj == obj ) { // object found
timerBitVec->clearBit( t->id-1 );
timerList->remove();
t = timerList->current();
} else {
t = timerList->next();
}
}
return TRUE;
}
/*****************************************************************************
TQEventLoop implementations for Glib-Main-Loop
*****************************************************************************/
void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
{
int sockfd = notifier->socket();
int type = notifier->type();
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQSocketNotifier: Internal error" );
#endif
return;
}
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("register socket notifier %d\n", sockfd);
#endif
TQPtrList<TQSockNotGPollFD> *list = &d->sn_list;
TQSockNotGPollFD *sn;
/*
if ( ! list ) {
// create new list, the TQSockNotType destructor will delete it for us
list = new TQPtrList<TQSockNot>;
TQ_CHECK_PTR( list );
list->setAutoDelete( TRUE );
d->sn_list = list;
}
*/
gushort events=0;
switch (type) {
case 0:
events = G_IO_IN | G_IO_HUP;
break;
case 1:
events = G_IO_OUT;
break;
case 2:
events = G_IO_PRI | G_IO_ERR | G_IO_NVAL;
break;
}
sn = new TQSockNotGPollFD;
TQ_CHECK_PTR( sn );
sn->obj = notifier;
sn->gPollFD.fd = sockfd;
sn->gPollFD.events = events;
sn->events = events; // save events!
sn->pending = FALSE;
list->append( sn );
g_source_add_poll(d->gSource, &sn->gPollFD);
}
void TQEventLoop::unregisterSocketNotifier( TQSocketNotifier *notifier )
{
int sockfd = notifier->socket();
int type = notifier->type();
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQSocketNotifier: Internal error" );
#endif
return;
}
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("unregister socket notifier %d\n", sockfd);
#endif
TQPtrList<TQSockNotGPollFD> *list = &d->sn_list;
TQSockNotGPollFD *sn;
if ( ! list )
return;
sn = list->first();
while ( sn && !(sn->obj == notifier) )
sn = list->next();
if ( !sn ) // not found
return;
d->sn_pending_list.removeRef( sn );
list->remove(); // remove notifier found above
g_source_remove_poll(d->gSource, &sn->gPollFD);
delete sn; // we don't autodelete - lets do it manually
}
void TQEventLoop::setSocketNotifierPending( TQSocketNotifier *notifier )
{
int sockfd = notifier->socket();
int type = notifier->type();
if ( sockfd < 0 || type < 0 || type > 2 || notifier == 0 ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQSocketNotifier: Internal error" );
#endif
return;
}
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("set socket notifier pending %d\n", sockfd);
#endif
TQPtrList<TQSockNotGPollFD> *list = &d->sn_list;
TQSockNotGPollFD *sn;
if ( ! list )
return;
sn = list->first();
while ( sn && !(sn->obj == notifier) )
sn = list->next();
if ( ! sn ) { // not found
return;
}
// We choose a random activation order to be more fair under high load.
// If a constant order is used and a peer early in the list can
// saturate the IO, it might grab our attention completely.
// Also, if we're using a straight list, the callback routines may
// delete other entries from the list before those other entries are
// processed.
if ( !sn->pending ) {
d->sn_pending_list.insert( (rand() & 0xff) %
(d->sn_pending_list.count()+1), sn );
sn->pending = TRUE; // add it only once!
}
}
void TQEventLoop::wakeUp()
{
/*
Apparently, there is not consistency among different operating
systems on how to use FIONREAD.
FreeBSD, Linux and Solaris all expect the 3rd argument to
ioctl() to be an int, which is normally 32-bit even on 64-bit
machines.
IRIX, on the other hand, expects a size_t, which is 64-bit on
64-bit machines.
So, the solution is to use size_t initialized to zero to make
sure all bits are set to zero, preventing underflow with the
FreeBSD/Linux/Solaris ioctls.
*/
size_t nbytes = 0;
char c = 0;
if ( ::ioctl( d->thread_pipe[0], FIONREAD, (char*)&nbytes ) >= 0 && nbytes == 0 ) {
::write( d->thread_pipe[1], &c, 1 );
}
}
int TQEventLoop::timeToWait() const
{
timeval *tm = qt_wait_timer();
if ( ! tm ) // no active timers
return -1;
return (tm->tv_sec*1000) + (tm->tv_usec/1000);
}
int TQEventLoop::activateTimers()
{
if ( !timerList || !timerList->count() ) // no timers
return 0;
bool first = TRUE;
timeval currentTime;
int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0;
register TimerInfo *t;
for ( ;; ) {
if ( ! maxCount-- )
break;
getTime( currentTime ); // get current time
if ( first ) {
if ( currentTime < watchtime ) // clock was turned back
repairTimer( currentTime );
first = FALSE;
watchtime = currentTime;
}
t = timerList->first();
if ( !t || currentTime < t->timeout ) // no timer has expired
break;
if ( ! begin ) {
begin = t;
} else if ( begin == t ) {
// avoid sending the same timer multiple times
break;
} else if ( t->interval < begin->interval || t->interval == begin->interval ) {
begin = t;
}
timerList->take(); // unlink from list
t->timeout += t->interval;
if ( t->timeout < currentTime )
t->timeout = currentTime + t->interval;
insertTimer( t ); // relink timer
if ( t->interval.tv_usec > 0 || t->interval.tv_sec > 0 )
n_act++;
TQTimerEvent e( t->id );
TQApplication::sendEvent( t->obj, &e ); // send event
if ( timerList->findRef( begin ) == -1 )
begin = 0;
}
return n_act;
}
int TQEventLoop::activateSocketNotifiers()
{
if ( d->sn_pending_list.isEmpty() )
return 0;
// activate entries
int n_act = 0;
TQEvent event( TQEvent::SockAct );
TQPtrListIterator<TQSockNotGPollFD> it( d->sn_pending_list );
TQSockNotGPollFD *sn;
while ( (sn=it.current()) ) {
++it;
d->sn_pending_list.removeRef( sn );
if ( sn->pending ) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("activate sn : send event fd=%d\n", sn->gPollFD.fd );
#endif
sn->pending = FALSE;
TQApplication::sendEvent( sn->obj, &event );
n_act++;
}
}
return n_act;
}

@ -0,0 +1,618 @@
/**
** TQt->glib main event loop integration by Norbert Frese 2005
** code based on qeventloop_x11.cpp 3.3.5
**
*/
/****************************************************************************
** $Id: qt/qeventloop_x11_glib.cpp
**
** Implementation of TQEventLoop class
**
** Copyright (C) 2000-2005 Trolltech AS. All rights reserved.
**
** This file is part of the kernel module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
** licenses for Unix/X11 may use this file in accordance with the TQt Commercial
** License Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about TQt Commercial License Agreements.
** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include "qeventloop_glib_p.h" // includes qplatformdefs.h
#include "ntqeventloop.h"
#include "ntqapplication.h"
#include "ntqbitarray.h"
#include "qcolor_p.h"
#include "qt_x11_p.h"
#if defined(QT_THREAD_SUPPORT)
# include "ntqmutex.h"
#endif // QT_THREAD_SUPPORT
#include <errno.h>
#include <glib.h>
// TQt-GSource Structure and Callbacks
typedef struct {
GSource source;
TQEventLoop * qeventLoop;
} TQtGSource;
static gboolean qt_gsource_prepare ( GSource *source,
gint *timeout );
static gboolean qt_gsource_check ( GSource *source );
static gboolean qt_gsource_dispatch ( GSource *source,
GSourceFunc callback, gpointer user_data );
static GSourceFuncs qt_gsource_funcs = {
qt_gsource_prepare,
qt_gsource_check,
qt_gsource_dispatch,
NULL,
NULL,
NULL
};
// forward main loop callbacks to TQEventLoop methods!
static gboolean qt_gsource_prepare ( GSource *source,
gint *timeout )
{
TQtGSource * qtGSource;
qtGSource = (TQtGSource*) source;
return qtGSource->qeventLoop->gsourcePrepare(source, timeout);
}
static gboolean qt_gsource_check ( GSource *source )
{
TQtGSource * qtGSource = (TQtGSource*) source;
return qtGSource->qeventLoop->gsourceCheck(source);
}
static gboolean qt_gsource_dispatch ( GSource *source,
GSourceFunc callback, gpointer user_data )
{
TQtGSource * qtGSource = (TQtGSource*) source;
return qtGSource->qeventLoop->gsourceDispatch(source);
}
// -------------------------------------------------
// resolve the conflict between X11's FocusIn and TQEvent::FocusIn
#undef FocusOut
#undef FocusIn
static const int XKeyPress = KeyPress;
static const int XKeyRelease = KeyRelease;
#undef KeyPress
#undef KeyRelease
// from qapplication.cpp
extern bool tqt_is_gui_used;
// from qeventloop_unix.cpp
extern timeval *qt_wait_timer();
extern void cleanupTimers();
// ### this needs to go away at some point...
typedef void (*VFPTR)();
typedef TQValueList<VFPTR> TQVFuncList;
void qt_install_preselect_handler( VFPTR );
void qt_remove_preselect_handler( VFPTR );
static TQVFuncList *qt_preselect_handler = 0;
void qt_install_postselect_handler( VFPTR );
void qt_remove_postselect_handler( VFPTR );
static TQVFuncList *qt_postselect_handler = 0;
void qt_install_preselect_handler( VFPTR handler )
{
if ( !qt_preselect_handler )
qt_preselect_handler = new TQVFuncList;
qt_preselect_handler->append( handler );
}
void qt_remove_preselect_handler( VFPTR handler )
{
if ( qt_preselect_handler ) {
TQVFuncList::Iterator it = qt_preselect_handler->find( handler );
if ( it != qt_preselect_handler->end() )
qt_preselect_handler->remove( it );
}
}
void qt_install_postselect_handler( VFPTR handler )
{
if ( !qt_postselect_handler )
qt_postselect_handler = new TQVFuncList;
qt_postselect_handler->prepend( handler );
}
void qt_remove_postselect_handler( VFPTR handler )
{
if ( qt_postselect_handler ) {
TQVFuncList::Iterator it = qt_postselect_handler->find( handler );
if ( it != qt_postselect_handler->end() )
qt_postselect_handler->remove( it );
}
}
void TQEventLoop::init()
{
// initialize ProcessEventFlags (all events & wait for more)
d->pev_flags = AllEvents | WaitForMore;
// initialize the common parts of the event loop
pipe( d->thread_pipe );
fcntl(d->thread_pipe[0], F_SETFD, FD_CLOEXEC);
fcntl(d->thread_pipe[1], F_SETFD, FD_CLOEXEC);
// intitialize the X11 parts of the event loop
d->xfd = -1;
if ( tqt_is_gui_used )
d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() );
// new GSource
TQtGSource * qtGSource = (TQtGSource*) g_source_new(&qt_gsource_funcs,
sizeof(TQtGSource));
g_source_set_can_recurse ((GSource*)qtGSource, TRUE);
qtGSource->qeventLoop = this;
// init main loop and attach gsource
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside init(1)\n");
#endif
g_main_loop_new (NULL, 1);
g_source_attach( (GSource*)qtGSource, NULL );
d->gSource = (GSource*) qtGSource;
// poll for X11 events
if ( tqt_is_gui_used ) {
d->x_gPollFD.fd = d->xfd;
d->x_gPollFD.events = G_IO_IN | G_IO_HUP;
g_source_add_poll(d->gSource, &d->x_gPollFD);
}
// poll thread-pipe
d->threadPipe_gPollFD.fd = d->thread_pipe[0];
d->threadPipe_gPollFD.events = G_IO_IN | G_IO_HUP;
g_source_add_poll(d->gSource, &d->threadPipe_gPollFD);
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside init(2)\n");
#endif
}
void TQEventLoop::cleanup()
{
// cleanup the common parts of the event loop
close( d->thread_pipe[0] );
close( d->thread_pipe[1] );
cleanupTimers();
// cleanup the X11 parts of the event loop
d->xfd = -1;
// todo: destroy gsource
}
bool TQEventLoop::processEvents( ProcessEventsFlags flags )
{
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside processEvents(1) looplevel=%d\n", d->looplevel );
#endif
ProcessEventsFlags save_flags;
int rval;
save_flags = d->pev_flags;
d->pev_flags = flags;
rval = g_main_context_iteration(NULL, flags & WaitForMore ? TRUE : FALSE);
d->pev_flags = save_flags;
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside processEvents(2) looplevel=%d rval=%d\n", d->looplevel, rval );
#endif
return rval; // were events processed?
}
bool TQEventLoop::processX11Events()
{
ProcessEventsFlags flags = d->pev_flags;
// process events from the X server
XEvent event;
int nevents = 0;
#if defined(QT_THREAD_SUPPORT)
TQMutexLocker locker( TQApplication::tqt_mutex );
#endif
// handle gui and posted events
if ( tqt_is_gui_used ) {
TQApplication::sendPostedEvents();
// Two loops so that posted events accumulate
while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
// also flushes output buffer
while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
if ( d->shortcut ) {
return FALSE;
}
XNextEvent( TQPaintDevice::x11AppDisplay(), &event );
if ( flags & ExcludeUserInput ) {
switch ( event.type ) {
case ButtonPress:
case ButtonRelease:
case MotionNotify:
case XKeyPress:
case XKeyRelease:
case EnterNotify:
case LeaveNotify:
continue;
case ClientMessage:
{
// from qapplication_x11.cpp
extern Atom tqt_wm_protocols;
extern Atom tqt_wm_take_focus;
extern Atom qt_qt_scrolldone;
// only keep the wm_take_focus and
// qt_qt_scrolldone protocols, discard all
// other client messages
if ( event.xclient.format != 32 )
continue;
if ( event.xclient.message_type == tqt_wm_protocols ||
(Atom) event.xclient.data.l[0] == tqt_wm_take_focus )
break;
if ( event.xclient.message_type == qt_qt_scrolldone )
break;
}
default: break;
}
}
nevents++;
if ( tqApp->x11ProcessEvent( &event ) == 1 )
return TRUE;
}
}
}
if ( d->shortcut ) {
return FALSE;
}
TQApplication::sendPostedEvents();
const uint exclude_all = ExcludeSocketNotifiers | 0x08;
// 0x08 == ExcludeTimers for X11 only
if ( nevents > 0 && ( flags & exclude_all ) == exclude_all &&
( flags & WaitForMore ) ) {
return TRUE;
}
return FALSE;
}
bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
{
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(1)\n");
#endif
ProcessEventsFlags flags = d->pev_flags;
#if defined(QT_THREAD_SUPPORT)
TQMutexLocker locker( TQApplication::tqt_mutex );
#endif
// don't block if exitLoop() or exit()/quit() has been called.
bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
// Process timers and socket notifiers - the common UNIX stuff
// return the maximum time we can wait for an event.
static timeval zerotm;
timeval *tm = 0;
if ( ! ( flags & 0x08 ) ) { // 0x08 == ExcludeTimers for X11 only
tm = qt_wait_timer(); // wait for timer or X event
if ( !canWait ) {
if ( !tm )
tm = &zerotm;
tm->tv_sec = 0; // no time to wait
tm->tv_usec = 0;
}
}
// include or exclude SocketNotifiers (by setting or cleaning poll events)
if ( ! ( flags & ExcludeSocketNotifiers ) ) {
TQPtrListIterator<TQSockNotGPollFD> it( d->sn_list );
TQSockNotGPollFD *sn;
while ( (sn=it.current()) ) {
++it;
sn->gPollFD.events = sn->events; // restore poll events
}
} else {
TQPtrListIterator<TQSockNotGPollFD> it( d->sn_list );
TQSockNotGPollFD *sn;
while ( (sn=it.current()) ) {
++it;
sn->gPollFD.events = 0; // delete poll events
}
}
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(2) canwait=%d\n", canWait);
#endif
if ( canWait )
emit aboutToBlock();
if ( qt_preselect_handler ) {
TQVFuncList::Iterator it, end = qt_preselect_handler->end();
for ( it = qt_preselect_handler->begin(); it != end; ++it )
(**it)();
}
// unlock the GUI mutex and select. when we return from this function, there is
// something for us to do
#if defined(QT_THREAD_SUPPORT)
locker.mutex()->unlock();
#endif
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(2.1) canwait=%d\n", canWait);
#endif
// do we have to dispatch events?
if (hasPendingEvents()) {
*timeout = 0; // no time to stay in poll
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(3a)\n");
#endif
return FALSE;
}
// stay in poll until something happens?
if (!tm) { // fixme
*timeout = -1; // wait forever
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(3b) timeout=%d \n", *timeout);
#endif
return FALSE;
}
// else timeout >=0
*timeout = tm->tv_sec * 1000 + tm->tv_usec/1000;
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(3c) timeout=%d \n", *timeout);
#endif
return FALSE;
}
bool TQEventLoop::gsourceCheck(GSource *gs) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(1)\n");
#endif
// Socketnotifier events?
TQPtrList<TQSockNotGPollFD> *list = &d->sn_list;
//if ( list ) {
TQSockNotGPollFD *sn = list->first();
while ( sn ) {
if ( sn->gPollFD.revents )
return TRUE;
sn = list->next();
}
//}
if (d->x_gPollFD.revents) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) xfd!\n");
#endif
return TRUE; // we got events!
}
if (d->threadPipe_gPollFD.revents) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) threadpipe!!\n");
#endif
return TRUE; // we got events!
}
if (hasPendingEvents()) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) pendingEvents!\n");
#endif
return TRUE; // we got more X11 events!
}
// check if we have timers to activate?
timeval * tm =qt_wait_timer();
if (tm && (tm->tv_sec == 0 && tm->tv_usec == 0 )) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) qtwaittimer!\n");
#endif
return TRUE;
}
// nothing to dispatch
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) nothing to dispatch!\n");
#endif
return FALSE;
}
bool TQEventLoop::gsourceDispatch(GSource *gs) {
// relock the GUI mutex before processing any pending events
#if defined(QT_THREAD_SUPPORT)
TQMutexLocker locker( TQApplication::tqt_mutex );
#endif
#if defined(QT_THREAD_SUPPORT)
locker.mutex()->lock();
#endif
int nevents=0;
ProcessEventsFlags flags = d->pev_flags;
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceDispatch(1)\n");
#endif
// we are awake, broadcast it
emit awake();
emit tqApp->guiThreadAwake();
// some other thread woke us up... consume the data on the thread pipe so that
// select doesn't immediately return next time
if ( d->threadPipe_gPollFD.revents) {
char c;
::read( d->thread_pipe[0], &c, 1 );
}
if ( qt_postselect_handler ) {
TQVFuncList::Iterator it, end = qt_postselect_handler->end();
for ( it = qt_postselect_handler->begin(); it != end; ++it )
(**it)();
}
// activate socket notifiers
if ( ! ( flags & ExcludeSocketNotifiers )) {
// if select says data is ready on any socket, then set the socket notifier
// to pending
// if ( &d->sn_list ) {
TQPtrList<TQSockNotGPollFD> *list = &d->sn_list;
TQSockNotGPollFD *sn = list->first();
while ( sn ) {
if ( sn->gPollFD.revents )
setSocketNotifierPending( sn->obj );
sn = list->next();
}
// }
nevents += activateSocketNotifiers();
}
// activate timers
if ( ! ( flags & 0x08 ) ) {
// 0x08 == ExcludeTimers for X11 only
nevents += activateTimers();
}
// return true if we handled events, false otherwise
//return (nevents > 0);
// now process x11 events!
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceDispatch(2) hasPendingEvents=%d\n", hasPendingEvents());
#endif
if (hasPendingEvents()) {
// color approx. optimization - only on X11
qt_reset_color_avail();
processX11Events();
}
#if defined(QT_THREAD_SUPPORT)
locker.mutex()->unlock();
#endif
return TRUE;
}
bool TQEventLoop::hasPendingEvents() const
{
extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
return ( qGlobalPostedEventsCount() || ( tqt_is_gui_used ? XPending( TQPaintDevice::x11AppDisplay() ) : 0));
}
void TQEventLoop::appStartingUp()
{
if ( tqt_is_gui_used )
d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() );
}
void TQEventLoop::appClosingDown()
{
d->xfd = -1;
}

@ -21,7 +21,7 @@ kernel {
$$KERNEL_H/ntqdrawutil.h \
$$KERNEL_H/ntqdropsite.h \
$$KERNEL_H/ntqevent.h \
$$KERNEL_H/ntqeventloop.h\
$$KERNEL_H/ntqeventloop.h \
$$KERNEL_P/qeventloop_p.h \
$$KERNEL_H/ntqfocusdata.h \
$$KERNEL_H/ntqfont.h \
@ -104,6 +104,10 @@ kernel {
HEADERS += $$KERNEL_P/qinputcontext_p.h
}
glibmainloop {
HEADERS+=$$KERNEL_P/qeventloop_glib_p.h
}
win32:SOURCES += $$KERNEL_CPP/qapplication_win.cpp \
$$KERNEL_CPP/qclipboard_win.cpp \
$$KERNEL_CPP/qcolor_win.cpp \
@ -133,7 +137,6 @@ kernel {
$$KERNEL_CPP/qcursor_x11.cpp \
$$KERNEL_CPP/qdnd_x11.cpp \
$$KERNEL_CPP/qdesktopwidget_x11.cpp \
$$KERNEL_CPP/qeventloop_x11.cpp \
$$KERNEL_CPP/qfont_x11.cpp \
$$KERNEL_CPP/qinputcontext.cpp \
$$KERNEL_CPP/qinputcontext_x11.cpp \
@ -146,6 +149,12 @@ kernel {
$$KERNEL_CPP/qwidget_x11.cpp \
$$KERNEL_CPP/qwidgetcreate_x11.cpp \
$$KERNEL_CPP/qfontengine_x11.cpp
glibmainloop {
SOURCES += $$KERNEL_CPP/qeventloop_x11_glib.cpp
} else {
SOURCES += $$KERNEL_CPP/qeventloop_x11.cpp
}
}
!x11:mac {
@ -172,8 +181,13 @@ kernel {
DEFINES += QMAC_ONE_PIXEL_LOCK
} else:unix {
SOURCES += $$KERNEL_CPP/qprinter_unix.cpp \
$$KERNEL_CPP/qpsprinter.cpp \
$$KERNEL_CPP/qeventloop_unix.cpp
$$KERNEL_CPP/qpsprinter.cpp
glibmainloop {
SOURCES += $$KERNEL_CPP/qeventloop_unix_glib.cpp
} else {
SOURCES += $$KERNEL_CPP/qeventloop_unix.cpp
}
}
unix:SOURCES += $$KERNEL_CPP/qprocess_unix.cpp \
$$KERNEL_CPP/qthread_unix.cpp

@ -196,3 +196,11 @@ wince-* {
$$CODECS_CPP/qtextcodecplugin.cpp \
$$WIDGETS_CPP/qwidgetplugin.cpp
}
glibmainloop {
DEFINES += QT_USE_GLIBMAINLOOP
QMAKE_CFLAGS += $$QMAKE_CFLAGS_GLIB
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_GLIB
LIBS += $$QMAKE_LIBS_GLIB
}

Loading…
Cancel
Save