aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-12-27 14:51:36 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-27 14:52:13 +0100
commit2ae6f14704263659896e859199d2ca565e8f958a (patch)
treeabc3461d28b1195996459ea658b296d858a417ea
parent7e2a0d8c6660cb1c67dd3a98b70ab2216497a6ac (diff)
Add Qml documentation
Change-Id: I38bfb0d87614fee1d508567a014a41e4be8cf6c2 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
-rw-r--r--src/imports/qmlwebsockets/qqmlwebsocket.cpp42
-rw-r--r--src/websockets/doc/qtwebsockets.qdocconf16
2 files changed, 54 insertions, 4 deletions
diff --git a/src/imports/qmlwebsockets/qqmlwebsocket.cpp b/src/imports/qmlwebsockets/qqmlwebsocket.cpp
index 3483d75..94d20e0 100644
--- a/src/imports/qmlwebsockets/qqmlwebsocket.cpp
+++ b/src/imports/qmlwebsockets/qqmlwebsocket.cpp
@@ -51,11 +51,51 @@
*/
/*!
- \qmlproperty url QQmlWebSocket::url
+ \qmlproperty QUrl WebSocket::url
Server url to connect to. The url must have one of 2 schemes: {ws://} or {wss://}.
When not supplied, then {ws://} is used.
*/
+/*!
+ \qmlproperty Status WebSocket::status
+ Status of the WebSocket.
+
+ The status can have the following values:
+ \list
+ \li WebSockets.Connecting
+ \li WebSockets.Open
+ \li WebSockets.Closing
+ \li WebSockets.Closed
+ \li WebSockets.Error
+ \endlist
+ */
+
+/*!
+ \qmlproperty QString WebSocket::errorString
+ Contains a description of the last error that occurred. When no error occurrred,
+ this string is empty.
+ */
+
+/*!
+ \qmlproperty bool WebSocket::active
+ When set to true, a connection is made to the server with the given url.
+ When set to false, the connection is closed.
+ The default value is false.
+ */
+
+/*!
+ \qmlsignal WebSocket::textMessageReceived(QString message)
+ This signal is emitted when a text message is received.
+ */
+
+/*!
+ \qmlsignal WebSocket::statusChanged(Status status)
+ This signal is emitted when the status of the WebSocket changes.
+ the \l {WebSocket::status}{status} argument provides the current status.
+
+ \sa WebSocket::status
+ */
+
#include "qqmlwebsocket.h"
#include <QtWebSockets/QWebSocket>
diff --git a/src/websockets/doc/qtwebsockets.qdocconf b/src/websockets/doc/qtwebsockets.qdocconf
index 83e995f..320db69 100644
--- a/src/websockets/doc/qtwebsockets.qdocconf
+++ b/src/websockets/doc/qtwebsockets.qdocconf
@@ -19,12 +19,17 @@ qhp.QtWebSockets.filterAttributes = qtwebsockets $QT_VERSION q
qhp.QtWebSockets.customFilters.Qt.name = QtWebSockets $QT_VERSION
qhp.QtWebSockets.customFilters.Qt.filterAttributes = qtwebsockets $QT_VERSION
-qhp.QtWebSockets.subprojects = classes examples
+qhp.QtWebSockets.subprojects = classes qml examples
qhp.QtWebSockets.subprojects.classes.title = C++ Classes
qhp.QtWebSockets.subprojects.classes.indexTitle = Qt WebSockets C++ Classes
qhp.QtWebSockets.subprojects.classes.selectors = class fake:headerfile
qhp.QtWebSockets.subprojects.classes.sortPages = true
+qhp.QtWebSockets.subprojects.qml.title = QML Types
+qhp.QtWebSockets.subprojects.qml.indexTitle = Qt WebSockets QML Types
+qhp.QtWebSockets.subprojects.qml.selectors = fake:headerfile
+qhp.QtWebSockets.subprojects.qml.sortPages = true
+
#qhp.QtWebSockets.subprojects.examples.title = Examples
#qhp.QtWebSockets.subprojects.examples.indexTitle = Qt WebSockets Examples
#qhp.QtWebSockets.subprojects.examples.selectors = class fake:example
@@ -35,15 +40,20 @@ tagfile = ../../../doc/qtwebsockets/
depends += qtcore qtnetwork qtdoc
-headerdirs += ..
+headerdirs += .. \
+ ../../imports
sourcedirs += .. \
- src
+ src \
+ ../../imports
+
exampledirs += ../../../examples/ \
snippets
navigation.landingpage = "Qt WebSockets"
navigation.cppclassespage = "Qt WebSockets C++ Classes"
+navigation.qmltypespage = "Qt WebSockets QML Types"
+
#imagedirs += ./images