Doc: correction link, example and parameter issues qtbase
Moved codecs folder to qtbase/examples Corrected quote in dropsite.qdoc Replaced snippet statement by include statement Added doc for undocumented parameters Task-number: QTBUG-34749 Change-Id: If4de95b8d39e5680fd0f63f8d2b6685a4b0a8052 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
1e8de50674
commit
267eab3f39
@ -205,7 +205,7 @@
|
|||||||
supported formats using the \l{The foreach Keyword}{foreach keyword}.
|
supported formats using the \l{The foreach Keyword}{foreach keyword}.
|
||||||
This keyword has the following format:
|
This keyword has the following format:
|
||||||
|
|
||||||
\snippet code/doc_src_examples_dropsite.qdoc 0
|
\include code/doc_src_examples_dropsite.qdoc 0
|
||||||
|
|
||||||
In our example, \c format is the \a variable and the \a container is a
|
In our example, \c format is the \a variable and the \a container is a
|
||||||
QStringList, obtained from \c mimeData->formats().
|
QStringList, obtained from \c mimeData->formats().
|
||||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@ -394,7 +394,7 @@ Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits");
|
|||||||
\fn bool QFlags::testFlag(Enum flag) const
|
\fn bool QFlags::testFlag(Enum flag) const
|
||||||
\since 4.2
|
\since 4.2
|
||||||
|
|
||||||
Returns \c true if the \a flag is set, otherwise false.
|
Returns \c true if the \a flag is set, otherwise \c false.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1937,7 +1937,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
|
|||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Prints a warning message containing the source code file name and
|
Prints a warning message containing the source code file name and
|
||||||
line number if \a test is false.
|
line number if \a test is \c false.
|
||||||
|
|
||||||
Q_ASSERT() is useful for testing pre- and post-conditions
|
Q_ASSERT() is useful for testing pre- and post-conditions
|
||||||
during development. It does nothing if \c QT_NO_DEBUG was defined
|
during development. It does nothing if \c QT_NO_DEBUG was defined
|
||||||
@ -1960,7 +1960,7 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
|
|||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Prints the message \a what together with the location \a where,
|
Prints the message \a what together with the location \a where,
|
||||||
the source file name and line number if \a test is false.
|
the source file name and line number if \a test is \c false.
|
||||||
|
|
||||||
Q_ASSERT_X is useful for testing pre- and post-conditions during
|
Q_ASSERT_X is useful for testing pre- and post-conditions during
|
||||||
development. It does nothing if \c QT_NO_DEBUG was defined during
|
development. It does nothing if \c QT_NO_DEBUG was defined during
|
||||||
@ -1983,18 +1983,18 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
|
|||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
\since 5.0
|
\since 5.0
|
||||||
|
|
||||||
Causes the compiler to assume that \a expr is true. This macro is useful
|
Causes the compiler to assume that \a expr is \c true. This macro is useful
|
||||||
for improving code generation, by providing the compiler with hints about
|
for improving code generation, by providing the compiler with hints about
|
||||||
conditions that it would not otherwise know about. However, there is no
|
conditions that it would not otherwise know about. However, there is no
|
||||||
guarantee that the compiler will actually use those hints.
|
guarantee that the compiler will actually use those hints.
|
||||||
|
|
||||||
This macro could be considered a "lighter" version of \l{Q_ASSERT()}. While
|
This macro could be considered a "lighter" version of \l{Q_ASSERT()}. While
|
||||||
Q_ASSERT will abort the program's execution if the condition is false,
|
Q_ASSERT will abort the program's execution if the condition is \c false,
|
||||||
Q_ASSUME will tell the compiler not to generate code for those conditions.
|
Q_ASSUME will tell the compiler not to generate code for those conditions.
|
||||||
Therefore, it is important that the assumptions always hold, otherwise
|
Therefore, it is important that the assumptions always hold, otherwise
|
||||||
undefined behaviour may occur.
|
undefined behaviour may occur.
|
||||||
|
|
||||||
If \a expr is a constantly false condition, Q_ASSUME will tell the compiler
|
If \a expr is a constantly \c false condition, Q_ASSUME will tell the compiler
|
||||||
that the current code execution cannot be reached. That is, Q_ASSUME(false)
|
that the current code execution cannot be reached. That is, Q_ASSUME(false)
|
||||||
is equivalent to Q_UNREACHABLE().
|
is equivalent to Q_UNREACHABLE().
|
||||||
|
|
||||||
@ -3346,6 +3346,8 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
|
|
||||||
It expands to "std::move" if your compiler supports that C++11 function, or to nothing
|
It expands to "std::move" if your compiler supports that C++11 function, or to nothing
|
||||||
otherwise.
|
otherwise.
|
||||||
|
|
||||||
|
qMove takes an rvalue reference to its parameter \a x, and converts it to an xvalue.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -3426,7 +3428,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters)
|
|||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
\since 5.0
|
\since 5.0
|
||||||
|
|
||||||
This macro marks a function as non-throwing if \a x is true. If
|
This macro marks a function as non-throwing if \a x is \c true. If
|
||||||
the function does nevertheless throw, the behaviour is defined:
|
the function does nevertheless throw, the behaviour is defined:
|
||||||
std::terminate() is called.
|
std::terminate() is called.
|
||||||
|
|
||||||
|
@ -1232,6 +1232,8 @@ void QEasingCurve::setOvershoot(qreal overshoot)
|
|||||||
It is only applicable if type() is QEasingCurve::BezierSpline.
|
It is only applicable if type() is QEasingCurve::BezierSpline.
|
||||||
Note that the spline implicitly starts at (0.0, 0.0) and has to end at (1.0, 1.0) to
|
Note that the spline implicitly starts at (0.0, 0.0) and has to end at (1.0, 1.0) to
|
||||||
be a valid easing curve.
|
be a valid easing curve.
|
||||||
|
\a c1 and \a c2 are the control points used for drawing the curve.
|
||||||
|
\a endPoint is the endpoint of the curve.
|
||||||
*/
|
*/
|
||||||
void QEasingCurve::addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint)
|
void QEasingCurve::addCubicBezierSegment(const QPointF & c1, const QPointF & c2, const QPointF & endPoint)
|
||||||
{
|
{
|
||||||
@ -1290,8 +1292,12 @@ QVector<QPointF> static inline tcbToBezier(const TCBPoints &tcbPoints)
|
|||||||
It is only applicable if type() is QEasingCurve::TCBSpline.
|
It is only applicable if type() is QEasingCurve::TCBSpline.
|
||||||
The spline has to start explitly at (0.0, 0.0) and has to end at (1.0, 1.0) to
|
The spline has to start explitly at (0.0, 0.0) and has to end at (1.0, 1.0) to
|
||||||
be a valid easing curve.
|
be a valid easing curve.
|
||||||
The three parameters are called tension, continuity and bias. All three parameters are
|
The tension \a t changes the length of the tangent vector.
|
||||||
valid between -1 and 1 and define the tangent of the control point.
|
The continuity \a c changes the sharpness in change between the tangents.
|
||||||
|
The bias \a b changes the direction of the tangent vector.
|
||||||
|
\a nextPoint is the sample position.
|
||||||
|
All three parameters are valid between -1 and 1 and define the
|
||||||
|
tangent of the control point.
|
||||||
If all three parameters are 0 the resulting spline is a Catmull-Rom spline.
|
If all three parameters are 0 the resulting spline is a Catmull-Rom spline.
|
||||||
The begin and endpoint always have a bias of -1 and 1, since the outer tangent is not defined.
|
The begin and endpoint always have a bias of -1 and 1, since the outer tangent is not defined.
|
||||||
*/
|
*/
|
||||||
@ -1390,7 +1396,7 @@ void QEasingCurve::setType(Type type)
|
|||||||
/*!
|
/*!
|
||||||
Sets a custom easing curve that is defined by the user in the function \a func.
|
Sets a custom easing curve that is defined by the user in the function \a func.
|
||||||
The signature of the function is qreal myEasingFunction(qreal progress),
|
The signature of the function is qreal myEasingFunction(qreal progress),
|
||||||
where \e progress and the return value is considered to be normalized between 0 and 1.
|
where \e progress and the return value are considered to be normalized between 0 and 1.
|
||||||
(In some cases the return value can be outside that range)
|
(In some cases the return value can be outside that range)
|
||||||
After calling this function type() will return QEasingCurve::Custom.
|
After calling this function type() will return QEasingCurve::Custom.
|
||||||
\a func cannot be zero.
|
\a func cannot be zero.
|
||||||
@ -1420,8 +1426,8 @@ QEasingCurve::EasingFunction QEasingCurve::customType() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Return the effective progress for the easing curve at \a progress.
|
Return the effective progress for the easing curve at \a progress.
|
||||||
While \a progress must be between 0 and 1, the returned effective progress
|
Whereas \a progress must be between 0 and 1, the returned effective progress
|
||||||
can be outside those bounds. For instance, QEasingCurve::InBack will
|
can be outside those bounds. For example, QEasingCurve::InBack will
|
||||||
return negative values in the beginning of the function.
|
return negative values in the beginning of the function.
|
||||||
*/
|
*/
|
||||||
qreal QEasingCurve::valueForProgress(qreal progress) const
|
qreal QEasingCurve::valueForProgress(qreal progress) const
|
||||||
|
@ -1617,7 +1617,7 @@ void QString::resize(int size)
|
|||||||
|
|
||||||
This function is useful for code that needs to build up a long
|
This function is useful for code that needs to build up a long
|
||||||
string and wants to avoid repeated reallocation. In this example,
|
string and wants to avoid repeated reallocation. In this example,
|
||||||
we want to add to the string until some condition is true, and
|
we want to add to the string until some condition is \c true, and
|
||||||
we're fairly sure that size is large enough to make a call to
|
we're fairly sure that size is large enough to make a call to
|
||||||
reserve() worthwhile:
|
reserve() worthwhile:
|
||||||
|
|
||||||
@ -2534,6 +2534,9 @@ bool QString::operator==(QLatin1String other) const
|
|||||||
QT_NO_CAST_FROM_ASCII when you compile your applications. This
|
QT_NO_CAST_FROM_ASCII when you compile your applications. This
|
||||||
can be useful if you want to ensure that all user-visible strings
|
can be useful if you want to ensure that all user-visible strings
|
||||||
go through QObject::tr(), for example.
|
go through QObject::tr(), for example.
|
||||||
|
|
||||||
|
Returns \c true if this string is lexically equal to the parameter
|
||||||
|
string \a other. Otherwise returns \c false.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \fn bool QString::operator==(const char *other) const
|
/*! \fn bool QString::operator==(const char *other) const
|
||||||
@ -2563,9 +2566,11 @@ bool operator<(const QString &s1, const QString &s2)
|
|||||||
{
|
{
|
||||||
return ucstrcmp(s1.constData(), s1.length(), s2.constData(), s2.length()) < 0;
|
return ucstrcmp(s1.constData(), s1.length(), s2.constData(), s2.length()) < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\overload operator<()
|
\overload operator<()
|
||||||
|
\relates QString
|
||||||
|
Returns \c true if this string is lexically less than the parameter
|
||||||
|
string called \a other; otherwise returns \c false.
|
||||||
*/
|
*/
|
||||||
bool QString::operator<(QLatin1String other) const
|
bool QString::operator<(QLatin1String other) const
|
||||||
{
|
{
|
||||||
@ -2592,6 +2597,9 @@ bool QString::operator<(QLatin1String other) const
|
|||||||
|
|
||||||
/*! \fn bool QString::operator<(const char *other) const
|
/*! \fn bool QString::operator<(const char *other) const
|
||||||
|
|
||||||
|
Returns \c true if this string is lexically less than string \a other.
|
||||||
|
Otherwise returns \c false.
|
||||||
|
|
||||||
\overload operator<()
|
\overload operator<()
|
||||||
|
|
||||||
The \a other const char pointer is converted to a QString using
|
The \a other const char pointer is converted to a QString using
|
||||||
@ -2616,6 +2624,9 @@ bool QString::operator<(QLatin1String other) const
|
|||||||
|
|
||||||
/*! \fn bool QString::operator<=(QLatin1String other) const
|
/*! \fn bool QString::operator<=(QLatin1String other) const
|
||||||
|
|
||||||
|
Returns \c true if this string is lexically less than or equal to
|
||||||
|
parameter string \a other. Otherwise returns \c false.
|
||||||
|
|
||||||
\overload operator<=()
|
\overload operator<=()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -2659,6 +2670,9 @@ bool QString::operator<(QLatin1String other) const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
\overload operator>()
|
\overload operator>()
|
||||||
|
\relates QString
|
||||||
|
Returns \c true if this string is lexically greater than the parameter
|
||||||
|
string \a other; otherwise returns \c false.
|
||||||
*/
|
*/
|
||||||
bool QString::operator>(QLatin1String other) const
|
bool QString::operator>(QLatin1String other) const
|
||||||
{
|
{
|
||||||
@ -2710,6 +2724,9 @@ bool QString::operator>(QLatin1String other) const
|
|||||||
|
|
||||||
/*! \fn bool QString::operator>=(QLatin1String other) const
|
/*! \fn bool QString::operator>=(QLatin1String other) const
|
||||||
|
|
||||||
|
Returns \c true if this string is lexically greater than or equal to parameter
|
||||||
|
string \a other. Otherwise returns \c false.
|
||||||
|
|
||||||
\overload operator>=()
|
\overload operator>=()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -2754,6 +2771,9 @@ bool QString::operator>(QLatin1String other) const
|
|||||||
|
|
||||||
/*! \fn bool QString::operator!=(QLatin1String other) const
|
/*! \fn bool QString::operator!=(QLatin1String other) const
|
||||||
|
|
||||||
|
Returns \c true if this string is not equal to parameter string \a other.
|
||||||
|
Otherwise returns \c false.
|
||||||
|
|
||||||
\overload operator!=()
|
\overload operator!=()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -4082,7 +4102,7 @@ QString QString::mid(int position, int n) const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns \c true if the string starts with \a s; otherwise returns
|
Returns \c true if the string starts with \a s; otherwise returns
|
||||||
false.
|
\c false.
|
||||||
|
|
||||||
If \a cs is Qt::CaseSensitive (default), the search is
|
If \a cs is Qt::CaseSensitive (default), the search is
|
||||||
case sensitive; otherwise the search is case insensitive.
|
case sensitive; otherwise the search is case insensitive.
|
||||||
@ -4109,7 +4129,7 @@ bool QString::startsWith(QLatin1String s, Qt::CaseSensitivity cs) const
|
|||||||
\overload startsWith()
|
\overload startsWith()
|
||||||
|
|
||||||
Returns \c true if the string starts with \a c; otherwise returns
|
Returns \c true if the string starts with \a c; otherwise returns
|
||||||
false.
|
\c false.
|
||||||
*/
|
*/
|
||||||
bool QString::startsWith(QChar c, Qt::CaseSensitivity cs) const
|
bool QString::startsWith(QChar c, Qt::CaseSensitivity cs) const
|
||||||
{
|
{
|
||||||
@ -4138,7 +4158,7 @@ bool QString::startsWith(const QStringRef &s, Qt::CaseSensitivity cs) const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns \c true if the string ends with \a s; otherwise returns
|
Returns \c true if the string ends with \a s; otherwise returns
|
||||||
false.
|
\c false.
|
||||||
|
|
||||||
If \a cs is Qt::CaseSensitive (default), the search is case
|
If \a cs is Qt::CaseSensitive (default), the search is case
|
||||||
sensitive; otherwise the search is case insensitive.
|
sensitive; otherwise the search is case insensitive.
|
||||||
@ -4181,7 +4201,7 @@ bool QString::endsWith(QLatin1String s, Qt::CaseSensitivity cs) const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns \c true if the string ends with \a c; otherwise returns
|
Returns \c true if the string ends with \a c; otherwise returns
|
||||||
false.
|
\c false.
|
||||||
|
|
||||||
\overload endsWith()
|
\overload endsWith()
|
||||||
*/
|
*/
|
||||||
@ -4581,7 +4601,7 @@ QString& QString::setUnicode(const QChar *unicode, int size)
|
|||||||
replaced with a single space.
|
replaced with a single space.
|
||||||
|
|
||||||
Whitespace means any character for which QChar::isSpace() returns
|
Whitespace means any character for which QChar::isSpace() returns
|
||||||
true. This includes the ASCII characters '\\t', '\\n', '\\v',
|
\c true. This includes the ASCII characters '\\t', '\\n', '\\v',
|
||||||
'\\f', '\\r', and ' '.
|
'\\f', '\\r', and ' '.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -4671,7 +4691,7 @@ QString QString::simplified() const
|
|||||||
the end.
|
the end.
|
||||||
|
|
||||||
Whitespace means any character for which QChar::isSpace() returns
|
Whitespace means any character for which QChar::isSpace() returns
|
||||||
true. This includes the ASCII characters '\\t', '\\n', '\\v',
|
\c true. This includes the ASCII characters '\\t', '\\n', '\\v',
|
||||||
'\\f', '\\r', and ' '.
|
'\\f', '\\r', and ' '.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@ -4866,7 +4886,7 @@ QString& QString::fill(QChar ch, int size)
|
|||||||
/*! \fn bool QString::isEmpty() const
|
/*! \fn bool QString::isEmpty() const
|
||||||
|
|
||||||
Returns \c true if the string has no characters; otherwise returns
|
Returns \c true if the string has no characters; otherwise returns
|
||||||
false.
|
\c false.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -4981,7 +5001,7 @@ QString& QString::fill(QChar ch, int size)
|
|||||||
\relates QString
|
\relates QString
|
||||||
|
|
||||||
Returns \c true if \a s1 is not equal to \a s2; otherwise returns
|
Returns \c true if \a s1 is not equal to \a s2; otherwise returns
|
||||||
false.
|
\c false.
|
||||||
|
|
||||||
For \a s1 != 0, this is equivalent to \c {compare(} \a s1, \a s2
|
For \a s1 != 0, this is equivalent to \c {compare(} \a s1, \a s2
|
||||||
\c {) != 0}. Note that no string is equal to \a s1 being 0.
|
\c {) != 0}. Note that no string is equal to \a s1 being 0.
|
||||||
@ -5389,12 +5409,12 @@ const ushort *QString::utf16() const
|
|||||||
Returns a string of size \a width that contains this string
|
Returns a string of size \a width that contains this string
|
||||||
padded by the \a fill character.
|
padded by the \a fill character.
|
||||||
|
|
||||||
If \a truncate is false and the size() of the string is more than
|
If \a truncate is \c false and the size() of the string is more than
|
||||||
\a width, then the returned string is a copy of the string.
|
\a width, then the returned string is a copy of the string.
|
||||||
|
|
||||||
\snippet qstring/main.cpp 32
|
\snippet qstring/main.cpp 32
|
||||||
|
|
||||||
If \a truncate is true and the size() of the string is more than
|
If \a truncate is \c true and the size() of the string is more than
|
||||||
\a width, then any characters in a copy of the string after
|
\a width, then any characters in a copy of the string after
|
||||||
position \a width are removed, and the copy is returned.
|
position \a width are removed, and the copy is returned.
|
||||||
|
|
||||||
@ -5430,7 +5450,7 @@ QString QString::leftJustified(int width, QChar fill, bool truncate) const
|
|||||||
|
|
||||||
\snippet qstring/main.cpp 49
|
\snippet qstring/main.cpp 49
|
||||||
|
|
||||||
If \a truncate is false and the size() of the string is more than
|
If \a truncate is \c false and the size() of the string is more than
|
||||||
\a width, then the returned string is a copy of the string.
|
\a width, then the returned string is a copy of the string.
|
||||||
|
|
||||||
If \a truncate is true and the size() of the string is more than
|
If \a truncate is true and the size() of the string is more than
|
||||||
@ -6053,8 +6073,8 @@ QString &QString::vsprintf(const char* cformat, va_list ap)
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6093,8 +6113,8 @@ qlonglong QString::toIntegral_helper(const QChar *data, int len, bool *ok, int b
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6134,8 +6154,8 @@ qulonglong QString::toIntegral_helper(const QChar *data, uint len, bool *ok, int
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6163,8 +6183,8 @@ long QString::toLong(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6191,8 +6211,8 @@ ulong QString::toULong(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6218,8 +6238,8 @@ int QString::toInt(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6245,8 +6265,8 @@ uint QString::toUInt(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6272,8 +6292,8 @@ short QString::toShort(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -6300,8 +6320,8 @@ ushort QString::toUShort(bool *ok, int base) const
|
|||||||
|
|
||||||
Returns 0.0 if the conversion fails.
|
Returns 0.0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, \c{*}\a{ok} is set to false;
|
If a conversion error occurs, \c{*}\a{ok} is set to \c false;
|
||||||
otherwise \c{*}\a{ok} is set to true.
|
otherwise \c{*}\a{ok} is set to \c true.
|
||||||
|
|
||||||
\snippet qstring/main.cpp 66
|
\snippet qstring/main.cpp 66
|
||||||
|
|
||||||
@ -6332,8 +6352,8 @@ double QString::toDouble(bool *ok) const
|
|||||||
/*!
|
/*!
|
||||||
Returns the string converted to a \c float value.
|
Returns the string converted to a \c float value.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true. Returns 0.0 if the conversion fails.
|
*\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
|
||||||
|
|
||||||
The string conversion will always happen in the 'C' locale. For locale
|
The string conversion will always happen in the 'C' locale. For locale
|
||||||
dependent conversion use QLocale::toFloat()
|
dependent conversion use QLocale::toFloat()
|
||||||
@ -8276,7 +8296,7 @@ ownership of it, no memory is freed when instances are destroyed.
|
|||||||
\fn bool QStringRef::isEmpty() const
|
\fn bool QStringRef::isEmpty() const
|
||||||
|
|
||||||
Returns \c true if the string reference has no characters; otherwise returns
|
Returns \c true if the string reference has no characters; otherwise returns
|
||||||
false.
|
\c false.
|
||||||
|
|
||||||
A string reference is empty if its size is zero.
|
A string reference is empty if its size is zero.
|
||||||
|
|
||||||
@ -9523,7 +9543,7 @@ QVector<uint> QStringRef::toUcs4() const
|
|||||||
the end.
|
the end.
|
||||||
|
|
||||||
Whitespace means any character for which QChar::isSpace() returns
|
Whitespace means any character for which QChar::isSpace() returns
|
||||||
true. This includes the ASCII characters '\\t', '\\n', '\\v',
|
\c true. This includes the ASCII characters '\\t', '\\n', '\\v',
|
||||||
'\\f', '\\r', and ' '.
|
'\\f', '\\r', and ' '.
|
||||||
|
|
||||||
Unlike QString::simplified(), trimmed() leaves internal whitespace alone.
|
Unlike QString::simplified(), trimmed() leaves internal whitespace alone.
|
||||||
@ -9555,8 +9575,8 @@ QStringRef QStringRef::trimmed() const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9580,8 +9600,8 @@ qint64 QStringRef::toLongLong(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9607,8 +9627,8 @@ quint64 QStringRef::toULongLong(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9634,8 +9654,8 @@ long QStringRef::toLong(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9660,8 +9680,8 @@ ulong QStringRef::toULong(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9685,8 +9705,8 @@ int QStringRef::toInt(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9710,8 +9730,8 @@ uint QStringRef::toUInt(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9735,8 +9755,8 @@ short QStringRef::toShort(bool *ok, int base) const
|
|||||||
base, which is 10 by default and must be between 2 and 36, or 0.
|
base, which is 10 by default and must be between 2 and 36, or 0.
|
||||||
Returns 0 if the conversion fails.
|
Returns 0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true.
|
*\a{ok} is set to \c true.
|
||||||
|
|
||||||
If \a base is 0, the C language convention is used: If the string
|
If \a base is 0, the C language convention is used: If the string
|
||||||
begins with "0x", base 16 is used; if the string begins with "0",
|
begins with "0x", base 16 is used; if the string begins with "0",
|
||||||
@ -9761,8 +9781,8 @@ ushort QStringRef::toUShort(bool *ok, int base) const
|
|||||||
|
|
||||||
Returns 0.0 if the conversion fails.
|
Returns 0.0 if the conversion fails.
|
||||||
|
|
||||||
If a conversion error occurs, \c{*}\a{ok} is set to false;
|
If a conversion error occurs, \c{*}\a{ok} is set to \c false;
|
||||||
otherwise \c{*}\a{ok} is set to true.
|
otherwise \c{*}\a{ok} is set to \c true.
|
||||||
|
|
||||||
The string conversion will always happen in the 'C' locale. For locale
|
The string conversion will always happen in the 'C' locale. For locale
|
||||||
dependent conversion use QLocale::toDouble()
|
dependent conversion use QLocale::toDouble()
|
||||||
@ -9784,8 +9804,8 @@ double QStringRef::toDouble(bool *ok) const
|
|||||||
/*!
|
/*!
|
||||||
Returns the string converted to a \c float value.
|
Returns the string converted to a \c float value.
|
||||||
|
|
||||||
If a conversion error occurs, *\a{ok} is set to false; otherwise
|
If a conversion error occurs, *\a{ok} is set to \c false; otherwise
|
||||||
*\a{ok} is set to true. Returns 0.0 if the conversion fails.
|
*\a{ok} is set to \c true. Returns 0.0 if the conversion fails.
|
||||||
|
|
||||||
The string conversion will always happen in the 'C' locale. For locale
|
The string conversion will always happen in the 'C' locale. For locale
|
||||||
dependent conversion use QLocale::toFloat()
|
dependent conversion use QLocale::toFloat()
|
||||||
|
@ -189,6 +189,8 @@
|
|||||||
/*! \fn bool QVarLengthArray::empty() const
|
/*! \fn bool QVarLengthArray::empty() const
|
||||||
\since 5.0
|
\since 5.0
|
||||||
|
|
||||||
|
Returns \c true if the array has size 0; otherwise returns \c false.
|
||||||
|
|
||||||
Same as isEmpty(). Provided for STL-compatibility.
|
Same as isEmpty(). Provided for STL-compatibility.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -285,7 +287,8 @@
|
|||||||
\fn void QVarLengthArray::push_back(const T &t)
|
\fn void QVarLengthArray::push_back(const T &t)
|
||||||
\since 5.0
|
\since 5.0
|
||||||
|
|
||||||
Same as append(). Provided for STL-compatibility.
|
Appends item \a t to the array, extending the array if necessary.
|
||||||
|
Provided for STL-compatibility.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -665,8 +668,7 @@
|
|||||||
/*! \fn QVarLengthArray &QVarLengthArray::operator+=(const T &value)
|
/*! \fn QVarLengthArray &QVarLengthArray::operator+=(const T &value)
|
||||||
|
|
||||||
\since 4.8
|
\since 4.8
|
||||||
Appends \a value to the array and returns a reference to this
|
Appends \a value to the array and returns a reference to this vector.
|
||||||
vector.
|
|
||||||
|
|
||||||
\sa append(), operator<<()
|
\sa append(), operator<<()
|
||||||
*/
|
*/
|
||||||
|
@ -565,6 +565,7 @@
|
|||||||
/*! \fn void QVector::removeAt(int i)
|
/*! \fn void QVector::removeAt(int i)
|
||||||
\since 5.2
|
\since 5.2
|
||||||
|
|
||||||
|
Removes the element at index position \a i.
|
||||||
Equivalent to
|
Equivalent to
|
||||||
\code
|
\code
|
||||||
remove(i);
|
remove(i);
|
||||||
@ -588,6 +589,8 @@
|
|||||||
/*! \fn T QVector::takeAt(int i)
|
/*! \fn T QVector::takeAt(int i)
|
||||||
\since 5.2
|
\since 5.2
|
||||||
|
|
||||||
|
Removes the element at index position \a i and returns it.
|
||||||
|
|
||||||
Equivalent to
|
Equivalent to
|
||||||
\code
|
\code
|
||||||
T t = at(i);
|
T t = at(i);
|
||||||
@ -907,7 +910,7 @@
|
|||||||
/*! \fn bool QVector::empty() const
|
/*! \fn bool QVector::empty() const
|
||||||
|
|
||||||
This function is provided for STL compatibility. It is equivalent
|
This function is provided for STL compatibility. It is equivalent
|
||||||
to isEmpty(), returning true if the vector is empty; otherwise
|
to isEmpty(), returning \c true if the vector is empty; otherwise
|
||||||
returns \c false.
|
returns \c false.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -71,7 +71,8 @@ QT_END_NAMESPACE
|
|||||||
This function needs to handle all messages to the path of the
|
This function needs to handle all messages to the path of the
|
||||||
virtual object, when the SubPath option is specified.
|
virtual object, when the SubPath option is specified.
|
||||||
The service, path, interface and methos are all part of the \a message.
|
The service, path, interface and methos are all part of the \a message.
|
||||||
Must return true when the message is handled, otherwise false (will generate dbus error message).
|
Parameter \a connection is the connection handle.
|
||||||
|
Must return \c true when the message is handled, otherwise \c false (will generate dbus error message).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -910,7 +910,7 @@ qreal QGuiApplication::devicePixelRatio() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the top level window at the given position, if any.
|
Returns the top level window at the given position \a pos, if any.
|
||||||
*/
|
*/
|
||||||
QWindow *QGuiApplication::topLevelAt(const QPoint &pos)
|
QWindow *QGuiApplication::topLevelAt(const QPoint &pos)
|
||||||
{
|
{
|
||||||
@ -2711,7 +2711,7 @@ void QGuiApplicationPrivate::notifyWindowIconChanged()
|
|||||||
\brief whether the application implicitly quits when the last window is
|
\brief whether the application implicitly quits when the last window is
|
||||||
closed.
|
closed.
|
||||||
|
|
||||||
The default is true.
|
The default is \c true.
|
||||||
|
|
||||||
If this property is \c true, the applications quits when the last visible
|
If this property is \c true, the applications quits when the last visible
|
||||||
primary window (i.e. window with no parent) is closed.
|
primary window (i.e. window with no parent) is closed.
|
||||||
@ -2739,7 +2739,7 @@ bool QGuiApplication::quitOnLastWindowClosed()
|
|||||||
primary window (i.e. window with no parent) is closed.
|
primary window (i.e. window with no parent) is closed.
|
||||||
|
|
||||||
By default, QGuiApplication quits after this signal is emitted. This feature
|
By default, QGuiApplication quits after this signal is emitted. This feature
|
||||||
can be turned off by setting \l quitOnLastWindowClosed to false.
|
can be turned off by setting \l quitOnLastWindowClosed to \c false.
|
||||||
|
|
||||||
\sa QWindow::close(), QWindow::isTopLevel()
|
\sa QWindow::close(), QWindow::isTopLevel()
|
||||||
*/
|
*/
|
||||||
@ -2915,7 +2915,7 @@ void QGuiApplicationPrivate::setApplicationState(Qt::ApplicationState state)
|
|||||||
Returns \c true if the application is currently saving the
|
Returns \c true if the application is currently saving the
|
||||||
\l{Session Management}{session}; otherwise returns \c false.
|
\l{Session Management}{session}; otherwise returns \c false.
|
||||||
|
|
||||||
This is true when commitDataRequest() and saveStateRequest() are emitted,
|
This is \c true when commitDataRequest() and saveStateRequest() are emitted,
|
||||||
but also when the windows are closed afterwards by session management.
|
but also when the windows are closed afterwards by session management.
|
||||||
|
|
||||||
\sa sessionId(), commitDataRequest(), saveStateRequest()
|
\sa sessionId(), commitDataRequest(), saveStateRequest()
|
||||||
@ -3186,7 +3186,7 @@ QStyleHints *QGuiApplication::styleHints()
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets whether Qt should use the system's standard colors, fonts, etc., to
|
Sets whether Qt should use the system's standard colors, fonts, etc., to
|
||||||
\a on. By default, this is true.
|
\a on. By default, this is \c true.
|
||||||
|
|
||||||
This function must be called before creating the QGuiApplication object, like
|
This function must be called before creating the QGuiApplication object, like
|
||||||
this:
|
this:
|
||||||
@ -3202,7 +3202,7 @@ void QGuiApplication::setDesktopSettingsAware(bool on)
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns \c true if Qt is set to use the system's standard colors, fonts, etc.;
|
Returns \c true if Qt is set to use the system's standard colors, fonts, etc.;
|
||||||
otherwise returns \c false. The default is true.
|
otherwise returns \c false. The default is \c true.
|
||||||
|
|
||||||
\sa setDesktopSettingsAware()
|
\sa setDesktopSettingsAware()
|
||||||
*/
|
*/
|
||||||
|
@ -163,7 +163,7 @@ void QOpenGLVersionProfile::setVersion(int majorVersion, int minorVersion)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the OpenGL profile. Only make sense if profiles are supported by this version.
|
Returns the OpenGL profile. Only makes sense if profiles are supported by this version.
|
||||||
|
|
||||||
\sa setProfile(), supportsProfiles()
|
\sa setProfile(), supportsProfiles()
|
||||||
*/
|
*/
|
||||||
@ -173,7 +173,8 @@ QSurfaceFormat::OpenGLContextProfile QOpenGLVersionProfile::profile() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the profile. Only make sense if profiles are supported by this version.
|
Sets the OpenGL profile \a profile. Only makes sense if profiles are supported by
|
||||||
|
this version.
|
||||||
|
|
||||||
\sa profile(), supportsProfiles()
|
\sa profile(), supportsProfiles()
|
||||||
*/
|
*/
|
||||||
@ -205,7 +206,7 @@ bool QOpenGLVersionProfile::isLegacyVersion() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns \c true if the version number is valid. Note that for a default constructed
|
Returns \c true if the version number is valid. Note that for a default constructed
|
||||||
QOpenGLVersionProfile object this function will return false.
|
QOpenGLVersionProfile object this function will return \c false.
|
||||||
|
|
||||||
\sa setVersion(), version()
|
\sa setVersion(), version()
|
||||||
*/
|
*/
|
||||||
@ -634,9 +635,9 @@ QOpenGLFunctions *QOpenGLContext::functions() const
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a pointer to an object that provides access to all functions for
|
Returns a pointer to an object that provides access to all functions for the
|
||||||
the version of the current context. Before using any of the functions
|
\a versionProfile of the current context. Before using any of the functions they must
|
||||||
they must be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions().
|
be initialized by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions().
|
||||||
|
|
||||||
Usually one would use the template version of this function to automatically
|
Usually one would use the template version of this function to automatically
|
||||||
have the result cast to the correct type.
|
have the result cast to the correct type.
|
||||||
@ -704,7 +705,7 @@ QSet<QByteArray> QOpenGLContext::extensions() const
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns \c true if this OpenGL context supports the specified OpenGL
|
Returns \c true if this OpenGL context supports the specified OpenGL
|
||||||
\a extension, false otherwise.
|
\a extension, \c false otherwise.
|
||||||
|
|
||||||
The context or a sharing context must be current.
|
The context or a sharing context must be current.
|
||||||
|
|
||||||
|
@ -1461,7 +1461,7 @@ QOpenGLTexture::QOpenGLTexture(Target target)
|
|||||||
/*!
|
/*!
|
||||||
Creates a QOpenGLTexture object that can later be bound to the 2D texture
|
Creates a QOpenGLTexture object that can later be bound to the 2D texture
|
||||||
target and contains the pixel data contained in \a image. If you wish
|
target and contains the pixel data contained in \a image. If you wish
|
||||||
to have a chain of mipmaps generated then set \a useMipMaps to true (this
|
to have a chain of mipmaps generated then set \a genMipMaps to \c true (this
|
||||||
is the default).
|
is the default).
|
||||||
|
|
||||||
This does create the underlying OpenGL texture object. Therefore,
|
This does create the underlying OpenGL texture object. Therefore,
|
||||||
@ -1491,6 +1491,8 @@ QOpenGLTexture::~QOpenGLTexture()
|
|||||||
functions that set properties of the texture object implicitly call create()
|
functions that set properties of the texture object implicitly call create()
|
||||||
on your behalf.
|
on your behalf.
|
||||||
|
|
||||||
|
Returns \c true if the creation succeeded, otherwise returns \c false.
|
||||||
|
|
||||||
\sa destroy(), isCreated(), textureId()
|
\sa destroy(), isCreated(), textureId()
|
||||||
*/
|
*/
|
||||||
bool QOpenGLTexture::create()
|
bool QOpenGLTexture::create()
|
||||||
@ -1557,9 +1559,8 @@ void QOpenGLTexture::bind()
|
|||||||
EXT_direct_state_access extension where available and simulates it
|
EXT_direct_state_access extension where available and simulates it
|
||||||
where it is not.
|
where it is not.
|
||||||
|
|
||||||
If \a restoreTextureUnit is true then this function
|
If parameter \a reset is \c true then this function will restore
|
||||||
will restore the active unit to the texture unit that was active
|
the active unit to the texture unit that was active upon entry.
|
||||||
upon entry.
|
|
||||||
|
|
||||||
\sa release()
|
\sa release()
|
||||||
*/
|
*/
|
||||||
@ -1584,7 +1585,7 @@ void QOpenGLTexture::release()
|
|||||||
/*!
|
/*!
|
||||||
Unbinds this texture from texture unit \a unit.
|
Unbinds this texture from texture unit \a unit.
|
||||||
|
|
||||||
If \a restoreTextureUnit is true then this function
|
If parameter \a reset is \c true then this function
|
||||||
will restore the active unit to the texture unit that was active
|
will restore the active unit to the texture unit that was active
|
||||||
upon entry.
|
upon entry.
|
||||||
*/
|
*/
|
||||||
@ -1838,11 +1839,11 @@ QOpenGLTexture::TextureFormat QOpenGLTexture::format() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the dimensions of this texture object. The default
|
Sets the dimensions of this texture object to \a width,
|
||||||
for each dimension is 1. The maximum allowable texture size
|
\a height, and \a depth. The default for each dimension is 1.
|
||||||
is dependent upon your OpenGL implementation. Allocating
|
The maximum allowable texture size is dependent upon your OpenGL
|
||||||
storage for a texture less than the maximum size can still
|
implementation. Allocating storage for a texture less than the
|
||||||
fail if your system is low on resources.
|
maximum size can still fail if your system is low on resources.
|
||||||
|
|
||||||
\sa width(), height(), depth()
|
\sa width(), height(), depth()
|
||||||
*/
|
*/
|
||||||
@ -1925,8 +1926,8 @@ int QOpenGLTexture::depth() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
For texture targets that support mipmaps this function
|
For texture targets that support mipmaps, this function
|
||||||
sets the requested number of mipmap levels to allocate storage
|
sets the requested number of mipmap \a levels to allocate storage
|
||||||
for. This function should be called before storage is allocated
|
for. This function should be called before storage is allocated
|
||||||
for the texture.
|
for the texture.
|
||||||
|
|
||||||
@ -1991,11 +1992,10 @@ int QOpenGLTexture::maximumMipLevels() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
For those texture targets that support array layers this function
|
Sets the number of array \a layers to allocate storage for. This
|
||||||
sets the number of array layers to allocate storage for. This
|
function should be called before storage is allocated for the texture.
|
||||||
function should be called before storage is allocated for the tecture.
|
|
||||||
|
|
||||||
For tarets that do not support array layers this function has
|
For targets that do not support array layers this function has
|
||||||
no effect.
|
no effect.
|
||||||
|
|
||||||
\sa layers(), isStorageAllocated()
|
\sa layers(), isStorageAllocated()
|
||||||
@ -2116,13 +2116,13 @@ bool QOpenGLTexture::isStorageAllocated() const
|
|||||||
Simpliar constraints apply for the \a viewFormat. See the above link
|
Simpliar constraints apply for the \a viewFormat. See the above link
|
||||||
and the specification for more details.
|
and the specification for more details.
|
||||||
|
|
||||||
The \a minimumMipmapLevel, \a maximumMipmapLevel, \a mimimumLayer,
|
The \a minimumMipmapLevel, \a maximumMipmapLevel, \a minimumLayer,
|
||||||
and \a maximumLayer arguments serve to restrict the parts of the
|
and \a maximumLayer arguments serve to restrict the parts of the
|
||||||
texture accessible by the texture view.
|
texture accessible by the texture view.
|
||||||
|
|
||||||
If creation of the texture view fails this function will return
|
If creation of the texture view fails this function will return
|
||||||
0. If the function succeeds it will return a pointer to a new
|
0. If the function succeeds it will return a pointer to a new
|
||||||
QOpenGLTexture object that will return true from its isTextureView()
|
QOpenGLTexture object that will return \c true from its isTextureView()
|
||||||
function.
|
function.
|
||||||
|
|
||||||
\sa isTextureView()
|
\sa isTextureView()
|
||||||
@ -2158,7 +2158,7 @@ bool QOpenGLTexture::isTextureView() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Uploads pixel \a data for this texture object \a mipLevel, array \a layer and \acubeFace.
|
Uploads pixel \a data for this texture object \a mipLevel, array \a layer, and \a cubeFace.
|
||||||
Storage must have been allocated before uploading pixel data. Some overloads of setData()
|
Storage must have been allocated before uploading pixel data. Some overloads of setData()
|
||||||
will set appropriate dimensions, mipmap levels, and array layers and then allocate storage
|
will set appropriate dimensions, mipmap levels, and array layers and then allocate storage
|
||||||
for you if they have enough information to do so. This will be noted in the function
|
for you if they have enough information to do so. This will be noted in the function
|
||||||
@ -2285,6 +2285,8 @@ void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
This overload of setData() will allocate storage for you.
|
This overload of setData() will allocate storage for you.
|
||||||
|
The pixel data is contained in \a image. Mipmaps are generated by default.
|
||||||
|
Set \a genMipMaps to \l DontGenerateMipMaps to turn off mipmap generation.
|
||||||
|
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
@ -2303,7 +2305,7 @@ void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Uploads compressed pixel \a data to \a mipLevel, array \a layer and \a cubeFace.
|
Uploads compressed pixel \a data to \a mipLevel, array \a layer, and \a cubeFace.
|
||||||
The pixel transfer can optionally be controlled with \a options. The \a dataSize
|
The pixel transfer can optionally be controlled with \a options. The \a dataSize
|
||||||
argument should specify the size of the data pointed to by \a data.
|
argument should specify the size of the data pointed to by \a data.
|
||||||
|
|
||||||
@ -2625,7 +2627,7 @@ QPair<int, int> QOpenGLTexture::mipLevelRange() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
If \a enabled is true, enables automatic mipmap generation for this texture object
|
If \a enabled is \c true, enables automatic mipmap generation for this texture object
|
||||||
to occur whenever the level 0 mipmap data is set via setData().
|
to occur whenever the level 0 mipmap data is set via setData().
|
||||||
|
|
||||||
The automatic mipmap generation is enabled by default.
|
The automatic mipmap generation is enabled by default.
|
||||||
@ -2673,7 +2675,7 @@ void QOpenGLTexture::generateMipMaps()
|
|||||||
|
|
||||||
The generation of mipmaps to above \baseLevel is achieved by setting the mipmap
|
The generation of mipmaps to above \baseLevel is achieved by setting the mipmap
|
||||||
base level to \a baseLevel and then generating the mipmap chain. If \a resetBaseLevel
|
base level to \a baseLevel and then generating the mipmap chain. If \a resetBaseLevel
|
||||||
is true, then the baseLevel of the texture will be reset to its previous value.
|
is \c true, then the baseLevel of the texture will be reset to its previous value.
|
||||||
|
|
||||||
\sa setAutoMipMapGenerationEnabled(), setMipLevels(), mipLevels()
|
\sa setAutoMipMapGenerationEnabled(), setMipLevels(), mipLevels()
|
||||||
*/
|
*/
|
||||||
@ -2727,6 +2729,8 @@ void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue val
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Parameters \a {r}, \a {g}, \a {b}, and \a {a} are values used for setting
|
||||||
|
the colors red, green, blue, and the alpha value.
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
|
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
|
||||||
@ -2941,6 +2945,7 @@ void QOpenGLTexture::setWrapMode(QOpenGLTexture::WrapMode mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Holds the texture dimension \a direction.
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setWrapMode(QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode)
|
void QOpenGLTexture::setWrapMode(QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode)
|
||||||
@ -2995,6 +3000,8 @@ void QOpenGLTexture::setBorderColor(QColor color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Sets the color red to \a {r}, green to \a {g}, blue to \{b}, and \a {a} to the
|
||||||
|
alpha value.
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
|
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
|
||||||
@ -3026,6 +3033,8 @@ void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Sets the color red to \a {r}, green to \a {g}, blue to \a {b}, and \a the alpha
|
||||||
|
value to {a}.
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
|
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
|
||||||
@ -3059,6 +3068,8 @@ void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Sets the color red to \a {r}, green to \a {g}, blue to \a {b}, and \a the alpha
|
||||||
|
value to {a}.
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
|
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
|
||||||
@ -3110,7 +3121,7 @@ QColor QOpenGLTexture::borderColor() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Writes the texture border color into the first 4 elements
|
Writes the texture border color into the first four elements
|
||||||
of the array pointed to by \a border.
|
of the array pointed to by \a border.
|
||||||
|
|
||||||
\sa setBorderColor()
|
\sa setBorderColor()
|
||||||
@ -3129,6 +3140,9 @@ void QOpenGLTexture::borderColor(float *border) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Writes the texture border color into the first four elements
|
||||||
|
of the array pointed to by \a border.
|
||||||
|
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::borderColor(int *border) const
|
void QOpenGLTexture::borderColor(int *border) const
|
||||||
@ -3145,6 +3159,9 @@ void QOpenGLTexture::borderColor(int *border) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Writes the texture border color into the first four elements
|
||||||
|
of the array pointed to by \a border.
|
||||||
|
|
||||||
\overload
|
\overload
|
||||||
*/
|
*/
|
||||||
void QOpenGLTexture::borderColor(unsigned int *border) const
|
void QOpenGLTexture::borderColor(unsigned int *border) const
|
||||||
@ -3235,8 +3252,8 @@ float QOpenGLTexture::maximumLevelOfDetail() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the minimum and maximum level of detail parameters.
|
Sets the minimum level of detail parameters to \a min and the maximum level
|
||||||
|
to \a max.
|
||||||
\note This function has no effect on Qt built for OpenGL ES 2.
|
\note This function has no effect on Qt built for OpenGL ES 2.
|
||||||
\sa levelOfDetailRange(), setMinimumLevelOfDetail(), setMaximumLevelOfDetail()
|
\sa levelOfDetailRange(), setMinimumLevelOfDetail(), setMaximumLevelOfDetail()
|
||||||
*/
|
*/
|
||||||
@ -3274,7 +3291,10 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the level of detail bias parameter.
|
Sets the level of detail bias to \a bias.
|
||||||
|
Level of detail bias affects the point at which mipmapping levels change.
|
||||||
|
Increasing values for level of detail bias makes the overall images blurrier
|
||||||
|
or smoother. Decreasing values make the overall images sharper.
|
||||||
|
|
||||||
\note This function has no effect on Qt built for OpenGL ES 2.
|
\note This function has no effect on Qt built for OpenGL ES 2.
|
||||||
\sa levelofDetailBias()
|
\sa levelofDetailBias()
|
||||||
|
@ -39,5 +39,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
//! [0]
|
//! [0]
|
||||||
|
\code
|
||||||
foreach(variable, container)
|
foreach(variable, container)
|
||||||
|
\endcode
|
||||||
//! [0]
|
//! [0]
|
||||||
|
@ -164,7 +164,7 @@ NSView *QMacCocoaViewContainer::cocoaView() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Sets the NSView to contain to be \a cocoaViewToWrap and retains it. If this
|
Sets \a view as the NSView to contain and retains it. If this
|
||||||
container already had a view set, it will release the previously set view.
|
container already had a view set, it will release the previously set view.
|
||||||
*/
|
*/
|
||||||
void QMacCocoaViewContainer::setCocoaView(NSView *view)
|
void QMacCocoaViewContainer::setCocoaView(NSView *view)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user