\ingroup tools
The QFlags<Enum> class is a template class, where Enum is an enum
- type. QFlags is used throughout Qt for storing combinations of
+ type. QFlags is used throughout Katie for storing combinations of
enum values.
The traditional C++ approach for storing OR-combinations of enum
enum value can be OR'd with any other enum value and passed on to
a function that takes an \c int or \c uint.
- Qt uses QFlags to provide type safety. For example, the
+ Katie uses QFlags to provide type safety. For example, the
Qt::Alignment type is simply a typedef for
QFlags<Qt::AlignmentFlag>. QLabel::setAlignment() takes a
Qt::Alignment parameter, which means that any combination of
\section1 Flags and the Meta-Object System
The Q_DECLARE_FLAGS() macro does not expose the flags to the meta-object
- system, so they cannot be used by Qt Script or edited in Katie Designer.
+ system, so they cannot be used by Katie Script or edited in Katie Designer.
To make the flags available for these purposes, the Q_FLAGS() macro must
be used:
to do), your compiler will thoughtfully create it for you. You must
do more.
- The curious user will have seen that the Qt classes derived
+ The curious user will have seen that the Katie classes derived
from QObject typically include this macro in a private section:
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 43
/*!
\headerfile <QtGlobal>
- \title Global Qt Declarations
+ \title Global Katie Declarations
\ingroup funclists
\brief The <QtGlobal> header file includes the fundamental global
- declarations. It is included by most other Qt header files.
+ declarations. It is included by most other Katie header files.
The global declarations include \l{types}, \l{functions} and
\l{macros}.
The type definitions are partly convenience definitions for basic
types (some of which guarantee certain bit-sizes on all platforms
- supported by Qt), partly types related to Qt message handling. The
- functions are related to generating messages, Qt version handling
+ supported by Katie), partly types related to Katie message handling. The
+ functions are related to generating messages, Katie version handling
and comparing and adjusting object values. And finally, some of
the declared macros enable programmers to add compiler or platform
specific code to their applications, while others are convenience
\section1 Types
The header file declares several type definitions that guarantee a
- specified bit-size on all platforms supported by Qt for various
+ specified bit-size on all platforms supported by Katie for various
basic types, for example \l qint8 which is a signed char
- guaranteed to be 8-bit on all platforms supported by Qt. The
+ guaranteed to be 8-bit on all platforms supported by Katie. The
header file also declares the \l qlonglong type definition for \c
- {long long int } (\c __int64 on Windows).
+ {long long int }.
Several convenience type definitions are declared: \l qreal for \c
double, \l uchar for \c unsigned char, \l uint for \c unsigned
short.
Finally, the QtMsgType definition identifies the various messages
- that can be generated and sent to a Qt message handler;
+ that can be generated and sent to a Katie message handler;
QtMsgHandler is a type definition for a pointer to a function with
the signature \c {void myMsgHandler(QtMsgType, const char *)}.
qInstallMsgHandler() function which installs the given
QtMsgHandler, and the qVersion() function which returns the
- version number of Qt at run-time as a string.
+ version number of Katie at run-time as a string.
\section1 Macros
i.e. translation without changing the stored source text. The
Q_ASSERT() and Q_ASSERT_X() enables warning messages of various
level of refinement. The Q_FOREACH() and foreach() macros
- implement Qt's foreach loop.
+ implement Katie's foreach loop.
The Q_INT64_C() and Q_UINT64_C() macros wrap signed and unsigned
64-bit integer literals in a platform-independent way. The
Finally, the QT_POINTER_SIZE macro expands to the size of a
pointer in bytes, and the QT_VERSION and QT_VERSION_STR macros
expand to a numeric value or a string, respectively, specifying
- Qt's version number, i.e the version the application is compiled
+ Katie's version number, i.e the version the application is compiled
against.
\sa <QtAlgorithms>
\relates <QtGlobal>
Typedef for \c{signed char}. This type is guaranteed to be 8-bit
- on all platforms supported by Qt.
+ on all platforms supported by Katie.
*/
/*!
\relates <QtGlobal>
Typedef for \c{unsigned char}. This type is guaranteed to
- be 8-bit on all platforms supported by Qt.
+ be 8-bit on all platforms supported by Katie.
*/
/*! \typedef qint16
\relates <QtGlobal>
Typedef for \c{signed short}. This type is guaranteed to be
- 16-bit on all platforms supported by Qt.
+ 16-bit on all platforms supported by Katie.
*/
/*!
\relates <QtGlobal>
Typedef for \c{unsigned short}. This type is guaranteed to
- be 16-bit on all platforms supported by Qt.
+ be 16-bit on all platforms supported by Katie.
*/
/*! \typedef qint32
\relates <QtGlobal>
Typedef for \c{signed int}. This type is guaranteed to be 32-bit
- on all platforms supported by Qt.
+ on all platforms supported by Katie.
*/
/*!
\relates <QtGlobal>
Typedef for \c{unsigned int}. This type is guaranteed to
- be 32-bit on all platforms supported by Qt.
+ be 32-bit on all platforms supported by Katie.
*/
/*! \typedef qint64
\relates <QtGlobal>
- Typedef for \c{long long int} (\c __int64 on Windows). This type
- is guaranteed to be 64-bit on all platforms supported by Qt.
+ Typedef for \c{long long int}. This type is guaranteed to be
+ 64-bit on all platforms supported by Katie.
Literals of this type can be created using the Q_INT64_C() macro:
Typedef for \c{unsigned long long int} (\c{unsigned __int64} on
Windows). This type is guaranteed to be 64-bit on all platforms
- supported by Qt.
+ supported by Katie.
Literals of this type can be created using the Q_UINT64_C()
macro:
etc.).
Typedef for either quint32 or quint64. This type is guaranteed to
- be the same size as a pointer on all platforms supported by Qt. On
- a system with 32-bit pointers, quintptr is a typedef for quint32;
+ be the same size as a pointer on all platforms supported by Katie.
+ On a system with 32-bit pointers, quintptr is a typedef for quint32;
on a system with 64-bit pointers, quintptr is a typedef for
quint64.
Integral type for representing pointer differences.
Typedef for either qint32 or qint64. This type is guaranteed to be
- the same size as a pointer on all platforms supported by Qt. On a
+ the same size as a pointer on all platforms supported by Katie. On a
system with 32-bit pointers, quintptr is a typedef for quint32; on
a system with 64-bit pointers, quintptr is a typedef for quint64.
\relates <QtGlobal>
This macro expands a numeric value of the form 0xMMNNPP (MM =
- major, NN = minor, PP = patch) that specifies Qt's version
+ major, NN = minor, PP = patch) that specifies Katie's version
number. For example, if you compile your application against Qt
4.1.2, the QT_VERSION macro will expand to 0x040102.
- You can use QT_VERSION to use the latest Qt features where
+ You can use QT_VERSION to use the latest Katie features where
available.
Example:
\macro QT_VERSION_STR
\relates <QtGlobal>
- This macro expands to a string that specifies Qt's version number
+ This macro expands to a string that specifies Katie's version number
(for example, "4.1.2"). This is the version against which the
application is compiled.
/*!
\relates <QtGlobal>
- Returns the version number of Qt at run-time as a string (for
+ Returns the version number of Katie at run-time as a string (for
example, "4.1.2"). This may be a different version than the
version the application was compiled against.
\fn QtMsgHandler qInstallMsgHandler(QtMsgHandler handler)
\relates <QtGlobal>
- Installs a Qt message \a handler which has been defined
+ Installs a Katie message \a 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.
+ warnings, critical and fatal error messages. The Katie library
+ contains hundreds of warning messages that are printed when internal
+ errors (usually invalid function arguments) occur. 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.
+ output. 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.
}
}
-#undef qDebug
/*!
\relates <QtGlobal>
Calls the message handler with the debug message \a msg. If no
message handler has been installed, the message is printed to
- stderr. Under Windows, the message is sent to the console, if it is a
- console application; otherwise, it is sent to the debugger. This
- function does nothing if \c QT_NO_DEBUG_OUTPUT was defined
- during compilation.
+ stderr.
If you pass the function a format string and a list of arguments,
it works in similar way to the C printf() function. The format
With this syntax, the function returns a QDebug object that is
configured to use the QtDebugMsg message type. It automatically
puts a single space between each item, and outputs a newline at
- the end. It supports many C++ and Qt types.
+ the end. It supports many C++ and Katie types.
To suppress the output at run-time, install your own message handler
with qInstallMsgHandler().
va_end(ap);
}
-#undef qWarning
/*!
\relates <QtGlobal>
Calls the message handler with the warning message \a msg. If no
message handler has been installed, the message is printed to
- stderr. Under Windows, the message is sent to the debugger. This
- function does nothing if \c QT_NO_WARNING_OUTPUT was defined
- during compilation; it exits if the environment variable \c
- QT_FATAL_WARNINGS is defined.
+ stderr. It exits if the environment variable \c QT_FATAL_WARNINGS
+ is set.
This function takes a format string and a list of arguments,
similar to the C printf() function. The format should be a Latin-1
Calls the message handler with the critical message \a msg. If no
message handler has been installed, the message is printed to
- stderr. Under Windows, the message is sent to the debugger.
+ stderr.
This function takes a format string and a list of arguments,
similar to the C printf() function. The format should be a Latin-1
Calls the message handler with the fatal message \a msg. If no
message handler has been installed, the message is printed to
- stderr. Under Windows, the message is sent to the debugger.
+ stderr.
If you are using the \bold{default message handler} this function will
- abort on Unix systems to create a core dump. On Windows, for debug builds,
- this function will report a _CRT_ERROR enabling you to connect a debugger
- to the application.
+ abort on Unix systems to create a core dump.
This function takes a format string and a list of arguments,
similar to the C printf() function.
\macro foreach(variable, container)
\relates <QtGlobal>
- This macro is used to implement Qt's \c foreach loop. The \a
+ This macro is used to implement Katie's \c foreach loop. The \a
variable parameter is a variable name or variable definition; the
- \a container parameter is a Qt container whose value type
+ \a container parameter is a container whose value type
corresponds to the type of the variable. See \l{The foreach
Keyword} for details.
using these macros is not required if UTF-8 codec is used for
translations.
- \sa QT_TRANSLATE_NOOP(), {Internationalization with Qt}
+ \sa QT_TRANSLATE_NOOP(), {Internationalization with Katie}
*/
/*!
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 35
- \sa QT_TR_NOOP(), {Internationalization with Qt}
+ \sa QT_TR_NOOP(), {Internationalization with Katie}
*/
/*!
\relates <QtGlobal>
You can use this macro to specify information about a custom type
- \a Type. With accurate type information, Qt's \l{Container Classes}
+ \a Type. With accurate type information, Katie's \l{Container Classes}
{generic containers} can choose appropriate storage methods and
algorithms.
This macro can be used to determine the byte order your system
uses for storing data in memory. i.e., whether your system is
- little-endian or big-endian. It is set by Qt to one of the macros
+ little-endian or big-endian. It is set by Katie to one of the macros
Q_LITTLE_ENDIAN or Q_BIG_ENDIAN. You normally won't need to worry
about endian-ness, but you might, for example if you need to know
which byte of an integer or UTF-16 character is stored in the
\macro QT_NAMESPACE
\internal
- If this macro is defined to \c ns all Qt classes are put in a namespace
+ If this macro is defined to \c ns all Katie classes are put in a namespace
called \c ns. Also, moc will output code putting metaobjects etc.
into namespace \c ns.
declarations are wildly mixed, wrap the \c{#include} lines in
\c QT_END_NAMESPACE and \c QT_BEGIN_NAMESPACE.
- When using the \c QT_NAMESPACE feature in user code
- (e.g., when building plugins statically linked to Qt) where
+ When using the \c QT_NAMESPACE feature in user code where
the user code is not intended to go into the \c QT_NAMESPACE
- namespace, all forward declarations of Qt classes need to
+ namespace, all forward declarations of Katie classes need to
be wrapped in \c QT_BEGIN_NAMESPACE and \c QT_END_NAMESPACE.
After that, a \c QT_USE_NAMESPACE should follow.
No further changes should be needed.
\relates <QtGlobal>
This macro can be used to ensure that the application is run
- against a recent enough version of Qt. This is especially useful
+ against a recent enough version of Katie. This is especially useful
if your application depends on a specific bug fix introduced in a
bug-fix release (e.g., 4.0.2).
The \a argc and \a argv parameters are the \c main() function's
\c argc and \c argv parameters. The \a version parameter is a
- string literal that specifies which version of Qt the application
+ string literal that specifies which version of Katie the application
requires (e.g., "4.0.2").
Example: