Add support for comparing value-type properties
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativevaluetypes / data / font_compare.qml
1 import Test 1.0
2
3 MyTypeObject {
4     property string f_family: font.family
5     property bool f_bold: font.bold
6     property int f_weight: font.weight
7     property bool f_italic: font.italic
8     property bool f_underline: font.underline
9     property bool f_overline: font.overline
10     property bool f_strikeout: font.strikeout
11     property real f_pointSize: font.pointSize
12     property int f_pixelSize: font.pixelSize
13     property int f_capitalization: font.capitalization
14     property real f_letterSpacing: font.letterSpacing
15     property real f_wordSpacing: font.wordSpacing;
16     property variant copy: font
17     property string tostring: font.toString()
18
19     // compare to string
20     property bool equalsString: (font == tostring)
21
22     // compare fonts to various value types
23     property bool equalsColor: (font == Qt.rgba(0.2, 0.88, 0.6, 0.34)) // false
24     property bool equalsVector3d: (font == Qt.vector3d(1, 2, 3))       // false
25     property bool equalsSize: (font == Qt.size(1912, 1913))            // false
26     property bool equalsPoint: (font == Qt.point(10, 4))               // false
27     property bool equalsRect: (font == Qt.rect(2, 3, 109, 102))        // false
28
29     property bool equalsSelf: (font == font) // true
30 }
31