|
static QDataStream | Write (QDataStream s, object p) |
|
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
|
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
|
static QTextStream | Write (QTextStream s, Global.FuncQTextStreamQTextStream f) |
|
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
|
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
|
static QDataStream | Write (QDataStream arg1, QChar arg2) |
|
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
|
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
|
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
|
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
|
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
|
static QDataStream | Write (QDataStream arg1, QTime arg2) |
|
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
|
static QTextStream | Write (QTextStream str, QDomNode node) |
| More...
|
|
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
|
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
|
static QDataStream | Write (QDataStream arg1, QLine arg2) |
|
static QDataStream | Write (QDataStream arg1, QDate arg2) |
|
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
|
static QDataStream | Write (QDataStream arg1, QRect arg2) |
|
static QDataStream | Write (QDataStream arg1, QSize arg2) |
|
static QDataStream | Write (QDataStream s, QVariant.Type p) |
|
static QDataStream | Write (QDataStream arg1, string arg2) |
|
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
| More...
|
|
static QDataStream | Read (QDataStream arg1, QChar arg2) |
|
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
|
static QDataStream | Read (QDataStream arg1, QRect arg2) |
|
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
|
static QDataStream | Read (QDataStream arg1, QDate arg2) |
|
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
|
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
|
static QTextStream | Read (QTextStream s, Global.FuncQTextStreamQTextStream f) |
|
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
|
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
|
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
|
static QDataStream | Read (QDataStream arg1, QLine arg2) |
|
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
|
static QDataStream | Read (QDataStream arg1, QSize arg2) |
|
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
|
static QDataStream | Read (QDataStream arg1, QTime arg2) |
|
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
|
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
|
static QDataStream | Read (QDataStream s, object p) |
|
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
|
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
|
static QDataStream | Read (QDataStream arg1, string arg2) |
|
static QDataStream | Read (QDataStream s, QVariant.Type p) |
|
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
| More...
|
|
static double | QAcos (double v) |
| More...
|
|
static void | QAddPostRoutine (System.Action arg1) |
|
static double | QAsin (double v) |
| More...
|
|
static double | QAtan (double v) |
| More...
|
|
static double | QAtan2 (double x, double y) |
| More...
|
|
static void | QBadAlloc () |
|
static int | QCeil (double v) |
| More...
|
|
static ushort | QChecksum (string s, uint len) |
|
static QByteArray | QCompress (QByteArray data, int compressionLevel=-1) |
|
static QByteArray | QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
|
static double | QCos (double v) |
| More...
|
|
static double | QExp (double v) |
| More...
|
|
static double | QFabs (double v) |
|
static double | QFastCos (double x) |
|
static double | QFastSin (double x) |
|
static string | QFlagLocation (string method) |
|
static int | QFloor (double v) |
| More...
|
|
static bool | QFuzzyCompare (double p1, double p2) |
| More...
|
|
static bool | QFuzzyCompare (float p1, float p2) |
| More...
|
|
static bool | QFuzzyIsNull (double d) |
|
static bool | QFuzzyIsNull (float f) |
|
static uint | QHash (QBitArray key) |
| More...
|
|
static uint | QHash (QChar key) |
| More...
|
|
static uint | QHash (QStringRef key) |
|
static uint | QHash (QUrl url) |
|
static uint | QHash (QPersistentModelIndex index) |
|
static uint | QHash (QByteArray key) |
| More...
|
|
static uint | QHash (QModelIndex index) |
|
static uint | QHash (uint key) |
| More...
|
|
static uint | QHash (char key) |
| More...
|
|
static uint | QHash (byte key) |
| More...
|
|
static uint | QHash (short key) |
| More...
|
|
static uint | QHash (NativeLong key) |
| More...
|
|
static uint | QHash (ushort key) |
| More...
|
|
static uint | QHash (long key) |
| More...
|
|
static uint | QHash (ulong key) |
| More...
|
|
static uint | QHash (int key) |
| More...
|
|
static uint | QHash (string key) |
| More...
|
|
static uint | QHash (NativeULong key) |
| More...
|
|
static Global.ActionQtMsgTypeString | QInstallMsgHandler (Global.ActionQtMsgTypeString handler) |
| More...
|
|
static int | QIntCast (float f) |
|
static int | QIntCast (double f) |
|
static bool | QIsFinite (double d) |
|
static bool | QIsFinite (float f) |
|
static bool | QIsInf (float f) |
|
static bool | QIsInf (double d) |
|
static bool | QIsNaN (float f) |
|
static bool | QIsNaN (double d) |
|
static bool | QIsNull (float f) |
|
static bool | QIsNull (double d) |
|
static double | QLn (double v) |
| More...
|
|
static double | QPow (double x, double y) |
| More...
|
|
static void | QRegisterStaticPluginInstanceFunction (Global.FuncQObject function) |
|
static void | QRemovePostRoutine (System.Action arg1) |
|
static int | QRound (double d) |
| More...
|
|
static long | QRound64 (double d) |
| More...
|
|
static double | QSin (double v) |
| More...
|
|
static double | QSqrt (double v) |
| More...
|
|
static bool | QStringComparisonHelper (QStringRef s1, string s2) |
|
static double | QTan (double v) |
| More...
|
|
static QByteArray | QUncompress (QByteArray data) |
|
static QByteArray | QUncompress (Pointer< byte > data, int nbytes) |
|
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
|
static QByteArray | Qgetenv (string varName) |
| More...
|
|
static bool | Qputenv (string varName, QByteArray value) |
| More...
|
|
static void | Qsrand (uint seed) |
| More...
|
|
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
|
static int | Qstrcmp (QByteArray str1, string str2) |
|
static int | Qstrcmp (string str1, QByteArray str2) |
|
static int | Qstrcmp (string str1, string str2) |
|
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
|
static Pointer< sbyte > | Qstrdup (string arg1) |
|
static int | Qstricmp (string arg1, string arg2) |
|
static uint | Qstrlen (string str) |
|
static int | Qstrncmp (string str1, string str2, uint len) |
|
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
|
static int | Qstrnicmp (string arg1, string arg2, uint len) |
|
static uint | Qstrnlen (string str, uint maxlen) |
|
static bool QtXml.Global.QFuzzyCompare |
( |
double |
p1, |
|
|
double |
p2 |
|
) |
| |
|
static |
Compares the floating point value p1 and p2 and returns true if they are considered equal, otherwise false.
Note that comparing values where either p1 or p2 is 0.0 will not work. The solution to this is to compare against values greater than or equal to 1.0.
// Instead of comparing with 0.0
qFuzzyCompare(0.0,1.0e-200); // This will return false
// Compare adding 1 to both values will fix the problem
qFuzzyCompare(1 + 0.0, 1 + 1.0e-200); // This will return true
The two numbers are compared in a relative way, where the exactness is stronger the smaller the numbers are.
Note: This function is thread-safe.
This function was introduced in Qt 4.4.
Installs a Qt message handler which has been defined previously. Returns a pointer to the previous message handler (which may be 0).
The message handler is a function that prints out debug messages, warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) occur. Qt built in release mode also contains such warnings unless QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages.
The default message handler prints the message to the standard output under X11 or to the debugger under Windows. If it is a fatal message, the application aborts immediately.
Only one message handler can be defined, since this is usually done on an application-wide basis to control debug output.
To restore the message handler, call qInstallMsgHandler(0).
Example:
#include <qapplication.h>
#include <stdio.h>
#include <stdlib.h>
void myMessageOutput(QtMsgType type, const char *msg)
{
switch (type) {
case QtDebugMsg:
fprintf(stderr, "Debug: s\n", msg);
break;
case QtWarningMsg:
fprintf(stderr, "Warning: s\n", msg);
break;
case QtCriticalMsg:
fprintf(stderr, "Critical: s\n", msg);
break;
case QtFatalMsg:
fprintf(stderr, "Fatal: s\n", msg);
abort();
}
}
int main(int argc, char **argv)
{
qInstallMsgHandler(myMessageOutput);
QApplication app(argc, argv);
...
return app.exec();
}
See also qDebug(), qWarning(), qCritical(), qFatal(), QtMsgType, and Debugging Techniques.