diff options
Diffstat (limited to 'src')
73 files changed, 682 insertions, 309 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index c144871..e5626b4 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2883,8 +2883,8 @@ int qrand() \relates <QtGlobal> \since 4.8 - \brief Hints the compiler that the enclosed condition is likely to evaluate - to \c true. + \brief Hints to the compiler that the enclosed condition, \a expr, is + likely to evaluate to \c true. Use of this macro can help the compiler to optimize the code. @@ -2900,8 +2900,8 @@ int qrand() \relates <QtGlobal> \since 4.8 - \brief Hints the compiler that the enclosed condition is likely to evaluate - to \c false. + \brief Hints to the compiler that the enclosed condition, \a expr, is + likely to evaluate to \c false. Use of this macro can help the compiler to optimize the code. diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp index 8c27430..b397c1a 100644 --- a/src/corelib/io/qdatastream.cpp +++ b/src/corelib/io/qdatastream.cpp @@ -584,8 +584,9 @@ void QDataStream::setByteOrder(ByteOrder bo) \value Qt_4_3 Version 9 (Qt 4.3) \value Qt_4_4 Version 10 (Qt 4.4) \value Qt_4_5 Version 11 (Qt 4.5) - \value Qt_4_6 Version 12 (Qt 4.6) + \value Qt_4_6 Version 12 (Qt 4.6, Qt 4.7, Qt 4.8) \value Qt_4_7 Same as Qt_4_6. + \value Qt_4_8 Same as Qt_4_6. \sa setVersion(), version() */ diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 9d6641c..66edf58 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -1656,6 +1656,8 @@ bool QFile::atEnd() const } /*! + \fn bool QFile::seek(qint64 pos) + For random-access devices, this function sets the current position to \a pos, returning true on success, or false if an error occurred. For sequential devices, the default behavior is to do nothing and diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp index 9590e39..97669ac 100644 --- a/src/corelib/io/qfilesystemengine.cpp +++ b/src/corelib/io/qfilesystemengine.cpp @@ -196,7 +196,7 @@ static bool _q_resolveEntryAndCreateLegacyEngine_recursive(QFileSystemEntry &ent Resolves the \a entry (see QDir::searchPaths) and returns an engine for it, but never a QFSFileEngine. - \returns a file engine that can be used to access the entry. Returns 0 if + Returns a file engine that can be used to access the entry. Returns 0 if QFileSystemEngine API should be used to query and interact with the file system object. */ diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 4894754..0d23a27 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -472,10 +472,10 @@ qint64 QFSFileEngine::size() const return d->nativeSize(); } +#ifndef Q_OS_WIN /*! \internal */ -#ifndef Q_OS_WIN qint64 QFSFileEnginePrivate::sizeFdFh() const { Q_Q(const QFSFileEngine); diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index c00fc68..92ce5ab 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -6088,7 +6088,7 @@ bool QUrl::isDetached() const "//servername/path/to/file.txt". Note that only certain platforms can actually open this file using QFile::open(). - \sa toLocalFile(), isLocalFile(), QDir::toNativeSeparators + \sa toLocalFile(), isLocalFile(), QDir::toNativeSeparators() */ QUrl QUrl::fromLocalFile(const QString &localFile) { diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index a4948c1..b88643d 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -1790,6 +1790,7 @@ QObjectList QObject::queryList(const char *inheritsClass, /*! \fn T qFindChild(const QObject *obj, const QString &name) \relates QObject + \overload qFindChildren() \obsolete This function is equivalent to @@ -1805,6 +1806,7 @@ QObjectList QObject::queryList(const char *inheritsClass, /*! \fn QList<T> qFindChildren(const QObject *obj, const QString &name) \relates QObject + \overload qFindChildren() \obsolete This function is equivalent to @@ -1834,38 +1836,6 @@ QObjectList QObject::queryList(const char *inheritsClass, /*! \internal - \fn T qFindChild(const QObject *obj, const QString &name = QString(), T dummy = 0) - \relates QObject - \overload qFindChildren() - - This function is equivalent to - \a{obj}->\l{QObject::findChild()}{findChild}<T>(\a name). - - \note This function was provided as a workaround for MSVC 6 - which did not support member template functions. It is advised - to use the other form in new code. - - \sa QObject::findChild() -*/ - -/*! - \internal - \fn QList<T> qFindChildren(const QObject *obj, const QString &name = QString(), T dummy = 0) - \relates QObject - \overload qFindChildren() - - This function is equivalent to - \a{obj}->\l{QObject::findChildren()}{findChildren}<T>(\a name). - - \note This function was provided as a workaround for MSVC 6 - which did not support member template functions. It is advised - to use the other form in new code. - - \sa QObject::findChildren() -*/ - -/*! - \internal */ void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QRegExp *re, const QMetaObject &mo, QList<void*> *list) @@ -2419,20 +2389,22 @@ int QObject::receivers(const char *signal) const This helper function calculates signal and method index for the given member in the specified class. - \li If member.mobj is 0 then both signalIndex and methodIndex are set to -1. + \list + \o If member.mobj is 0 then both signalIndex and methodIndex are set to -1. - \li If specified member is not a member of obj instance class (or one of + \o If specified member is not a member of obj instance class (or one of its parent classes) then both signalIndex and methodIndex are set to -1. + \endlist This function is used by QObject::connect and QObject::disconnect which are working with QMetaMethod. - \param[out] signalIndex is set to the signal index of member. If the member + \a signalIndex is set to the signal index of member. If the member specified is not signal this variable is set to -1. - \param[out] methodIndex is set to the method index of the member. If the - member is not a method of the object specified by obj param this variable - is set to -1. + \a methodIndex is set to the method index of the member. If the + member is not a method of the object specified by the \a obj argument this + variable is set to -1. */ void QMetaObjectPrivate::memberIndexes(const QObject *obj, const QMetaMethod &member, @@ -2689,9 +2661,9 @@ bool QObject::connect(const QObject *sender, const char *signal, Qt::ConnectionType type) but it uses QMetaMethod to specify signal and method. - \see connect(const QObject *sender, const char *signal, - const QObject *receiver, const char *method, - Qt::ConnectionType type) + \sa connect(const QObject *sender, const char *signal, + const QObject *receiver, const char *method, + Qt::ConnectionType type) */ bool QObject::connect(const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, @@ -2987,7 +2959,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal, In the same way 0 can be used for \a receiver in the meaning "any receiving object". In this case method shoud also be QMetaMethod(). \a sender parameter should be never 0. - \see disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method) + \sa disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method) */ bool QObject::disconnect(const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index d274fa3..15d81b9 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -345,6 +345,11 @@ public: }; #endif +#ifdef qdoc +T qFindChild(const QObject *o, const QString &name = QString()); +QList<T> qFindChildren(const QObject *oobj, const QString &name = QString()); +QList<T> qFindChildren(const QObject *o, const QRegExp &re); +#endif #ifdef QT_DEPRECATED template<typename T> inline QT_DEPRECATED T qFindChild(const QObject *o, const QString &name = QString()) diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 3c8704c..0edcb3b 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -205,6 +205,9 @@ QTimer::~QTimer() Starts or restarts the timer with the timeout specified in \l interval. + If the timer is already running, it will be + \l{QTimer::stop()}{stopped} and restarted. + If \l singleShot is true, the timer will be activated only once. */ void QTimer::start() @@ -218,6 +221,12 @@ void QTimer::start() /*! Starts or restarts the timer with a timeout interval of \a msec milliseconds. + + If the timer is already running, it will be + \l{QTimer::stop()}{stopped} and restarted. + + If \l singleShot is true, the timer will be activated only once. + */ void QTimer::start(int msec) { diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 4504eab..d255422 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -600,7 +600,7 @@ static QString find_translation(const QLocale & locale, /*! \since 4.8 - Loads \a filename + \a prefix + \a \l{QLocale::uiLanguages()}{ui language + Loads \a filename + \a prefix + \l{QLocale::uiLanguages()}{ui language name} + \a suffix (".qm" if the \a suffix is not specified), which may be an absolute file name or relative to \a directory. Returns true if the translation is successfully loaded; otherwise returns false. @@ -618,7 +618,7 @@ static QString find_translation(const QLocale & locale, \endlist For example, an application running in the locale with the following - l{QLocale::uiLanguages()}{ui languages} - "es", "fr-CA", "de" might call + \l{QLocale::uiLanguages()}{ui languages} - "es", "fr-CA", "de" might call load(QLocale::system(), "foo", ".", "/opt/foolib", ".qm"). load() would replace '-' (dash) with '_' (underscore) in the ui language and then try to open the first existing readable file from this list: @@ -637,8 +637,8 @@ static QString find_translation(const QLocale & locale, \o \c /opt/foolib/foo \endlist - For OSs where file system is case sensitive, QTranslator also tries to load - a lower-cased version of the locale name. + On operating systems where file system is case sensitive, QTranslator also + tries to load a lower-cased version of the locale name. */ bool QTranslator::load(const QLocale & locale, const QString & filename, diff --git a/src/corelib/thread/qmutexpool.cpp b/src/corelib/thread/qmutexpool.cpp index 03ab047..49fb46b 100644 --- a/src/corelib/thread/qmutexpool.cpp +++ b/src/corelib/thread/qmutexpool.cpp @@ -123,7 +123,8 @@ QMutexPool *QMutexPool::instance() return globalMutexPool(); } -/*! \fn QMutexPool::get(void *address) +/*! + \fn QMutexPool::get(const void *address) Returns a QMutex from the pool. QMutexPool uses the value \a address to determine which mutex is returned from the pool. */ diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index 1c1d684..36a9c60 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -590,10 +590,10 @@ void **QListData::erase(void **xi) \sa operator=() */ -/*! \fn QList::QList(std::initializer_list<T> args) +/*! \fn inline QList::QList(std::initializer_list<T> args) \since 4.8 - Construct a list from a std::initilizer_list. + Construct a list from the std::initializer_list specified by \a args. This constructor is only enabled if the compiler supports C++0x */ diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index ef49906..4648ca1 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -937,7 +937,7 @@ QLocale::Country QLocale::country() const name() will not contain it for compatibility reasons. Use bcp47Name() instead if you need a full locale name. - \sa QLocale(const QString &), language(), script(), country(), bcp47Name() + \sa QLocale(), language(), script(), country(), bcp47Name() */ QString QLocale::name() const diff --git a/src/corelib/tools/qlocale.qdoc b/src/corelib/tools/qlocale.qdoc index 34e4fb3..fd139c3 100644 --- a/src/corelib/tools/qlocale.qdoc +++ b/src/corelib/tools/qlocale.qdoc @@ -769,6 +769,8 @@ \value Weekdays a QList<Qt::DayOfWeek> specifying the regular weekdays \value LocaleChanged this type is queried whenever the system locale is changed. \value ListToSeparatedString a string that represents a join of a given QStringList with a locale-defined separator. + \value NativeLanguageName a string that represents the name of the native language. + \value NativeCountryName a string that represents the name of the native country. */ /*! diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index 8ce6b57..9277a3e 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -252,10 +252,9 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QScopedArrayPointer::QScopedArrayPointer(T *p = 0) + \fn QScopedArrayPointer::QScopedArrayPointer() - Constructs this QScopedArrayPointer instance and sets its pointer - to \a p. + Constructs a QScopedArrayPointer instance. */ /*! diff --git a/src/corelib/tools/qscopedvaluerollback.cpp b/src/corelib/tools/qscopedvaluerollback.cpp index a9bbdb3..1ad47f4 100644 --- a/src/corelib/tools/qscopedvaluerollback.cpp +++ b/src/corelib/tools/qscopedvaluerollback.cpp @@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE /*! \class QScopedValueRollback - \brief The QScopedValueRollback resets a variable to its previous value on destruction + \brief The QScopedValueRollback class resets a variable to its previous value on destruction. \since 4.8 \ingroup misc @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE /*! \fn QScopedValueRollback::QScopedValueRollback(T &var) - Stores the previous value of var internally, for revert on destruction. + Stores the previous value of \a var internally, for revert on destruction. */ /*! diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 8ad4e70..e27afb8 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -837,6 +837,25 @@ int QString::grow(int size) \sa QString::const_iterator */ +/*! + \typedef QString::const_reference + + The QString::const_reference typedef provides an STL-style + const reference for QString. +*/ +/*! + \typedef QString::reference + + The QString::const_reference typedef provides an STL-style + reference for QString. +*/ +/*! + \typedef QString::value_type + + The QString::const_reference typedef provides an STL-style + value type for QString. +*/ + /*! \fn QString::iterator QString::begin() Returns an \l{STL-style iterator} pointing to the first character in @@ -9111,7 +9130,7 @@ QByteArray QStringRef::toUtf8() const UCS-4 is a Unicode codec and is lossless. All characters from this string can be encoded in UCS-4. - \sa fromUtf8(), toAscii(), toLatin1(), toLocal8Bit(), QTextCodec, fromUcs4(), toWCharArray() + \sa toAscii(), toLatin1(), toLocal8Bit(), QTextCodec */ QVector<uint> QStringRef::toUcs4() const { diff --git a/src/corelib/tools/qstringbuilder.cpp b/src/corelib/tools/qstringbuilder.cpp index fb06736..45de6bc 100644 --- a/src/corelib/tools/qstringbuilder.cpp +++ b/src/corelib/tools/qstringbuilder.cpp @@ -142,7 +142,8 @@ QT_BEGIN_NAMESPACE characters. */ -/*! \fn QStringBuilder::operator QString() const +/*! + \fn operator QStringBuilder::QString() const Converts the \c QLatin1Literal into a \c QString object. */ diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index 5997574..8b47137 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -683,7 +683,7 @@ int QtPrivate::QStringList_removeDuplicates(QStringList *that) /*! \fn QStringList::QStringList(std::initializer_list<QString> args) \since 4.8 - Construct a list from a std::initilizer_list. + Construct a list from a std::initializer_list given by \a args. This constructor is only enabled if the compiler supports C++0x */ diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc index b2dc7d6..b1d7a1a 100644 --- a/src/corelib/tools/qvarlengtharray.qdoc +++ b/src/corelib/tools/qvarlengtharray.qdoc @@ -337,6 +337,20 @@ Typedef for const T &. Provided for STL compatibility. */ +/*! + \typedef QVarLengthArray::const_iterator + \since 4.7 + + Typedef for const T *. Provided for STL compatibility. +*/ + +/*! + \typedef QVarLengthArray::iterator + \since 4.7 + + Typedef for T *. Provided for STL compatibility. +*/ + /*! \fn void QVarLengthArray::prepend(const T &value) \since 4.8 @@ -501,7 +515,7 @@ \relates QVarLengthArray \since 4.8 - Returns true if the two array are equal; + Returns true if the two arrays, specified by \a left and \a right, are equal. Two arrays are considered equal if they contain the same values in the same order. @@ -516,7 +530,7 @@ \relates QVarLengthArray \since 4.8 - Returns true if the two array are different; + Returns true if the two arrays, specified by \a left and \a right, are \e not equal. Two arrays are considered equal if they contain the same values in the same order. diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp index 8c4dd06..98a2412 100644 --- a/src/corelib/tools/qvector.cpp +++ b/src/corelib/tools/qvector.cpp @@ -277,7 +277,7 @@ int QVectorData::grow(int sizeofTypedData, int size, int sizeofT, bool excessive /*! \fn QVector::QVector(std::initializer_list<T> args) \since 4.8 - Construct a vector from a std::initilizer_list. + Construct a vector from the std::initilizer_list given by \a args. This constructor is only enabled if the compiler supports C++0x */ diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp index 19626af..caaffd3 100644 --- a/src/corelib/xml/qxmlstream.cpp +++ b/src/corelib/xml/qxmlstream.cpp @@ -646,6 +646,11 @@ QXmlStreamReader::TokenType QXmlStreamReader::tokenType() const parser has reached the end element, the current element becomes the parent element. + You can traverse a document by repeatedly calling this function while + ensuring that the stream reader is not at the end of the document: + + \snippet doc/src/snippets/xml/streamreader/traverse.cpp traverse document + This is a convenience function for when you're only concerned with parsing XML elements. The \l{QXmlStream Bookmarks Example} makes extensive use of this function. diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index 6628ca3..58c1caa 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -234,10 +234,11 @@ void QDBusConnectionManager::setConnection(const QString &name, QDBusConnectionP /*! \since 4.8 - \enum QDBusConnection::ConnectionCapabilities - The available capabilities for a D-Bus connection. + \enum QDBusConnection::ConnectionCapability - \value UnixFileDescriptorPassing passing of Unix file descriptors to other processes + This enum describes the available capabilities for a D-Bus connection. + + \value UnixFileDescriptorPassing enables passing of Unix file descriptors to other processes (see QDBusUnixFileDescriptor) \sa connectionCapabilities() diff --git a/src/dbus/qdbusunixfiledescriptor.cpp b/src/dbus/qdbusunixfiledescriptor.cpp index 75a99b4..86d2b3c 100644 --- a/src/dbus/qdbusunixfiledescriptor.cpp +++ b/src/dbus/qdbusunixfiledescriptor.cpp @@ -99,7 +99,17 @@ QT_BEGIN_NAMESPACE invalid state and QDBusUnixFileDescriptor::isSupported() will return false. - \sa QDBusConnection::ConnectionCapabilities, QDBusConnection::connectionCapabilities + \sa QDBusConnection::ConnectionCapabilities, QDBusConnection::connectionCapabilities() +*/ + +/*! + \typedef QDBusUnixFileDescriptor::Data + \internal +*/ + +/*! + \variable QDBusUnixFileDescriptor::d + \internal */ class QDBusUnixFileDescriptorPrivate : public QSharedData { @@ -122,7 +132,7 @@ QExplicitlySharedDataPointer<QDBusUnixFileDescriptorPrivate>::~QExplicitlyShared This is equivalent to constructing the object with an invalid file descriptor (like -1). - \sa fileDescriptor, isValid + \sa fileDescriptor(), isValid() */ QDBusUnixFileDescriptor::QDBusUnixFileDescriptor() : d(0) @@ -140,7 +150,7 @@ QDBusUnixFileDescriptor::QDBusUnixFileDescriptor() If the \a fileDescriptor parameter is not valid, isValid() will return false and fileDescriptor() will return -1. - \sa setFileDescriptor, fileDescriptor + \sa setFileDescriptor(), fileDescriptor() */ QDBusUnixFileDescriptor::QDBusUnixFileDescriptor(int fileDescriptor) : d(0) @@ -227,7 +237,7 @@ bool QDBusUnixFileDescriptor::isSupported() /*! Sets the file descriptor that this QDBusUnixFileDescriptor object holds - to a copy of \a fileDescriptor.T he original file descriptor is not + to a copy of \a fileDescriptor. The original file descriptor is not touched and must be closed by the user. Note that the value returned by fileDescriptor() will be different from diff --git a/src/declarative/debugger/qdeclarativedebugservice_p.h b/src/declarative/debugger/qdeclarativedebugservice_p.h index 42d4482..4f1f1a6 100644 --- a/src/declarative/debugger/qdeclarativedebugservice_p.h +++ b/src/declarative/debugger/qdeclarativedebugservice_p.h @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeDebugServicePrivate; -class Q_DECLARATIVE_EXPORT QDeclarativeDebugService : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugService : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeDebugService) diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h index 49303e1..df3b170 100644 --- a/src/declarative/debugger/qpacketprotocol_p.h +++ b/src/declarative/debugger/qpacketprotocol_p.h @@ -59,7 +59,7 @@ class QPacket; class QPacketAutoSend; class QPacketProtocolPrivate; -class Q_DECLARATIVE_EXPORT QPacketProtocol : public QObject +class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject { Q_OBJECT public: @@ -91,7 +91,7 @@ private: }; -class Q_DECLARATIVE_EXPORT QPacket : public QDataStream +class Q_DECLARATIVE_PRIVATE_EXPORT QPacket : public QDataStream { public: QPacket(); diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 836ad49..9c274e9 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -240,22 +240,20 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() BorderImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt. - It can also handle .sci files, which are a QML-specific format. A .sci - file uses a simple text-based format that specifies the borders, the - image file and the tile rules. + This property can also be used to refer to .sci files, which are + written in a QML-specific, text-based format that specifies the + borders, the image file and the tile rules for a given border image. The following .sci file sets the borders to 10 on each side for the image \c picture.png: - \qml - BorderImage { - border.left: 10 - border.top: 10 - border.bottom: 10 - border.right: 10 - source: "picture.png" - } - \endqml + \code + border.left: 10 + border.top: 10 + border.bottom: 10 + border.right: 10 + source: "picture.png" + \endcode The URL may be absolute, or relative to the URL of the component. diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 34925f1..c4b2c2e 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1799,7 +1799,7 @@ void QDeclarativeGridView::setHighlightRangeMode(HighlightRangeMode mode) \o Qt.LeftToRight (default) - Items will be laid out starting in the top, left corner. The flow is dependent on the \l GridView::flow property. \o Qt.RightToLeft - Items will be laid out starting in the top, right corner. The flow is dependent - on the \l GridView:flow property. + on the \l GridView::flow property. \endlist \bold Note: If GridView::flow is set to GridView.LeftToRight, this is not to be confused if diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 91b430d..fed3587 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -2605,6 +2605,17 @@ void QDeclarativeItem::setKeepMouseGrab(bool keep) If \a item is a \c null value, this maps the point from the coordinate system of the root QML view. */ + +/*! + Maps the point (\a x, \a y), which is in \a item's coordinate system, to + this item's coordinate system, and returns a script value with \c x and \c y + properties matching the mapped cooordinate. + + If \a item is a \c null value, this maps the point from the coordinate + system of the root QML view. + + \sa Item::mapFromItem() +*/ QScriptValue QDeclarativeItem::mapFromItem(const QScriptValue &item, qreal x, qreal y) const { QScriptValue sv = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(this))->newObject(); @@ -2631,6 +2642,17 @@ QScriptValue QDeclarativeItem::mapFromItem(const QScriptValue &item, qreal x, qr If \a item is a \c null value, this maps \a x and \a y to the coordinate system of the root QML view. */ + +/*! + Maps the point (\a x, \a y), which is in this item's coordinate system, to + \a item's coordinate system, and returns a script value with \c x and \c y + properties matching the mapped cooordinate. + + If \a item is a \c null value, this maps \a x and \a y to the coordinate + system of the root QML view. + + \sa Item::mapToItem() +*/ QScriptValue QDeclarativeItem::mapToItem(const QScriptValue &item, qreal x, qreal y) const { QScriptValue sv = QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(this))->newObject(); @@ -2650,8 +2672,17 @@ QScriptValue QDeclarativeItem::mapToItem(const QScriptValue &item, qreal x, qrea /*! \qmlmethod Item::forceActiveFocus() - Force active focus on the item. - This method sets focus on the item and makes sure that all the focus scopes higher in the object hierarchy are also given focus. + Forces active focus on the item. + + This method sets focus on the item and makes sure that all the focus scopes + higher in the object hierarchy are also given the focus. +*/ + +/*! + Forces active focus on the item. + + This method sets focus on the item and makes sure that all the focus scopes + higher in the object hierarchy are also given the focus. */ void QDeclarativeItem::forceActiveFocus() { @@ -2670,7 +2701,12 @@ void QDeclarativeItem::forceActiveFocus() Returns the visible child item at point (\a x, \a y), which is in this item's coordinate system, or \c null if there is no such item. - */ +*/ + +/*! + Returns the visible child item at point (\a x, \a y), which is in this + item's coordinate system, or 0 if there is no such item. +*/ QDeclarativeItem *QDeclarativeItem::childAt(qreal x, qreal y) const { const QList<QGraphicsItem *> children = childItems(); diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index 77587a4..168c151 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -434,7 +434,7 @@ void QDeclarativeDataBlob::notifyComplete(QDeclarativeDataBlob *blob) /*! \class QDeclarativeDataLoader -\brief The QDeclarativeDataLoader class abstracts loading files and their dependecies over the network. +\brief The QDeclarativeDataLoader class abstracts loading files and their dependencies over the network. \internal The QDeclarativeDataLoader class is provided for the exclusive use of the QDeclarativeTypeLoader class. @@ -453,9 +453,11 @@ are required before processing can fully complete. To complete processing, the QDeclarativeDataBlob::done() callback is invoked. done() is called when one of these three preconditions are met. -1. The QDeclarativeDataBlob has no dependencies. -2. The QDeclarativeDataBlob has an error set. -3. All the QDeclarativeDataBlob's dependencies are themselves "done()". +\list 1 +\o The QDeclarativeDataBlob has no dependencies. +\o The QDeclarativeDataBlob has an error set. +\o All the QDeclarativeDataBlob's dependencies are themselves "done()". +\endlist Thus QDeclarativeDataBlob::done() will always eventually be called, even if the blob has an error set. */ @@ -616,13 +618,17 @@ void QDeclarativeDataLoader::setData(QDeclarativeDataBlob *blob, const QByteArra } /*! -\class QDeclarativeTypeLoader +Constructs a new type loader that uses the given \a engine. */ QDeclarativeTypeLoader::QDeclarativeTypeLoader(QDeclarativeEngine *engine) : QDeclarativeDataLoader(engine) { } +/*! +Destroys the type loader, first clearing the cache of any information about +loaded files. +*/ QDeclarativeTypeLoader::~QDeclarativeTypeLoader() { clearCache(); @@ -674,7 +680,7 @@ QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QByteArray &data, const } /*! -Return a QDeclarativeScriptData for \a url. The QDeclarativeScriptData may be cached. +Returns a QDeclarativeScriptData for \a url. The QDeclarativeScriptData may be cached. */ QDeclarativeScriptData *QDeclarativeTypeLoader::getScript(const QUrl &url) { @@ -695,7 +701,7 @@ QDeclarativeScriptData *QDeclarativeTypeLoader::getScript(const QUrl &url) } /*! -Return a QDeclarativeQmldirData for \a url. The QDeclarativeQmldirData may be cached. +Returns a QDeclarativeQmldirData for \a url. The QDeclarativeQmldirData may be cached. */ QDeclarativeQmldirData *QDeclarativeTypeLoader::getQmldir(const QUrl &url) { @@ -715,6 +721,10 @@ QDeclarativeQmldirData *QDeclarativeTypeLoader::getQmldir(const QUrl &url) return qmldirData; } +/*! +Clears cached information about loaded files, including any type data, scripts +and qmldir information. +*/ void QDeclarativeTypeLoader::clearCache() { for (TypeCache::Iterator iter = m_typeCache.begin(); iter != m_typeCache.end(); ++iter) diff --git a/src/gui/graphicsview/qgraphicslayout.cpp b/src/gui/graphicsview/qgraphicslayout.cpp index cd6416c..76d2d04 100644 --- a/src/gui/graphicsview/qgraphicslayout.cpp +++ b/src/gui/graphicsview/qgraphicslayout.cpp @@ -478,7 +478,7 @@ static bool g_instantInvalidatePropagation = false; /*! \internal \since 4.8 - \see instantInvalidatePropagation + \sa instantInvalidatePropagation() Calling this function with \a enable set to true will enable a feature that makes propagation of invalidation up to ancestor layout items to be done in @@ -489,7 +489,7 @@ static bool g_instantInvalidatePropagation = false; invalid (not activated). This is the recommended behaviour. If not set it will also propagate up the parentLayoutItem() hierarchy, but - it will stop at the \i first \i widget it encounters, and post a layout + it will stop at the \e{first widget} it encounters, and post a layout request to the widget. When the layout request is consumed, this might cause it to continue propagation up to the parentLayoutItem() of the widget. It will continue in this fashion until it has reached a widget with @@ -508,7 +508,7 @@ void QGraphicsLayout::setInstantInvalidatePropagation(bool enable) /*! \internal \since 4.8 - \see setInstantInvalidatePropagation + \sa setInstantInvalidatePropagation() returns true if the complete widget/layout hierarchy is rearranged in one go. */ diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 61a228d..14322dc 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2008,10 +2008,11 @@ void QImage::fill(uint pixel) /*! \fn void QImage::fill(Qt::GlobalColor color) - \overload - \since 4.8 + + Fills the image with the given \a color, described as a standard global + color. */ void QImage::fill(Qt::GlobalColor color) @@ -2022,7 +2023,7 @@ void QImage::fill(Qt::GlobalColor color) /*! - \fn void QImage::fill(Qt::GlobalColor color) + \fn void QImage::fill(const QColor &color) \overload diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index 52fbfa5..617409f 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -1102,7 +1102,7 @@ void QTableView::setRootIndex(const QModelIndex &index) } /*! - \reimp + \internal */ void QTableView::doItemsLayout() { diff --git a/src/gui/kernel/qactiongroup.cpp b/src/gui/kernel/qactiongroup.cpp index 8029dfb..cbab6aa 100644 --- a/src/gui/kernel/qactiongroup.cpp +++ b/src/gui/kernel/qactiongroup.cpp @@ -108,8 +108,8 @@ void QActionGroupPrivate::_q_actionHovered() \ingroup mainwindow-classes - In some situations it is useful to group actions together. For - example, if you have a \gui{Left Align} action, a \gui{Right + In some situations it is useful to group QAction objects together. + For example, if you have a \gui{Left Align} action, a \gui{Right Align} action, a \gui{Justify} action, and a \gui{Center} action, only one of these actions should be active at any one time. One simple way of achieving this is to group the actions together in diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index eb0fd8d..cb1f0cd 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -2623,8 +2623,6 @@ OSStatus QApplicationPrivate::globalAppleEventProcessor(const AppleEvent *ae, Ap Return true if you want to stop the event from being processed. Return false for normal event dispatching. The default implementation returns false. - - \sa macEventFilter(void *nsevent) */ bool QApplication::macEventFilter(EventHandlerCallRef, EventRef) { diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index 98359e4..1059ead 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -444,6 +444,9 @@ void QApplication::alert(QWidget *, int) { } +/*! + \internal +*/ QPlatformNativeInterface *QApplication::platformNativeInterface() { QPlatformIntegration *pi = QApplicationPrivate::platformIntegration(); diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index f5a93d9..e2539aa 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -199,6 +199,19 @@ QT_END_NAMESPACE [super setInitialFirstResponder:view]; } +- (void)setInitialFirstResponder:(NSView *)view +{ + // This method is called the first time the window is placed on screen and + // is the earliest point in time we can connect OpenGL contexts to NSViews. + QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; + if (qwidget) { + qt_event_request_window_change(qwidget); + qt_mac_send_posted_gl_updates(qwidget); + } + + [super setInitialFirstResponder:view]; +} + - (BOOL)makeFirstResponder:(NSResponder *)responder { // For some reason Cocoa wants to flip the first responder diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index bdd2fe4..de2d87e 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3103,10 +3103,10 @@ QUrl QFileOpenEvent::url() const } /*! - \fn bool openFile(QFile &file, QIODevice::OpenMode flags) const + \fn bool QFileOpenEvent::openFile(QFile &file, QIODevice::OpenMode flags) const - Opens a QFile on the file referenced by this event. - Returns true if successful; otherwise returns false. + Opens a QFile on the \a file referenced by this event in the mode specified + by \a flags. Returns true if successful; otherwise returns false. This is necessary as some files cannot be opened by name, but require specific information stored in this event. diff --git a/src/gui/kernel/qgenericplugin_qpa.cpp b/src/gui/kernel/qgenericplugin_qpa.cpp index ca2fe7a..e7b65b7 100644 --- a/src/gui/kernel/qgenericplugin_qpa.cpp +++ b/src/gui/kernel/qgenericplugin_qpa.cpp @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE \brief The QGenericPlugin class is an abstract base class for window-system related plugins in Qt QPA. - Note that this class is only available in \l{Qt QPA}. + Note that this class is only available in Qt QPA. A mouse plugin can be created by subclassing QGenericPlugin and reimplementing the pure virtual keys() and diff --git a/src/gui/kernel/qgenericpluginfactory_qpa.cpp b/src/gui/kernel/qgenericpluginfactory_qpa.cpp index 8db22fb..fb6a0d8 100644 --- a/src/gui/kernel/qgenericpluginfactory_qpa.cpp +++ b/src/gui/kernel/qgenericpluginfactory_qpa.cpp @@ -65,8 +65,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, \brief The QGenericPluginFactory class creates window-system related plugin drivers in Qt QPA. - Note that this class is only available in \l{Qt QPA}. - + Note that this class is only available in Qt QPA. \sa QGenericPlugin */ diff --git a/src/gui/kernel/qplatformcursor_qpa.cpp b/src/gui/kernel/qplatformcursor_qpa.cpp index e612e2d..0695486 100644 --- a/src/gui/kernel/qplatformcursor_qpa.cpp +++ b/src/gui/kernel/qplatformcursor_qpa.cpp @@ -52,48 +52,46 @@ QT_BEGIN_NAMESPACE QList <QWeakPointer<QPlatformCursor> > QPlatformCursorPrivate::instances; /*! - \class QGraphicsSystemCursor + \class QPlatformCursor - \brief The QGraphicsSystemCursor class provides information about + \brief The QPlatformCursor class provides information about pointer device events (movement, buttons), and requests to change the currently displayed cursor. - Note that QGraphicsSystemCursor does not include any graphics for + Note that QPlatformCursor does not include any graphics for display. An application that sets a QCursor may provide its own graphics. - \sa QGraphicsSystemCursorImage + \sa QPlatformCursorImage */ /*! - \fn virtual void QGraphicsSystemCursor::pointerEvent(const QMouseEvent & event) + \fn virtual void QPlatformCursor::pointerEvent(const QMouseEvent & event) This method is called by Qt whenever a QMouseEvent is generated by the underlying pointer input. \a event is a reference to the QMouseEvent in question. A default do-nothing implementation is provided. - - \sa QApplicationPrivate::handleMouseEvent() */ /*! - \fn virtual void QGraphicsSystemCursor::changeCursor(QCursor * widgetCursor, QWidget * widget) + \fn virtual void QPlatformCursor::changeCursor(QCursor * widgetCursor, QWidget * widget) \brief This method is called by Qt whenever the cursor graphic should be changed. - Implementation of this method is mandatory for a subclass of QGraphicsSystemCursor. + Implementation of this method is mandatory for a subclass of QPlatformCursor. \a widgetCursor is a pointer to the QCursor that should be displayed. \a widget is a pointer to the widget currently displayed at QCursor::pos(). Note that this may be 0 if the current position is not occupied by a displayed widget. - \sa QApplicationPrivate::handleMouseEvent(), QCursor::pos() + \sa QCursor::pos() */ /*! - \fn QGraphicsSystemCursor::QGraphicsSystemCursor() + \fn QPlatformCursor::QPlatformCursor(QPlatformScreen *screen) - \brief Constructs a QGraphicsSystemCursor + Constructs a QPlatformCursor for the given \a screen. */ QPlatformCursor::QPlatformCursor(QPlatformScreen *scr ) : screen(scr) @@ -106,12 +104,12 @@ QPlatformCursor::QPlatformCursor(QPlatformScreen *scr ) // from src/gui/embedded/QGraphicsSystemCursorImage_qws.cpp /*! - \class QGraphicsSystemCursorImage + \class QPlatformCursorImage - \brief The QGraphicsSystemCursorImage class provides a set of graphics + \brief The QPlatformCursorImage class provides a set of graphics intended to be used as cursors. - \sa QGraphicsSystemCursor + \sa QPlatformCursor */ static QPlatformCursorImage *systemCursorTable[Qt::LastCursor+1]; @@ -502,7 +500,7 @@ void QPlatformCursorImage::createSystemCursor(int id) } /*! - \fn void QGraphicsSystemCursorImage::set(Qt::CursorShape id) + \fn void QPlatformCursorImage::set(Qt::CursorShape id) \brief Calling this method sets the cursor image to the specified shape @@ -531,15 +529,8 @@ void QPlatformCursorImage::set(Qt::CursorShape id) } /*! - \fn void QGraphicsSystemCursorImage::set(const QImage * image, int hx, int hy) - - \brief Set the cursor image to the specified QImage, with the hotsport at (hx, hy) - - \a image A pointer to a QImage - - \a hx The x coordinate of the cursor's hotspot - - \a hy the y coordinate of the cursor's hotspot + Sets the cursor image to the given \a image, with the hotspot at the + point specified by (\a hx, \a hy). */ void QPlatformCursorImage::set(const QImage &image, int hx, int hy) @@ -550,22 +541,19 @@ void QPlatformCursorImage::set(const QImage &image, int hx, int hy) } /*! - \fn void QGraphicsSystemCursorImage::set(const uchar *data, const uchar *mask, int width, int height, int hx, int hy) - - \brief set the cursor image to the graphic represented by the combination of data, mask, - width, and height - - \a data The pixel data of the graphic - - \a mask Mask data for the graphic. pixels in data with a corresponding mask bit of 0 are not drawn + \fn void QPlatformCursorImage::set(const uchar *data, const uchar *mask, int width, int height, int hx, int hy) - \a width The width of the graphic in pixels + Sets the cursor image to the graphic represented by the combination of + \a data and \a mask, with dimensions given by \a width and \a height and a + hotspot at the point specified by (\a hx, \a hy). - \a height The height of the graphic in pixels + The image data specified by \a data must be supplied in the format + described by QImage::Format_Indexed8. - \a hx The X hotspot of the cursor graphic - - \a hy The Y hotspot of the cursor graphic + The corresponding mask data specified by \a mask must be supplied in a + character array containing packed 1 bit per pixel format data, with any + padding bits at the end of the array. Bits of value 0 represent transparent + pixels in the image data. */ void QPlatformCursorImage::set(const uchar *data, const uchar *mask, int width, int height, int hx, int hy) @@ -625,34 +613,23 @@ void QPlatformCursorImage::set(const uchar *data, const uchar *mask, } /*! - \fn QGraphicsSystemCursorImage::QGraphicsSystemCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY) - - \brief set the cursor image to the graphic represented by the combination of data, mask, - width, and height - - \a data The pixel data of the graphic - - \a mask Mask data for the graphic. pixels in data with a corresponding mask bit of 0 are not drawn - - \a width The width of the graphic in pixels - - \a height The height of the graphic in pixels - - \a hotX The X hotspot of the cursor graphic + \fn QPlatformCursorImage::QPlatformCursorImage(const uchar *data, const uchar *mask, int width, int height, int hotX, int hotY) - \a hotY The Y hotspot of the cursor graphic + Sets the cursor image to the graphic represented by the combination of + \a data and \a mask, with dimensions given by \a width and \a height and a + hotspot at the point specified by (\a hotX, \a hotY). - \sa set + \sa set() */ /*! - \fn QImage *QGraphicsSystemCursorImage::image() + \fn QImage *QPlatformCursorImage::image() \brief Return the cursor graphic as a pointer to a QImage */ /*! - \fn QPoint QGraphicsSystemCursorImage::hotspot() + \fn QPoint QPlatformCursorImage::hotspot() \brief Return the cursor's hotspot */ diff --git a/src/gui/kernel/qplatformglcontext_qpa.cpp b/src/gui/kernel/qplatformglcontext_qpa.cpp index 8daa5d4..5c56efb 100644 --- a/src/gui/kernel/qplatformglcontext_qpa.cpp +++ b/src/gui/kernel/qplatformglcontext_qpa.cpp @@ -191,17 +191,17 @@ void QPlatformGLContext::deleteQGLContext() which maps to the QPlatformGLContext. */ -/*! \fn void swapBuffers() +/*! \fn void QPlatformGLContext::swapBuffers() Reimplement in subclass to native swap buffers calls */ -/*! getProcAddress(const QString& procName) +/*! \fn void *QPlatformGLContext::getProcAddress(const QString &procName) Reimplement in subclass to native getProcAddr calls. Note: its convenient to use qPrintable(const QString &str) to get the const char * pointer */ -/*! platformWindowFormat() const +/*! \fn QPlatformWindowFormat QPlatformGLContext::platformWindowFormat() const QWidget has the function qplatformWindowFormat(). That function is for the application programmer to request the format of the window and the context that he wants. diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index 972fb0a..29287fe 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -132,20 +132,20 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const the recommended approach for making new platform plugin is to copy an existing plugin inside the QTSRCTREE/src/plugins/platform and develop the plugin inside the source tree. - The minimal platformintegration is the smallest platform integration it is possible to make, + The minimal platform integration is the smallest platform integration it is possible to make, which makes it an ideal starting point for new plugins. For a slightly more advanced plugin, consider reviewing the directfb plugin, or the testlite plugin. */ /*! - \fn QPixmapData *createPixmapData(QPixmapData::PixelType type) const + \fn QPixmapData *QPlatformIntegration::createPixmapData(QPixmapData::PixelType type) const Factory function for QPixmapData. PixelType can be either PixmapType or BitmapType. \sa QPixmapData */ /*! - \fn QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const + \fn QPlatformWindow *QPlatformIntegration::createPlatformWindow(QWidget *widget, WId winId = 0) const Factory function for QPlatformWindow. The widget parameter is a pointer to the top level widget(tlw) which the QPlatformWindow is suppose to be created for. The WId handle is actually @@ -162,7 +162,7 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const */ /*! - \fn QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const + \fn QWindowSurface *QPlatformIntegration::createWindowSurface(QWidget *widget, WId winId) const Factory function for QWindowSurface. The QWidget parameter is a pointer to the top level widget(tlw) the window surface is created for. A QPlatformWindow is always created @@ -175,7 +175,7 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const */ /*! - \fn void moveToScreen(QWidget *window, int screen) + \fn void QPlatformIntegration::moveToScreen(QWidget *window, int screen) This function is called when a QWidget is displayed on screen, or the QWidget is to be displayed on a new screen. The QWidget parameter is a pointer to the top level widget and @@ -187,14 +187,14 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const */ /*! - \fn QList<QPlatformScreen *> screens() const + \fn QList<QPlatformScreen *> QPlatformIntegration::screens() const Accessor function to a list of all the screens on the current system. The screen with the index == 0 is the default/main screen. */ /*! - \fn bool isVirtualDesktop() + \fn bool QPlatformIntegration::isVirtualDesktop() Returns if the current windowing system configuration defines all the screens to be one desktop(virtual desktop), or if each screen is a desktop of its own. @@ -203,7 +203,7 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const */ /*! - \fn QPixmap grabWindow(WId window, int x, int y, int width, int height) const + \fn QPixmap QPlatformIntegration::grabWindow(WId window, int x, int y, int width, int height) const This function is called when Qt needs to be able to grab the content of a window. diff --git a/src/gui/kernel/qplatformscreen_qpa.cpp b/src/gui/kernel/qplatformscreen_qpa.cpp index 87e40e4..2a1e7e4 100644 --- a/src/gui/kernel/qplatformscreen_qpa.cpp +++ b/src/gui/kernel/qplatformscreen_qpa.cpp @@ -66,12 +66,15 @@ QWidget *QPlatformScreen::topLevelAt(const QPoint & pos) const return 0; } -/*! \fn physicalSize() const - Reimplement in subclass to return the physical size of the screen. This function is used by - QFont to convert point sizes to pixel sizes. - - Default implementation takes the pixel size of the screen, considers a dpi of 100 and returns - the calculated (and probably wrong) physical size +/*! + Reimplement this function in subclass to return the physical size of the + screen. This function is used by QFont to convert point sizes to pixel + sizes. + + The default implementation takes the pixel size of the screen, considers a + resolution of 100 dots per inch, and returns the calculated physical size. + A device with a screen that has different resolutions will need to be + supported by a suitable reimplementation of this function. */ QSize QPlatformScreen::physicalSize() const { @@ -110,20 +113,20 @@ QPlatformScreen * QPlatformScreen::platformScreenForWidget(const QWidget *widget QPlatformScreen is also used by the public api QDesktopWidget for information about the desktop. */ -/*! \fn geometry() const +/*! \fn QRect QPlatformScreen::geometry() const = 0 Reimplement in subclass to return the pixel geometry of the screen */ -/*! \fn availableGeometry() const +/*! \fn QRect QPlatformScreen::availableGeometry() const Reimplement in subclass to return the pixel geometry of the available space This normally is the desktop screen minus the task manager, global menubar etc. */ -/*! \fn depth() const +/*! \fn int QPlatformScreen::depth() const = 0 Reimplement in subclass to return current depth of the screen */ -/*! \fn format() const +/*! \fn QImage::Format QPlatformScreen::format() const = 0 Reimplement in subclass to return the image format which corresponds to the screen format */ diff --git a/src/gui/kernel/qplatformwindowformat_qpa.cpp b/src/gui/kernel/qplatformwindowformat_qpa.cpp index e89b458..482ae68 100644 --- a/src/gui/kernel/qplatformwindowformat_qpa.cpp +++ b/src/gui/kernel/qplatformwindowformat_qpa.cpp @@ -122,8 +122,6 @@ public: \i \link setStencil() Stencil buffer.\endlink \i \link setStereo() Stereo buffers.\endlink \i \link setDirectRendering() Direct rendering.\endlink - \i \link setOverlay() Presence of an overlay.\endlink - \i \link setPlane() Plane of an overlay.\endlink \i \link setSampleBuffers() Multisample buffers.\endlink \endlist @@ -168,7 +166,7 @@ public: United States and other countries. \endlegalese - \sa QPlatformContext, QWidget + \sa QPlatformGLContext, QWidget */ /*! @@ -182,8 +180,6 @@ public: \i \link setStencil() Stencil buffer:\endlink Enabled. \i \link setStereo() Stereo:\endlink Disabled. \i \link setDirectRendering() Direct rendering:\endlink Enabled. - \i \link setOverlay() Overlay:\endlink Disabled. - \i \link setPlane() Plane:\endlink 0 (i.e., normal plane). \i \link setSampleBuffers() Multisample buffers:\endlink Disabled. \endlist */ @@ -207,14 +203,10 @@ QPlatformWindowFormat::QPlatformWindowFormat() \snippet doc/src/snippets/code/src_opengl_qgl.cpp 3 Note that there are QGL::FormatOption values to turn format settings - both on and off, e.g. QGL::DepthBuffer and QGL::NoDepthBuffer, + both on and off; e.g., QGL::DepthBuffer and QGL::NoDepthBuffer, QGL::DirectRendering and QGL::IndirectRendering, etc. - The \a plane parameter defaults to 0 and is the plane which this - format should be associated with. Not all OpenGL implementations - supports overlay/underlay rendering planes. - - \sa defaultFormat(), setOption(), setPlane() + \sa defaultFormat(), setOption() */ QPlatformWindowFormat::QPlatformWindowFormat(QPlatformWindowFormat::FormatOptions options) @@ -619,8 +611,6 @@ QPlatformGLContext *QPlatformWindowFormat::sharedGLContext() const Otherwise returns false. WindowSurface is enabled by default. - - \sa setOverlay() */ /*! @@ -628,9 +618,7 @@ QPlatformGLContext *QPlatformWindowFormat::sharedGLContext() const otherwise the QWidget will only have a QPlatformWindow. - This is useful for ie. QGLWidget where the QPlatformGLContext controls the surface. - - \sa hasOverlay() + This is useful for QGLWidget where the QPlatformGLContext controls the surface. */ void QPlatformWindowFormat::setWindowSurface(bool enable) @@ -894,7 +882,7 @@ void QPlatformWindowFormat::setDefaultFormat(const QPlatformWindowFormat &f) } -/*! +/* Returns the default QPlatformWindowFormat for overlay contexts. The default overlay format is: @@ -907,9 +895,7 @@ void QPlatformWindowFormat::setDefaultFormat(const QPlatformWindowFormat &f) \i \link setStencil() Stencil buffer:\endlink Disabled. \i \link setStereo() Stereo:\endlink Disabled. \i \link setDirectRendering() Direct rendering:\endlink Enabled. - \i \link setOverlay() Overlay:\endlink Disabled. \i \link setSampleBuffers() Multisample buffers:\endlink Disabled. - \i \link setPlane() Plane:\endlink 1 (i.e., first overlay plane). \endlist \sa setDefaultFormat() diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index a9bfba6..56d7d3f 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -681,8 +681,10 @@ int QWidget::metric(PaintDeviceMetric m) const /*! \preliminary - Sets the window to be the \a window specified. - The QWidget takes ownership of the \a surface. + Sets the window to be the platform \a window specified. + + The widget takes ownership of the \a window. Any platform window + previously set on the widget will be destroyed. */ void QWidget::setPlatformWindow(QPlatformWindow *window) { @@ -711,6 +713,9 @@ QPlatformWindow *QWidget::platformWindow() const return 0; } +/*! + Sets the platform window format for the widget to the \a format specified. +*/ void QWidget::setPlatformWindowFormat(const QPlatformWindowFormat &format) { if (isWindow() || testAttribute(Qt::WA_NativeWindow)) { @@ -727,6 +732,9 @@ void QWidget::setPlatformWindowFormat(const QPlatformWindowFormat &format) } } +/*! + Returns the platform window format for the widget. +*/ QPlatformWindowFormat QWidget::platformWindowFormat() const { Q_D(const QWidget); diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index 5d8f43b..79c4c4e 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1826,9 +1826,9 @@ static QPointF qt_radial_gradient_adapt_focal_point(const QPointF ¢er, radius and \a focalPoint. \note If the given focal point is outside the circle defined by the - center (\a cx, \a cy) and the \a radius it will be re-adjusted to - the intersection between the line from the center to the focal point - and the circle. + \a center point and \a radius, it will be re-adjusted to lie at a point on + the circle where it intersects with the line from \a center to + \a focalPoint. \sa QGradient::setColorAt(), QGradient::setStops() */ @@ -1947,11 +1947,9 @@ QRadialGradient::QRadialGradient(const QPointF ¢er, qreal centerRadius, cons /*! \since 4.8 - Constructs an extended radial gradient with the given \a center, \a - centerRadius, \a focalPoint, and \a focalRadius. - Constructs a radial gradient with the given center (\a cx, \a cy), - center radius \a centerRadius, focal point (\a fx, \a fy), and - focal radius \a focalRadius. + Constructs an extended radial gradient with the given center + (\a cx, \a cy), center radius, \a centerRadius, focal point, (\a fx, \a fy), + and focal radius \a focalRadius. */ QRadialGradient::QRadialGradient(qreal cx, qreal cy, qreal centerRadius, qreal fx, qreal fy, qreal focalRadius) { @@ -2049,7 +2047,7 @@ qreal QRadialGradient::centerRadius() const return m_data.radial.cradius; } -/* +/*! \since 4.8 Sets the center radius of this radial gradient in logical coordinates @@ -2080,7 +2078,7 @@ qreal QRadialGradient::focalRadius() const return u.f; } -/* +/*! \since 4.8 Sets the focal radius of this radial gradient in logical coordinates diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp index 9562d83..c46513a 100644 --- a/src/gui/painting/qpaintengine.cpp +++ b/src/gui/painting/qpaintengine.cpp @@ -387,6 +387,7 @@ void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDraw \value MaxUser Last user type ID \value OpenGL2 \value PaintBuffer + \value Blitter */ /*! diff --git a/src/gui/styles/qs60style_feedbackinterface_p.h b/src/gui/styles/qs60style_feedbackinterface_p.h new file mode 100644 index 0000000..81fcdc3 --- /dev/null +++ b/src/gui/styles/qs60style_feedbackinterface_p.h @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QObject> + +class TactileFeedbackInterface : public QObject +{ + public: + virtual void touchFeedback(QEvent *event, const QWidget *widget) = 0; +}; + +Q_DECLARE_INTERFACE(TactileFeedbackInterface, "com.trolltech.Qt.TactileFeedbackInterface/1.0") diff --git a/src/gui/text/qfontdatabase_qws.cpp b/src/gui/text/qfontdatabase_qws.cpp index c5a04f1..c83e929 100644 --- a/src/gui/text/qfontdatabase_qws.cpp +++ b/src/gui/text/qfontdatabase_qws.cpp @@ -759,9 +759,6 @@ bool QFontDatabase::supportsThreadedFontRendering() return true; } -/*! - \internal -*/ QFontEngine * QFontDatabase::findFont(int script, const QFontPrivate *fp, const QFontDef &request) diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp index 195bd78..9e1646f 100644 --- a/src/gui/text/qfontmetrics.cpp +++ b/src/gui/text/qfontmetrics.cpp @@ -1329,8 +1329,10 @@ bool QFontMetricsF::inFont(QChar ch) const } /*! - Returns true if the character encoded in UCS-4/UTF-32 is a valid - character in the font; otherwise returns false. + \fn bool QFontMetricsF::inFontUcs4(uint ch) const + + Returns true if the character given by \a ch, encoded in UCS-4/UTF-32, + is a valid character in the font; otherwise returns false. */ bool QFontMetricsF::inFontUcs4(uint ucs4) const { diff --git a/src/gui/text/qplatformfontdatabase_qpa.cpp b/src/gui/text/qplatformfontdatabase_qpa.cpp index 6071c55..7e829db 100644 --- a/src/gui/text/qplatformfontdatabase_qpa.cpp +++ b/src/gui/text/qplatformfontdatabase_qpa.cpp @@ -51,6 +51,13 @@ extern void qt_registerFont(const QString &familyname, const QString &foundrynam QFont::Style style, int stretch, bool antialiased,bool scalable, int pixelSize, const QSupportedWritingSystems &writingSystems, void *hanlde); +/*! + \fn void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *) + + Registers the pre-rendered QPF2 font contained in the given \a dataArray. + + \sa registerFont() +*/ void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void *handle) { if (dataArray.size() == 0) @@ -88,6 +95,32 @@ void QPlatformFontDatabase::registerQPF2Font(const QByteArray &dataArray, void * } } +/*! + \fn void QPlatformFontDatabase::registerFont(const QString &familyName, + const QString &foundryName, QFont::Weight weight, QFont::Style style, + QFont::Stretch stretch, bool antialiased, bool scalable, int pixelSize, + const QSupportedWritingSystems &writingSystems, void *usrPtr) + + Registers a font with the given set of attributes describing the font's + foundry, family name, style and stretch information, pixel size, and + supported writing systems. Additional information about whether the font + can be scaled and antialiased can also be provided. + + The foundry name and font family are described by \a foundryName and + \a familyName. The font weight (light, normal, bold, etc.), style (normal, + oblique, italic) and stretch information (condensed, expanded, unstretched, + etc.) are specified by \a weight, \a style and \a stretch. + + Some fonts can be antialiased and scaled; \a scalable and \a antialiased + can be set to true for fonts with these attributes. The intended pixel + size of non-scalable fonts is specified by \a pixelSize; this value will be + ignored for scalable fonts. + + The writing systems supported by the font are specified by the + \a writingSystems argument. + + \sa registerQPF2Font() +*/ void QPlatformFontDatabase::registerFont(const QString &familyname, const QString &foundryname, QFont::Weight weight, QFont::Style style, QFont::Stretch stretch, bool antialiased, bool scalable, int pixelSize, const QSupportedWritingSystems &writingSystems, void *usrPtr) @@ -206,7 +239,8 @@ void QPlatformFontDatabase::populateFontDatabase() } /*! - + Returns the font engine that can be used to render the font described by + the font definition, \a fontDef, in the specified \a script. */ QFontEngine *QPlatformFontDatabase::fontEngine(const QFontDef &fontDef, QUnicodeTables::Script script, void *handle) { @@ -229,7 +263,8 @@ QFontEngine *QPlatformFontDatabase::fontEngine(const QByteArray &fontData, qreal } /*! - + Returns a list of alternative fonts for the specified \a family and + \a style and \a script using the \a styleHint given. */ QStringList QPlatformFontDatabase::fallbacksForFamily(const QString family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) const { @@ -241,8 +276,13 @@ QStringList QPlatformFontDatabase::fallbacksForFamily(const QString family, cons } /*! - Adds an application font. Returns a list of family names, or an empty list if the font could - not be added + Adds an application font described by the font contained supplied \a fontData + or using the font contained in the file referenced by \a fileName. Returns + a list of family names, or an empty list if the font could not be added. + + \note The default implementation of this function does not add an application + font. Subclasses should reimplement this function to perform the necessary + loading and registration of fonts. */ QStringList QPlatformFontDatabase::addApplicationFont(const QByteArray &fontData, const QString &fileName) { @@ -280,21 +320,23 @@ QString QPlatformFontDatabase::fontDir() const /*! \class QPlatformFontDatabase - \brief The QPlatformFontDatabase makes it possible to customize how fonts are picked up, and - and how they are rendered + \brief The QPlatformFontDatabase class makes it possible to customize how fonts + are discovered and how they are rendered \ingroup painting QPlatformFontDatabase is the superclass which is intended to let platform implementations use native font handling. - Qt has its internal fontdatabase which it uses to pick up available fonts. To be able - to populate this database subclass this class, and reimplement populateFontDatabase(). + Qt has its internal font database which it uses to discover available fonts on the + user's system. To be able to populate this database subclass this class, and + reimplement populateFontDatabase(). - Use the function registerFont to populate the internal fontdatabase. + Use the function registerFont() to populate the internal font database. - Sometimes a specified font does not have the required glyphs, then the fallbackForFamily - function is called. + Sometimes a specified font does not have the required glyphs; in such a case, the + fallbackForFamily() function is called automatically to find alternative font + families that can supply alternatives to the missing glyphs. \sa QSupportedWritingSystems */ diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp index 843deb0..3f8f225 100644 --- a/src/gui/text/qrawfont.cpp +++ b/src/gui/text/qrawfont.cpp @@ -87,16 +87,16 @@ QT_BEGIN_NAMESPACE QRawFont can be constructed in a number of ways: \list - \o \l It can be constructed by calling QTextLayout::glyphRuns() or QTextFragment::glyphRuns(). - The returned QGlyphRun objects will contain QRawFont objects which represent the actual - fonts used to render each portion of the text. - \o \l It can be constructed by passing a QFont object to QRawFont::fromFont(). The function - will return a QRawFont object representing the font that will be selected as response to - the QFont query and the selected writing system. - \o \l It can be constructed by passing a file name or QByteArray directly to the QRawFont - constructor, or by calling loadFromFile() or loadFromData(). In this case, the - font will not be registered in QFontDatabase, and it will not be available as part of - regular font selection. + \o It can be constructed by calling QTextLayout::glyphs() or QTextFragment::glyphs(). The + returned QGlyphs objects will contain QRawFont objects which represent the actual fonts + used to render each portion of the text. + \o It can be constructed by passing a QFont object to QRawFont::fromFont(). The function + will return a QRawFont object representing the font that will be selected as response to + the QFont query and the selected writing system. + \o It can be constructed by passing a file name or QByteArray directly to the QRawFont + constructor, or by calling loadFromFile() or loadFromData(). In this case, the + font will not be registered in QFontDatabase, and it will not be available as part of + regular font selection. \endlist QRawFont is considered local to the thread in which it is constructed (either using a @@ -132,8 +132,9 @@ QRawFont::QRawFont() } /*! - Constructs a QRawFont representing the font contained in the file referenced by \a fileName, - with \a pixelSize size in pixels, and the selected \a hintingPreference. + Constructs a QRawFont representing the font contained in the file referenced + by \a fileName for the size (in pixels) given by \a pixelSize, and using the + hinting preference specified by \a hintingPreference. \note The referenced file must contain a TrueType or OpenType font. */ @@ -146,7 +147,9 @@ QRawFont::QRawFont(const QString &fileName, } /*! - Constructs a QRawFont representing the font contained in \a fontData. + Constructs a QRawFont representing the font contained in the supplied + \a fontData for the size (in pixels) given by \a pixelSize, and using the + hinting preference specified by \a hintingPreference. \note The data must contain a TrueType or OpenType font. */ @@ -192,7 +195,9 @@ bool QRawFont::isValid() const } /*! - Replaces the current QRawFont with the contents of the file references by \a fileName. + Replaces the current QRawFont with the contents of the file referenced + by \a fileName for the size (in pixels) given by \a pixelSize, and using the + hinting preference specified by \a hintingPreference. The file must reference a TrueType or OpenType font. @@ -208,7 +213,9 @@ void QRawFont::loadFromFile(const QString &fileName, } /*! - Replaces the current QRawFont with the contents of \a fontData. + Replaces the current QRawFont with the font contained in the supplied + \a fontData for the size (in pixels) given by \a pixelSize, and using the + hinting preference specified by \a hintingPreference. The \a fontData must contain a TrueType or OpenType font. @@ -226,8 +233,9 @@ void QRawFont::loadFromData(const QByteArray &fontData, } /*! - This function returns a rasterized image of the glyph at a given \a glyphIndex in the underlying - font, if the QRawFont is valid, otherwise it will return an invalid QImage. + This function returns a rasterized image of the glyph at the given + \a glyphIndex in the underlying font, using the \a transform specified. + If the QRawFont is not valid, this function will return an invalid QImage. If \a antialiasingType is set to QRawFont::SubPixelAntialiasing, then the resulting image will be in QImage::Format_RGB32 and the RGB values of each pixel will represent the subpixel opacities of @@ -422,11 +430,15 @@ int QRawFont::weight() const } /*! - Converts a string of unicode points to glyph indexes using the CMAP table in the - underlying font. Note that in cases where there are other tables in the font that affect the - shaping of the text, the returned glyph indexes will not correctly represent the rendering - of the text. To get the correctly shaped text, you can use QTextLayout to lay out and shape the - text, and then call QTextLayout::glyphRuns() to get the set of glyph index list and QRawFont pairs. + Converts the string of unicode points given by \a text to glyph indexes + using the CMAP table in the underlying font, and returns a vector containing + the result. + + Note that, in cases where there are other tables in the font that affect the + shaping of the text, the returned glyph indexes will not correctly represent + the rendering of the text. To get the correctly shaped text, you can use + QTextLayout to lay out and shape the text, then call QTextLayout::glyphs() + to get the set of glyph index list and QRawFont pairs. \sa advancesForGlyphIndexes(), glyphIndexesForChars(), QGlyphRun, QTextLayout::glyphRuns(), QTextFragment::glyphRuns() */ diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index fe3c993..cfe4aee 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -600,7 +600,7 @@ Qt::CursorMoveStyle QTextDocument::defaultCursorMoveStyle() const /*! \since 4.8 - Set the default cursor movement style. + Sets the default cursor movement style to the given \a style. */ void QTextDocument::setDefaultCursorMoveStyle(Qt::CursorMoveStyle style) { diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp index a699568..833414f 100644 --- a/src/gui/text/qtextformat.cpp +++ b/src/gui/text/qtextformat.cpp @@ -571,6 +571,8 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt) \value FontStyleHint Corresponds to the QFont::StyleHint property \value FontStyleStrategy Corresponds to the QFont::StyleStrategy property \value FontKerning Specifies whether the font has kerning turned on. + \value FontHintingPreference Controls the use of hinting according to values + of the QFont::HintingPreference enum. \omitvalue FirstFontProperty \omitvalue LastFontProperty @@ -588,8 +590,13 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &stream, QTextFormat &fmt) List properties - \value ListStyle - \value ListIndent + \value ListStyle Specifies the style used for the items in a list, + described by values of the QTextListFormat::Style enum. + \value ListIndent Specifies the amount of indentation used for a list. + \value ListNumberPrefix Defines the text which is prepended to item numbers in + numeric lists. + \value ListNumberSuffix Defines the text which is appended to item numbers in + numeric lists. Table and frame properties @@ -1263,16 +1270,18 @@ bool QTextFormat::operator==(const QTextFormat &rhs) const \value AlignNormal Adjacent characters are positioned in the standard way for text in the writing system in use. - \value AlignSuperScript Characters are placed above the baseline for + \value AlignSuperScript Characters are placed above the base line for normal text. - \value AlignSubScript Characters are placed below the baseline for + \value AlignSubScript Characters are placed below the base line for normal text. - \value AlignMiddle The center of the object is vertically aligned with the base line. - Currently, this is only implemented for inline objects. + \value AlignMiddle The center of the object is vertically aligned with the + base line. Currently, this is only implemented for + inline objects. \value AlignBottom The bottom edge of the object is vertically aligned with the base line. \value AlignTop The top edge of the object is vertically aligned with the base line. + \value AlignBaseline The base lines of the characters are aligned. */ /*! @@ -2136,8 +2145,9 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const \fn void QTextBlockFormat::setLineHeight(qreal height, int heightType) \since 4.8 - This sets the line height for the paragraph to the value in height - which is dependant on heightType, described by the LineHeightTypes enum. + Sets the line height for the paragraph to the value given by \a height + which is dependent on \a heightType in the way described by the + LineHeightTypes enum. \sa LineHeightTypes, lineHeight(), lineHeightType() */ @@ -2147,11 +2157,16 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const \fn qreal QTextBlockFormat::lineHeight(qreal scriptLineHeight, qreal scaling) const \since 4.8 - This returns what the height of the lines in the paragraph will be depending - on the given height of the script line and the scaling. The value that is returned - is also dependant on the given LineHeightType of the paragraph as well as the LineHeight - setting that has been set for the paragraph. The scaling is needed for the heights - that include a fixed number of pixels, to scale them appropriately for printing. + Returns the height of the lines in the paragraph based on the height of the + script line given by \a scriptLineHeight and the specified \a scaling + factor. + + The value that is returned is also dependent on the given LineHeightType of + the paragraph as well as the LineHeight setting that has been set for the + paragraph. + + The scaling is needed for heights that include a fixed number of pixels, to + scale them appropriately for printing. \sa LineHeightTypes, setLineHeight(), lineHeightType() */ @@ -2237,6 +2252,13 @@ QList<QTextOption::Tab> QTextBlockFormat::tabPositions() const numbering scheme used for items in the list. Note that lists that use the decimal numbering scheme begin counting at 1 rather than 0. + Style properties can be set to further configure the appearance of list + items; for example, the ListNumberPrefix and ListNumberSuffix properties + can be used to customize the numbers used in an ordered list so that they + appear as (1), (2), (3), etc.: + + \snippet doc/src/snippets/textdocument-listitemstyles/mainwindow.cpp add a styled, ordered list + \sa QTextList */ @@ -2328,8 +2350,11 @@ QTextListFormat::QTextListFormat(const QTextFormat &fmt) \fn void QTextListFormat::setNumberPrefix(const QString &numberPrefix) \since 4.8 - Sets the list format's number prefix. This can be used with all - sorted list types. It does not have any effect on unsorted list types. + Sets the list format's number prefix to the string specified by + \a numberPrefix. This can be used with all sorted list types. It does not + have any effect on unsorted list types. + + The default prefix is an empty string. \sa numberPrefix() */ @@ -2347,8 +2372,10 @@ QTextListFormat::QTextListFormat(const QTextFormat &fmt) \fn void QTextListFormat::setNumberSuffix(const QString &numberSuffix) \since 4.8 - Sets the list format's number suffix. This can be used with all - sorted list types. It does not have any effect on unsorted list types. + Sets the list format's number suffix to the string specified by + \a numberSuffix. This can be used with all sorted list types. It does not + have any effect on unsorted list types. + The default suffix is ".". \sa numberSuffix() diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 988ae93..8e12aad 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -584,7 +584,7 @@ bool QTextLayout::cacheEnabled() const this option is for widgets like QLineEdit or custom widgets without a QTextDocument. Default value is Qt::LogicalMoveStyle. - \sa setCursorMoveStyle() + \sa cursorMoveStyle() */ void QTextLayout::setCursorMoveStyle(Qt::CursorMoveStyle style) { diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index 8a93c28..2d63f63 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1127,12 +1127,19 @@ void QLineEdit::setDragEnabled(bool b) behavior applies. */ +/*! + Returns the movement style for the cursor in the line edit. +*/ Qt::CursorMoveStyle QLineEdit::cursorMoveStyle() const { Q_D(const QLineEdit); return d->control->cursorMoveStyle(); } +/*! + Sets the movement style for the cursor in the line edit to the given + \a style. +*/ void QLineEdit::setCursorMoveStyle(Qt::CursorMoveStyle style) { Q_D(QLineEdit); diff --git a/src/gui/widgets/qmdiarea.cpp b/src/gui/widgets/qmdiarea.cpp index fde683d..2fe9706 100644 --- a/src/gui/widgets/qmdiarea.cpp +++ b/src/gui/widgets/qmdiarea.cpp @@ -2176,7 +2176,7 @@ void QMdiArea::setTabsClosable(bool closable) Tabs are not movable by default. - \sa QTabBar::tabsMovable, setViewMode() + \sa QTabBar::movable, setViewMode() */ bool QMdiArea::tabsMovable() const { diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp index ade798f..c6551e5 100644 --- a/src/gui/widgets/qtabwidget.cpp +++ b/src/gui/widgets/qtabwidget.cpp @@ -883,7 +883,7 @@ QSize QTabWidget::minimumSizeHint() const .expandedTo(QApplication::globalStrut()); } -/* +/*! \reimp */ int QTabWidget::heightForWidth(int width) const diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp index 80ec723..7545658 100644 --- a/src/network/access/qhttpmultipart.cpp +++ b/src/network/access/qhttpmultipart.cpp @@ -256,7 +256,7 @@ void QHttpPart::setBodyDevice(QIODevice *device) /*! Constructs a QHttpMultiPart with content type MixedType and sets - parent as the parent object. + \a parent as the parent object. \sa QHttpMultiPart::ContentType */ diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index f64fcb6..8fc8eb7 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -301,6 +301,10 @@ static void ensureInitialized() again, without emitting the authenticationRequired() signal. If it rejects the credentials, this signal will be emitted again. + \note It is not possible to use a QueuedConnection to connect to + this signal, as the connection will fail if the authenticator has + not been filled in with new information when the signal returns. + \sa proxyAuthenticationRequired() */ diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 2791eed..666aba7 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -128,7 +128,7 @@ QNetworkConfigurationManagerPrivate *qNetworkConfigurationManagerPrivate() \fn void QNetworkConfigurationManager::configurationRemoved(const QNetworkConfiguration &config) This signal is emitted when a configuration is about to be removed from the system. The removed - \a configuration is invalid but retains name and identifier. + configuration, specified by \a config, is invalid but retains name and identifier. */ /*! diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index b659289..df61fb6 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -675,8 +675,8 @@ QString QSslSocket::peerVerifyName() const /*! \since 4.8 - Sets a different hostname for the certificate validation instead of the one used for the TCP - connection. + Sets a different host name, given by \a hostName, for the certificate + validation instead of the one used for the TCP connection. \sa connectToHostEncrypted() */ diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 2b0c8f8..c33aec2 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1993,7 +1993,7 @@ struct DDSFormat { If you're using double buffering you can swap the screen contents with the off-screen buffer using swapBuffers(). - Please note that QGLContext is not thread safe. + Please note that QGLContext is not \l{thread-safe}. */ /*! @@ -3266,18 +3266,13 @@ bool QGLContext::areSharing(const QGLContext *context1, const QGLContext *contex \fn QColor QGLContext::overlayTransparentColor() const If this context is a valid context in an overlay plane, returns - the plane's transparent color. Otherwise returns an \link - QColor::isValid() invalid \endlink color. - - The returned color's \link QColor::pixel() pixel \endlink value is - the index of the transparent color in the colormap of the overlay - plane. (Naturally, the color's RGB values are meaningless.) + the plane's transparent color. Otherwise returns an + \{QColor::isValid()}{invalid} color. The returned QColor object will generally work as expected only when passed as the argument to QGLWidget::qglColor() or QGLWidget::qglClearColor(). Under certain circumstances it can - also be used to draw transparent graphics with a QPainter. See the - examples/opengl/overlay_x11 example for details. + also be used to draw transparent graphics with a QPainter. */ diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index e7fc560..bc36ced 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -52,6 +52,9 @@ QT_BEGIN_NAMESPACE +/*! + Returns an OpenGL format for the platform window format specified by \a format. +*/ QGLFormat QGLFormat::fromPlatformWindowFormat(const QPlatformWindowFormat &format) { QGLFormat retFormat; @@ -83,6 +86,9 @@ QGLFormat QGLFormat::fromPlatformWindowFormat(const QPlatformWindowFormat &forma return retFormat; } +/*! + Returns a platform window format for the OpenGL format specified by \a format. +*/ QPlatformWindowFormat QGLFormat::toPlatformWindowFormat(const QGLFormat &format) { QPlatformWindowFormat retFormat; @@ -378,6 +384,10 @@ QGLContext::QGLContext(QPlatformGLContext *platformContext) d->setupSharing(); } +/*! + Returns a OpenGL context for the platform-specific OpenGL context given by + \a platformContext. +*/ QGLContext *QGLContext::fromPlatformGLContext(QPlatformGLContext *platformContext) { if (!platformContext) diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 22215aa..18b6eaa 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -1407,10 +1407,6 @@ bool QGLWidgetPrivate::renderCxPm(QPixmap* pm) return true; } -/*! \internal - Free up any allocated colormaps. This fn is only called for - top-level widgets. -*/ void QGLWidgetPrivate::cleanupColormaps() { if (!cmap.handle()) { diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 3532390..0af8108 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -205,13 +205,16 @@ int QGLFramebufferObjectFormat::samples() const /*! \since 4.8 - Enables or disables mipmapping. Mipmapping is disabled by default. + Enables mipmapping if \a enabled is true; otherwise disables it. + + Mipmapping is disabled by default. + If mipmapping is enabled, additional memory will be allocated for the mipmap levels. The mipmap levels can be updated by binding the texture and calling glGenerateMipmap(). Mipmapping cannot be enabled for multisampled framebuffer objects. - \sa mipmap(), texture() + \sa mipmap(), QGLFramebufferObject::texture() */ void QGLFramebufferObjectFormat::setMipmap(bool enabled) { @@ -713,7 +716,7 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, as a texture, you first need to copy from it to a regular framebuffer object using QGLContext::blitFramebuffer(). - \section Threading + \section1 Threading As of Qt 4.8, it's possible to draw into a QGLFramebufferObject using a QPainter in a separate thread. Note that OpenGL 2.0 or diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 810ac7d..3afb3b1 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -77,7 +77,7 @@ \endlist - \section Threading + \section1 Threading As of Qt 4.8, it's possible to render into a QGLPixelBuffer using a QPainter in a separate thread. Note that OpenGL 2.0 or OpenGL ES diff --git a/src/plugins/s60/feedback/feedback.pro b/src/plugins/s60/feedback/feedback.pro new file mode 100644 index 0000000..1069220 --- /dev/null +++ b/src/plugins/s60/feedback/feedback.pro @@ -0,0 +1,18 @@ +include(../../qpluginbase.pri) + +TARGET = qtactilefeedback$${QT_LIBINFIX} + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/s60/feedback + +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE + +contains(S60_VERSION, 5.0)|contains(S60_VERSION, symbian3) { + HEADERS += qtactileFeedback.h + SOURCES += qtactileFeedback_s60.cpp + + LIBS += -ltouchfeedback +} + +load(data_caging_paths) + +TARGET.UID3=0x200315B4 diff --git a/src/plugins/s60/feedback/qtactileFeedback.h b/src/plugins/s60/feedback/qtactileFeedback.h new file mode 100644 index 0000000..7c4cc29 --- /dev/null +++ b/src/plugins/s60/feedback/qtactileFeedback.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QEvent> +#include <QWidget> + +#include "private/qs60style_feedbackinterface_p.h" + +class QTactileFeedback : public TactileFeedbackInterface +{ + Q_OBJECT + Q_INTERFACES(TactileFeedbackInterface) + + public: + void touchFeedback(QEvent *event, const QWidget *widget); + }; diff --git a/src/plugins/s60/feedback/qtactileFeedback_s60.cpp b/src/plugins/s60/feedback/qtactileFeedback_s60.cpp new file mode 100644 index 0000000..c2f1d34 --- /dev/null +++ b/src/plugins/s60/feedback/qtactileFeedback_s60.cpp @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QApplication> +#include <QObject> +#include <QSlider> +#include <QScrollBar> + +#include <QtCore/qplugin.h> +#include "qtactileFeedback.h" + +#include <touchfeedback.h> + +void QTactileFeedback::touchFeedback(QEvent *event, const QWidget *widget) +{ + //Lets share the global instance for touch feedback (you are NOT allowed to try and delete it!). + MTouchFeedback* feedback = MTouchFeedback::Instance(); + + //If the widget itself is not handling focus, try to use focusProxy widget. + const QWidget *w = ((widget->focusPolicy() == Qt::NoFocus) && (widget->focusProxy())) ? widget->focusProxy() : widget; + + //Only give tactile feedback for enabled widgets that take focus. + if (feedback && w && w->isEnabled() && w->isWidgetType() && w->isVisible()) { + //Scrollbars are 'special' that they don't take focus (nor they have focusProxy), yet we'd like to have tactile feedback for them + if (w->focusPolicy() == Qt::NoFocus) + if (!qobject_cast<const QScrollBar *>(w)) + return; + + //Don't give tactile feedback for widgets that are outside topmost dialog. + QWidget *dialog = QApplication::activeModalWidget(); + if (dialog) { + QList<const QWidget *> allChildren = dialog->findChildren<const QWidget *>(); + if (!allChildren.contains(w)) + return; + } + + //Widget specific tactile feedback. + if (qobject_cast<const QSlider *>(w) || qobject_cast<const QScrollBar *>(w)) + feedback->InstantFeedback(ETouchFeedbackSensitive); + else + feedback->InstantFeedback(ETouchFeedbackBasic); + } +} + +Q_EXPORT_PLUGIN2("feedback", QTactileFeedback); diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index a3a965e..1c4f110 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -3820,7 +3820,7 @@ QStringList QScriptEngine::importedExtensions() const which did not support member template functions. It is advised to use the other form in new code. - \sa QScriptEngine::toScriptValue(), qscriptvalue_cast + \sa QScriptEngine::toScriptValue(), qscriptvalue_cast() */ /*! diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index ce42e40..c615a30 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -1006,7 +1006,8 @@ QString QSqlTableModel::orderByClause() const } /*! - Returns the index of the field \a fieldName. + Returns the index of the field \a fieldName, or -1 if no corresponding field + exists in the model. */ int QSqlTableModel::fieldIndex(const QString &fieldName) const { |