~loic.molinari/+junk/qtdeclarative-shadereffectsource-changes

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlvaluetypes/data/rectf_compare.qml

  • Committer: Loïc Molinari
  • Date: 2012-04-21 17:59:51 UTC
  • Revision ID: loic.molinari@canonical.com-20120421175951-bqx68caaf5zrp76l
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import Test 1.0
 
2
 
 
3
MyTypeObject {
 
4
    property real r_x: rectf.x
 
5
    property real r_y: rectf.y
 
6
    property real r_width: rectf.width
 
7
    property real r_height: rectf.height
 
8
    property variant copy: rectf
 
9
    property string tostring: rectf.toString()
 
10
 
 
11
    // compare to string
 
12
    property bool equalsString: (rectf == tostring)
 
13
 
 
14
    // compare rectfs to various value types
 
15
    property bool equalsColor: (rectf == Qt.rgba(0.2, 0.88, 0.6, 0.34))   // false
 
16
    property bool equalsVector3d: (rectf == Qt.vector3d(1, 2, 3))         // false
 
17
    property bool equalsSize: (rectf == Qt.size(1912, 1913))              // false
 
18
    property bool equalsPoint: (rectf == Qt.point(10, 4))                 // false
 
19
    property bool equalsRect: (rectf == Qt.rect(103.8, 99.2, 88.1, 77.6)) // true
 
20
 
 
21
    property bool equalsSelf: (rectf == rectf)                            // true
 
22
    property bool equalsOther: (rectf == Qt.rect(13.8, 9.2, 78.7, 96.2))  // false
 
23
    property bool rectfEqualsRect: (rectfrect == rect)                    // true
 
24
}
 
25