diff options
author | Nico Vertriest <nico.vertriest@digia.com> | 2015-06-04 12:41:56 +0200 |
---|---|---|
committer | Nico Vertriest <nico.vertriest@digia.com> | 2015-06-25 10:58:58 +0000 |
commit | c3d26e75b0a9cc9848ebe316ee88b29655a6564f (patch) | |
tree | 8f23a2a85dfc76e046b04783307f602553f27eb4 /src/quick/doc | |
parent | 3e5a89ae70eb612afef0d593f180a57da17c782f (diff) |
Doc: resize tables with overflow
Task-number: QTBUG-46475
Change-Id: Iebb2f7677f8b514d2b3e08480abfc98a0e155c1c
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Diffstat (limited to 'src/quick/doc')
-rw-r--r-- | src/quick/doc/snippets/qml/loader/KeyReader.qml | 3 | ||||
-rw-r--r-- | src/quick/doc/snippets/qml/loader/sizeitem.qml | 29 | ||||
-rw-r--r-- | src/quick/doc/snippets/qml/loader/sizeloader.qml | 29 | ||||
-rw-r--r-- | src/quick/doc/snippets/qml/propertyanimation.qml | 6 | ||||
-rw-r--r-- | src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc | 4 | ||||
-rw-r--r-- | src/quick/doc/src/concepts/visualcanvas/visualparent.qdoc | 8 | ||||
-rw-r--r-- | src/quick/doc/src/qmltypereference.qdoc | 56 |
7 files changed, 85 insertions, 50 deletions
diff --git a/src/quick/doc/snippets/qml/loader/KeyReader.qml b/src/quick/doc/snippets/qml/loader/KeyReader.qml index a61d2bd11a..eebd72b96d 100644 --- a/src/quick/doc/snippets/qml/loader/KeyReader.qml +++ b/src/quick/doc/snippets/qml/loader/KeyReader.qml @@ -37,7 +37,8 @@ Item { Item { focus: true Keys.onPressed: { - console.log("Loaded item captured:", event.text); + console.log("Loaded item captured:", + event.text); event.accepted = true; } } diff --git a/src/quick/doc/snippets/qml/loader/sizeitem.qml b/src/quick/doc/snippets/qml/loader/sizeitem.qml index db79e28816..750ea9f58a 100644 --- a/src/quick/doc/snippets/qml/loader/sizeitem.qml +++ b/src/quick/doc/snippets/qml/loader/sizeitem.qml @@ -34,21 +34,22 @@ import QtQuick 2.0 Item { - width: 200; height: 200 + width: 200; height: 200 - Loader { - // position the Loader in the center of the parent - anchors.centerIn: parent - sourceComponent: rect - } + Loader { + // position the Loader in the center + // of the parent + anchors.centerIn: parent + sourceComponent: rect + } - Component { - id: rect - Rectangle { - width: 50 - height: 50 - color: "red" - } - } + Component { + id: rect + Rectangle { + width: 50 + height: 50 + color: "red" + } + } } //![0] diff --git a/src/quick/doc/snippets/qml/loader/sizeloader.qml b/src/quick/doc/snippets/qml/loader/sizeloader.qml index d691f460cb..9643768774 100644 --- a/src/quick/doc/snippets/qml/loader/sizeloader.qml +++ b/src/quick/doc/snippets/qml/loader/sizeloader.qml @@ -34,21 +34,22 @@ import QtQuick 2.0 Item { - width: 200; height: 200 + width: 200; height: 200 - Loader { - // Explicitly set the size of the Loader to the parent item's size - anchors.fill: parent - sourceComponent: rect - } + Loader { + // Explicitly set the size of the + // Loader to the parent item's size + anchors.fill: parent + sourceComponent: rect + } - Component { - id: rect - Rectangle { - width: 50 - height: 50 - color: "red" - } - } + Component { + id: rect + Rectangle { + width: 50 + height: 50 + color: "red" + } + } } //![0] diff --git a/src/quick/doc/snippets/qml/propertyanimation.qml b/src/quick/doc/snippets/qml/propertyanimation.qml index 2d8a3744ce..1cbb84e1db 100644 --- a/src/quick/doc/snippets/qml/propertyanimation.qml +++ b/src/quick/doc/snippets/qml/propertyanimation.qml @@ -92,7 +92,11 @@ Rectangle { color: "red" // this is a standalone animation, it's not running by default - PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 } + PropertyAnimation { id: animation; + target: theRect; + property: "width"; + to: 30; + duration: 500 } MouseArea { anchors.fill: parent; onClicked: animation.running = true } } diff --git a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc index 40190051e2..dffcabbd5b 100644 --- a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc +++ b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc @@ -169,6 +169,7 @@ created directly as types within QML: \table \row +\li C++ \li \code class MyModelPlugin : public QQmlExtensionPlugin @@ -183,7 +184,8 @@ public: } } \endcode - +\row +\li QML \li \qml MyModel { diff --git a/src/quick/doc/src/concepts/visualcanvas/visualparent.qdoc b/src/quick/doc/src/concepts/visualcanvas/visualparent.qdoc index 9ccb0b53b3..fd5bf51307 100644 --- a/src/quick/doc/src/concepts/visualcanvas/visualparent.qdoc +++ b/src/quick/doc/src/concepts/visualcanvas/visualparent.qdoc @@ -63,7 +63,9 @@ import QtQuick 2.0 Item { width: 100; height: 100 - Rectangle { width: 50; height: 50; color: "red" } + Rectangle { width: 50; + height: 50; + color: "red" } } \endcode @@ -75,7 +77,9 @@ Item { width: 100; height: 100 data: [ - Rectangle { width: 50; height: 50; color: "red" } + Rectangle { width: 50; + height: 50; + color: "red" } ] } \endcode diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc index e3641f2d76..630e0f58bc 100644 --- a/src/quick/doc/src/qmltypereference.qdoc +++ b/src/quick/doc/src/qmltypereference.qdoc @@ -252,7 +252,7 @@ available when you import \c QtQuick. The vector2d type has the following idempotent functions which can be invoked in QML: - \table + \table 60% \header \li Function Signature \li Description @@ -430,9 +430,11 @@ console.log(c); // 32 the 4x4 \c matrix with the matrix applied post-vector \li \code var a = Qt.vector3d(1,2,3); -var b = Qt.matrix4x4(4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19); +var b = Qt.matrix4x4(4,5,6,7,8,9,10,11, + 12,13,14,15,16,17,18,19); var c = a.times(b); -console.log(c.toString()); // QVector3D(0.774194, 0.849462, 0.924731) +console.log(c.toString()); +// QVector3D(0.774194, 0.849462, 0.924731) \endcode \row @@ -481,7 +483,8 @@ console.log(c.toString()); // QVector3D(-3, -3, -3) \li \code var a = Qt.vector3d(1,2,3); var b = a.normalized(); -console.log(b.toString()); // QVector3D(0.267261, 0.534522, 0.801784) +console.log(b.toString()); +// QVector3D(0.267261, 0.534522, 0.801784) \endcode \row @@ -515,7 +518,8 @@ console.log(b.toString()); // QVector4D(1, 2, 3, 0) \li bool fuzzyEquals(vector3d other, real epsilon) \li Returns true if \c this vector3d is approximately equal to the \c other vector3d. The approximation will be true if each attribute of \c this is within \c epsilon - of \c other. Note that \c epsilon is an optional argument, the default \c epsilon + of \c other. + Note that \c epsilon is an optional argument, the default \c epsilon is 0.00001. \li \code var a = Qt.vector3d(1,2,3); @@ -591,7 +595,8 @@ console.log(c.toString()); // QVector4D(5, 12, 21, 32) var a = Qt.vector4d(1,2,3,4); var b = 4.48; var c = a.times(b); -console.log(c.toString()); // QVector3D(4.48, 8.96, 13.44, 17.92) +console.log(c.toString()); // QVector3D(4.48, 8.96, + 13.44, 17.92) \endcode \row @@ -620,7 +625,8 @@ console.log(c.toString()); // QVector4D(-4, -4, -4, -4) \li \code var a = Qt.vector4d(1,2,3,4); var b = a.normalized(); -console.log(b.toString()); // QVector4D(0.182574, 0.365148, 0.547723, 0.730297) +console.log(b.toString()); +// QVector4D(0.182574, 0.365148, 0.547723, 0.730297) \endcode \row @@ -701,7 +707,7 @@ console.log(c + " " + d); // false true The matrix4x4 type has the following idempotent functions which can be invoked in QML: - \table + \table 70 % \header \li Function Signature \li Description @@ -715,7 +721,9 @@ console.log(c + " " + d); // false true var a = Qt.matrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); var b = Qt.matrix4x4(4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19); var c = a.times(b); -console.log(c.toString()); // QMatrix4x4(120, 130, 140, 150, 280, 306, 332, 358, 440, 482, 524, 566, 600, 658, 716, 774) +console.log(c.toString()); +// QMatrix4x4(120, 130, 140, 150, 280, 306, 332, 358, 440, 482, +//524, 566, 600, 658, 716, 774) \endcode \row @@ -749,7 +757,9 @@ console.log(c.toString()); // QVector3D(0.155556, 0.437037, 0.718518) var a = Qt.matrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); var b = 4.48; var c = a.times(b); -console.log(c.toString()); // QMatrix4x4(4.48, 8.96, 13.44, 17.92, 22.4, 26.88, 31.36, 35.84, 40.32, 44.8, 49.28, 53.76, 58.24, 62.72, 67.2, 71.68) +console.log(c.toString()); +// QMatrix4x4(4.48, 8.96, 13.44, 17.92, 22.4, 26.88, 31.36, 35.84, +// 40.32, 44.8, 49.28, 53.76, 58.24, 62.72, 67.2, 71.68) \endcode \row @@ -759,7 +769,9 @@ console.log(c.toString()); // QMatrix4x4(4.48, 8.96, 13.44, 17.92, 22.4, 26.88, var a = Qt.matrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); var b = Qt.matrix4x4(5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); var c = a.plus(b); -console.log(c.toString()); // QMatrix4x4(6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36) +console.log(c.toString()); +// QMatrix4x4(6, 8, 10, 12, 14, 16, 18, 20, 22, +// 24, 26, 28, 30, 32, 34, 36) \endcode \row @@ -769,7 +781,9 @@ console.log(c.toString()); // QMatrix4x4(6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 2 var a = Qt.matrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); var b = Qt.matrix4x4(5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20); var c = a.minus(b); -console.log(c.toString()); // QMatrix4x4(-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4) +console.log(c.toString()); +// QMatrix4x4(-4, -4, -4, -4, -4, -4, -4, -4, -4, +// -4, -4, -4, -4, -4, -4, -4) \endcode \row @@ -780,7 +794,8 @@ console.log(c.toString()); // QMatrix4x4(-4, -4, -4, -4, -4, -4, -4, -4, -4, -4, var a = Qt.matrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); var b = Qt.vector4d(a.m21, a.m22, a.m23, a.m24); var c = a.row(2); // zero based access! so not equal to b -console.log(b.toString() + " " + c.toString()); // QVector4D(5, 6, 7, 8) QVector4D(9, 10, 11, 12) +console.log(b.toString() + " " + c.toString()); +// QVector4D(5, 6, 7, 8) QVector4D(9, 10, 11, 12) \endcode \row @@ -791,7 +806,8 @@ console.log(b.toString() + " " + c.toString()); // QVector4D(5, 6, 7, 8) QVector var a = Qt.matrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); var b = Qt.vector4d(a.m12, a.m22, a.m32, a.m42); var c = a.column(2); // zero based access! so not equal to b -console.log(b.toString() + " " + c.toString()); // QVector4D(2, 6, 10, 14) QVector4D(3, 7, 11, 15) +console.log(b.toString() + " " + c.toString()); +// QVector4D(2, 6, 10, 14) QVector4D(3, 7, 11, 15) \endcode \row @@ -809,7 +825,9 @@ console.log(b); // 6 \li \code var a = Qt.matrix4x4(1,0,0,0,0,2,0,0,0,0,3,0,100,200,300,1); var b = a.inverted(); -console.log(b.toString()); // QMatrix4x4(1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0.333333, 0, -100, -100, -100, 1) +console.log(b.toString()); +// QMatrix4x4(1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0.333333, 0, -100, +// -100, -100, 1) \endcode \row @@ -818,7 +836,8 @@ console.log(b.toString()); // QMatrix4x4(1, 0, 0, 0, 0, 0.5, 0, 0, 0, 0, 0.33333 \li \code var a = Qt.matrix4x4(1,0,0,0,0,2,0,0,0,0,3,0,100,200,300,1); var b = a.transposed(); -console.log(b.toString()); // QMatrix4x4(1, 0, 0, 100, 0, 2, 0, 200, 0, 0, 3, 300, 0, 0, 0, 1) +console.log(b.toString()); +// QMatrix4x4(1, 0, 0, 100, 0, 2, 0, 200, 0, 0, 3, 300, 0, 0, 0, 1) \endcode \row @@ -829,7 +848,10 @@ console.log(b.toString()); // QMatrix4x4(1, 0, 0, 100, 0, 2, 0, 200, 0, 0, 3, 30 argument, the default \c epsilon is 0.00001. \li \code var a = Qt.matrix4x4(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); -var b = Qt.matrix4x4(1.0001,2.0001,3.0002,4.0003,5.0001,6.0002,7.0002,8.0004,9.0001,10.0003,11.0003,12.0004,13.0001,14.0002,15.0003,16.0004); +var b = Qt.matrix4x4(1.0001,2.0001,3.0002,4.0003,5.0001,6.0002, + 7.0002,8.0004, 9.0001,10.0003, + 11.0003,12.0004,13.0001, + 14.0002,15.0003,16.0004); var c = a.fuzzyEquals(b); // default epsilon var d = a.fuzzyEquals(b, 0.005); // supplied epsilon console.log(c + " " + d); // false true |