Provides a list of API Elements (Classes, Enums, etc)

You can filter the list using the field names of an Element, optionally
with a Django QuerySet suffix such as <field>__icontains
GET /api/service/elements/?namespace__name=Ubuntu.Components
HTTP 200 OK Vary: Accept Content-Type: text/html; charset=utf-8 Allow: GET, POST, HEAD, OPTIONS
[ { "url": "http://developer.ubuntu.com/api/service/elements/149/", "name": "AbstractButton", "description": "The AbstractButton class defines the behavior of the button. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.AbstractButton", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$AbstractButton-brief -->\n<p>The AbstractButton class defines the behavior of the button. <a href=\"#details\">More...</a></p>\n<!-- @@@AbstractButton -->\n<p>Inherits <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a></p>\n<p>Inherited by <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a>, <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.CheckBox/\">CheckBox</a>, <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ListItems.Empty/\">Empty</a>, and <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Pickers.PickerDelegate/\">PickerDelegate</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clicked-signal\">clicked</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#pressAndHold-signal\">pressAndHold</a></b></b>()</li>\n</ul>\n<a name=\"signal-handlers\"></a>\n<h2>Signal Handlers</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#onClicked-signal-handler\">onClicked</a></b></b>()</li>\n</ul>\n<!-- $$$AbstractButton-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>This class defines the behavior of the button: it defines the MouseArea and the states.</p>\n<!-- @@@AbstractButton -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> associated with this <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\">url</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.iconSource.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\">Component</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$clicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clicked-signal\"></a>AbstractButton::<span class=\"name\">clicked</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a mouse click on the button and the button is not disabled. If <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">action</a> is defined, the action will be triggered.</p>\n</div></div><!-- @@@clicked -->\n<br/>\n<!-- $$$pressAndHold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pressAndHold-signal\"></a>AbstractButton::<span class=\"name\">pressAndHold</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a long press.</p>\n</div></div><!-- @@@pressAndHold -->\n<br/>\n<h2>Signal Handler Documentation</h2>\n<!-- $$$onClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onClicked-signal-handler\"></a>AbstractButton::<span class=\"name\">onClicked</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>If a button is clicked, its triggered() signal will automatically be called.</p>\n</div></div><!-- @@@onClicked -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1348/", "name": "AbstractButton", "description": "The AbstractButton class defines the behavior of the button. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.AbstractButton", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$AbstractButton-brief -->\n<p>The AbstractButton class defines the behavior of the button. <a href=\"#details\">More...</a></p>\n<!-- @@@AbstractButton -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a></p>\n</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherited By:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a>, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.CheckBox\">CheckBox</a>, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ListItems.Empty\">Empty</a>, and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Pickers.PickerDelegate\">PickerDelegate</a>.</p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clicked-signal\">clicked</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#pressAndHold-signal\">pressAndHold</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#triggered-signal\">triggered</a></b></b>(var <i>value</i>)</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#trigger-method\">trigger</a></b></b>(<i>value</i>)</li>\n</ul>\n<!-- $$$AbstractButton-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>This class defines the behavior of the button: it defines the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> and the states. All components deriving from this class support haptic feedback out of the box.</p>\n<!-- @@@AbstractButton -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the suru icon theme. Default value: action.iconName.</p>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folders where the icon themes are installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/suru\">/usr/share/icons/suru</a></li>\n<li>Ubuntu Desktop: <a href=\"file:/usr/share/icons/ubuntu-mono-dark\">/usr/share/icons/ubuntu-mono-dark</a></li>\n</ul>\n<p>These 2 separate icon themes will be merged soon.</p>\n<p>If both <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>This is the URL of any image file If both iconSource and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> are defined, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$clicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clicked-signal\"></a><span class=\"name\">clicked</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a mouse click on the button and the button is not disabled. If <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">action</a> is defined, the action will be triggered.</p>\n</div></div><!-- @@@clicked -->\n<br/>\n<!-- $$$pressAndHold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pressAndHold-signal\"></a><span class=\"name\">pressAndHold</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a long press.</p>\n</div></div><!-- @@@pressAndHold -->\n<br/>\n<!-- $$$triggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"triggered-signal\"></a><span class=\"name\">triggered</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-var.html\">var</a></span><i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the actionItem is triggered.</p>\n</div></div><!-- @@@triggered -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$trigger -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"trigger-method\"></a><span class=\"name\">trigger</span>(<i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Trigger this action item if it is enabled.</p>\n</div></div><!-- @@@trigger -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-abstractbutton.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/457/", "name": "AbstractButton", "description": "The AbstractButton class defines the behavior of the button. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.AbstractButton", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$AbstractButton-brief -->\n<p>The AbstractButton class defines the behavior of the button. <a href=\"#details\">More...</a></p>\n<!-- @@@AbstractButton -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a></p>\n<p>Inherited by <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a>, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.CheckBox\">CheckBox</a>, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ListItems.Empty\">Empty</a>, and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Pickers.PickerDelegate\">PickerDelegate</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clicked-signal\">clicked</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#pressAndHold-signal\">pressAndHold</a></b></b>()</li>\n</ul>\n<a name=\"signal-handlers\"></a>\n<h2>Signal Handlers</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#onClicked-signal-handler\">onClicked</a></b></b>()</li>\n</ul>\n<!-- $$$AbstractButton-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>This class defines the behavior of the button: it defines the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> and the states. All components deriving from this class support haptic feedback out of the box.</p>\n<!-- @@@AbstractButton -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the ubuntu-mobile icon theme. Default value: action.iconName.</p>\n<p>If both <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>If both iconSource and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> are defined, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$clicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clicked-signal\"></a>AbstractButton::<span class=\"name\">clicked</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a mouse click on the button and the button is not disabled. If <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">action</a> is defined, the action will be triggered.</p>\n</div></div><!-- @@@clicked -->\n<br/>\n<!-- $$$pressAndHold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pressAndHold-signal\"></a>AbstractButton::<span class=\"name\">pressAndHold</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a long press.</p>\n</div></div><!-- @@@pressAndHold -->\n<br/>\n<h2>Signal Handler Documentation</h2>\n<!-- $$$onClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onClicked-signal-handler\"></a>AbstractButton::<span class=\"name\">onClicked</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>If a button is clicked, its triggered() signal will automatically be called.</p>\n</div></div><!-- @@@onClicked -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-abstractbutton.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1349/", "name": "Action", "description": "Describe an action that can be re-used in, for example a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a> ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Action", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Action-brief -->\n<p>Describe an action that can be re-used in, for example a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a> <a href=\"#details\">More...</a></p>\n<!-- @@@Action -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#visible-prop\">visible</a></b></b> : bool</li>\n</ul>\n<!-- $$$Action-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>Examples: See <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></p>\n<!-- @@@Action -->\n<h2>Property Documentation</h2>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the action.</p>\n<p>This is the name of the icon in the suru theme. If both <a href=\"#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n}</pre>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folder where the icon theme is installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/suru\">/usr/share/icons/suru</a></li>\n</ul>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the action.</p>\n<p>This is a URL to any image file. In order to use an icon from the Ubuntu theme, use the <a href=\"#iconName-prop\">iconName</a> property instead.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$visible -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"visible-prop\"></a><span class=\"name\">visible</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The action is visible to the user</p>\n</div></div><!-- @@@visible -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-action.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/150/", "name": "Action", "description": "Describe an action that can be re-used in, for example a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a> ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Action", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Action-brief -->\n<p>Describe an action that can be re-used in, for example a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a> <a href=\"#details\">More...</a></p>\n<!-- @@@Action -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#itemHint-prop\">itemHint</a></b></b> : Component<tt> (deprecated)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#visible-prop\">visible</a></b></b> : bool<tt> (deprecated)</tt></li>\n</ul>\n<!-- $$$Action-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>Examples: See <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a></p>\n<!-- @@@Action -->\n<h2>Property Documentation</h2>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\">url</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the action.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$itemHint -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"itemHint-prop\"></a><span class=\"name\">itemHint</span> : <span class=\"type\">Component</span></p></td></tr></table></div><div class=\"qmldoc\"><p>This documentation is deprecated.</p>\n<p><b>itemHint is DEPRECATED. Use <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a> to specify the representation of an <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a>.</b></p>\n</div></div><!-- @@@itemHint -->\n<br/>\n<!-- $$$visible -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"visible-prop\"></a><span class=\"name\">visible</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>This documentation is deprecated.</p>\n<p><b>visible is DEPRECATED. Use <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a> to specify the representation of an <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a>.</b> The action is visible to the user</p>\n</div></div><!-- @@@visible -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/458/", "name": "Action", "description": "Describe an action that can be re-used in, for example a <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a> ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Action", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Action-brief -->\n<p>Describe an action that can be re-used in, for example a <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a> <a href=\"#details\">More...</a></p>\n<!-- @@@Action -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#itemHint-prop\">itemHint</a></b></b> : Component<tt> (deprecated)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#visible-prop\">visible</a></b></b> : bool<tt> (deprecated)</tt></li>\n</ul>\n<!-- $$$Action-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>Examples: See <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a></p>\n<!-- @@@Action -->\n<h2>Property Documentation</h2>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the action.</p>\n<p>This is the name of the icon in the ubuntu-mobile theme. If both <a href=\"#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a></span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n}</pre>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folder where the icon theme is installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/ubuntu-mobile\">/usr/share/icons/ubuntu-mobile</a></li>\n</ul>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the action.</p>\n<p>This is a URL to any image file. In order to use an icon from the Ubuntu theme, use the <a href=\"#iconName-prop\">iconName</a> property instead.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$itemHint -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"itemHint-prop\"></a><span class=\"name\">itemHint</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>This documentation is deprecated.</p>\n<p><b>itemHint is DEPRECATED. Use <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a> to specify the representation of an <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a>.</b></p>\n</div></div><!-- @@@itemHint -->\n<br/>\n<!-- $$$visible -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"visible-prop\"></a><span class=\"name\">visible</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>This documentation is deprecated.</p>\n<p><b>visible is DEPRECATED. Use <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a> to specify the representation of an <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a>.</b> The action is visible to the user</p>\n</div></div><!-- @@@visible -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-action.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/151/", "name": "ActionItem", "description": "A visual representation of an Action. The API of ActionItem is a copy of the API of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a>, with additional properties to define visual aspects of the ActionItem. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.ActionItem", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActionItem-brief -->\n<p>A visual representation of an Action. The API of ActionItem is a copy of the API of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a>, with additional properties to define visual aspects of the ActionItem. <a href=\"#details\">More...</a></p>\n<!-- @@@ActionItem -->\n<p>Inherits <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.StyledItem/\">StyledItem</a></p>\n<p>Inherited by <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.AbstractButton/\">AbstractButton</a> and <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarButton/\">ToolbarButton</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#triggered-signal\">triggered</a></b></b>(var <i>value</i>)</li>\n</ul>\n<a name=\"signal-handlers\"></a>\n<h2>Signal Handlers</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#onTriggered-signal-handler\">onTriggered</a></b></b>()</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#trigger-method\">trigger</a></b></b>(<i>value</i>)</li>\n</ul>\n<!-- $$$ActionItem-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>If <a href=\"#action-prop\">action</a> is set, the values of the other properties will by default be identical to the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a>'s property values. Setting the other properties will override the properties copied from the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a>.</p>\n<p>See <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarItems/\">ToolbarItems</a> for examples of how to use <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarButton/\">ToolbarButton</a> or other ActionItems in a toolbar.</p>\n<!-- @@@ActionItem -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> associated with this <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\">url</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.iconSource.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\">Component</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$triggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"triggered-signal\"></a>ActionItem::<span class=\"name\">triggered</span>(<span class=\"type\">var</span><i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a> is triggered.</p>\n</div></div><!-- @@@triggered -->\n<br/>\n<h2>Signal Handler Documentation</h2>\n<!-- $$$onTriggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onTriggered-signal-handler\"></a>ActionItem::<span class=\"name\">onTriggered</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>If <a href=\"#action-prop\">action</a> is set, this will trigger it.</p>\n</div></div><!-- @@@onTriggered -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$trigger -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"trigger-method\"></a>ActionItem::<span class=\"name\">trigger</span>(<i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Trigger this action item if it is enabled.</p>\n</div></div><!-- @@@trigger -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/459/", "name": "ActionItem", "description": "A visual representation of an Action. The API of ActionItem is a copy of the API of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a>, with additional properties to define visual aspects of the ActionItem. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.ActionItem", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActionItem-brief -->\n<p>A visual representation of an Action. The API of ActionItem is a copy of the API of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a>, with additional properties to define visual aspects of the ActionItem. <a href=\"#details\">More...</a></p>\n<!-- @@@ActionItem -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n<p>Inherited by <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.AbstractButton\">AbstractButton</a>, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.TextField\">TextField</a>, and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarButton\">ToolbarButton</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#triggered-signal\">triggered</a></b></b>(var <i>value</i>)</li>\n</ul>\n<a name=\"signal-handlers\"></a>\n<h2>Signal Handlers</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#onTriggered-signal-handler\">onTriggered</a></b></b>()</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#trigger-method\">trigger</a></b></b>(<i>value</i>)</li>\n</ul>\n<!-- $$$ActionItem-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>If <a href=\"#action-prop\">action</a> is set, the values of the other properties will by default be identical to the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a>'s property values. Setting the other properties will override the properties copied from the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a>.</p>\n<p>See <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarItems\">ToolbarItems</a> for examples of how to use <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarButton\">ToolbarButton</a> or other ActionItems in a toolbar.</p>\n<!-- @@@ActionItem -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the ubuntu-mobile icon theme. Default value: action.iconName.</p>\n<p>If both <a href=\"#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>If both iconSource and <a href=\"#iconName-prop\">iconName</a> are defined, <a href=\"#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$triggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"triggered-signal\"></a>ActionItem::<span class=\"name\">triggered</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-var.html\">var</a></span><i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the actionItem is triggered.</p>\n</div></div><!-- @@@triggered -->\n<br/>\n<h2>Signal Handler Documentation</h2>\n<!-- $$$onTriggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onTriggered-signal-handler\"></a>ActionItem::<span class=\"name\">onTriggered</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>If <a href=\"#action-prop\">action</a> is set, this will trigger it.</p>\n</div></div><!-- @@@onTriggered -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$trigger -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"trigger-method\"></a>ActionItem::<span class=\"name\">trigger</span>(<i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Trigger this action item if it is enabled.</p>\n</div></div><!-- @@@trigger -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-actionitem.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1350/", "name": "ActionItem", "description": "A visual representation of an Action. The API of ActionItem is a copy of the API of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a>, with additional properties to define visual aspects of the ActionItem. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.ActionItem", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActionItem-brief -->\n<p>A visual representation of an Action. The API of ActionItem is a copy of the API of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a>, with additional properties to define visual aspects of the ActionItem. <a href=\"#details\">More...</a></p>\n<!-- @@@ActionItem -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherited By:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.AbstractButton\">AbstractButton</a>, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.TextField\">TextField</a>, and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ToolbarButton\">ToolbarButton</a>.</p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#triggered-signal\">triggered</a></b></b>(var <i>value</i>)</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#trigger-method\">trigger</a></b></b>(<i>value</i>)</li>\n</ul>\n<!-- $$$ActionItem-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>If <a href=\"#action-prop\">action</a> is set, the values of the other properties will by default be identical to the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a>'s property values. Setting the other properties will override the properties copied from the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a>.</p>\n<p>See <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ToolbarItems\">ToolbarItems</a> for examples of how to use <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ToolbarButton\">ToolbarButton</a> or other ActionItems in a toolbar.</p>\n<!-- @@@ActionItem -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the suru icon theme. Default value: action.iconName.</p>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folders where the icon themes are installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/suru\">/usr/share/icons/suru</a></li>\n<li>Ubuntu Desktop: <a href=\"file:/usr/share/icons/ubuntu-mono-dark\">/usr/share/icons/ubuntu-mono-dark</a></li>\n</ul>\n<p>These 2 separate icon themes will be merged soon.</p>\n<p>If both <a href=\"#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>This is the URL of any image file If both iconSource and <a href=\"#iconName-prop\">iconName</a> are defined, <a href=\"#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$triggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"triggered-signal\"></a><span class=\"name\">triggered</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-var.html\">var</a></span><i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the actionItem is triggered.</p>\n</div></div><!-- @@@triggered -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$trigger -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"trigger-method\"></a><span class=\"name\">trigger</span>(<i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Trigger this action item if it is enabled.</p>\n</div></div><!-- @@@trigger -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-actionitem.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/152/", "name": "ActionList", "description": "List of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> items ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.ActionList", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActionList-brief -->\n<p>List of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> items <a href=\"#details\">More...</a></p>\n<!-- @@@ActionList -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#children-prop\">children</a></b></b> : list&lt;Action&gt;</li>\n</ul>\n<!-- $$$ActionList-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<!-- @@@ActionList -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>List of already defined actions when not defining them as children of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionList/\">ActionList</a>. Note that when you set this property, the children of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionList/\">ActionList</a> will be ignored, so do not set the list and define children.</p>\n<p>The advantage of setting actions over using the children is that the same <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> items can be used in several sets of actions.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$children -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"children-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">children</span> : <span class=\"type\">list</span>&lt;<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Default property to allow adding of children.</p>\n</div></div><!-- @@@children -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/460/", "name": "ActionList", "description": "List of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> items ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.ActionList", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActionList-brief -->\n<p>List of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> items <a href=\"#details\">More...</a></p>\n<!-- @@@ActionList -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/QtQml.QtObject\">QtObject</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#children-prop\">children</a></b></b> : list&lt;Action&gt;</li>\n</ul>\n<!-- $$$ActionList-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<!-- @@@ActionList -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>List of already defined actions when not defining them as children of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionList\">ActionList</a>. Note that when you set this property, the children of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionList\">ActionList</a> will be ignored, so do not set the list and define children.</p>\n<p>The advantage of setting actions over using the children is that the same <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> items can be used in several sets of actions.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$children -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"children-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">children</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\">Action</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Default property to allow adding of children.</p>\n</div></div><!-- @@@children -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-actionlist.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1351/", "name": "ActionList", "description": "List of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> items ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.ActionList", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActionList-brief -->\n<p>List of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> items <a href=\"#details\">More...</a></p>\n<!-- @@@ActionList -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/QtQml.QtObject\">QtObject</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#children-prop\">children</a></b></b> : list&lt;Action&gt;</li>\n</ul>\n<!-- $$$ActionList-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<!-- @@@ActionList -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>List of already defined actions when not defining them as children of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionList\">ActionList</a>. Note that when you set this property, the children of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionList\">ActionList</a> will be ignored, so do not set the list and define children.</p>\n<p>The advantage of setting actions over using the children is that the same <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> items can be used in several sets of actions.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$children -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"children-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">children</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\">Action</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Default property to allow adding of children.</p>\n</div></div><!-- @@@children -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-actionlist.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/154/", "name": "ActivityIndicator", "description": "The ActivityIndicator component visually indicates that a task of unknown duration is in progress, e.g&#x2e; busy indication, connection in progress indication, etc. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.ActivityIndicator", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActivityIndicator-brief -->\n<p>The ActivityIndicator component visually indicates that a task of unknown duration is in progress, e.g&#x2e; busy indication, connection in progress indication, etc. <a href=\"#details\">More...</a></p>\n<!-- @@@ActivityIndicator -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#running-prop\">running</a></b></b> : bool<tt> (preliminary)</tt></li>\n</ul>\n<!-- $$$ActivityIndicator-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Note: for time consuming JavaScript operations use WorkerScript, otherwise no UI interaction will be possible and the ActicityIndicator animation will freeze.</p>\n<p><b>This component is under heavy development.</b></p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">Item</span> {\n <span class=\"type\">ActivityIndicator</span> {\n <span class=\"name\">id</span>: <span class=\"name\">activity</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">toggleActive</span>\n <span class=\"name\">text</span>: (<span class=\"name\">activity</span>.<span class=\"name\">running</span>) ? <span class=\"string\">&quot;Deactivate&quot;</span> : <span class=\"string\">&quot;Activate&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">activity</span>.<span class=\"name\">running</span> <span class=\"operator\">=</span> !<span class=\"name\">activity</span>.<span class=\"name\">running</span>\n }\n}</pre>\n<!-- @@@ActivityIndicator -->\n<h2>Property Documentation</h2>\n<!-- $$$running -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"running-prop\"></a><span class=\"name\">running</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Presents whether there is activity to be visualized or not. The default value is false. When activated (set to true), an animation is shown indicating an ongoing activity, which continues until deactivated (set to false).</p>\n</div></div><!-- @@@running -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/462/", "name": "ActivityIndicator", "description": "The ActivityIndicator component visually indicates that a task of unknown duration is in progress, e.g&#x2e; busy indication, connection in progress indication, etc. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.ActivityIndicator", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActivityIndicator-brief -->\n<p>The ActivityIndicator component visually indicates that a task of unknown duration is in progress, e.g&#x2e; busy indication, connection in progress indication, etc. <a href=\"#details\">More...</a></p>\n<!-- @@@ActivityIndicator -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#running-prop\">running</a></b></b> : bool<tt> (preliminary)</tt></li>\n</ul>\n<!-- $$$ActivityIndicator-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Note: for time consuming JavaScript operations use <a href=\"/api/qml/sdk-14.04/QtQml.WorkerScript\">WorkerScript</a>, otherwise no UI interaction will be possible and the ActicityIndicator animation will freeze.</p>\n<p><b>This component is under heavy development.</b></p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\">ActivityIndicator</span> {\n <span class=\"name\">id</span>: <span class=\"name\">activity</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">toggleActive</span>\n <span class=\"name\">text</span>: (<span class=\"name\">activity</span>.<span class=\"name\">running</span>) ? <span class=\"string\">&quot;Deactivate&quot;</span> : <span class=\"string\">&quot;Activate&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">activity</span>.<span class=\"name\">running</span> <span class=\"operator\">=</span> !<span class=\"name\">activity</span>.<span class=\"name\">running</span>\n }\n}</pre>\n<!-- @@@ActivityIndicator -->\n<h2>Property Documentation</h2>\n<!-- $$$running -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"running-prop\"></a><span class=\"name\">running</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Presents whether there is activity to be visualized or not. The default value is false. When activated (set to true), an animation is shown indicating an ongoing activity, which continues until deactivated (set to false).</p>\n</div></div><!-- @@@running -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-activityindicator.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1353/", "name": "ActivityIndicator", "description": "The ActivityIndicator component visually indicates that a task of unknown duration is in progress, e.g&#x2e; busy indication, connection in progress indication, etc. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.ActivityIndicator", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ActivityIndicator-brief -->\n<p>The ActivityIndicator component visually indicates that a task of unknown duration is in progress, e.g&#x2e; busy indication, connection in progress indication, etc. <a href=\"#details\">More...</a></p>\n<!-- @@@ActivityIndicator -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#running-prop\">running</a></b></b> : bool<tt> (preliminary)</tt></li>\n</ul>\n<!-- $$$ActivityIndicator-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Note: for time consuming JavaScript operations use <a href=\"/api/qml/sdk-14.10/QtQml.WorkerScript\">WorkerScript</a>, otherwise no UI interaction will be possible and the ActicityIndicator animation will freeze.</p>\n<p><b>This component is under heavy development.</b></p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\">ActivityIndicator</span> {\n <span class=\"name\">id</span>: <span class=\"name\">activity</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">toggleActive</span>\n <span class=\"name\">text</span>: (<span class=\"name\">activity</span>.<span class=\"name\">running</span>) ? <span class=\"string\">&quot;Deactivate&quot;</span> : <span class=\"string\">&quot;Activate&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">activity</span>.<span class=\"name\">running</span> <span class=\"operator\">=</span> !<span class=\"name\">activity</span>.<span class=\"name\">running</span>\n }\n}</pre>\n<!-- @@@ActivityIndicator -->\n<h2>Property Documentation</h2>\n<!-- $$$running -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"running-prop\"></a><span class=\"name\">running</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Presents whether there is activity to be visualized or not. The default value is false. When activated (set to true), an animation is shown indicating an ongoing activity, which continues until deactivated (set to false).</p>\n</div></div><!-- @@@running -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-activityindicator.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1415/", "name": "Alarm", "description": "Alarm component is a representation of an alarm event. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Alarm", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Alarm-brief -->\n<p>Alarm component is a representation of an alarm event. <a href=\"#details\">More...</a></p>\n<!-- @@@Alarm -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#date-prop\">date</a></b></b> : Date</li>\n<li class=\"fn\"><b><b><a href=\"#daysOfWeek-prop\">daysOfWeek</a></b></b> : DaysOfWeek</li>\n<li class=\"fn\"><b><b><a href=\"#enabled-prop\">enabled</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#error-prop\">error</a></b></b> : Error</li>\n<li class=\"fn\"><b><b><a href=\"#message-prop\">message</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#sound-prop\">sound</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#status-prop\">status</a></b></b> : Status</li>\n<li class=\"fn\"><b><b><a href=\"#type-prop\">type</a></b></b> : AlarmType</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#cancel-method\">cancel</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#reset-method\">reset</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#save-method\">save</a></b></b>()</li>\n</ul>\n<!-- $$$Alarm-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The Alarm element encapsulates alarm event data. Supports one time and repeating alarms, where repeating can be either daily or weekly on one or several selected days.</p>\n<p>The alarm data is validated upon <a href=\"#save-method\">save</a> operation, which can be used to save a new alarm or update existing alarm's properties.</p>\n<p>During data validation the alarm properties may suffer changes. These changes will be reported back to each changed property. See what changes can occurr at <a href=\"#save-method\">save</a> function documentation.</p>\n<p>Example usage:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"type\">Alarm</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarm</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Row\">Row</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">date</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Date:&quot;</span>\n <span class=\"name\">anchors</span>.verticalCenter: <span class=\"name\">parent</span>.<span class=\"name\">verticalCenter</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.TextField\">TextField</a></span> {\n <span class=\"name\">text</span>: <span class=\"name\">alarm</span>.<span class=\"name\">date</span>.<span class=\"name\">toString</span>()\n <span class=\"name\">onAccepted</span>: <span class=\"name\">alarm</span>.<span class=\"name\">date</span> <span class=\"operator\">=</span> new <span class=\"name\">Date</span>(<span class=\"name\">text</span>)\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Row\">Row</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">msg</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Message:&quot;</span>\n <span class=\"name\">anchors</span>.verticalCenter: <span class=\"name\">parent</span>.<span class=\"name\">verticalCenter</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.TextField\">TextField</a></span> {\n <span class=\"name\">text</span>: <span class=\"name\">alarm</span>.<span class=\"name\">message</span>\n <span class=\"name\">onAccepted</span>: <span class=\"name\">alarm</span>.<span class=\"name\">message</span> <span class=\"operator\">=</span> <span class=\"name\">text</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Save&quot;</span>\n <span class=\"name\">onClicked</span>: {\n <span class=\"name\">alarm</span>.<span class=\"name\">save</span>();\n <span class=\"keyword\">if</span> (<span class=\"name\">alarm</span>.<span class=\"name\">error</span> <span class=\"operator\">!=</span> <span class=\"name\">Alarm</span>.<span class=\"name\">NoError</span>)\n <span class=\"name\">print</span>(<span class=\"string\">&quot;Error saving alarm, code: &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">alarm</span>.<span class=\"name\">error</span>);\n }\n }\n }\n}</pre>\n<p>An alarm can be cancelled using <a href=\"#cancel-method\">cancel</a> function but only if the event has previously been stored in the alarm collection.</p>\n<p>The <a href=\"#reset-method\">reset</a> function clears the properties of the alarm bringing them to the default values. In this way the same alarm component can be used to save several alarms at the same time.</p>\n<!-- @@@Alarm -->\n<h2>Property Documentation</h2>\n<!-- $$$date -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"date-prop\"></a><span class=\"name\">date</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.Date\">Date</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the date the alarm will be triggered. The default value is the current date and time the alarm object was created. Further <a href=\"#reset-method\">reset</a> calls will bring the value back to the time the <a href=\"#reset-method\">reset</a> was called.</p>\n</div></div><!-- @@@date -->\n<br/>\n<!-- $$$daysOfWeek -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"daysOfWeek-prop\"></a><span class=\"name\">daysOfWeek</span> : <span class=\"type\">DaysOfWeek</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the days of the week the alarm is scheduled. This property can have only one day set for one time alarms and multiple days for repeating alarms. The following flags can be set:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th colspan=\"3\" rowspan=\" 1\">Alarm.DayOfWeek enum:</th></tr>\n<tr class=\"qt-style\"><th >Type</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Monday</td><td >0x01</td><td >The alarm will kick on Mondays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Tuesday</td><td >0x02</td><td >The alarm will kick on Tuesdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Wednesday</td><td >0x04</td><td >The alarm will kick on Wednesdays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Thursday</td><td >0x08</td><td >The alarm will kick on Thursdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Friday</td><td >0x10</td><td >The alarm will kick on Fridays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Saturday</td><td >0x20</td><td >The alarm will kick on Saturdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Sunday</td><td >0x40</td><td >The alarm will kick on Sundays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.AutoDetect</td><td >0x80</td><td >The alarm day will be detected from the alarm date.</td></tr>\n</table>\n<p>The default value is Alarm.AutoDetect.</p>\n</div></div><!-- @@@daysOfWeek -->\n<br/>\n<!-- $$$enabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"enabled-prop\"></a><span class=\"name\">enabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies whether the alarm is enabled or not. Disable dalarms are not scheduled. The default value is true;</p>\n</div></div><!-- @@@enabled -->\n<br/>\n<!-- $$$error -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"error-prop\"></a><span class=\"name\">error</span> : <span class=\"type\">Error</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the error code occurred during the last performed operation.</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th >Error code</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >NoError</td><td >0</td><td >Successful operation completion.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InvalidDate</td><td >1</td><td >The date specified for the alarm was invalid.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >EarlyDate</td><td >2</td><td >The date specified for the alarm is an earlier date than the current one.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >NoDaysOfWeek</td><td >3</td><td >The <a href=\"#daysOfWeek-prop\">daysOfWeek</a> parameter of the alarm was not specified.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >OneTimeOnMoreDays</td><td >4</td><td >The one-time alarm was set to be kicked in several days.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InvalidEvent</td><td >5</td><td >The alarm event is invalid.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >AdaptationError</td><td >100</td><td >The error occurred in alarm adaptation layer. Adaptations may define additional behind this value.</td></tr>\n</table>\n</div></div><!-- @@@error -->\n<br/>\n<!-- $$$message -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"message-prop\"></a><span class=\"name\">message</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the message string which will be displayed when the alarm is triggered. The default value is the localized &quot;Alarm&quot; text.</p>\n</div></div><!-- @@@message -->\n<br/>\n<!-- $$$sound -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"sound-prop\"></a><span class=\"name\">sound</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the alarm's sound to be played when the alarm is triggered. An empty url will mean to play the default sound.</p>\n<p>The defaul tvalue is an empty url.</p>\n</div></div><!-- @@@sound -->\n<br/>\n<!-- $$$status -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"status-prop\"></a><span class=\"name\">status</span> : <span class=\"type\">Status</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the status of the last performed operation. It can take one of the following values:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th >Status code</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Ready</td><td >1</td><td >Specifies either that the Alarm object is ready to perform any operation or that the previous operation has been successfully completed.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InProgress</td><td >2</td><td >Specifies that there is an operation pending on Alarm object.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Fail</td><td >3</td><td >Specifies that the last alarm operation has failed. The failure code is set in <a href=\"#error-prop\">error</a> property.</td></tr>\n</table>\n<p>The notification signal has a parameter specifying the <i>operation</i> the status refers to. The operation can take the following values:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th >Operation code</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >NoOperation</td><td >There is no operation pending. This may be set when an error occured in the alarm adapters and the operation cannot be determined.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Saving</td><td >The status reported refers to an operation requested through <a href=\"#save-method\">save()</a>.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Canceling</td><td >The status reported refers to an operation requested through <a href=\"#cancel-method\">cancel()</a>.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Reseting</td><td >The status reported refers to an operation requested through <a href=\"#reset-method\">reset()</a>.</td></tr>\n</table>\n<p>For example an implementation which resets the alarm data whenever the save or cancel operations succeed would look as follows:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Alarm\">Alarm</a></span> {\n <span class=\"name\">onStatusChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">status</span> <span class=\"operator\">!==</span> <span class=\"name\">Alarm</span>.<span class=\"name\">Ready</span>)\n <span class=\"keyword\">return</span>;\n <span class=\"keyword\">if</span> ((<span class=\"name\">operation</span> <span class=\"operator\">&gt;</span> <span class=\"name\">Alarm</span>.<span class=\"name\">NoOperation</span>) <span class=\"operator\">&amp;&amp;</span> (<span class=\"name\">operation</span> <span class=\"operator\">&lt;</span> <span class=\"name\">Alarm</span>.<span class=\"name\">Reseting</span>)) {\n <span class=\"name\">reset</span>();\n }\n }\n}</pre>\n</div></div><!-- @@@status -->\n<br/>\n<!-- $$$type -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"type-prop\"></a><span class=\"name\">type</span> : <span class=\"type\">AlarmType</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the type of the alarm, which can have one of the following values:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th colspan=\"2\" rowspan=\" 1\">Alarm.AlarmType enum:</th></tr>\n<tr class=\"qt-style\"><th >Type</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.OneTime</td><td >The alarm occurs only once.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Repeating</td><td >The alarm is a repeating one, either daily, weekly on a given day or on selected days.</td></tr>\n</table>\n<p>The default value is Alarm.OneTime.</p>\n</div></div><!-- @@@type -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$cancel -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"cancel-method\"></a><span class=\"name\">cancel</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function removes the alarm from the collection. The function will fail for alarms which are not yet registered to the collection.</p>\n<p>The operation is asynchronous, and its status is reported through the <a href=\"#status-prop\">status</a> property. Further operations should wait till the previous operation is completed. The operation result is stored in the <a href=\"#error-prop\">error</a> property.</p>\n</div></div><!-- @@@cancel -->\n<br/>\n<!-- $$$reset -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"reset-method\"></a><span class=\"name\">reset</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function resets the alarm properties to its defaults. After this call the object can be used to create a new alarm event.</p>\n<p><b>Note</b>: do not call this function on alarm objects retrieved from <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.AlarmModel\">AlarmModel</a>, as calling it will result in the model being out of sync from the alarm database.</p>\n</div></div><!-- @@@reset -->\n<br/>\n<!-- $$$save -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"save-method\"></a><span class=\"name\">save</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Updates or adds an alarm to the alarm collection. The operation aligns properties according to the following rules:</p>\n<ul>\n<li>- the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> will be set to the alarm day if the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> was set to Alarm.AutoDetect.</li>\n<li>- if the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> is set to a day other than the one specified in the <a href=\"#date-prop\">date</a> field, the <a href=\"#date-prop\">date</a> will be moved ahead to match the day from the <a href=\"#daysOfWeek-prop\">daysOfWeek</a>.</li>\n</ul>\n<p>The function will fail if</p>\n<ul>\n<li>- the <a href=\"#date-prop\">date</a> property is invalid</li>\n<li>- for one time alarm, the <a href=\"#date-prop\">date</a> property falue is earlier than the current time</li>\n<li>- the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> property is set to multiple days for one time alarm</li>\n</ul>\n<p>The operation is asynchronous, and its status is reported through the <a href=\"#status-prop\">status</a> property. Further operations should wait till the previous operation is completed. The operation result is stored in the <a href=\"#error-prop\">error</a> property.</p>\n</div></div><!-- @@@save -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-alarm.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/520/", "name": "Alarm", "description": "Alarm component is a representation of an alarm event. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Alarm", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Alarm-brief -->\n<p>Alarm component is a representation of an alarm event. <a href=\"#details\">More...</a></p>\n<!-- @@@Alarm -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#date-prop\">date</a></b></b> : Date</li>\n<li class=\"fn\"><b><b><a href=\"#daysOfWeek-prop\">daysOfWeek</a></b></b> : DaysOfWeek</li>\n<li class=\"fn\"><b><b><a href=\"#enabled-prop\">enabled</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#error-prop\">error</a></b></b> : Error</li>\n<li class=\"fn\"><b><b><a href=\"#message-prop\">message</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#sound-prop\">sound</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#status-prop\">status</a></b></b> : Status</li>\n<li class=\"fn\"><b><b><a href=\"#type-prop\">type</a></b></b> : AlarmType</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#cancel-method\">cancel</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#reset-method\">reset</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#save-method\">save</a></b></b>()</li>\n</ul>\n<!-- $$$Alarm-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The Alarm element encapsulates alarm event data. Supports one time and repeating alarms, where repeating can be either daily or weekly on one or several selected days.</p>\n<p>The alarm data is validated upon <a href=\"#save-method\">save</a> operation, which can be used to save a new alarm or update existing alarm's properties.</p>\n<p>During data validation the alarm properties may suffer changes. These changes will be reported back to each changed property. See what changes can occurr at <a href=\"#save-method\">save</a> function documentation.</p>\n<p>Example usage:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"type\">Alarm</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarm</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Row\">Row</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">date</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Date:&quot;</span>\n <span class=\"name\">anchors</span>.verticalCenter: <span class=\"name\">parent</span>.<span class=\"name\">verticalCenter</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.TextField\">TextField</a></span> {\n <span class=\"name\">text</span>: <span class=\"name\">alarm</span>.<span class=\"name\">date</span>.<span class=\"name\">toString</span>()\n <span class=\"name\">onAccepted</span>: <span class=\"name\">alarm</span>.<span class=\"name\">date</span> <span class=\"operator\">=</span> new <span class=\"name\">Date</span>(<span class=\"name\">text</span>)\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Row\">Row</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">msg</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Message:&quot;</span>\n <span class=\"name\">anchors</span>.verticalCenter: <span class=\"name\">parent</span>.<span class=\"name\">verticalCenter</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.TextField\">TextField</a></span> {\n <span class=\"name\">text</span>: <span class=\"name\">alarm</span>.<span class=\"name\">message</span>\n <span class=\"name\">onAccepted</span>: <span class=\"name\">alarm</span>.<span class=\"name\">message</span> <span class=\"operator\">=</span> <span class=\"name\">text</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Save&quot;</span>\n <span class=\"name\">onClicked</span>: {\n <span class=\"name\">alarm</span>.<span class=\"name\">save</span>();\n <span class=\"keyword\">if</span> (<span class=\"name\">alarm</span>.<span class=\"name\">error</span> <span class=\"operator\">!=</span> <span class=\"name\">Alarm</span>.<span class=\"name\">NoError</span>)\n <span class=\"name\">print</span>(<span class=\"string\">&quot;Error saving alarm, code: &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">alarm</span>.<span class=\"name\">error</span>);\n }\n }\n }\n}</pre>\n<p>An alarm can be cancelled using <a href=\"#cancel-method\">cancel</a> function but only if the event has previously been stored in the alarm collection.</p>\n<p>The <a href=\"#reset-method\">reset</a> function clears the properties of the alarm bringing them to the default values. In this way the same alarm component can be used to save several alarms at the same time.</p>\n<!-- @@@Alarm -->\n<h2>Property Documentation</h2>\n<!-- $$$date -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"date-prop\"></a><span class=\"name\">date</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Date\">Date</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the date the alarm will be triggered. The default value is the current date and time the alarm object was created. Further <a href=\"#reset-method\">reset</a> calls will bring the value back to the time the <a href=\"#reset-method\">reset</a> was called.</p>\n</div></div><!-- @@@date -->\n<br/>\n<!-- $$$daysOfWeek -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"daysOfWeek-prop\"></a><span class=\"name\">daysOfWeek</span> : <span class=\"type\">DaysOfWeek</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the days of the week the alarm is scheduled. This property can have only one day set for one time alarms and multiple days for repeating alarms. The following flags can be set:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th colspan=\"3\" rowspan=\" 1\">Alarm.DayOfWeek enum:</th></tr>\n<tr class=\"qt-style\"><th >Type</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Monday</td><td >0x01</td><td >The alarm will kick on Mondays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Tuesday</td><td >0x02</td><td >The alarm will kick on Tuesdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Wednesday</td><td >0x04</td><td >The alarm will kick on Wednesdays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Thursday</td><td >0x08</td><td >The alarm will kick on Thursdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Friday</td><td >0x10</td><td >The alarm will kick on Fridays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Saturday</td><td >0x20</td><td >The alarm will kick on Saturdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Sunday</td><td >0x40</td><td >The alarm will kick on Sundays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.AutoDetect</td><td >0x80</td><td >The alarm day will be detected from the alarm date.</td></tr>\n</table>\n<p>The default value is Alarm.AutoDetect.</p>\n</div></div><!-- @@@daysOfWeek -->\n<br/>\n<!-- $$$enabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"enabled-prop\"></a><span class=\"name\">enabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies whether the alarm is enabled or not. Disable dalarms are not scheduled. The default value is true;</p>\n</div></div><!-- @@@enabled -->\n<br/>\n<!-- $$$error -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"error-prop\"></a><span class=\"name\">error</span> : <span class=\"type\">Error</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the error code occurred during the last performed operation.</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th >Error code</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >NoError</td><td >0</td><td >Successful operation completion.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InvalidDate</td><td >1</td><td >The date specified for the alarm was invalid.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >EarlyDate</td><td >2</td><td >The date specified for the alarm is an earlier date than the current one.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >NoDaysOfWeek</td><td >3</td><td >The <a href=\"#daysOfWeek-prop\">daysOfWeek</a> parameter of the alarm was not specified.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >OneTimeOnMoreDays</td><td >4</td><td >The one-time alarm was set to be kicked in several days.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InvalidEvent</td><td >5</td><td >The alarm event is invalid.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >AdaptationError</td><td >100</td><td >The error occurred in alarm adaptation layer. Adaptations may define additional behind this value.</td></tr>\n</table>\n</div></div><!-- @@@error -->\n<br/>\n<!-- $$$message -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"message-prop\"></a><span class=\"name\">message</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the message string which will be displayed when the alarm is triggered. The default value is the localized &quot;Alarm&quot; text.</p>\n</div></div><!-- @@@message -->\n<br/>\n<!-- $$$sound -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"sound-prop\"></a><span class=\"name\">sound</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the alarm's sound to be played when the alarm is triggered. An empty url will mean to play the default sound.</p>\n<p>The defaul tvalue is an empty url.</p>\n</div></div><!-- @@@sound -->\n<br/>\n<!-- $$$status -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"status-prop\"></a><span class=\"name\">status</span> : <span class=\"type\">Status</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the status of the last performed operation. It can take one of the following values:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th >Status code</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Ready</td><td >1</td><td >Specifies either that the Alarm object is ready to perform any operation or that the previous operation has been successfully completed.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InProgress</td><td >2</td><td >Specifies that there is an operation pending on Alarm object.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Fail</td><td >3</td><td >Specifies that the last alarm operation has failed. The failure code is set in <a href=\"#error-prop\">error</a> property.</td></tr>\n</table>\n<p>The notification signal has a parameter specifying the <i>operation</i> the status refers to. The operation can take the following values:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th >Operation code</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >NoOperation</td><td >There is no operation pending. This may be set when an error occured in the alarm adapters and the operation cannot be determined.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Saving</td><td >The status reported refers to an operation requested through <a href=\"#save-method\">save()</a>.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Canceling</td><td >The status reported refers to an operation requested through <a href=\"#cancel-method\">cancel()</a>.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Reseting</td><td >The status reported refers to an operation requested through <a href=\"#reset-method\">reset()</a>.</td></tr>\n</table>\n<p>For example an implementation which resets the alarm data whenever the save or cancel operations succeed would look as follows:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Alarm\">Alarm</a></span> {\n <span class=\"name\">onStatusChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">status</span> <span class=\"operator\">!==</span> <span class=\"name\">Alarm</span>.<span class=\"name\">Ready</span>)\n <span class=\"keyword\">return</span>;\n <span class=\"keyword\">if</span> ((<span class=\"name\">operation</span> <span class=\"operator\">&gt;</span> <span class=\"name\">Alarm</span>.<span class=\"name\">NoOperation</span>) <span class=\"operator\">&amp;&amp;</span> (<span class=\"name\">operation</span> <span class=\"operator\">&lt;</span> <span class=\"name\">Alarm</span>.<span class=\"name\">Reseting</span>)) {\n <span class=\"name\">reset</span>();\n }\n }\n}</pre>\n</div></div><!-- @@@status -->\n<br/>\n<!-- $$$type -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"type-prop\"></a><span class=\"name\">type</span> : <span class=\"type\">AlarmType</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the type of the alarm, which can have one of the following values:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th colspan=\"2\" rowspan=\" 1\">Alarm.AlarmType enum:</th></tr>\n<tr class=\"qt-style\"><th >Type</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.OneTime</td><td >The alarm occurs only once.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Repeating</td><td >The alarm is a repeating one, either daily, weekly on a given day or on selected days.</td></tr>\n</table>\n<p>The default value is Alarm.OneTime.</p>\n</div></div><!-- @@@type -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$cancel -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"cancel-method\"></a>Alarm::<span class=\"name\">cancel</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function removes the alarm from the collection. The function will fail for alarms which are not yet registered to the collection.</p>\n<p>The operation is asynchronous, and its status is reported through the <a href=\"#status-prop\">status</a> property. Further operations should wait till the previous operation is completed. The operation result is stored in the <a href=\"#error-prop\">error</a> property.</p>\n</div></div><!-- @@@cancel -->\n<br/>\n<!-- $$$reset -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"reset-method\"></a>Alarm::<span class=\"name\">reset</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function resets the alarm properties to its defaults. After this call the object can be used to create a new alarm event.</p>\n<p><b>Note</b>: do not call this function on alarm objects retrieved from <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.AlarmModel\">AlarmModel</a>, as calling it will result in the model being out of sync from the alarm database.</p>\n</div></div><!-- @@@reset -->\n<br/>\n<!-- $$$save -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"save-method\"></a>Alarm::<span class=\"name\">save</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Updates or adds an alarm to the alarm collection. The operation aligns properties according to the following rules:</p>\n<ul>\n<li>- the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> will be set to the alarm day if the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> was set to Alarm.AutoDetect.</li>\n<li>- if the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> is set to a day other than the one specified in the <a href=\"#date-prop\">date</a> field, the <a href=\"#date-prop\">date</a> will be moved ahead to match the day from the <a href=\"#daysOfWeek-prop\">daysOfWeek</a>.</li>\n</ul>\n<p>The function will fail if</p>\n<ul>\n<li>- the <a href=\"#date-prop\">date</a> property is invalid</li>\n<li>- for one time alarm, the <a href=\"#date-prop\">date</a> property falue is earlier than the current time</li>\n<li>- the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> property is set to multiple days for one time alarm</li>\n</ul>\n<p>The operation is asynchronous, and its status is reported through the <a href=\"#status-prop\">status</a> property. Further operations should wait till the previous operation is completed. The operation result is stored in the <a href=\"#error-prop\">error</a> property.</p>\n</div></div><!-- @@@save -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-alarm.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/207/", "name": "Alarm", "description": "Alarm component is a representation of an alarm event. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Alarm", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Alarm-brief -->\n<p>Alarm component is a representation of an alarm event. <a href=\"#details\">More...</a></p>\n<!-- @@@Alarm -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#date-prop\">date</a></b></b> : Date</li>\n<li class=\"fn\"><b><b><a href=\"#daysOfWeek-prop\">daysOfWeek</a></b></b> : DaysOfWeek</li>\n<li class=\"fn\"><b><b><a href=\"#enabled-prop\">enabled</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#error-prop\">error</a></b></b> : Error</li>\n<li class=\"fn\"><b><b><a href=\"#message-prop\">message</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#sound-prop\">sound</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#status-prop\">status</a></b></b> : Status</li>\n<li class=\"fn\"><b><b><a href=\"#type-prop\">type</a></b></b> : AlarmType</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#cancel-method\">cancel</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#reset-method\">reset</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#save-method\">save</a></b></b>()</li>\n</ul>\n<!-- $$$Alarm-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The Alarm element encapsulates alarm event data. Supports one time and repeating alarms, where repeating can be either daily or weekly on one or several selected days.</p>\n<p>The alarm data is validated upon <a href=\"#save-method\">save</a> operation, which can be used to save a new alarm or update existing alarm's properties.</p>\n<p>During data validation the alarm properties may suffer changes. These changes will be reported back to each changed property. See what changes can occurr at <a href=\"#save-method\">save</a> function documentation.</p>\n<p>Example usage:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">Rectangle</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"type\">Alarm</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarm</span>\n }\n <span class=\"type\">Column</span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\">Row</span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">date</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Date:&quot;</span>\n <span class=\"name\">anchors</span>.verticalCenter: <span class=\"name\">parent</span>.<span class=\"name\">verticalCenter</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.TextField/\">TextField</a></span> {\n <span class=\"name\">text</span>: <span class=\"name\">alarm</span>.<span class=\"name\">date</span>.<span class=\"name\">toString</span>()\n <span class=\"name\">onAccepted</span>: <span class=\"name\">alarm</span>.<span class=\"name\">date</span> <span class=\"operator\">=</span> new <span class=\"name\">Date</span>(<span class=\"name\">text</span>)\n }\n }\n <span class=\"type\">Row</span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">msg</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Message:&quot;</span>\n <span class=\"name\">anchors</span>.verticalCenter: <span class=\"name\">parent</span>.<span class=\"name\">verticalCenter</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.TextField/\">TextField</a></span> {\n <span class=\"name\">text</span>: <span class=\"name\">alarm</span>.<span class=\"name\">message</span>\n <span class=\"name\">onAccepted</span>: <span class=\"name\">alarm</span>.<span class=\"name\">message</span> <span class=\"operator\">=</span> <span class=\"name\">text</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Save&quot;</span>\n <span class=\"name\">onClicked</span>: {\n <span class=\"name\">alarm</span>.<span class=\"name\">save</span>();\n <span class=\"keyword\">if</span> (<span class=\"name\">alarm</span>.<span class=\"name\">error</span> <span class=\"operator\">!=</span> <span class=\"name\">Alarm</span>.<span class=\"name\">NoError</span>)\n <span class=\"name\">print</span>(<span class=\"string\">&quot;Error saving alarm, code: &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">alarm</span>.<span class=\"name\">error</span>);\n <span class=\"keyword\">else</span> <span class=\"name\">alarm</span>.<span class=\"name\">reset</span>();\n }\n }\n }\n}</pre>\n<p>An alarm can be cancelled using <a href=\"#cancel-method\">cancel</a> function but only if the event has previously been stored in the alarm collection.</p>\n<p>The <a href=\"#reset-method\">reset</a> function clears the properties of the alarm bringing them to the default values. In this way the same alarm component can be used to save several alarms at the same time.</p>\n<!-- @@@Alarm -->\n<h2>Property Documentation</h2>\n<!-- $$$date -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"date-prop\"></a><span class=\"name\">date</span> : <span class=\"type\">Date</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the date the alarm will be triggered. The default value is the current date and time the alarm object was created. Further <a href=\"#reset-method\">reset</a> calls will bring the value back to the time the <a href=\"#reset-method\">reset</a> was called.</p>\n</div></div><!-- @@@date -->\n<br/>\n<!-- $$$daysOfWeek -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"daysOfWeek-prop\"></a><span class=\"name\">daysOfWeek</span> : <span class=\"type\">DaysOfWeek</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the days of the week the alarm is scheduled. This property can have only one day set for one time alarms and multiple days for repeating alarms. The following flags can be set:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th colspan=\"3\" rowspan=\" 1\">Alarm.DayOfWeek enum:</th></tr>\n<tr class=\"qt-style\"><th >Type</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Monday</td><td >0x01</td><td >The alarm will kick on Mondays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Tuesday</td><td >0x02</td><td >The alarm will kick on Tuesdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Wednesday</td><td >0x04</td><td >The alarm will kick on Wednesdays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Thursday</td><td >0x08</td><td >The alarm will kick on Thursdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Friday</td><td >0x10</td><td >The alarm will kick on Fridays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Saturday</td><td >0x20</td><td >The alarm will kick on Saturdays.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.Sunday</td><td >0x40</td><td >The alarm will kick on Sundays.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.AutoDetect</td><td >0x80</td><td >The alarm day will be detected from the alarm date.</td></tr>\n</table>\n<p>The default value is Alarm.AutoDetect.</p>\n</div></div><!-- @@@daysOfWeek -->\n<br/>\n<!-- $$$enabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"enabled-prop\"></a><span class=\"name\">enabled</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies whether the alarm is enabled or not. Disable dalarms are not scheduled. The default value is true;</p>\n</div></div><!-- @@@enabled -->\n<br/>\n<!-- $$$error -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"error-prop\"></a><span class=\"name\">error</span> : <span class=\"type\">Error</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the error code occurred during the last performed operation.</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th >Error code</th><th >Value</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >NoError</td><td >0</td><td >Successful operation completion.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InvalidDate</td><td >1</td><td >The date specified for the alarm was invalid.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >EarlyDate</td><td >2</td><td >The date specified for the alarm is an earlier date than the current one.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >NoDaysOfWeek</td><td >3</td><td >The <a href=\"#daysOfWeek-prop\">daysOfWeek</a> parameter of the alarm was not specified.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >OneTimeOnMoreDays</td><td >4</td><td >The one-time alarm was set to be kicked in several days.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >InvalidEvent</td><td >5</td><td >The alarm event is invalid.</td></tr>\n<tr valign=\"top\" class=\"odd\"><td >AdaptationError</td><td >100</td><td >The error occurred in alarm adaptation layer. Adaptations may define additional behind this value.</td></tr>\n</table>\n</div></div><!-- @@@error -->\n<br/>\n<!-- $$$message -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"message-prop\"></a><span class=\"name\">message</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the message string which will be displayed when the alarm is triggered. The default value is the localized &quot;Alarm&quot; text.</p>\n</div></div><!-- @@@message -->\n<br/>\n<!-- $$$sound -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"sound-prop\"></a><span class=\"name\">sound</span> : <span class=\"type\">url</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the alarm's sound to be played when the alarm is triggered. An empty url will mean to play the default sound.</p>\n<p>The defaul tvalue is an empty url.</p>\n</div></div><!-- @@@sound -->\n<br/>\n<!-- $$$status -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"status-prop\"></a><span class=\"name\">status</span> : <span class=\"type\">Status</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the status of the last performed operation.</p>\n</div></div><!-- @@@status -->\n<br/>\n<!-- $$$type -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"type-prop\"></a><span class=\"name\">type</span> : <span class=\"type\">AlarmType</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the type of the alarm, which can have one of the following values:</p>\n<table class=\"generic\">\n <thead><tr class=\"qt-style\"><th colspan=\"2\" rowspan=\" 1\">Alarm.AlarmType enum:</th></tr>\n<tr class=\"qt-style\"><th >Type</th><th >Description</th></tr></thead>\n<tr valign=\"top\" class=\"odd\"><td >Alarm.OneTime</td><td >The alarm occurs only once.</td></tr>\n<tr valign=\"top\" class=\"even\"><td >Alarm.Repeating</td><td >The alarm is a repeating one, either daily, weekly on a given day or on selected days.</td></tr>\n</table>\n<p>The default value is Alarm.OneTime.</p>\n</div></div><!-- @@@type -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$cancel -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"cancel-method\"></a>Alarm::<span class=\"name\">cancel</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function removes the alarm from the collection. The function will fail for alarms which are not yet registered to the collection.</p>\n<p>The operation result is stored in the <a href=\"#error-prop\">error</a> property.</p>\n</div></div><!-- @@@cancel -->\n<br/>\n<!-- $$$reset -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"reset-method\"></a>Alarm::<span class=\"name\">reset</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function resets the alarm properties to its defaults. After this call the object can be used to create a new alarm event.</p>\n</div></div><!-- @@@reset -->\n<br/>\n<!-- $$$save -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"save-method\"></a>Alarm::<span class=\"name\">save</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Updates or adds an alarm to the alarm collection. The operation aligns properties according to the following rules:</p>\n<ul>\n<li>- the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> will be set to the alarm day if the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> was set to Alarm.AutoDetect.</li>\n<li>- if the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> is set to a day other than the one specified in the <a href=\"#date-prop\">date</a> field, the <a href=\"#date-prop\">date</a> will be moved ahead to match the day from the <a href=\"#daysOfWeek-prop\">daysOfWeek</a>.</li>\n</ul>\n<p>The function will fail if</p>\n<ul>\n<li>- the <a href=\"#date-prop\">date</a> property is invalid</li>\n<li>- for one time alarm, the <a href=\"#date-prop\">date</a> property falue is earlier than the current time</li>\n<li>- the <a href=\"#daysOfWeek-prop\">daysOfWeek</a> property is set to multiple days for one time alarm</li>\n</ul>\n<p>The operation result is stored in the <a href=\"#error-prop\">error</a> property.</p>\n</div></div><!-- @@@save -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/208/", "name": "AlarmModel", "description": "AlarmModel holds the list of alarms defined. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.AlarmModel", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$AlarmModel-brief -->\n<p>AlarmModel holds the list of alarms defined. <a href=\"#details\">More...</a></p>\n<!-- @@@AlarmModel -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#count-prop\">count</a></b></b> : int</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">Alarm <b><b><a href=\"#get-method\">get</a></b></b>(int <i>index</i>)</li>\n</ul>\n<!-- $$$AlarmModel-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The AlarmModel is a simple container of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Alarm/\">Alarm</a> definitions stored in the alarm collection. The data provided by the model are read only, adding, modifying or removing data is only possible through <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Alarm/\">Alarm</a> functions. Any modification on the alarms or any new alarm added to the collection will refresh all the model instances. This also means that the delegates visualizing the model elements will also be re-created.</p>\n<p>Example usage:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\nimport Ubuntu.Components.ListItems 0.1\n<span class=\"type\">ListView</span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span> {}\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">100</span>)\n <span class=\"name\">delegate</span>: <span class=\"name\">Subtitled</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">subText</span>: <span class=\"name\">Qt</span>.<span class=\"name\">formatDateTime</span>(<span class=\"name\">date</span>)\n }\n}</pre>\n<p>The model defines the same roles as the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Alarm/\">Alarm</a> properties. Note that the use of <i>enabled</i> role in delegates may be ambiguous. Therefore the model defines the additional role called <i>model</i>, which represents the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Alarm/\">Alarm</a> object from the index the delegate is showing the data, so the <i>enabled</i> role can then be accessed by simply dereferencing the model i.e&#x2e; model.enabled.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">ListView</span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{}\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n }\n }\n}</pre>\n<p>The number of alarm events can be obtained from the <a href=\"#count-prop\">count</a> property. To get a specific alarm event data from the model, use the <a href=\"#get-method\">get()</a> function.</p>\n<p>As the <a href=\"#get-method\">get()</a> function returns the alarm object from the given index. Combined with the alarm functions the alarms can be updated in place.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">ListView</span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarmModel</span>\n }\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n <span class=\"name\">onCheckedChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">checked</span> <span class=\"operator\">!=</span> <span class=\"name\">model</span>.<span class=\"name\">enabled</span>) {\n var <span class=\"name\">data</span> = <span class=\"name\">alarmModel</span>.<span class=\"name\">get</span>(<span class=\"name\">index</span>);\n <span class=\"name\">data</span>.<span class=\"name\">enabled</span> <span class=\"operator\">=</span> <span class=\"name\">checked</span>;\n <span class=\"name\">data</span>.<span class=\"name\">save</span>();\n }\n }\n }\n }\n}</pre>\n<p>In this kind of &quot;in place&quot; updates using the <i>model</i> role would give the same result:</p>\n<pre class=\"qml\"><span class=\"type\">ListView</span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarmModel</span>\n }\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n <span class=\"name\">onCheckedChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">checked</span> <span class=\"operator\">!=</span> <span class=\"name\">model</span>.<span class=\"name\">enabled</span>) {\n <span class=\"name\">model</span>.<span class=\"name\">enabled</span> <span class=\"operator\">=</span> <span class=\"name\">checked</span>;\n <span class=\"name\">model</span>.<span class=\"name\">save</span>();\n }\n }\n }\n }\n}</pre>\n<!-- @@@AlarmModel -->\n<h2>Property Documentation</h2>\n<!-- $$$count -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"count-prop\"></a><span class=\"name\">count</span> : <span class=\"type\">int</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The number of data entries in the model.</p>\n</div></div><!-- @@@count -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$get -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"get-method\"></a><span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Alarm/\">Alarm</a></span> AlarmModel::<span class=\"name\">get</span>(<span class=\"type\">int</span><i> index</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns the copy of the alarm event at <i>index</i> in the model. This allows the alarm data to be modified and updated either through normal component binding or in Javascript functions.</p>\n<pre class=\"cpp\">Component<span class=\"operator\">.</span>onCompleted: {\n var alarm <span class=\"operator\">=</span> alarmModel<span class=\"operator\">.</span>get(<span class=\"number\">0</span>);\n alarm<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n alarm<span class=\"operator\">.</span>save();\n}</pre>\n<p>This Javascript code returns the alarm properties from the first index of the model, updates its message and updates the alarm. Note that the alarm must be saved in order to have the changes visible. The follwoing code will not update the alarm in the model/collection:</p>\n<pre class=\"cpp\">Component<span class=\"operator\">.</span>onCompleted: {\n alarmModel<span class=\"operator\">.</span>get(<span class=\"number\">0</span>)<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n alarm<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n}</pre>\n<p><b>Warning</b>: The returned object is not guarantied to remain valid, it should not be used in property bindings.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Alarm/\">Alarm</a>.</p>\n</div></div><!-- @@@get -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1416/", "name": "AlarmModel", "description": "AlarmModel holds the list of alarms defined. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.AlarmModel", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$AlarmModel-brief -->\n<p>AlarmModel holds the list of alarms defined. <a href=\"#details\">More...</a></p>\n<!-- @@@AlarmModel -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#count-prop\">count</a></b></b> : int</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">Alarm <b><b><a href=\"#get-method\">get</a></b></b>(int <i>index</i>)</li>\n</ul>\n<!-- $$$AlarmModel-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The AlarmModel is a simple container of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Alarm\">Alarm</a> definitions stored in the alarm collection. The data provided by the model are read only, adding, modifying or removing data is only possible through <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Alarm\">Alarm</a> functions. Any modification on the alarms or any new alarm added to the collection will refresh all the model instances. This also means that the delegates visualizing the model elements will also be re-created.</p>\n<p>Example usage:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\nimport Ubuntu.Components.ListItems 1.0\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span> {}\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">100</span>)\n <span class=\"name\">delegate</span>: <span class=\"name\">Subtitled</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">subText</span>: <span class=\"name\">Qt</span>.<span class=\"name\">formatDateTime</span>(<span class=\"name\">date</span>)\n }\n}</pre>\n<p>The model defines the same roles as the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Alarm\">Alarm</a> properties. Note that the use of <i>enabled</i> role in delegates may be ambiguous. Therefore the model defines the additional role called <i>model</i>, which represents the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Alarm\">Alarm</a> object from the index the delegate is showing the data, so the <i>enabled</i> role can then be accessed by simply dereferencing the model i.e&#x2e; model.enabled.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{}\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n }\n }\n}</pre>\n<p>The number of alarm events can be obtained from the <a href=\"#count-prop\">count</a> property. To get a specific alarm event data from the model, use the <a href=\"#get-method\">get()</a> function.</p>\n<p>As the <a href=\"#get-method\">get()</a> function returns the alarm object from the given index. Combined with the alarm functions the alarms can be updated in place.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarmModel</span>\n }\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n <span class=\"name\">onCheckedChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">checked</span> <span class=\"operator\">!=</span> <span class=\"name\">model</span>.<span class=\"name\">enabled</span>) {\n var <span class=\"name\">data</span> = <span class=\"name\">alarmModel</span>.<span class=\"name\">get</span>(<span class=\"name\">index</span>);\n <span class=\"name\">data</span>.<span class=\"name\">enabled</span> <span class=\"operator\">=</span> <span class=\"name\">checked</span>;\n <span class=\"name\">data</span>.<span class=\"name\">save</span>();\n }\n }\n }\n }\n}</pre>\n<p>In this kind of &quot;in place&quot; updates using the <i>model</i> role would give the same result:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarmModel</span>\n }\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n <span class=\"name\">onCheckedChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">checked</span> <span class=\"operator\">!=</span> <span class=\"name\">model</span>.<span class=\"name\">enabled</span>) {\n <span class=\"name\">model</span>.<span class=\"name\">enabled</span> <span class=\"operator\">=</span> <span class=\"name\">checked</span>;\n <span class=\"name\">model</span>.<span class=\"name\">save</span>();\n }\n }\n }\n }\n}</pre>\n<!-- @@@AlarmModel -->\n<h2>Property Documentation</h2>\n<!-- $$$count -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"count-prop\"></a><span class=\"name\">count</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The number of data entries in the model.</p>\n</div></div><!-- @@@count -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$get -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"get-method\"></a><span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Alarm\">Alarm</a></span> <span class=\"name\">get</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span><i> index</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns the copy of the alarm event at <i>index</i> in the model. This allows the alarm data to be modified and updated either through normal component binding or in Javascript functions.</p>\n<pre class=\"cpp\">Component<span class=\"operator\">.</span>onCompleted: {\n var alarm <span class=\"operator\">=</span> alarmModel<span class=\"operator\">.</span>get(<span class=\"number\">0</span>);\n alarm<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n alarm<span class=\"operator\">.</span>save();\n}</pre>\n<p>This Javascript code returns the alarm properties from the first index of the model, updates its message and updates the alarm. Note that the alarm must be saved in order to have the changes visible. The follwoing code will not update the alarm in the model/collection:</p>\n<pre class=\"cpp\">Component<span class=\"operator\">.</span>onCompleted: {\n alarmModel<span class=\"operator\">.</span>get(<span class=\"number\">0</span>)<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n alarm<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n}</pre>\n<p><b>Warning</b>: The returned object is not guarantied to remain valid, it should not be used in property bindings.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Alarm\">Alarm</a>.</p>\n</div></div><!-- @@@get -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-alarmmodel.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/521/", "name": "AlarmModel", "description": "AlarmModel holds the list of alarms defined. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.AlarmModel", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$AlarmModel-brief -->\n<p>AlarmModel holds the list of alarms defined. <a href=\"#details\">More...</a></p>\n<!-- @@@AlarmModel -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#count-prop\">count</a></b></b> : int</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">Alarm <b><b><a href=\"#get-method\">get</a></b></b>(int <i>index</i>)</li>\n</ul>\n<!-- $$$AlarmModel-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The AlarmModel is a simple container of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Alarm\">Alarm</a> definitions stored in the alarm collection. The data provided by the model are read only, adding, modifying or removing data is only possible through <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Alarm\">Alarm</a> functions. Any modification on the alarms or any new alarm added to the collection will refresh all the model instances. This also means that the delegates visualizing the model elements will also be re-created.</p>\n<p>Example usage:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\nimport Ubuntu.Components.ListItems 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span> {}\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">100</span>)\n <span class=\"name\">delegate</span>: <span class=\"name\">Subtitled</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">subText</span>: <span class=\"name\">Qt</span>.<span class=\"name\">formatDateTime</span>(<span class=\"name\">date</span>)\n }\n}</pre>\n<p>The model defines the same roles as the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Alarm\">Alarm</a> properties. Note that the use of <i>enabled</i> role in delegates may be ambiguous. Therefore the model defines the additional role called <i>model</i>, which represents the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Alarm\">Alarm</a> object from the index the delegate is showing the data, so the <i>enabled</i> role can then be accessed by simply dereferencing the model i.e&#x2e; model.enabled.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{}\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n }\n }\n}</pre>\n<p>The number of alarm events can be obtained from the <a href=\"#count-prop\">count</a> property. To get a specific alarm event data from the model, use the <a href=\"#get-method\">get()</a> function.</p>\n<p>As the <a href=\"#get-method\">get()</a> function returns the alarm object from the given index. Combined with the alarm functions the alarms can be updated in place.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarmModel</span>\n }\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n <span class=\"name\">onCheckedChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">checked</span> <span class=\"operator\">!=</span> <span class=\"name\">model</span>.<span class=\"name\">enabled</span>) {\n var <span class=\"name\">data</span> = <span class=\"name\">alarmModel</span>.<span class=\"name\">get</span>(<span class=\"name\">index</span>);\n <span class=\"name\">data</span>.<span class=\"name\">enabled</span> <span class=\"operator\">=</span> <span class=\"name\">checked</span>;\n <span class=\"name\">data</span>.<span class=\"name\">save</span>();\n }\n }\n }\n }\n}</pre>\n<p>In this kind of &quot;in place&quot; updates using the <i>model</i> role would give the same result:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"name\">AlarmModel</span>{\n <span class=\"name\">id</span>: <span class=\"name\">alarmModel</span>\n }\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"name\">message</span>\n <span class=\"name\">control</span>: <span class=\"name\">Switch</span> {\n <span class=\"name\">checked</span>: <span class=\"name\">model</span>.<span class=\"name\">enabled</span>\n <span class=\"name\">onCheckedChanged</span>: {\n <span class=\"keyword\">if</span> (<span class=\"name\">checked</span> <span class=\"operator\">!=</span> <span class=\"name\">model</span>.<span class=\"name\">enabled</span>) {\n <span class=\"name\">model</span>.<span class=\"name\">enabled</span> <span class=\"operator\">=</span> <span class=\"name\">checked</span>;\n <span class=\"name\">model</span>.<span class=\"name\">save</span>();\n }\n }\n }\n }\n}</pre>\n<!-- @@@AlarmModel -->\n<h2>Property Documentation</h2>\n<!-- $$$count -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"count-prop\"></a><span class=\"name\">count</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The number of data entries in the model.</p>\n</div></div><!-- @@@count -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$get -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"get-method\"></a><span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Alarm\">Alarm</a></span> AlarmModel::<span class=\"name\">get</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span><i> index</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns the copy of the alarm event at <i>index</i> in the model. This allows the alarm data to be modified and updated either through normal component binding or in Javascript functions.</p>\n<pre class=\"cpp\">Component<span class=\"operator\">.</span>onCompleted: {\n var alarm <span class=\"operator\">=</span> alarmModel<span class=\"operator\">.</span>get(<span class=\"number\">0</span>);\n alarm<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n alarm<span class=\"operator\">.</span>save();\n}</pre>\n<p>This Javascript code returns the alarm properties from the first index of the model, updates its message and updates the alarm. Note that the alarm must be saved in order to have the changes visible. The follwoing code will not update the alarm in the model/collection:</p>\n<pre class=\"cpp\">Component<span class=\"operator\">.</span>onCompleted: {\n alarmModel<span class=\"operator\">.</span>get(<span class=\"number\">0</span>)<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n alarm<span class=\"operator\">.</span>message <span class=\"operator\">+</span><span class=\"operator\">=</span> <span class=\"string\">&quot; updated&quot;</span>;\n}</pre>\n<p><b>Warning</b>: The returned object is not guarantied to remain valid, it should not be used in property bindings.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Alarm\">Alarm</a>.</p>\n</div></div><!-- @@@get -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-alarmmodel.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/209/", "name": "Argument", "description": "The Argument class specifies what type a given command line parameter should be. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Argument", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Argument-brief -->\n<p>The Argument class specifies what type a given command line parameter should be. <a href=\"#details\">More...</a></p>\n<!-- @@@Argument -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#help-prop\">help</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#name-prop\">name</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#required-prop\">required</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#valueNames-prop\">valueNames</a></b></b> : list&lt;string&gt;</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">string <b><b><a href=\"#at-method\">at</a></b></b>(int <i>i</i>)</li>\n</ul>\n<!-- $$$Argument-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>Important</b>: Argument is not used on its own but must be a child of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Arguments/\">Arguments</a>.</p>\n<p>An Argument is defined by its <a href=\"#name-prop\">name</a> and <a href=\"#valueNames-prop\">valueNames</a> properties which correspond to a command line parameter (e.g&#x2e; <i>--target</i>) and the values passed to it (e.g&#x2e; <i>--target=http://myaddress</i>).</p>\n<p>For example, the following code allows to retrieve parameters on the command line of the form <i>--target=URL</i>:</p>\n<pre class=\"qml\"><span class=\"type\">Argument</span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;target&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;address of the resource to retrieve&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">true</span>\n <span class=\"name\">valueNames</span>: [<span class=\"string\">&quot;URL&quot;</span>]\n}</pre>\n<p>To retrieve a value passed to the parameter knowing its position, use the <a href=\"#at-method\">at</a> method.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Arguments/\">Arguments</a>.</p>\n<!-- @@@Argument -->\n<h2>Property Documentation</h2>\n<!-- $$$help -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"help-prop\"></a><span class=\"name\">help</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Help displayed when launching the application with --usage.</p>\n</div></div><!-- @@@help -->\n<br/>\n<!-- $$$name -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"name-prop\"></a><span class=\"name\">name</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Name identifying the command line argument.</p>\n<p>For example 'target' corrsesponds to the <i>'--target'</i> command line argument.</p>\n</div></div><!-- @@@name -->\n<br/>\n<!-- $$$required -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"required-prop\"></a><span class=\"name\">required</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether or not this argument needs to be passed on the command line when launching the application.</p>\n</div></div><!-- @@@required -->\n<br/>\n<!-- $$$valueNames -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"valueNames-prop\"></a><span class=\"name\">valueNames</span> : <span class=\"type\">list</span>&lt;<span class=\"type\">string</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Names given to the values of this argument. They are used when displaying the expected command line arguments of the application.</p>\n<p>Typically all capital letters (e.g&#x2e; URL).</p>\n</div></div><!-- @@@valueNames -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$at -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"at-method\"></a><span class=\"type\">string</span> Argument::<span class=\"name\">at</span>(<span class=\"type\">int</span><i> i</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns the <i>i</i>th value of the argument. Values are counted from 0.</p>\n</div></div><!-- @@@at -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/523/", "name": "Argument", "description": "The Argument class specifies what type a given command line parameter should be. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Argument", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Argument-brief -->\n<p>The Argument class specifies what type a given command line parameter should be. <a href=\"#details\">More...</a></p>\n<!-- @@@Argument -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#help-prop\">help</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#name-prop\">name</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#required-prop\">required</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#valueNames-prop\">valueNames</a></b></b> : list&lt;string&gt;</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">string <b><b><a href=\"#at-method\">at</a></b></b>(int <i>i</i>)</li>\n</ul>\n<!-- $$$Argument-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>Important</b>: Argument is not used on its own but must be a child of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Arguments\">Arguments</a>.</p>\n<p>An Argument is defined by its <a href=\"#name-prop\">name</a> and <a href=\"#valueNames-prop\">valueNames</a> properties which correspond to a command line parameter (e.g&#x2e; <i>--target</i>) and the values passed to it (e.g&#x2e; <i>--target=http://myaddress</i>).</p>\n<p>For example, the following code allows to retrieve parameters on the command line of the form <i>--target=URL</i>:</p>\n<pre class=\"qml\"><span class=\"type\">Argument</span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;target&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;address of the resource to retrieve&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">true</span>\n <span class=\"name\">valueNames</span>: [<span class=\"string\">&quot;URL&quot;</span>]\n}</pre>\n<p>To retrieve a value passed to the parameter knowing its position, use the <a href=\"#at-method\">at</a> method.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Arguments\">Arguments</a>.</p>\n<!-- @@@Argument -->\n<h2>Property Documentation</h2>\n<!-- $$$help -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"help-prop\"></a><span class=\"name\">help</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Help displayed when launching the application with --usage.</p>\n</div></div><!-- @@@help -->\n<br/>\n<!-- $$$name -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"name-prop\"></a><span class=\"name\">name</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Name identifying the command line argument.</p>\n<p>For example 'target' corrsesponds to the <i>'--target'</i> command line argument.</p>\n</div></div><!-- @@@name -->\n<br/>\n<!-- $$$required -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"required-prop\"></a><span class=\"name\">required</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether or not this argument needs to be passed on the command line when launching the application.</p>\n</div></div><!-- @@@required -->\n<br/>\n<!-- $$$valueNames -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"valueNames-prop\"></a><span class=\"name\">valueNames</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Names given to the values of this argument. They are used when displaying the expected command line arguments of the application.</p>\n<p>Typically all capital letters (e.g&#x2e; URL).</p>\n</div></div><!-- @@@valueNames -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$at -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"at-method\"></a><span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span> Argument::<span class=\"name\">at</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span><i> i</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns the <i>i</i>th value of the argument. Values are counted from 0.</p>\n</div></div><!-- @@@at -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-argument.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1418/", "name": "Argument", "description": "The Argument class specifies what type a given command line parameter should be. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Argument", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Argument-brief -->\n<p>The Argument class specifies what type a given command line parameter should be. <a href=\"#details\">More...</a></p>\n<!-- @@@Argument -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#help-prop\">help</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#name-prop\">name</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#required-prop\">required</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#valueNames-prop\">valueNames</a></b></b> : list&lt;string&gt;</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">string <b><b><a href=\"#at-method\">at</a></b></b>(int <i>i</i>)</li>\n</ul>\n<!-- $$$Argument-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>Important</b>: Argument is not used on its own but must be a child of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Arguments\">Arguments</a>.</p>\n<p>An Argument is defined by its <a href=\"#name-prop\">name</a> and <a href=\"#valueNames-prop\">valueNames</a> properties which correspond to a command line parameter (e.g&#x2e; <i>--target</i>) and the values passed to it (e.g&#x2e; <i>--target=http://myaddress</i>).</p>\n<p>For example, the following code allows to retrieve parameters on the command line of the form <i>--target=URL</i>:</p>\n<pre class=\"qml\"><span class=\"type\">Argument</span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;target&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;address of the resource to retrieve&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">true</span>\n <span class=\"name\">valueNames</span>: [<span class=\"string\">&quot;URL&quot;</span>]\n}</pre>\n<p>To retrieve a value passed to the parameter knowing its position, use the <a href=\"#at-method\">at</a> method.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Arguments\">Arguments</a>.</p>\n<!-- @@@Argument -->\n<h2>Property Documentation</h2>\n<!-- $$$help -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"help-prop\"></a><span class=\"name\">help</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Help displayed when launching the application with --usage.</p>\n</div></div><!-- @@@help -->\n<br/>\n<!-- $$$name -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"name-prop\"></a><span class=\"name\">name</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Name identifying the command line argument.</p>\n<p>For example 'target' corrsesponds to the <i>'--target'</i> command line argument.</p>\n</div></div><!-- @@@name -->\n<br/>\n<!-- $$$required -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"required-prop\"></a><span class=\"name\">required</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether or not this argument needs to be passed on the command line when launching the application.</p>\n</div></div><!-- @@@required -->\n<br/>\n<!-- $$$valueNames -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"valueNames-prop\"></a><span class=\"name\">valueNames</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Names given to the values of this argument. They are used when displaying the expected command line arguments of the application.</p>\n<p>Typically all capital letters (e.g&#x2e; URL).</p>\n</div></div><!-- @@@valueNames -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$at -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"at-method\"></a><span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span> <span class=\"name\">at</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span><i> i</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns the <i>i</i>th value of the argument. Values are counted from 0.</p>\n</div></div><!-- @@@at -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-argument.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/210/", "name": "Arguments", "description": "The Arguments class provides a way to declare what command line parameters are expected by the application. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Arguments", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Arguments-brief -->\n<p>The Arguments class provides a way to declare what command line parameters are expected by the application. <a href=\"#details\">More...</a></p>\n<!-- @@@Arguments -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#arguments-prop\">arguments</a></b></b> : list&lt;Argument&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#defaultArgument-prop\">defaultArgument</a></b></b> : Argument</li>\n<li class=\"fn\"><b><b><a href=\"#error-prop\">error</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#errorMessage-prop\">errorMessage</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#values-prop\">values</a></b></b> : Object</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">void <b><b><a href=\"#printUsage-method\">printUsage</a></b></b>()</li>\n<li class=\"fn\">void <b><b><a href=\"#quitWithError-method\">quitWithError</a></b></b>(string <i>errorMessage</i>)</li>\n</ul>\n<!-- $$$Arguments-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Example of use:</p>\n<pre class=\"qml\"><span class=\"type\">Arguments</span> {\n <span class=\"name\">id</span>: <span class=\"name\">args</span>\n <span class=\"name\">defaultArgument</span>.help: <span class=\"string\">&quot;Expects URL of the media to play.&quot;</span>\n <span class=\"name\">defaultArgument</span>.valueNames: [<span class=\"string\">&quot;URL&quot;</span>]\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Argument/\">Argument</a></span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;fullscreen&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;whether or not the media will be played fullscreen&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">false</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Argument/\">Argument</a></span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;volume&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;level to which to set the volume&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">false</span>\n <span class=\"name\">valueNames</span>: [<span class=\"string\">&quot;VOLUME_LEVEL&quot;</span>]\n }\n}</pre>\n<p>The code above ensures that at least one argument is passed on the command line which will then be available in QML via the <a href=\"#defaultArgument-prop\">defaultArgument</a> property. Optionally two other arguments can be passed:</p>\n<p><i>--fullscreen</i> that will be exposed as a boolean property: <a href=\"#values-prop\">values</a>.fullscreen</p>\n<p><i>--volume</i> that will be exposed as a string property: <a href=\"#values-prop\">values</a>.volume</p>\n<pre class=\"qml\"><span class=\"type\">Item</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;volume = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">values</span>.<span class=\"name\">volume</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;fullscreen = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">values</span>.<span class=\"name\">fullscreen</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;URL = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">defaultArgument</span>.<span class=\"name\">at</span>(<span class=\"number\">0</span>)\n }\n}</pre>\n<p>If the application is launched with the incorrect arguments or with the <i>--usage</i> argument an help will be outputted on the command line and the application will exit:</p>\n<pre class=\"cpp\">Usage: application <span class=\"operator\">[</span><span class=\"operator\">-</span><span class=\"operator\">-</span>fullscreen<span class=\"operator\">]</span> <span class=\"operator\">[</span><span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span>VOLUME_LEVEL<span class=\"operator\">]</span> URL\nOptions:\n<span class=\"operator\">-</span><span class=\"operator\">-</span>fullscreen whether <span class=\"keyword\">or</span> <span class=\"keyword\">not</span> the media will be played fullscreen\n<span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span>VOLUME_LEVE level to which to set the volume\nExpects URL of the media to play<span class=\"operator\">.</span></pre>\n<p><b>See also </b><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Argument/\">Argument</a>.</p>\n<!-- @@@Arguments -->\n<h2>Property Documentation</h2>\n<!-- $$$arguments -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"arguments-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"qmldefault\">default</span><span class=\"name\">arguments</span> : <span class=\"type\">list</span>&lt;<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Argument/\">Argument</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>List of command line <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Argument/\">arguments</a> that are expected by the application.</p>\n<p>See detailed description above for an example on how to use it.</p>\n</div></div><!-- @@@arguments -->\n<br/>\n<!-- $$$defaultArgument -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"defaultArgument-prop\"></a><span class=\"name\">defaultArgument</span> : <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Argument/\">Argument</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The default argument corresponds to the values passed on the command line without any name.</p>\n<p>For example in:</p>\n<pre class=\"cpp\"><span class=\"operator\">.</span><span class=\"operator\">/</span>application <span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span><span class=\"number\">42</span> http:<span class=\"comment\">//myaddress</span></pre>\n<p><i>http://myaddress</i> is the first value of the default argument.</p>\n</div></div><!-- @@@defaultArgument -->\n<br/>\n<!-- $$$error -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"error-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">error</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether or not the command line arguments passed to the application correspond to the expected arguments.</p>\n<p>Also set when calling <a href=\"#quitWithError-method\">quitWithError</a></p>\n</div></div><!-- @@@error -->\n<br/>\n<!-- $$$errorMessage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"errorMessage-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">errorMessage</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Error message describing how the command line arguments passed to the application failed to correspond to the expected arguments.</p>\n<p>Also set when calling <a href=\"#quitWithError-method\">quitWithError</a></p>\n</div></div><!-- @@@errorMessage -->\n<br/>\n<!-- $$$values -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"values-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">values</span> : <span class=\"type\">Object</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Object of which properties have the values of the command line arguments.</p>\n</div></div><!-- @@@values -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$printUsage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"printUsage-method\"></a><span class=\"type\">void</span> Arguments::<span class=\"name\">printUsage</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Outputs help to the console on how to pass arguments to the application.</p>\n</div></div><!-- @@@printUsage -->\n<br/>\n<!-- $$$quitWithError -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"quitWithError-method\"></a><span class=\"type\">void</span> Arguments::<span class=\"name\">quitWithError</span>(<span class=\"type\">string</span><i> errorMessage</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Exits the application outputting <i>errorMessage</i> to the console.</p>\n</div></div><!-- @@@quitWithError -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1419/", "name": "Arguments", "description": "The Arguments class provides a way to declare what command line parameters are expected by the application. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Arguments", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Arguments-brief -->\n<p>The Arguments class provides a way to declare what command line parameters are expected by the application. <a href=\"#details\">More...</a></p>\n<!-- @@@Arguments -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#arguments-prop\">arguments</a></b></b> : list&lt;Argument&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#defaultArgument-prop\">defaultArgument</a></b></b> : Argument</li>\n<li class=\"fn\"><b><b><a href=\"#error-prop\">error</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#errorMessage-prop\">errorMessage</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#values-prop\">values</a></b></b> : Object</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">void <b><b><a href=\"#printUsage-method\">printUsage</a></b></b>()</li>\n<li class=\"fn\">void <b><b><a href=\"#quitWithError-method\">quitWithError</a></b></b>(string <i>errorMessage</i>)</li>\n</ul>\n<!-- $$$Arguments-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Example of use:</p>\n<pre class=\"qml\"><span class=\"type\">Arguments</span> {\n <span class=\"name\">id</span>: <span class=\"name\">args</span>\n <span class=\"name\">defaultArgument</span>.help: <span class=\"string\">&quot;Expects URL of the media to play.&quot;</span>\n <span class=\"name\">defaultArgument</span>.valueNames: [<span class=\"string\">&quot;URL&quot;</span>]\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Argument\">Argument</a></span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;fullscreen&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;whether or not the media will be played fullscreen&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">false</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Argument\">Argument</a></span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;volume&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;level to which to set the volume&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">false</span>\n <span class=\"name\">valueNames</span>: [<span class=\"string\">&quot;VOLUME_LEVEL&quot;</span>]\n }\n}</pre>\n<p>The code above ensures that at least one argument is passed on the command line which will then be available in QML via the <a href=\"#defaultArgument-prop\">defaultArgument</a> property. Optionally two other arguments can be passed:</p>\n<p><i>--fullscreen</i> that will be exposed as a boolean property: <a href=\"#values-prop\">values</a>.fullscreen</p>\n<p><i>--volume</i> that will be exposed as a string property: <a href=\"#values-prop\">values</a>.volume</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;volume = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">values</span>.<span class=\"name\">volume</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;fullscreen = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">values</span>.<span class=\"name\">fullscreen</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;URL = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">defaultArgument</span>.<span class=\"name\">at</span>(<span class=\"number\">0</span>)\n }\n}</pre>\n<p>If the application is launched with the incorrect arguments or with the <i>--usage</i> argument an help will be outputted on the command line and the application will exit:</p>\n<pre class=\"cpp\">Usage: application <span class=\"operator\">[</span><span class=\"operator\">-</span><span class=\"operator\">-</span>fullscreen<span class=\"operator\">]</span> <span class=\"operator\">[</span><span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span>VOLUME_LEVEL<span class=\"operator\">]</span> URL\nOptions:\n<span class=\"operator\">-</span><span class=\"operator\">-</span>fullscreen whether <span class=\"keyword\">or</span> <span class=\"keyword\">not</span> the media will be played fullscreen\n<span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span>VOLUME_LEVE level to which to set the volume\nExpects URL of the media to play<span class=\"operator\">.</span></pre>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Argument\">Argument</a>.</p>\n<!-- @@@Arguments -->\n<h2>Property Documentation</h2>\n<!-- $$$arguments -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"arguments-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"qmldefault\">default</span><span class=\"name\">arguments</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\">Argument</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>List of command line arguments that are expected by the application.</p>\n<p>See detailed description above for an example on how to use it.</p>\n</div></div><!-- @@@arguments -->\n<br/>\n<!-- $$$defaultArgument -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"defaultArgument-prop\"></a><span class=\"name\">defaultArgument</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Argument\">Argument</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The default argument corresponds to the values passed on the command line without any name.</p>\n<p>For example in:</p>\n<pre class=\"cpp\"><span class=\"operator\">.</span><span class=\"operator\">/</span>application <span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span><span class=\"number\">42</span> http:<span class=\"comment\">//myaddress</span></pre>\n<p><i>http://myaddress</i> is the first value of the default argument.</p>\n</div></div><!-- @@@defaultArgument -->\n<br/>\n<!-- $$$error -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"error-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">error</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether or not the command line arguments passed to the application correspond to the expected arguments.</p>\n<p>Also set when calling <a href=\"#quitWithError-method\">quitWithError</a></p>\n</div></div><!-- @@@error -->\n<br/>\n<!-- $$$errorMessage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"errorMessage-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">errorMessage</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Error message describing how the command line arguments passed to the application failed to correspond to the expected arguments.</p>\n<p>Also set when calling <a href=\"#quitWithError-method\">quitWithError</a></p>\n</div></div><!-- @@@errorMessage -->\n<br/>\n<!-- $$$values -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"values-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">values</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Object\">Object</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Object of which properties have the values of the command line arguments.</p>\n</div></div><!-- @@@values -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$printUsage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"printUsage-method\"></a><span class=\"type\">void</span> <span class=\"name\">printUsage</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Outputs help to the console on how to pass arguments to the application.</p>\n</div></div><!-- @@@printUsage -->\n<br/>\n<!-- $$$quitWithError -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"quitWithError-method\"></a><span class=\"type\">void</span> <span class=\"name\">quitWithError</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span><i> errorMessage</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Exits the application outputting <i>errorMessage</i> to the console.</p>\n</div></div><!-- @@@quitWithError -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-arguments.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/524/", "name": "Arguments", "description": "The Arguments class provides a way to declare what command line parameters are expected by the application. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Arguments", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Arguments-brief -->\n<p>The Arguments class provides a way to declare what command line parameters are expected by the application. <a href=\"#details\">More...</a></p>\n<!-- @@@Arguments -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#arguments-prop\">arguments</a></b></b> : list&lt;Argument&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#defaultArgument-prop\">defaultArgument</a></b></b> : Argument</li>\n<li class=\"fn\"><b><b><a href=\"#error-prop\">error</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#errorMessage-prop\">errorMessage</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#values-prop\">values</a></b></b> : Object</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">void <b><b><a href=\"#printUsage-method\">printUsage</a></b></b>()</li>\n<li class=\"fn\">void <b><b><a href=\"#quitWithError-method\">quitWithError</a></b></b>(string <i>errorMessage</i>)</li>\n</ul>\n<!-- $$$Arguments-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Example of use:</p>\n<pre class=\"qml\"><span class=\"type\">Arguments</span> {\n <span class=\"name\">id</span>: <span class=\"name\">args</span>\n <span class=\"name\">defaultArgument</span>.help: <span class=\"string\">&quot;Expects URL of the media to play.&quot;</span>\n <span class=\"name\">defaultArgument</span>.valueNames: [<span class=\"string\">&quot;URL&quot;</span>]\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Argument\">Argument</a></span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;fullscreen&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;whether or not the media will be played fullscreen&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">false</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Argument\">Argument</a></span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;volume&quot;</span>\n <span class=\"name\">help</span>: <span class=\"string\">&quot;level to which to set the volume&quot;</span>\n <span class=\"name\">required</span>: <span class=\"number\">false</span>\n <span class=\"name\">valueNames</span>: [<span class=\"string\">&quot;VOLUME_LEVEL&quot;</span>]\n }\n}</pre>\n<p>The code above ensures that at least one argument is passed on the command line which will then be available in QML via the <a href=\"#defaultArgument-prop\">defaultArgument</a> property. Optionally two other arguments can be passed:</p>\n<p><i>--fullscreen</i> that will be exposed as a boolean property: <a href=\"#values-prop\">values</a>.fullscreen</p>\n<p><i>--volume</i> that will be exposed as a string property: <a href=\"#values-prop\">values</a>.volume</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;volume = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">values</span>.<span class=\"name\">volume</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;fullscreen = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">values</span>.<span class=\"name\">fullscreen</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;URL = &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">args</span>.<span class=\"name\">defaultArgument</span>.<span class=\"name\">at</span>(<span class=\"number\">0</span>)\n }\n}</pre>\n<p>If the application is launched with the incorrect arguments or with the <i>--usage</i> argument an help will be outputted on the command line and the application will exit:</p>\n<pre class=\"cpp\">Usage: application <span class=\"operator\">[</span><span class=\"operator\">-</span><span class=\"operator\">-</span>fullscreen<span class=\"operator\">]</span> <span class=\"operator\">[</span><span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span>VOLUME_LEVEL<span class=\"operator\">]</span> URL\nOptions:\n<span class=\"operator\">-</span><span class=\"operator\">-</span>fullscreen whether <span class=\"keyword\">or</span> <span class=\"keyword\">not</span> the media will be played fullscreen\n<span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span>VOLUME_LEVE level to which to set the volume\nExpects URL of the media to play<span class=\"operator\">.</span></pre>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Argument\">Argument</a>.</p>\n<!-- @@@Arguments -->\n<h2>Property Documentation</h2>\n<!-- $$$arguments -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"arguments-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"qmldefault\">default</span><span class=\"name\">arguments</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\">Argument</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>List of command line arguments that are expected by the application.</p>\n<p>See detailed description above for an example on how to use it.</p>\n</div></div><!-- @@@arguments -->\n<br/>\n<!-- $$$defaultArgument -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"defaultArgument-prop\"></a><span class=\"name\">defaultArgument</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Argument\">Argument</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The default argument corresponds to the values passed on the command line without any name.</p>\n<p>For example in:</p>\n<pre class=\"cpp\"><span class=\"operator\">.</span><span class=\"operator\">/</span>application <span class=\"operator\">-</span><span class=\"operator\">-</span>volume<span class=\"operator\">=</span><span class=\"number\">42</span> http:<span class=\"comment\">//myaddress</span></pre>\n<p><i>http://myaddress</i> is the first value of the default argument.</p>\n</div></div><!-- @@@defaultArgument -->\n<br/>\n<!-- $$$error -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"error-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">error</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether or not the command line arguments passed to the application correspond to the expected arguments.</p>\n<p>Also set when calling <a href=\"#quitWithError-method\">quitWithError</a></p>\n</div></div><!-- @@@error -->\n<br/>\n<!-- $$$errorMessage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"errorMessage-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">errorMessage</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Error message describing how the command line arguments passed to the application failed to correspond to the expected arguments.</p>\n<p>Also set when calling <a href=\"#quitWithError-method\">quitWithError</a></p>\n</div></div><!-- @@@errorMessage -->\n<br/>\n<!-- $$$values -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"values-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">values</span> : <span class=\"type\">Object</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Object of which properties have the values of the command line arguments.</p>\n</div></div><!-- @@@values -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$printUsage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"printUsage-method\"></a><span class=\"type\">void</span> Arguments::<span class=\"name\">printUsage</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Outputs help to the console on how to pass arguments to the application.</p>\n</div></div><!-- @@@printUsage -->\n<br/>\n<!-- $$$quitWithError -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"quitWithError-method\"></a><span class=\"type\">void</span> Arguments::<span class=\"name\">quitWithError</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span><i> errorMessage</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Exits the application outputting <i>errorMessage</i> to the console.</p>\n</div></div><!-- @@@quitWithError -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-arguments.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/464/", "name": "Button", "description": "Standard Ubuntu button. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Button", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Button-brief -->\n<p>Standard Ubuntu button. <a href=\"#details\">More...</a></p>\n<!-- @@@Button -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.AbstractButton\">AbstractButton</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#gradient-prop\">gradient</a></b></b> : Gradient</li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconPosition-prop\">iconPosition</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<!-- $$$Button-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"http://design.ubuntu.com/apps/building-blocks/buttons\">See also the Design Guidelines on Buttons</a>.</p>\n<p>Examples:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Column\">Column</a></span> {\n <span class=\"type\">Button</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Send&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked text-only Button&quot;</span>)\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n <span class=\"name\">gradient</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">greyGradient</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked icon-only Button&quot;</span>)\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Icon on left&quot;</span>\n <span class=\"name\">iconPosition</span>: <span class=\"string\">&quot;left&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked text and icon Button&quot;</span>)\n }\n}</pre>\n<p>An <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> can be used to specify <b>clicked</b>, iconSource and text. Example:</p>\n<pre class=\"qml\"> <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">action1</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click me&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;action!&quot;</span>)\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">action</span>: <span class=\"name\">action1</span>\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">warmGrey</span>\n }\n}</pre>\n<!-- @@@Button -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtquick-index.html/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The background color of the button.</p>\n<p><b>See also </b><a href=\"#gradient-prop\">gradient</a>.</p>\n</div></div><!-- @@@color -->\n<br/>\n<!-- $$$gradient -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"gradient-prop\"></a><span class=\"name\">gradient</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Gradient\">Gradient</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The gradient used to fill the background of the button.</p>\n<p>Standard Ubuntu gradients are defined in <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.UbuntuColors\">UbuntuColors</a>.</p>\n<p>If both a gradient and a color are specified, the gradient will be used.</p>\n<p><b>See also </b><a href=\"#color-prop\">color</a>.</p>\n</div></div><!-- @@@gradient -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the ubuntu-mobile icon theme. Default value: action.iconName.</p>\n<p>If both <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconPosition -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconPosition-prop\"></a><span class=\"name\">iconPosition</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The position of the icon relative to the text. Options are &quot;left&quot; and &quot;right&quot;. The default value is &quot;left&quot;.</p>\n<p>If only text or only an icon is defined, this property is ignored and the text or icon is centered horizontally and vertically in the button.</p>\n<p>Currently this is a string value. We are waiting for support for enums: https://bugreports.qt-project.org/browse/QTBUG-14861</p>\n</div></div><!-- @@@iconPosition -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>If both iconSource and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> are defined, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-button.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/156/", "name": "Button", "description": "Standard Ubuntu button. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Button", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Button-brief -->\n<p>Standard Ubuntu button. <a href=\"#details\">More...</a></p>\n<!-- @@@Button -->\n<p>Inherits <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.AbstractButton/\">AbstractButton</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#gradient-prop\">gradient</a></b></b> : Gradient</li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconPosition-prop\">iconPosition</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<!-- $$$Button-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"http://design.ubuntu.com/apps/building-blocks/buttons\">See also the Design Guidelines on Buttons</a>.</p>\n<p>Examples:</p>\n<pre class=\"qml\"><span class=\"type\">Column</span> {\n <span class=\"type\">Button</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Send&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked text-only Button&quot;</span>)\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">iconSource</span>: <span class=\"string\">&quot;icon.png&quot;</span>\n <span class=\"name\">gradient</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">greyGradient</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked icon-only Button&quot;</span>)\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">iconSource</span>: <span class=\"string\">&quot;icon.png&quot;</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Icon on left&quot;</span>\n <span class=\"name\">iconPosition</span>: <span class=\"string\">&quot;left&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked text and icon Button&quot;</span>)\n }\n}</pre>\n<p>An <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> can be used to specify <b>clicked</b>, iconSource and text. Example:</p>\n<pre class=\"qml\"> <span class=\"type\">Item</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">action1</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click me&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;action!&quot;</span>)\n <span class=\"name\">iconSource</span>: <span class=\"string\">&quot;icon.png&quot;</span>\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">action</span>: <span class=\"name\">action1</span>\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">warmGrey</span>\n }\n}</pre>\n<!-- @@@Button -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> associated with this <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\">color</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The background color of the button.</p>\n<p><b>See also </b><a href=\"#gradient-prop\">gradient</a>.</p>\n</div></div><!-- @@@color -->\n<br/>\n<!-- $$$gradient -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"gradient-prop\"></a><span class=\"name\">gradient</span> : <span class=\"type\">Gradient</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The gradient used to fill the background of the button.</p>\n<p>Standard Ubuntu gradients are defined in <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.UbuntuColors/\">UbuntuColors</a>.</p>\n<p>If both a gradient and a color are specified, the gradient will be used.</p>\n<p><b>See also </b><a href=\"#color-prop\">color</a>.</p>\n</div></div><!-- @@@gradient -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconPosition -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconPosition-prop\"></a><span class=\"name\">iconPosition</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The position of the icon relative to the text. Options are &quot;left&quot; and &quot;right&quot;. The default value is &quot;left&quot;.</p>\n<p>If only text or only an icon is defined, this property is ignored and the text or icon is centered horizontally and vertically in the button.</p>\n<p>Currently this is a string value. We are waiting for support for enums: https://bugreports.qt-project.org/browse/QTBUG-14861</p>\n</div></div><!-- @@@iconPosition -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\">url</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.iconSource.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\">Component</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1355/", "name": "Button", "description": "Standard Ubuntu button. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Button", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Button-brief -->\n<p>Standard Ubuntu button. <a href=\"#details\">More...</a></p>\n<!-- @@@Button -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.AbstractButton\">AbstractButton</a></p>\n</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherited By:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ComboButton\">ComboButton</a>.</p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#font-prop\">font</a></b></b> : font</li>\n<li class=\"fn\"><b><b><a href=\"#gradient-prop\">gradient</a></b></b> : Gradient</li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconPosition-prop\">iconPosition</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clicked-signal\">clicked</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#pressAndHold-signal\">pressAndHold</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#triggered-signal\">triggered</a></b></b>(var <i>value</i>)</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#trigger-method\">trigger</a></b></b>(<i>value</i>)</li>\n</ul>\n<!-- $$$Button-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"http://design.ubuntu.com/apps/building-blocks/buttons\">See also the Design Guidelines on Buttons</a>.</p>\n<p>Examples:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"type\">Button</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Send&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked text-only Button&quot;</span>)\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n <span class=\"name\">gradient</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">greyGradient</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked icon-only Button&quot;</span>)\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Icon on left&quot;</span>\n <span class=\"name\">iconPosition</span>: <span class=\"string\">&quot;left&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;clicked text and icon Button&quot;</span>)\n }\n}</pre>\n<p>An <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> can be used to specify <b>clicked</b>, iconSource and text. Example:</p>\n<pre class=\"qml\"> <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">action1</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click me&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;action!&quot;</span>)\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;compose&quot;</span>\n }\n <span class=\"type\">Button</span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">action</span>: <span class=\"name\">action1</span>\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">warmGrey</span>\n }\n}</pre>\n<!-- @@@Button -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The background color of the button.</p>\n<p><b>See also </b><a href=\"#gradient-prop\">gradient</a>.</p>\n</div></div><!-- @@@color -->\n<br/>\n<!-- $$$font -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"font-prop\"></a><span class=\"name\">font</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-font.html\">font</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The font used for the button's text.</p>\n</div></div><!-- @@@font -->\n<br/>\n<!-- $$$gradient -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"gradient-prop\"></a><span class=\"name\">gradient</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Gradient\">Gradient</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The gradient used to fill the background of the button.</p>\n<p>Standard Ubuntu gradients are defined in <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.UbuntuColors\">UbuntuColors</a>.</p>\n<p>If both a gradient and a color are specified, the gradient will be used.</p>\n<p><b>See also </b><a href=\"#color-prop\">color</a>.</p>\n</div></div><!-- @@@gradient -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the suru icon theme. Default value: action.iconName.</p>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folders where the icon themes are installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/suru\">/usr/share/icons/suru</a></li>\n<li>Ubuntu Desktop: <a href=\"file:/usr/share/icons/ubuntu-mono-dark\">/usr/share/icons/ubuntu-mono-dark</a></li>\n</ul>\n<p>These 2 separate icon themes will be merged soon.</p>\n<p>If both <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconPosition -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconPosition-prop\"></a><span class=\"name\">iconPosition</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The position of the icon relative to the text. Options are &quot;left&quot; and &quot;right&quot;. The default value is &quot;left&quot;.</p>\n<p>If only text or only an icon is defined, this property is ignored and the text or icon is centered horizontally and vertically in the button.</p>\n<p>Currently this is a string value. We are waiting for support for enums: https://bugreports.qt-project.org/browse/QTBUG-14861</p>\n</div></div><!-- @@@iconPosition -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>This is the URL of any image file If both iconSource and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> are defined, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$clicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clicked-signal\"></a><span class=\"name\">clicked</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a mouse click on the button and the button is not disabled. If <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">action</a> is defined, the action will be triggered.</p>\n</div></div><!-- @@@clicked -->\n<br/>\n<!-- $$$pressAndHold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pressAndHold-signal\"></a><span class=\"name\">pressAndHold</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a long press.</p>\n</div></div><!-- @@@pressAndHold -->\n<br/>\n<!-- $$$triggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"triggered-signal\"></a><span class=\"name\">triggered</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-var.html\">var</a></span><i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the actionItem is triggered.</p>\n</div></div><!-- @@@triggered -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$trigger -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"trigger-method\"></a><span class=\"name\">trigger</span>(<i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Trigger this action item if it is enabled.</p>\n</div></div><!-- @@@trigger -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-button.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/158/", "name": "CheckBox", "description": "CheckBox is a component with two states, checked or unchecked. It can be used to set boolean options. The behavior is the same as <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Switch/\">Switch</a>, the only difference is the graphical style. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.CheckBox", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$CheckBox-brief -->\n<p>CheckBox is a component with two states, checked or unchecked. It can be used to set boolean options. The behavior is the same as <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Switch/\">Switch</a>, the only difference is the graphical style. <a href=\"#details\">More...</a></p>\n<!-- @@@CheckBox -->\n<p>Inherits <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.AbstractButton/\">AbstractButton</a></p>\n<p>Inherited by <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Switch/\">Switch</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#checked-prop\">checked</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<!-- $$$CheckBox-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"http://design.ubuntu.com/apps/building-blocks/toggles\">See also the Design Guidelines on Toggles</a>.</p>\n<p><b>This component is under heavy development.</b></p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">Item</span> {\n <span class=\"type\">CheckBox</span> {\n <span class=\"name\">checked</span>: <span class=\"number\">true</span>\n }\n}</pre>\n<!-- @@@CheckBox -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a> associated with this <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$checked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"checked-prop\"></a><span class=\"name\">checked</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Specifies whether the checkbox is checked or not. By default the property is set to false.</p>\n</div></div><!-- @@@checked -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\">url</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.iconSource.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\">Component</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ActionItem/\">actionItem</a>. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1357/", "name": "CheckBox", "description": "CheckBox is a component with two states, checked or unchecked. It can be used to set boolean options. The behavior is the same as <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Switch\">Switch</a>, the only difference is the graphical style. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.CheckBox", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$CheckBox-brief -->\n<p>CheckBox is a component with two states, checked or unchecked. It can be used to set boolean options. The behavior is the same as <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Switch\">Switch</a>, the only difference is the graphical style. <a href=\"#details\">More...</a></p>\n<!-- @@@CheckBox -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.AbstractButton\">AbstractButton</a></p>\n</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherited By:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Switch\">Switch</a>.</p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#checked-prop\">checked</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clicked-signal\">clicked</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#pressAndHold-signal\">pressAndHold</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#triggered-signal\">triggered</a></b></b>(var <i>value</i>)</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#trigger-method\">trigger</a></b></b>(<i>value</i>)</li>\n</ul>\n<!-- $$$CheckBox-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"http://design.ubuntu.com/apps/building-blocks/toggles\">See also the Design Guidelines on Toggles</a>.</p>\n<p><b>This component is under heavy development.</b></p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\">CheckBox</span> {\n <span class=\"name\">checked</span>: <span class=\"number\">true</span>\n }\n}</pre>\n<!-- @@@CheckBox -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$checked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"checked-prop\"></a><span class=\"name\">checked</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Specifies whether the checkbox is checked or not. By default the property is set to false.</p>\n</div></div><!-- @@@checked -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the suru icon theme. Default value: action.iconName.</p>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folders where the icon themes are installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/suru\">/usr/share/icons/suru</a></li>\n<li>Ubuntu Desktop: <a href=\"file:/usr/share/icons/ubuntu-mono-dark\">/usr/share/icons/ubuntu-mono-dark</a></li>\n</ul>\n<p>These 2 separate icon themes will be merged soon.</p>\n<p>If both <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>This is the URL of any image file If both iconSource and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> are defined, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$clicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clicked-signal\"></a><span class=\"name\">clicked</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a mouse click on the button and the button is not disabled. If <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">action</a> is defined, the action will be triggered.</p>\n</div></div><!-- @@@clicked -->\n<br/>\n<!-- $$$pressAndHold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pressAndHold-signal\"></a><span class=\"name\">pressAndHold</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>This handler is called when there is a long press.</p>\n</div></div><!-- @@@pressAndHold -->\n<br/>\n<!-- $$$triggered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"triggered-signal\"></a><span class=\"name\">triggered</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-var.html\">var</a></span><i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the actionItem is triggered.</p>\n</div></div><!-- @@@triggered -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$trigger -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"trigger-method\"></a><span class=\"name\">trigger</span>(<i> value</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Trigger this action item if it is enabled.</p>\n</div></div><!-- @@@trigger -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-checkbox.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/466/", "name": "CheckBox", "description": "CheckBox is a component with two states, checked or unchecked. It can be used to set boolean options. The behavior is the same as <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Switch\">Switch</a>, the only difference is the graphical style. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.CheckBox", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$CheckBox-brief -->\n<p>CheckBox is a component with two states, checked or unchecked. It can be used to set boolean options. The behavior is the same as <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Switch\">Switch</a>, the only difference is the graphical style. <a href=\"#details\">More...</a></p>\n<!-- @@@CheckBox -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.AbstractButton\">AbstractButton</a></p>\n<p>Inherited by <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Switch\">Switch</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#action-prop\">action</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#checked-prop\">checked</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#hovered-prop\">hovered</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#iconName-prop\">iconName</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#iconSource-prop\">iconSource</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#style-prop\">style</a></b></b> : Component</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n</ul>\n<!-- $$$CheckBox-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"http://design.ubuntu.com/apps/building-blocks/toggles\">See also the Design Guidelines on Toggles</a>.</p>\n<p><b>This component is under heavy development.</b></p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\">CheckBox</span> {\n <span class=\"name\">checked</span>: <span class=\"number\">true</span>\n }\n}</pre>\n<!-- @@@CheckBox -->\n<h2>Property Documentation</h2>\n<!-- $$$action -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"action-prop\"></a><span class=\"name\">action</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Action\">Action</a> associated with this <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a>. If action is set, the values of the Action properties are copied to the values of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem\">ActionItem</a> properties.</p>\n</div></div><!-- @@@action -->\n<br/>\n<!-- $$$checked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"checked-prop\"></a><span class=\"name\">checked</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Specifies whether the checkbox is checked or not. By default the property is set to false.</p>\n</div></div><!-- @@@checked -->\n<br/>\n<!-- $$$hovered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hovered-prop\"></a><span class=\"name\">hovered</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the mouse cursor hovers over the button's mouse area.</p>\n</div></div><!-- @@@hovered -->\n<br/>\n<!-- $$$iconName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconName-prop\"></a><span class=\"name\">iconName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The icon associated with the actionItem in the ubuntu-mobile icon theme. Default value: action.iconName.</p>\n<p>If both <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconSource-prop\">iconSource</a> and iconName are defined, iconName will be ignored.</p>\n</div></div><!-- @@@iconName -->\n<br/>\n<!-- $$$iconSource -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"iconSource-prop\"></a><span class=\"name\">iconSource</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image associated with the actionItem. Default value: action.iconSource.</p>\n<p>If both iconSource and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> are defined, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ActionItem#iconName-prop\">iconName</a> will be ignored.</p>\n</div></div><!-- @@@iconSource -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>True if the user presses a mouse button in the button's mouse area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$style -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"style-prop\"></a><span class=\"name\">style</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Component instantiated immediately and placed below everything else.</p>\n</div></div><!-- @@@style -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the actionItem. Default value: action.text</p>\n</div></div><!-- @@@text -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-checkbox.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/518/", "name": "Clipboard", "description": "This is a singleton type providing access to the system clipboard. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Clipboard", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Clipboard-brief -->\n<p>This is a singleton type providing access to the system clipboard. <a href=\"#details\">More...</a></p>\n<!-- @@@Clipboard -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#data-prop\">data</a></b></b> : MimeData</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#dataChanged-signal\">dataChanged</a></b></b>()</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">MimeData <b><b><a href=\"#newData-method\">newData</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#clear-method\">clear</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#push-method\">push</a></b></b>(var <i>data</i>)</li>\n</ul>\n<!-- $$$Clipboard-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Clipboard data can be retrieved through data property, which returns an object of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a> type. The actual content of the clipboard can be accessed through this object. Data can be pushed to the clipboard using <a href=\"#push-method\">push()</a> function.</p>\n<p>The clipboard data cannot be modified through the type returned by the data property, for this a new instance of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a> type must be used. This instance can be either a standalone MimeDala component or an object created using <a href=\"#newData-method\">newData()</a> function. Remember that standalone <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a> types duplicate the clipboard data which may cause extensive memory use.</p>\n<p>Examples of use:</p>\n<p>1. Using standard MimeType component - the following example copies the selected text from the text area into the clipboard pushing also a color</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.TextArea\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">mimeData</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;green&quot;</span>\n <span class=\"name\">text</span>: <span class=\"name\">editor</span>.<span class=\"name\">text</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">mimeData</span>)\n }\n}</pre>\n<p>2. Pushing data straight to clipboard</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.TextArea\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: {\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">editor</span>.<span class=\"name\">text</span>);\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>([<span class=\"string\">&quot;application/x-color&quot;</span>, <span class=\"string\">&quot;green&quot;</span>]);\n }\n }\n}</pre>\n<p>3. Pushing data using <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a> object</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.TextArea\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: {\n var <span class=\"name\">mimeData</span> = <span class=\"name\">Clipboard</span>.<span class=\"name\">newData</span>();\n <span class=\"name\">mimeData</span>.<span class=\"name\">text</span> <span class=\"operator\">=</span> <span class=\"name\">editor</span>.<span class=\"name\">text</span>;\n <span class=\"name\">mimeData</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"string\">&quot;green&quot;</span>;\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">mimeData</span>);\n }\n }\n}</pre>\n<!-- @@@Clipboard -->\n<h2>Property Documentation</h2>\n<!-- $$$data -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"data-prop\"></a><span class=\"name\">data</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Provides access to the Clipboard's current data.</p>\n</div></div><!-- @@@data -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$dataChanged -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"dataChanged-signal\"></a>Clipboard::<span class=\"name\">dataChanged</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal is triggered when clipboard content gets changed.</p>\n</div></div><!-- @@@dataChanged -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$newData -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"newData-method\"></a><span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a></span> Clipboard::<span class=\"name\">newData</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function returns a new <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a> object that can be used in Java script code to push pultiple MIME types at the same time.</p>\n</div></div><!-- @@@newData -->\n<br/>\n<!-- $$$clear -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clear-method\"></a>Clipboard::<span class=\"name\">clear</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function clears the clipboard content.</p>\n</div></div><!-- @@@clear -->\n<br/>\n<!-- $$$push -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"push-method\"></a>Clipboard::<span class=\"name\">push</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-var.html\">var</a></span><i> data</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function copies data provided as parameter to the clipboard. The parameter can be a MimeData instance or object created using <a href=\"#newData-method\">newData()</a> beside the ones listed at MimeData::data.</p>\n<p>When <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MimeData\">MimeData</a> instance or object is given, the entire object content will be pushed to the clipboard.</p>\n</div></div><!-- @@@push -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-clipboard.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/205/", "name": "Clipboard", "description": "This is a singleton type providing access to the system clipboard. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Clipboard", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Clipboard-brief -->\n<p>This is a singleton type providing access to the system clipboard. <a href=\"#details\">More...</a></p>\n<!-- @@@Clipboard -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#data-prop\">data</a></b></b> : MimeData</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#dataChanged-signal\">dataChanged</a></b></b>()</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">MimeData <b><b><a href=\"#newData-method\">newData</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#clear-method\">clear</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#push-method\">push</a></b></b>(var <i>data</i>)</li>\n</ul>\n<!-- $$$Clipboard-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Clipboard data can be retrieved through data property, which returns an object of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a> type. The actual content of the clipboard can be accessed through this object. Data can be pushed to the clipboard using <a href=\"#push-method\">push()</a> function.</p>\n<p>The clipboard data cannot be modified through the type returned by the data property, for this a new instance of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a> type must be used. This instance can be either a standalone MimeDala component or an object created using <a href=\"#newData-method\">newData()</a> function. Remember that standalone <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a> types duplicate the clipboard data which may cause extensive memory use.</p>\n<p>Examples of use:</p>\n<p>1. Using standard MimeType component - the following example copies the selected text from the text area into the clipboard pushing also a color</p>\n<pre class=\"qml\"><span class=\"type\">Item</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.TextArea/\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">mimeData</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;green&quot;</span>\n <span class=\"name\">text</span>: <span class=\"name\">editor</span>.<span class=\"name\">text</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">mimeData</span>)\n }\n}</pre>\n<p>2. Pushing data straight to clipboard</p>\n<pre class=\"qml\"><span class=\"type\">Item</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.TextArea/\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: {\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">editor</span>.<span class=\"name\">text</span>);\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>([<span class=\"string\">&quot;application/x-color&quot;</span>, <span class=\"string\">&quot;green&quot;</span>]);\n }\n }\n}</pre>\n<p>3. Pushing data using <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a> object</p>\n<pre class=\"qml\"><span class=\"type\">Item</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.TextArea/\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: {\n var <span class=\"name\">mimeData</span> = <span class=\"name\">Clipboard</span>.<span class=\"name\">newData</span>();\n <span class=\"name\">mimeData</span>.<span class=\"name\">text</span> <span class=\"operator\">=</span> <span class=\"name\">editor</span>.<span class=\"name\">text</span>;\n <span class=\"name\">mimeData</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"string\">&quot;green&quot;</span>;\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">mimeData</span>);\n }\n }\n}</pre>\n<!-- @@@Clipboard -->\n<h2>Property Documentation</h2>\n<!-- $$$data -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"data-prop\"></a><span class=\"name\">data</span> : <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Provides access to the Clipboard's current data.</p>\n</div></div><!-- @@@data -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$dataChanged -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"dataChanged-signal\"></a>Clipboard::<span class=\"name\">dataChanged</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal is triggered when clipboard content gets changed.</p>\n</div></div><!-- @@@dataChanged -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$newData -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"newData-method\"></a><span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a></span> Clipboard::<span class=\"name\">newData</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function returns a new <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a> object that can be used in Java script code to push pultiple MIME types at the same time.</p>\n</div></div><!-- @@@newData -->\n<br/>\n<!-- $$$clear -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clear-method\"></a>Clipboard::<span class=\"name\">clear</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function clears the clipboard content.</p>\n</div></div><!-- @@@clear -->\n<br/>\n<!-- $$$push -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"push-method\"></a>Clipboard::<span class=\"name\">push</span>(<span class=\"type\">var</span><i> data</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function copies data provided as parameter to the clipboard. The parameter can be a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a> instance or object created using <a href=\"#newData-method\">newData()</a> beside the ones listed at <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/#data-prop\">MimeData::data</a>.</p>\n<p>When <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MimeData/\">MimeData</a> instance or object is given, the entire object content will be pushed to the clipboard.</p>\n</div></div><!-- @@@push -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1413/", "name": "Clipboard", "description": "This is a singleton type providing access to the system clipboard. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Clipboard", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Clipboard-brief -->\n<p>This is a singleton type providing access to the system clipboard. <a href=\"#details\">More...</a></p>\n<!-- @@@Clipboard -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#data-prop\">data</a></b></b> : MimeData</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#dataChanged-signal\">dataChanged</a></b></b>()</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clear-method\">clear</a></b></b>()</li>\n<li class=\"fn\">MimeData <b><b><a href=\"#newData-method\">newData</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#push-method\">push</a></b></b>(var <i>data</i>)</li>\n</ul>\n<!-- $$$Clipboard-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Clipboard data can be retrieved through data property, which returns an object of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a> type. The actual content of the clipboard can be accessed through this object. Data can be pushed to the clipboard using <a href=\"#push-method\">push()</a> function.</p>\n<p>The clipboard data cannot be modified through the type returned by the data property, for this a new instance of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a> type must be used. This instance can be either a standalone MimeDala component or an object created using <a href=\"#newData-method\">newData()</a> function. Remember that standalone <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a> types duplicate the clipboard data which may cause extensive memory use.</p>\n<p>Examples of use:</p>\n<p>1. Using standard MimeType component - the following example copies the selected text from the text area into the clipboard pushing also a color</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.TextArea\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">mimeData</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;green&quot;</span>\n <span class=\"name\">text</span>: <span class=\"name\">editor</span>.<span class=\"name\">text</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">mimeData</span>)\n }\n}</pre>\n<p>2. Pushing data straight to clipboard</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.TextArea\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: {\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">editor</span>.<span class=\"name\">text</span>);\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>([<span class=\"string\">&quot;application/x-color&quot;</span>, <span class=\"string\">&quot;green&quot;</span>]);\n }\n }\n}</pre>\n<p>3. Pushing data using <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a> object</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.TextArea\">TextArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">editor</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Copy&quot;</span>\n <span class=\"name\">onClicked</span>: {\n var <span class=\"name\">mimeData</span> = <span class=\"name\">Clipboard</span>.<span class=\"name\">newData</span>();\n <span class=\"name\">mimeData</span>.<span class=\"name\">text</span> <span class=\"operator\">=</span> <span class=\"name\">editor</span>.<span class=\"name\">text</span>;\n <span class=\"name\">mimeData</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"string\">&quot;green&quot;</span>;\n <span class=\"name\">Clipboard</span>.<span class=\"name\">push</span>(<span class=\"name\">mimeData</span>);\n }\n }\n}</pre>\n<!-- @@@Clipboard -->\n<h2>Property Documentation</h2>\n<!-- $$$data -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"data-prop\"></a><span class=\"name\">data</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Provides access to the Clipboard's current data.</p>\n</div></div><!-- @@@data -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$dataChanged -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"dataChanged-signal\"></a><span class=\"name\">dataChanged</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal is triggered when clipboard content gets changed.</p>\n</div></div><!-- @@@dataChanged -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$clear -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clear-method\"></a><span class=\"name\">clear</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function clears the clipboard content.</p>\n</div></div><!-- @@@clear -->\n<br/>\n<!-- $$$newData -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"newData-method\"></a><span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a></span> <span class=\"name\">newData</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>The function returns a new <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a> object that can be used in Java script code to push pultiple MIME types at the same time.</p>\n</div></div><!-- @@@newData -->\n<br/>\n<!-- $$$push -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"push-method\"></a><span class=\"name\">push</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-var.html\">var</a></span><i> data</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function copies data provided as parameter to the clipboard. The parameter can be a MimeData instance or object created using <a href=\"#newData-method\">newData()</a> beside the ones listed at MimeData::data.</p>\n<p>When <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MimeData\">MimeData</a> instance or object is given, the entire object content will be pushed to the clipboard.</p>\n</div></div><!-- @@@push -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-clipboard.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1490/", "name": "ComboButton", "description": "Ubuntu button providing a drop-down panel visualizing custom options. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.ComboButton", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$ComboButton-brief -->\n<p>Ubuntu button providing a drop-down panel visualizing custom options. <a href=\"#details\">More...</a></p>\n<!-- @@@ComboButton -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#collapsedHeight-prop\">collapsedHeight</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#comboList-prop\">comboList</a></b></b> : list&lt;Item&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#comboListHeight-prop\">comboListHeight</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#dropdownColor-prop\">dropdownColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#expanded-prop\">expanded</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#expandedHeight-prop\">expandedHeight</a></b></b> : real</li>\n</ul>\n<!-- $$$ComboButton-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The component is composed of three main blocks: <b>main button</b>, <b>dropdown</b> and <b>combo list</b>.</p>\n<p>The <i>main button</i> holds the main functionailty of the component, and it is located at the left-top side of the expanded button. The <i>clicked()</i> signal is triggered only when this button is pressed.</p>\n<p>The <i>dropdown</i> is a button located on the right of the main button. Its functionality is to drive the component's expanded state.</p>\n<p>The <i>combo list</i> is a panel showing the content specified in <a href=\"#comboList-prop\">comboList</a> property when expanded. The content is stretched horizontally to the component's width, and its height is controlled by the <a href=\"#expandedHeight-prop\">expandedHeight</a> property as follows:</p>\n<ul>\n<li>If the content height is smaller than the value of <a href=\"#expandedHeight-prop\">expandedHeight</a>, the combo list will be expanded only to the height of the content.<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">ComboButton</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;smaller content&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>) <span class=\"comment\">// smaller than the default expandedHeight</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n }\n}</pre>\n</li>\n<li>If the content height is greater than <a href=\"#expandedHeight-prop\">expandedHeight</a>, the combo list will expand till the height specified by the property and the content will be scrolled; in case the combo list content is one single Flickable, <a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a>, <a href=\"/api/qml/sdk-14.10/QtQuick.GridView\">GridView</a> or <a href=\"/api/qml/sdk-14.10/QtQuick.PathView\">PathView</a>, the content scrolling will be provided by the content itself.<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">ComboButton</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;long scrolled content&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Repeater\">Repeater</a></span> {\n <span class=\"name\">model</span>: <span class=\"number\">5</span>\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n }\n }\n }\n}</pre>\n</li>\n<li>In case the content is a single Flickable, <a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a>, <a href=\"/api/qml/sdk-14.10/QtQuick.GridView\">GridView</a> or <a href=\"/api/qml/sdk-14.10/QtQuick.PathView\">PathView</a>, the content will be filling the entire combo list area defined.<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\nimport Ubuntu.Components.ListItems 1.0\n<span class=\"type\">ComboButton</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;listview&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a></span> {\n <span class=\"name\">model</span>: <span class=\"number\">10</span>\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Item #&quot;</span> <span class=\"operator\">+</span> <span class=\"name\">modelData</span>\n }\n }\n}</pre>\n</li>\n<li>Vertical anchoring of combo list content to its parent is not possible as the expansion calculation is done based on the combo list content height. If the content wants to take the size of the entire combo list, it should bind its height to the <a href=\"#comboListHeight-prop\">comboListHeight</a> property.<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">ComboButton</span> {\n <span class=\"name\">id</span>: <span class=\"name\">combo</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;smaller content&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">height</span>: <span class=\"name\">combo</span>.<span class=\"name\">comboListHeight</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n }\n}</pre>\n</li>\n<li>In case the expansion needs to be the size of the combo list content, the <a href=\"#expandedHeight-prop\">expandedHeight</a> should be set to -1.<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">ComboButton</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;auto-sized content&quot;</span>\n <span class=\"name\">expandedHeight</span>: -<span class=\"number\">1</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Repeater\">Repeater</a></span> {\n <span class=\"name\">model</span>: <span class=\"number\">5</span>\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Button #&quot;</span> <span class=\"operator\">+</span> <span class=\"name\">modelData</span>\n }\n }\n }\n}</pre>\n</li>\n</ul>\n<p>The combo list can be expanded/collapsed either through the <a href=\"#expanded-prop\">expanded</a> property or by clicking on the dropdown button. It is not collapsed when pressing the main button or clicking on the combo list. In order to do an auto-collapsing button you must reset the expanded property (set it to false) when the main button is clicked or when a selection is taken from the combo list content. The following example illustrates a possible implementation.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">ComboButton</span> {\n <span class=\"name\">id</span>: <span class=\"name\">combo</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Auto closing&quot;</span>\n <span class=\"name\">expanded</span>: <span class=\"number\">true</span>\n <span class=\"name\">expandedHeight</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">expanded</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.UbuntuListView\">UbuntuListView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span>\n <span class=\"name\">height</span>: <span class=\"name\">combo</span>.<span class=\"name\">comboListHeight</span>\n <span class=\"name\">model</span>: <span class=\"number\">20</span>\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Action #&quot;</span> <span class=\"operator\">+</span> <span class=\"name\">modelData</span>\n <span class=\"name\">onClicked</span>: {\n <span class=\"name\">combo</span>.<span class=\"name\">text</span> <span class=\"operator\">=</span> <span class=\"name\">text</span>;\n <span class=\"name\">combo</span>.<span class=\"name\">expanded</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>;\n }\n }\n }\n}</pre>\n<a name=\"styling\"></a>\n<h3>Styling</h3>\n<p>The style of the component is defined in <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Styles.ComboButtonStyle\">ComboButtonStyle</a>.</p>\n<!-- @@@ComboButton -->\n<h2>Property Documentation</h2>\n<!-- $$$collapsedHeight -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"collapsedHeight-prop\"></a><span class=\"name\">collapsedHeight</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the height of the component when collapsed. By default the value is the implicit height of the component.</p>\n</div></div><!-- @@@collapsedHeight -->\n<br/>\n<!-- $$$comboList -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"comboList-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">comboList</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Property holding the list of items to be shown in the combo list. Being a default property children items declared will land in the combo list.</p>\n<p><b>Note: </b>The component is not responsible for layouting the content. It only provides scrolling abilities for the case the content exceeds the defined expanded height.</p></div></div><!-- @@@comboList -->\n<br/>\n<!-- $$$comboListHeight -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"comboListHeight-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">comboListHeight</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the maximum combo list height allowed based on the <a href=\"#expandedHeight-prop\">expandedHeight</a> and <a href=\"#collapsedHeight-prop\">collapsedHeight</a> values. It is a convenience property that can be used to size the combo list content.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\nimport Ubuntu.Components.ListItems 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ComboButton\">ComboButton</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">combo</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Full comboList size&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a></span> {\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">combo</span>.<span class=\"name\">comboListHeight</span>\n <span class=\"name\">model</span>: <span class=\"number\">20</span>\n <span class=\"name\">delegate</span>: <span class=\"name\">Standard</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Action #&quot;</span> <span class=\"operator\">+</span> <span class=\"name\">modelData</span>\n }\n }\n}</pre>\n<p><b>See also </b><a href=\"#collapsedHeight-prop\">collapsedHeight</a> and <a href=\"#expandedHeight-prop\">expandedHeight</a>.</p>\n</div></div><!-- @@@comboListHeight -->\n<br/>\n<!-- $$$dropdownColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"dropdownColor-prop\"></a><span class=\"name\">dropdownColor</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies the color of the dropdown button and the combo list for both collapsed and expanded states. You can use <a href=\"#expanded-prop\">expanded</a> to define different colors for expanded or collapsed states.</p>\n</div></div><!-- @@@dropdownColor -->\n<br/>\n<!-- $$$expanded -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"expanded-prop\"></a><span class=\"name\">expanded</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Specifies whether the combo list is expanded or not. The default falue is false.</p>\n</div></div><!-- @@@expanded -->\n<br/>\n<!-- $$$expandedHeight -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"expandedHeight-prop\"></a><span class=\"name\">expandedHeight</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the maximum height value the component should expand. When setting the property, remember to take into account the <a href=\"#collapsedHeight-prop\">collapsedHeight</a> value. The best practice is to use bind it with <a href=\"#collapsedHeight-prop\">collapsedHeight</a>.</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ComboButton\">ComboButton</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;altered expandedHeight&quot;</span>\n <span class=\"name\">expandedHeight</span>: <span class=\"name\">collapsedHeight</span> <span class=\"operator\">+</span> <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">25</span>)\n}</pre>\n<p>A value of -1 will instruct the component to expand the combo list as much as its content height is.</p>\n<p>The default value is <a href=\"#collapsedHeight-prop\">collapsedHeight</a> + 19.5 GU, so at least 3 ListItems can fit in the combo list.</p>\n<p><b>See also </b><a href=\"#collapsedHeight-prop\">collapsedHeight</a>.</p>\n</div></div><!-- @@@expandedHeight -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-combobutton.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/468/", "name": "CrossFadeImage", "description": "An Image like component which smoothly fades when its source is updated. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.CrossFadeImage", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$CrossFadeImage-brief -->\n<p>An Image like component which smoothly fades when its source is updated. <a href=\"#details\">More...</a></p>\n<!-- @@@CrossFadeImage -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#fadeDuration-prop\">fadeDuration</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#fillMode-prop\">fillMode</a></b></b> : enumeration</li>\n<li class=\"fn\"><b><b><a href=\"#running-prop\">running</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#source-prop\">source</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#sourceSize-prop\">sourceSize</a></b></b> : size</li>\n<li class=\"fn\"><b><b><a href=\"#status-prop\">status</a></b></b> : enumeration</li>\n</ul>\n<!-- $$$CrossFadeImage-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">CrossFadeImage</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">100</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">75</span>)\n <span class=\"name\">source</span>: <span class=\"string\">&quot;http://design.ubuntu.com/wp-content/uploads/ubuntu-logo14.png&quot;</span>\n <span class=\"name\">fadeDuration</span>: <span class=\"number\">1000</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">parent</span>.<span class=\"name\">source</span> <span class=\"operator\">=</span> <span class=\"string\">&quot;http://design.ubuntu.com/wp-content/uploads/canonical-logo1.png&quot;</span>\n }\n}</pre>\n<!-- @@@CrossFadeImage -->\n<h2>Property Documentation</h2>\n<!-- $$$fadeDuration -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fadeDuration-prop\"></a><span class=\"name\">fadeDuration</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The time over which to fade between images. Defaults to <tt>UbuntuAnimation.FastDuration</tt>.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.UbuntuAnimation\">UbuntuAnimation</a>.</p>\n</div></div><!-- @@@fadeDuration -->\n<br/>\n<!-- $$$fillMode -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fillMode-prop\"></a><span class=\"name\">fillMode</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-enumeration.html\">enumeration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Defaults to <tt>Image.PreserveAspectFit</tt>.</p>\n<ul>\n<li>Image.Stretch - the image is scaled to fit</li>\n<li>Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping</li>\n<li>Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary</li>\n<li>Image.Tile - the image is duplicated horizontally and vertically</li>\n<li>Image.TileVertically - the image is stretched horizontally and tiled vertically</li>\n<li>Image.TileHorizontally - the image is stretched vertically and tiled horizontally</li>\n<li>Image.Pad - the image is not transformed</li>\n</ul>\n</div></div><!-- @@@fillMode -->\n<br/>\n<!-- $$$running -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"running-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">running</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether the animation is running</p>\n</div></div><!-- @@@running -->\n<br/>\n<!-- $$$source -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"source-prop\"></a><span class=\"name\">source</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image being displayed. Can be a URL to any image format supported by Qt.</p>\n</div></div><!-- @@@source -->\n<br/>\n<!-- $$$sourceSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"sourceSize-prop\"></a><span class=\"name\">sourceSize</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-size.html\">size</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The actual width and height of the loaded image This property holds the actual width and height of the loaded image.</p>\n<p>Unlike the width and height properties, which scale the painting of the image, this property sets the actual number of pixels stored for the loaded image so that large images do not use more memory than necessary.</p>\n<p>Note: Changing this property dynamically causes the image source to be reloaded, potentially even from the network, if it is not in the disk cache.</p>\n</div></div><!-- @@@sourceSize -->\n<br/>\n<!-- $$$status -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"status-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">status</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-enumeration.html\">enumeration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>This property holds the status of image loading. It can be one of:</p>\n<ul>\n<li>Image.Null - no image has been set</li>\n<li>Image.Ready - the image has been loaded</li>\n<li>Image.Loading - the image is currently being loaded</li>\n<li>Image.Error - an error occurred while loading the image</li>\n</ul>\n</div></div><!-- @@@status -->\n<br/>\n</div></div>\n", "source_file": "qml-crossfadeimage.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1359/", "name": "CrossFadeImage", "description": "An Image like component which smoothly fades when its source is updated. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.CrossFadeImage", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$CrossFadeImage-brief -->\n<p>An Image like component which smoothly fades when its source is updated. <a href=\"#details\">More...</a></p>\n<!-- @@@CrossFadeImage -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import .</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#fadeDuration-prop\">fadeDuration</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#fadeStyle-prop\">fadeStyle</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#fillMode-prop\">fillMode</a></b></b> : enumeration</li>\n<li class=\"fn\"><b><b><a href=\"#running-prop\">running</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#source-prop\">source</a></b></b> : url</li>\n<li class=\"fn\"><b><b><a href=\"#sourceSize-prop\">sourceSize</a></b></b> : size</li>\n<li class=\"fn\"><b><b><a href=\"#status-prop\">status</a></b></b> : enumeration</li>\n</ul>\n<!-- $$$CrossFadeImage-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">CrossFadeImage</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">100</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">75</span>)\n <span class=\"name\">source</span>: <span class=\"string\">&quot;http://design.ubuntu.com/wp-content/uploads/ubuntu-logo14.png&quot;</span>\n <span class=\"name\">fadeDuration</span>: <span class=\"number\">1000</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">parent</span>.<span class=\"name\">source</span> <span class=\"operator\">=</span> <span class=\"string\">&quot;http://design.ubuntu.com/wp-content/uploads/canonical-logo1.png&quot;</span>\n }\n}</pre>\n<!-- @@@CrossFadeImage -->\n<h2>Property Documentation</h2>\n<!-- $$$fadeDuration -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fadeDuration-prop\"></a><span class=\"name\">fadeDuration</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The time over which to fade between images. Defaults to <tt>UbuntuAnimation.FastDuration</tt>.</p>\n<p><b>See also </b><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.UbuntuAnimation\">UbuntuAnimation</a>.</p>\n</div></div><!-- @@@fadeDuration -->\n<br/>\n<!-- $$$fadeStyle -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fadeStyle-prop\"></a><span class=\"name\">fadeStyle</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Style of the fade effect</p>\n<p>Defaults to <tt>overlay</tt></p>\n<ul>\n<li>overlay - the new fading image overlays the current one</li>\n<li>cross - the current one fades out while the new image fades in</li>\n</ul>\n<p>This QML property was introduced in Ubuntu.Components 1.1.</p>\n</div></div><!-- @@@fadeStyle -->\n<br/>\n<!-- $$$fillMode -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fillMode-prop\"></a><span class=\"name\">fillMode</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-enumeration.html\">enumeration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Defaults to <tt>Image.PreserveAspectFit</tt></p>\n<ul>\n<li>Image.Stretch - the image is scaled to fit</li>\n<li>Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping</li>\n<li>Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary</li>\n<li>Image.Tile - the image is duplicated horizontally and vertically</li>\n<li>Image.TileVertically - the image is stretched horizontally and tiled vertically</li>\n<li>Image.TileHorizontally - the image is stretched vertically and tiled horizontally</li>\n<li>Image.Pad - the image is not transformed</li>\n</ul>\n</div></div><!-- @@@fillMode -->\n<br/>\n<!-- $$$running -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"running-prop\"></a><span class=\"name\">running</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Whether the animation is running</p>\n</div></div><!-- @@@running -->\n<br/>\n<!-- $$$source -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"source-prop\"></a><span class=\"name\">source</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The image being displayed. Can be a URL to any image format supported by Qt.</p>\n</div></div><!-- @@@source -->\n<br/>\n<!-- $$$sourceSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"sourceSize-prop\"></a><span class=\"name\">sourceSize</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-size.html\">size</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The actual width and height of the loaded image This property holds the actual width and height of the loaded image.</p>\n<p>Unlike the width and height properties, which scale the painting of the image, this property sets the actual number of pixels stored for the loaded image so that large images do not use more memory than necessary.</p>\n<p>Note: Changing this property dynamically causes the image source to be reloaded, potentially even from the network, if it is not in the disk cache.</p>\n</div></div><!-- @@@sourceSize -->\n<br/>\n<!-- $$$status -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"status-prop\"></a><span class=\"name\">status</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-enumeration.html\">enumeration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>This property holds the status of image loading. It can be one of:</p>\n<ul>\n<li>Image.Null - no image has been set</li>\n<li>Image.Ready - the image has been loaded</li>\n<li>Image.Loading - the image is currently being loaded</li>\n<li>Image.Error - an error occurred while loading the image</li>\n</ul>\n</div></div><!-- @@@status -->\n<br/>\n</div></div>\n", "source_file": "qml-crossfadeimage.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/211/", "name": "FontUtils", "description": "FontUtils is a <a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qqmlcontext.html#details\">context property</a>, which provides utility functions for font manipulations. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.FontUtils", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$FontUtils-brief -->\n<p>FontUtils is a <a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qqmlcontext.html#details\">context property</a>, which provides utility functions for font manipulations. <a href=\"#details\">More...</a></p>\n<!-- @@@FontUtils -->\n<ul>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">real <b><b><a href=\"#modularScale-method\">modularScale</a></b></b>(string <i>size</i>)</li>\n<li class=\"fn\">real <b><b><a href=\"#sizeToPixels-method\">sizeToPixels</a></b></b>(string <i>size</i>)</li>\n</ul>\n<!-- $$$FontUtils-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>FontUtils cannot be instantiated and it is already available as a context property, i.e&#x2e; 'FontUtils' is an instance that can be used from anywhere in the code.</p>\n<p>Example of a Label implementation which uses the default base scale for the font size:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">Text</span> {\n property <span class=\"type\">string</span> <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;medium&quot;</span>\n <span class=\"name\">font</span>.pixelSize: <span class=\"name\">FontUtils</span>.<span class=\"name\">sizeToPixels</span>(<span class=\"name\">fontSize</span>)\n}</pre>\n<p>Another example of a custom text input component exposing a fontSize property and a base font unit size to scale its font:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">TextInput</span> {\n property <span class=\"type\">string</span> <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;small&quot;</span>\n property <span class=\"type\">int</span> <span class=\"name\">baseFontUnits</span>: <span class=\"name\">units</span>.<span class=\"name\">dp</span>(<span class=\"number\">20</span>)\n <span class=\"name\">font</span>.pixelSize: <span class=\"name\">FontUtils</span>.<span class=\"name\">modularScale</span>(<span class=\"name\">fontSize</span>) <span class=\"operator\">*</span> <span class=\"name\">units</span>.<span class=\"name\">dp</span>(<span class=\"name\">baseFontUnits</span>)\n}</pre>\n<!-- @@@FontUtils -->\n<h2>Method Documentation</h2>\n<!-- $$$modularScale -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"modularScale-method\"></a><span class=\"type\">real</span> FontUtils::<span class=\"name\">modularScale</span>(<span class=\"type\">string</span><i> size</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function returns the number interpretation of a given font scale. The scale can have one of the following values:</p>\n<ul>\n<li><b>xx-small</b></li>\n<li><b>x-small</b></li>\n<li><b>small</b></li>\n<li><b>medium</b></li>\n<li><b>large</b></li>\n<li><b>x-large</b></li>\n</ul>\n</div></div><!-- @@@modularScale -->\n<br/>\n<!-- $$$sizeToPixels -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"sizeToPixels-method\"></a><span class=\"type\">real</span> FontUtils::<span class=\"name\">sizeToPixels</span>(<span class=\"type\">string</span><i> size</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function calculates the pixel size of a given scale. The size scale can be one of the strings specified at <a href=\"#modularScale-method\">modularScale</a> function. On failure returns 0.</p>\n</div></div><!-- @@@sizeToPixels -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/525/", "name": "FontUtils", "description": "FontUtils is a <a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qqmlcontext.html#details\">context property</a>, which provides utility functions for font manipulations. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.FontUtils", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$FontUtils-brief -->\n<p>FontUtils is a <a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qqmlcontext.html#details\">context property</a>, which provides utility functions for font manipulations. <a href=\"#details\">More...</a></p>\n<!-- @@@FontUtils -->\n<ul>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">real <b><b><a href=\"#modularScale-method\">modularScale</a></b></b>(string <i>size</i>)</li>\n<li class=\"fn\">real <b><b><a href=\"#sizeToPixels-method\">sizeToPixels</a></b></b>(string <i>size</i>)</li>\n</ul>\n<!-- $$$FontUtils-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>FontUtils cannot be instantiated and it is already available as a context property, i.e&#x2e; 'FontUtils' is an instance that can be used from anywhere in the code.</p>\n<p>Example of a Label implementation which uses the default base scale for the font size:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Text\">Text</a></span> {\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span> <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;medium&quot;</span>\n <span class=\"name\">font</span>.pixelSize: <span class=\"name\">FontUtils</span>.<span class=\"name\">sizeToPixels</span>(<span class=\"name\">fontSize</span>)\n}</pre>\n<p>Another example of a custom text input component exposing a fontSize property and a base font unit size to scale its font:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span> <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;small&quot;</span>\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span> <span class=\"name\">baseFontUnits</span>: <span class=\"name\">units</span>.<span class=\"name\">dp</span>(<span class=\"number\">20</span>)\n <span class=\"name\">font</span>.pixelSize: <span class=\"name\">FontUtils</span>.<span class=\"name\">modularScale</span>(<span class=\"name\">fontSize</span>) <span class=\"operator\">*</span> <span class=\"name\">units</span>.<span class=\"name\">dp</span>(<span class=\"name\">baseFontUnits</span>)\n}</pre>\n<!-- @@@FontUtils -->\n<h2>Method Documentation</h2>\n<!-- $$$modularScale -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"modularScale-method\"></a><span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-real.html\">real</a></span> FontUtils::<span class=\"name\">modularScale</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span><i> size</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function returns the number interpretation of a given font scale. The scale can have one of the following values:</p>\n<ul>\n<li><b>xx-small</b></li>\n<li><b>x-small</b></li>\n<li><b>small</b></li>\n<li><b>medium</b></li>\n<li><b>large</b></li>\n<li><b>x-large</b></li>\n</ul>\n</div></div><!-- @@@modularScale -->\n<br/>\n<!-- $$$sizeToPixels -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"sizeToPixels-method\"></a><span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-real.html\">real</a></span> FontUtils::<span class=\"name\">sizeToPixels</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span><i> size</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function calculates the pixel size of a given scale. The size scale can be one of the strings specified at <a href=\"#modularScale-method\">modularScale</a> function. On failure returns 0.</p>\n</div></div><!-- @@@sizeToPixels -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-fontutils.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1420/", "name": "FontUtils", "description": "FontUtils is a <a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qqmlcontext.html#details\">context property</a>, which provides utility functions for font manipulations. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.FontUtils", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$FontUtils-brief -->\n<p>FontUtils is a <a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qqmlcontext.html#details\">context property</a>, which provides utility functions for font manipulations. <a href=\"#details\">More...</a></p>\n<!-- @@@FontUtils -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\">real <b><b><a href=\"#modularScale-method\">modularScale</a></b></b>(string <i>size</i>)</li>\n<li class=\"fn\">real <b><b><a href=\"#sizeToPixels-method\">sizeToPixels</a></b></b>(string <i>size</i>)</li>\n</ul>\n<!-- $$$FontUtils-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>FontUtils cannot be instantiated and it is already available as a context property, i.e&#x2e; 'FontUtils' is an instance that can be used from anywhere in the code.</p>\n<p>Example of a Label implementation which uses the default base scale for the font size:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Text\">Text</a></span> {\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span> <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;medium&quot;</span>\n <span class=\"name\">font</span>.pixelSize: <span class=\"name\">FontUtils</span>.<span class=\"name\">sizeToPixels</span>(<span class=\"name\">fontSize</span>)\n}</pre>\n<p>Another example of a custom text input component exposing a fontSize property and a base font unit size to scale its font:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span> <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;small&quot;</span>\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span> <span class=\"name\">baseFontUnits</span>: <span class=\"name\">units</span>.<span class=\"name\">dp</span>(<span class=\"number\">20</span>)\n <span class=\"name\">font</span>.pixelSize: <span class=\"name\">FontUtils</span>.<span class=\"name\">modularScale</span>(<span class=\"name\">fontSize</span>) <span class=\"operator\">*</span> <span class=\"name\">units</span>.<span class=\"name\">dp</span>(<span class=\"name\">baseFontUnits</span>)\n}</pre>\n<!-- @@@FontUtils -->\n<h2>Method Documentation</h2>\n<!-- $$$modularScale -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"modularScale-method\"></a><span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span> <span class=\"name\">modularScale</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span><i> size</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function returns the number interpretation of a given font scale. The scale can have one of the following values:</p>\n<ul>\n<li><b>xx-small</b></li>\n<li><b>x-small</b></li>\n<li><b>small</b></li>\n<li><b>medium</b></li>\n<li><b>large</b></li>\n<li><b>x-large</b></li>\n</ul>\n</div></div><!-- @@@modularScale -->\n<br/>\n<!-- $$$sizeToPixels -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"sizeToPixels-method\"></a><span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span> <span class=\"name\">sizeToPixels</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span><i> size</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The function calculates the pixel size of a given scale. The size scale can be one of the strings specified at <a href=\"#modularScale-method\">modularScale</a> function. On failure returns 0.</p>\n</div></div><!-- @@@sizeToPixels -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-fontutils.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1579/", "name": "Header", "description": "", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Header", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import .</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n</td></tr></table><ul>\n</ul>\n<!-- $$$Header-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<!-- @@@Header -->\n</div></div>\n", "source_file": "qml-header.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1370/", "name": "Icon", "description": "The Icon component displays an icon from the icon theme. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Icon", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Icon-brief -->\n<p>The Icon component displays an icon from the icon theme. <a href=\"#details\">More...</a></p>\n<!-- @@@Icon -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#keyColor-prop\">keyColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#name-prop\">name</a></b></b> : string</li>\n</ul>\n<!-- $$$Icon-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The icon theme contains a set of standard icons referred to by their name. Using icons whenever possible enhances consistency accross applications. Each icon has a name and can have different visual representations depending on the size requested.</p>\n<p>Icons can also be colorized. Setting the <a href=\"#color-prop\">color</a> property will make all pixels with the <a href=\"#keyColor-prop\">keyColor</a> (by default #808080) colored.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">Icon</span> {\n <span class=\"name\">width</span>: <span class=\"number\">64</span>\n <span class=\"name\">height</span>: <span class=\"number\">64</span>\n <span class=\"name\">name</span>: <span class=\"string\">&quot;search&quot;</span>\n}</pre>\n<p>Example of colorization:</p>\n<pre class=\"qml\"><span class=\"type\">Icon</span> {\n <span class=\"name\">width</span>: <span class=\"number\">64</span>\n <span class=\"name\">height</span>: <span class=\"number\">64</span>\n <span class=\"name\">name</span>: <span class=\"string\">&quot;search&quot;</span>\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">warmGrey</span>\n}</pre>\n<p>Icon themes are created following the <a href=\"http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html\">Freedesktop Icon Theme Specification</a>.</p>\n<!-- @@@Icon -->\n<h2>Property Documentation</h2>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The color that all pixels that originally are of color <a href=\"#keyColor-prop\">keyColor</a> should take.</p>\n</div></div><!-- @@@color -->\n<br/>\n<!-- $$$keyColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"keyColor-prop\"></a><span class=\"name\">keyColor</span> : <span class=\"type\"><a href=\"#color-prop\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The color of the pixels that should be colorized. By default it is set to #808080.</p>\n</div></div><!-- @@@keyColor -->\n<br/>\n<!-- $$$name -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"name-prop\"></a><span class=\"name\">name</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The name of the icon to display.</p>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folders where the icon themes are installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/suru\">/usr/share/icons/suru</a></li>\n<li>Ubuntu Desktop: <a href=\"file:/usr/share/icons/ubuntu-mono-dark\">/usr/share/icons/ubuntu-mono-dark</a></li>\n</ul>\n<p>These 2 separate icon themes will be merged soon.</p>\n</div></div><!-- @@@name -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-icon.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/477/", "name": "Icon", "description": "The Icon component displays an icon from the icon theme. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Icon", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Icon-brief -->\n<p>The Icon component displays an icon from the icon theme. <a href=\"#details\">More...</a></p>\n<!-- @@@Icon -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#keyColor-prop\">keyColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#name-prop\">name</a></b></b> : string</li>\n</ul>\n<!-- $$$Icon-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The icon theme contains a set of standard icons referred to by their name. Using icons whenever possible enhances consistency accross applications. Each icon has a name and can have different visual representations depending on the size requested.</p>\n<p>Icons can also be colorized. Setting the <a href=\"#color-prop\">color</a> property will make all pixels with the <a href=\"#keyColor-prop\">keyColor</a> (by default #808080) colored.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">Icon</span> {\n <span class=\"name\">width</span>: <span class=\"number\">64</span>\n <span class=\"name\">height</span>: <span class=\"number\">64</span>\n <span class=\"name\">name</span>: <span class=\"string\">&quot;search&quot;</span>\n}</pre>\n<p>Example of colorization:</p>\n<pre class=\"qml\"><span class=\"type\">Icon</span> {\n <span class=\"name\">width</span>: <span class=\"number\">64</span>\n <span class=\"name\">height</span>: <span class=\"number\">64</span>\n <span class=\"name\">name</span>: <span class=\"string\">&quot;search&quot;</span>\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">warmGrey</span>\n}</pre>\n<p>Icon themes are created following the <a href=\"http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html\">Freedesktop Icon Theme Specification</a>.</p>\n<!-- @@@Icon -->\n<h2>Property Documentation</h2>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\"><a href=\"#color-prop\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The color that all pixels that originally are of color <a href=\"#keyColor-prop\">keyColor</a> should take.</p>\n</div></div><!-- @@@color -->\n<br/>\n<!-- $$$keyColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"keyColor-prop\"></a><span class=\"name\">keyColor</span> : <span class=\"type\"><a href=\"#color-prop\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The color of the pixels that should be colorized. By default it is set to #808080.</p>\n</div></div><!-- @@@keyColor -->\n<br/>\n<!-- $$$name -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"name-prop\"></a><span class=\"name\">name</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The name of the icon to display.</p>\n<p><b>Note: </b>The complete list of icons available in Ubuntu is not published yet. For now please refer to the folders where the icon themes are installed:</p><ul>\n<li>Ubuntu Touch: <a href=\"file:/usr/share/icons/ubuntu-mobile\">/usr/share/icons/ubuntu-mobile</a></li>\n<li>Ubuntu Desktop: <a href=\"file:/usr/share/icons/ubuntu-mono-dark\">/usr/share/icons/ubuntu-mono-dark</a></li>\n</ul>\n<p>These 2 separate icon themes will be merged soon.</p>\n</div></div><!-- @@@name -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-icon.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/166/", "name": "Icon", "description": "The Icon component displays an icon from the icon theme. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Icon", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Icon-brief -->\n<p>The Icon component displays an icon from the icon theme. <a href=\"#details\">More...</a></p>\n<!-- @@@Icon -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#keyColor-prop\">keyColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#name-prop\">name</a></b></b> : string</li>\n</ul>\n<!-- $$$Icon-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The icon theme contains a set of standard icons referred to by their name. Using icons whenever possible enhances consistency accross applications. Each icon has a name and can have different visual representations depending on the size requested.</p>\n<p>Icons can also be colorized. Setting the <a href=\"#color-prop\">color</a> property will make all pixels with the <a href=\"#keyColor-prop\">keyColor</a> (by default #808080) colored.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">Icon</span> {\n <span class=\"name\">width</span>: <span class=\"number\">64</span>\n <span class=\"name\">height</span>: <span class=\"number\">64</span>\n <span class=\"name\">name</span>: <span class=\"string\">&quot;search&quot;</span>\n}</pre>\n<p>Example of colorization:</p>\n<pre class=\"qml\"><span class=\"type\">Icon</span> {\n <span class=\"name\">width</span>: <span class=\"number\">64</span>\n <span class=\"name\">height</span>: <span class=\"number\">64</span>\n <span class=\"name\">name</span>: <span class=\"string\">&quot;search&quot;</span>\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">warmGrey</span>\n}</pre>\n<p>Icon themes are created following the <a href=\"http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html\">Freedesktop Icon Theme Specification</a>.</p>\n<!-- @@@Icon -->\n<h2>Property Documentation</h2>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\"><a href=\"#color-prop\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The color that all pixels that originally are of color <a href=\"#keyColor-prop\">keyColor</a> should take.</p>\n</div></div><!-- @@@color -->\n<br/>\n<!-- $$$keyColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"keyColor-prop\"></a><span class=\"name\">keyColor</span> : <span class=\"type\"><a href=\"#color-prop\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The color of the pixels that should be colorized. By default it is set to #808080.</p>\n</div></div><!-- @@@keyColor -->\n<br/>\n<!-- $$$name -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"name-prop\"></a><span class=\"name\">name</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The name of the icon to display.</p>\n</div></div><!-- @@@name -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/937/", "name": "InverseMouse", "description": "Attached object filtering mouse events occured outside the owner. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.InverseMouse", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$InverseMouse-brief -->\n<p>Attached object filtering mouse events occured outside the owner. <a href=\"#details\">More...</a></p>\n<!-- @@@InverseMouse -->\n<!-- $$$InverseMouse-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Similar to Mouse filter attached property, provides mouse event filtering capabilities but for events occurring outside of the owner's area, excluding the input method area.</p>\n<p>Being derived from Mouse filter element, provides the same behavior as the Mouse filter, except that all the signals are emitted when the mouse event occurs outside the owner's area. Note that accepting composed mouse events does not have any effect on event propagation.</p>\n<p>Altering <i>priority</i> property has no effect on inverse mouse filter as mouse events captured by the filter are not forwarded to the owner, hence forwarding those events first to the owner will not have any effect.</p>\n<!-- @@@InverseMouse -->\n</div></div>\n", "source_file": "qml-ubuntu-components0-inversemouse.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1421/", "name": "InverseMouse", "description": "Attached object filtering mouse events occured outside the owner. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.InverseMouse", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$InverseMouse-brief -->\n<p>Attached object filtering mouse events occured outside the owner. <a href=\"#details\">More...</a></p>\n<!-- @@@InverseMouse -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<!-- $$$InverseMouse-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Similar to Mouse filter attached property, provides mouse event filtering capabilities but for events occurring outside of the owner's area, excluding the input method area.</p>\n<p>Being derived from Mouse filter element, provides the same behavior as the Mouse filter, except that all the signals are emitted when the mouse event occurs outside the owner's area. Note that accepting composed mouse events does not have any effect on event propagation.</p>\n<p>Altering <i>priority</i> property has no effect on inverse mouse filter as mouse events captured by the filter are not forwarded to the owner, hence forwarding those events first to the owner will not have any effect.</p>\n<!-- @@@InverseMouse -->\n</div></div>\n", "source_file": "qml-ubuntu-components-inversemouse.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1412/", "name": "InverseMouseArea", "description": "The InverseMouseArea captures mouse events happening outside of a given area. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.InverseMouseArea", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$InverseMouseArea-brief -->\n<p>The InverseMouseArea captures mouse events happening outside of a given area. <a href=\"#details\">More...</a></p>\n<!-- @@@InverseMouseArea -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#sensingArea-prop\">sensingArea</a></b></b> : Item</li>\n<li class=\"fn\"><b><b><a href=\"#topmostItem-prop\">topmostItem</a></b></b> : bool</li>\n</ul>\n<!-- $$$InverseMouseArea-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>A typical use case is hiding of a popup or tooltip when the user presses or taps outside of the popup or tooltip area. The following example illustrates the use of InverseMouseArea in a Popup.</p>\n<p>Popup.qml</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">width</span>: <span class=\"number\">200</span>; <span class=\"name\">height</span>: <span class=\"number\">200</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;darkgray&quot;</span>\n <span class=\"name\">radius</span>: <span class=\"number\">10</span>\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">acceptedButtons</span>: <span class=\"name\">Qt</span>.<span class=\"name\">LeftButton</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">parent</span>.<span class=\"name\">destroy</span>()\n }\n}</pre>\n<p>In the Popup above the mouse presses happening outside the area will cause closing and destroying the popup.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">640</span>\n <span class=\"name\">height</span>: <span class=\"number\">480</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">button</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Press me&quot;</span>\n <span class=\"name\">onClicked</span>: {\n var <span class=\"name\">component</span> = <span class=\"name\">Qt</span>.<span class=\"name\">createComponent</span>(<span class=\"string\">&quot;Popup.qml&quot;</span>);\n var <span class=\"name\">obj</span> = <span class=\"name\">component</span>.<span class=\"name\">create</span>(<span class=\"name\">parent</span>);\n <span class=\"name\">obj</span>.<span class=\"name\">visible</span> <span class=\"operator\">=</span> <span class=\"number\">true</span>;\n }\n }\n}</pre>\n<p>By default the InverseMouseArea sensing area (the area from which the mouse clicks will be taken) is the application's root component, or the Window in which the topmost parent component of the mouse area resides. This area can be however altered to a different area by setting the <a href=\"#sensingArea-prop\">sensingArea</a> property to a component which is either a parent of the mouse area or a sibling of it.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">71</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;clicked on the root component&quot;</span>)\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">blueRect</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">51</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">sensingArea</span>: <span class=\"name\">blueRect</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;clicked on the blue rect&quot;</span>)\n }\n }\n }\n}</pre>\n<p>In this example the inverse mouse area will get mouse presses only when those happen on the blue rectangle area. When clicked outside of the blue rectangle or inside the red rectangle, the mouse area covering the root item will get click signals.</p>\n<p>InverseMouseArea, being derived from <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> respects the stacking and z-order of the components. This should be taken into account when combining it with MouseAreas within the same level of the component hierarchy or when combined with <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> siblings. In these cases it is recommended to have the InverseMouseArea declared as last component, having it in this way as last one oin the component stack.</p>\n<pre class=\"qml\"> <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">71</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">label</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">horizontalCenter</span>: <span class=\"name\">parent</span>.<span class=\"name\">horizontalCenter</span>\n <span class=\"name\">top</span>: <span class=\"name\">parent</span>.<span class=\"name\">top</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">z</span>: <span class=\"number\">1</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;red band&quot;</span>)\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"type\">anchors</span> {\n <span class=\"name\">top</span>: <span class=\"name\">label</span>.<span class=\"name\">bottom</span>\n <span class=\"name\">topMargin</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">2</span>)\n <span class=\"name\">horizontalCenter</span>: <span class=\"name\">parent</span>.<span class=\"name\">horizontalCenter</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;green&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">button</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;I'm a button, I do nothing.&quot;</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;green band&quot;</span>)\n }\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">button</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;all over except button&quot;</span>)\n }\n }\n}</pre>\n<p>When this is not enough, and you want to grab all the mouse events that have been sent to the <a href=\"#sensingArea-prop\">sensingArea</a>, you can use <a href=\"#topmostItem-prop\">topmostItem</a> to place the mouse area above all the components that were instantiated under the sensing area. Beware that setting this property will no longer consider neither the z-order nor the component stack order anymore, as it will steal all the mouse events from the component set as <a href=\"#sensingArea-prop\">sensingArea</a>.</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">71</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">firstRect</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">top</span>: <span class=\"name\">parent</span>.<span class=\"name\">top</span>\n <span class=\"name\">leftMargin</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">topMargin</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n }\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">15</span>)\n <span class=\"name\">height</span>: <span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;IMA&quot;</span>\n <span class=\"name\">topmostItem</span>: <span class=\"number\">true</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;IMA&quot;</span>)\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">firstRect</span>.<span class=\"name\">right</span>\n <span class=\"name\">top</span>: <span class=\"name\">firstRect</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">height</span>: <span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;MA&quot;</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;MA&quot;</span>)\n }\n }\n}</pre>\n<!-- @@@InverseMouseArea -->\n<h2>Property Documentation</h2>\n<!-- $$$sensingArea -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"sensingArea-prop\"></a><span class=\"name\">sensingArea</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>This property holds the sensing area of the inverse mouse area. By default it is the root item but it can be set to any other area. The area can be reset to the root item by setting null to the property.</p>\n</div></div><!-- @@@sensingArea -->\n<br/>\n<!-- $$$topmostItem -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"topmostItem-prop\"></a><span class=\"name\">topmostItem</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies whether the InverseMouseArea should be above all components taking all mouse, wheel and hover events from the application's or from the area specified by the <a href=\"#sensingArea-prop\">sensingArea</a> (true), or only from the siblings (false). The default value is false.</p>\n</div></div><!-- @@@topmostItem -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-inversemousearea.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/517/", "name": "InverseMouseArea", "description": "The InverseMouseArea captures mouse events happening outside of a given area. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.InverseMouseArea", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$InverseMouseArea-brief -->\n<p>The InverseMouseArea captures mouse events happening outside of a given area. <a href=\"#details\">More...</a></p>\n<!-- @@@InverseMouseArea -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#sensingArea-prop\">sensingArea</a></b></b> : Item</li>\n<li class=\"fn\"><b><b><a href=\"#topmostItem-prop\">topmostItem</a></b></b> : bool</li>\n</ul>\n<!-- $$$InverseMouseArea-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>A typical use case is hiding of a popup or tooltip when the user presses or taps outside of the popup or tooltip area. The following example illustrates the use of InverseMouseArea in a Popup.</p>\n<p>Popup.qml</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">width</span>: <span class=\"number\">200</span>; <span class=\"name\">height</span>: <span class=\"number\">200</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;darkgray&quot;</span>\n <span class=\"name\">radius</span>: <span class=\"number\">10</span>\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">acceptedButtons</span>: <span class=\"name\">Qt</span>.<span class=\"name\">LeftButton</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">parent</span>.<span class=\"name\">destroy</span>()\n }\n}</pre>\n<p>In the Popup above the mouse presses happening outside the area will cause closing and destroying the popup.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">640</span>\n <span class=\"name\">height</span>: <span class=\"number\">480</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">button</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Press me&quot;</span>\n <span class=\"name\">onClicked</span>: {\n var <span class=\"name\">component</span> = <span class=\"name\">Qt</span>.<span class=\"name\">createComponent</span>(<span class=\"string\">&quot;Popup.qml&quot;</span>);\n var <span class=\"name\">obj</span> = <span class=\"name\">component</span>.<span class=\"name\">create</span>(<span class=\"name\">parent</span>);\n <span class=\"name\">obj</span>.<span class=\"name\">visible</span> <span class=\"operator\">=</span> <span class=\"number\">true</span>;\n }\n }\n}</pre>\n<p>By default the InverseMouseArea sensing area (the area from which the mouse clicks will be taken) is the application's root component, or the Window in which the topmost parent component of the mouse area resides. This area can be however altered to a different area by setting the <a href=\"#sensingArea-prop\">sensingArea</a> property to a component which is either a parent of the mouse area or a sibling of it.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">71</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;clicked on the root component&quot;</span>)\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">blueRect</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">51</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">sensingArea</span>: <span class=\"name\">blueRect</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;clicked on the blue rect&quot;</span>)\n }\n }\n }\n}</pre>\n<p>In this example the inverse mouse area will get mouse presses only when those happen on the blue rectangle area. When clicked outside of the blue rectangle or inside the red rectangle, the mouse area covering the root item will get click signals.</p>\n<p>InverseMouseArea, being derived from <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> respects the stacking and z-order of the components. This should be taken into account when combining it with MouseAreas within the same level of the component hierarchy or when combined with <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> siblings. In these cases it is recommended to have the InverseMouseArea declared as last component, having it in this way as last one oin the component stack.</p>\n<pre class=\"qml\"> <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">71</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">label</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">horizontalCenter</span>: <span class=\"name\">parent</span>.<span class=\"name\">horizontalCenter</span>\n <span class=\"name\">top</span>: <span class=\"name\">parent</span>.<span class=\"name\">top</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">z</span>: <span class=\"number\">1</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;red band&quot;</span>)\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"type\">anchors</span> {\n <span class=\"name\">top</span>: <span class=\"name\">label</span>.<span class=\"name\">bottom</span>\n <span class=\"name\">topMargin</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">2</span>)\n <span class=\"name\">horizontalCenter</span>: <span class=\"name\">parent</span>.<span class=\"name\">horizontalCenter</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;green&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">button</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;I'm a button, I do nothing.&quot;</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;green band&quot;</span>)\n }\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">button</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;all over except button&quot;</span>)\n }\n }\n}</pre>\n<p>When this is not enough, and you want to grab all the mouse events that have been sent to the <a href=\"#sensingArea-prop\">sensingArea</a>, you can use <a href=\"#topmostItem-prop\">topmostItem</a> to place the mouse area above all the components that were instantiated under the sensing area. Beware that setting this property will no longer consider neither the z-order nor the component stack order anymore, as it will steal all the mouse events from the component set as <a href=\"#sensingArea-prop\">sensingArea</a>.</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">71</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">firstRect</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">top</span>: <span class=\"name\">parent</span>.<span class=\"name\">top</span>\n <span class=\"name\">leftMargin</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">topMargin</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n }\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">15</span>)\n <span class=\"name\">height</span>: <span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n <span class=\"type\">InverseMouseArea</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;IMA&quot;</span>\n <span class=\"name\">topmostItem</span>: <span class=\"number\">true</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;IMA&quot;</span>)\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">firstRect</span>.<span class=\"name\">right</span>\n <span class=\"name\">top</span>: <span class=\"name\">firstRect</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">height</span>: <span class=\"name\">width</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;MA&quot;</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;MA&quot;</span>)\n }\n }\n}</pre>\n<!-- @@@InverseMouseArea -->\n<h2>Property Documentation</h2>\n<!-- $$$sensingArea -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"sensingArea-prop\"></a><span class=\"name\">sensingArea</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>This property holds the sensing area of the inverse mouse area. By default it is the root item but it can be set to any other area. The area can be reset to the root item by setting null to the property.</p>\n</div></div><!-- @@@sensingArea -->\n<br/>\n<!-- $$$topmostItem -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"topmostItem-prop\"></a><span class=\"name\">topmostItem</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies whether the InverseMouseArea should be above all components taking all mouse, wheel and hover events from the application's or from the area specified by the <a href=\"#sensingArea-prop\">sensingArea</a> (true), or only from the siblings (false). The default value is false.</p>\n</div></div><!-- @@@topmostItem -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-inversemousearea.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/168/", "name": "Label", "description": "Text with Ubuntu styling. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Label", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Label-brief -->\n<p>Text with Ubuntu styling. <a href=\"#details\">More...</a></p>\n<!-- @@@Label -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#fontSize-prop\">fontSize</a></b></b> : string</li>\n</ul>\n<!-- $$$Label-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">Rectangle</span> {\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">coolGrey</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"type\">Label</span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Hello, world!&quot;</span>\n <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;large&quot;</span>\n }\n}</pre>\n<!-- @@@Label -->\n<h2>Property Documentation</h2>\n<!-- $$$fontSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fontSize-prop\"></a><span class=\"name\">fontSize</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The size of the text. One of the following strings (from smallest to largest):</p>\n<ul>\n<li>&quot;xx-small&quot;</li>\n<li>&quot;x-small&quot;</li>\n<li>&quot;small&quot;</li>\n<li>&quot;medium&quot;</li>\n<li>&quot;large&quot;</li>\n<li>&quot;x-large&quot;</li>\n</ul>\n<p>Default value is &quot;medium&quot;.</p>\n</div></div><!-- @@@fontSize -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/479/", "name": "Label", "description": "Text with Ubuntu styling. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Label", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Label-brief -->\n<p>Text with Ubuntu styling. <a href=\"#details\">More...</a></p>\n<!-- @@@Label -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/QtQuick.Text\">Text</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#fontSize-prop\">fontSize</a></b></b> : string</li>\n</ul>\n<!-- $$$Label-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">coolGrey</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"type\">Label</span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Hello, world!&quot;</span>\n <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;large&quot;</span>\n }\n}</pre>\n<!-- @@@Label -->\n<h2>Property Documentation</h2>\n<!-- $$$fontSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fontSize-prop\"></a><span class=\"name\">fontSize</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The size of the text. One of the following strings (from smallest to largest):</p>\n<ul>\n<li>&quot;xx-small&quot;</li>\n<li>&quot;x-small&quot;</li>\n<li>&quot;small&quot;</li>\n<li>&quot;medium&quot;</li>\n<li>&quot;large&quot;</li>\n<li>&quot;x-large&quot;</li>\n</ul>\n<p>Default value is &quot;medium&quot;.</p>\n</div></div><!-- @@@fontSize -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-label.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1372/", "name": "Label", "description": "Text with Ubuntu styling. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Label", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Label-brief -->\n<p>Text with Ubuntu styling. <a href=\"#details\">More...</a></p>\n<!-- @@@Label -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/QtQuick.Text\">Text</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#fontSize-prop\">fontSize</a></b></b> : string</li>\n</ul>\n<!-- $$$Label-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">coolGrey</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"type\">Label</span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Hello, world!&quot;</span>\n <span class=\"name\">fontSize</span>: <span class=\"string\">&quot;large&quot;</span>\n }\n}</pre>\n<!-- @@@Label -->\n<h2>Property Documentation</h2>\n<!-- $$$fontSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"fontSize-prop\"></a><span class=\"name\">fontSize</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The size of the text. One of the following strings (from smallest to largest):</p>\n<ul>\n<li>&quot;xx-small&quot;</li>\n<li>&quot;x-small&quot;</li>\n<li>&quot;small&quot;</li>\n<li>&quot;medium&quot;</li>\n<li>&quot;large&quot;</li>\n<li>&quot;x-large&quot;</li>\n</ul>\n<p>Default value is &quot;medium&quot;.</p>\n</div></div><!-- @@@fontSize -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-label.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1373/", "name": "MainView", "description": "MainView is the root Item that should be used for all applications. It automatically adds a header and toolbar for its contents and can rotate its content based on the device orientation. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.MainView", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$MainView-brief -->\n<p>MainView is the root Item that should be used for all applications. It automatically adds a header and toolbar for its contents and can rotate its content based on the device orientation. <a href=\"#details\">More...</a></p>\n<!-- @@@MainView -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actionManager-prop\">actionManager</a></b></b> : UnityActions.ActionManager</li>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : list&lt;Action&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#anchorToKeyboard-prop\">anchorToKeyboard</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#applicationName-prop\">applicationName</a></b></b> : string<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#automaticOrientation-prop\">automaticOrientation</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#backgroundColor-prop\">backgroundColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#footerColor-prop\">footerColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#headerColor-prop\">headerColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#useDeprecatedToolbar-prop\">useDeprecatedToolbar</a></b></b> : bool</li>\n</ul>\n<!-- $$$MainView-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The simplest way to use a MainView is to include a single <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> object inside the MainView:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Simple page&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Push me&quot;</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">15</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;Click!&quot;</span>)\n }\n }\n}</pre>\n<p>It is not required to set the anchors of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> as it will automatically fill its parent. The MainView has a header that automatically shows the title of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a>.</p>\n<p>Do not include multiple Pages directly inside the MainView, but use <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Tabs\">Tabs</a> or <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageStack\">PageStack</a> inside MainView to navigate between several Pages.</p>\n<p>For the MainView to automatically rotate its content following the orientation of the device, set the <a href=\"#automaticOrientation-prop\">automaticOrientation</a> property to true.</p>\n<p>If the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> inside the MainView includes a Flickable with enough contents for scrolling, the header will automatically hide and show when the user scrolls up or down:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Page with Flickable&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Flickable\">Flickable</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">contentHeight</span>: <span class=\"name\">column</span>.<span class=\"name\">height</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">column</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Repeater\">Repeater</a></span> {\n <span class=\"name\">model</span>: <span class=\"number\">100</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;line &quot;</span><span class=\"operator\">+</span><span class=\"name\">index</span>\n }\n }\n }\n }\n }\n}</pre>\n<p>The same header behavior is automatic when using a <a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a> instead of a Flickable in the above example.</p>\n<p>A toolbar can be added to the application by setting the tools property of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a>:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Page title&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">rectangle</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">coolGrey</span>\n }\n <span class=\"name\">tools</span>: <span class=\"name\">ToolbarItems</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ToolbarButton\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;orange&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"name\">UbuntuColors</span>.<span class=\"name\">orange</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ToolbarButton\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;purple&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"name\">UbuntuColors</span>.<span class=\"name\">lightAubergine</span>\n }\n }\n }\n }\n}</pre>\n<p>The toolbar is hidden by default, but will be made visible when the user performs a bottom-edge-swipe gesture, and hidden when the user swipes it out, or when the active <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> inside the MainView is changed. The examples above show how to include a single <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> inside a MainView, but more advanced application structures are possible using <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageStack\">PageStack</a> and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Tabs\">Tabs</a>. See <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.ToolbarItems\">ToolbarItems</a> for details on how to to control the behavior and contents of the toolbar.</p>\n<!-- @@@MainView -->\n<h2>Property Documentation</h2>\n<!-- $$$actionManager -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actionManager-prop\"></a><span class=\"name\">actionManager</span> : <span class=\"type\">UnityActions</span>.<span class=\"type\">ActionManager</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The ActionManager that supervises the global and local ActionContexts. The <a href=\"#actions-prop\">actions</a> property should be used preferably since it covers most use cases. The ActionManager is accessible to have a more refined control over the actions, e.g&#x2e; if one wants to add/remove actions dynamically, create specific action contexts, etc.</p>\n</div></div><!-- @@@actionManager -->\n<br/>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\">Action</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>A global list of actions that will be available to the system (including HUD) as long as the application is running. For actions that are not always available to the system, but only when a certain Page is active, see the actions property of Page.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$anchorToKeyboard -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"anchorToKeyboard-prop\"></a><span class=\"name\">anchorToKeyboard</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>The property holds if the application should automatically resize the contents when the input method appears</p>\n<p>The default value is false.</p>\n</div></div><!-- @@@anchorToKeyboard -->\n<br/>\n<!-- $$$applicationName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"applicationName-prop\"></a><span class=\"name\">applicationName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>The property holds the application's name, which must be the same as the desktop file's name. The name also sets the name of the QCoreApplication and defaults for data and cache folders that work on the desktop and under confinement. C++ code that writes files may use QStandardPaths::writableLocation with QStandardPaths::DataLocation or QStandardPaths::CacheLocation.</p>\n</div></div><!-- @@@applicationName -->\n<br/>\n<!-- $$$automaticOrientation -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"automaticOrientation-prop\"></a><span class=\"name\">automaticOrientation</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Sets whether the application will be automatically rotating when the device is.</p>\n<p>The default value is false.</p>\n</div></div><!-- @@@automaticOrientation -->\n<br/>\n<!-- $$$backgroundColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"backgroundColor-prop\"></a><span class=\"name\">backgroundColor</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the background.</p>\n<p>The background is usually a single color. However if <a href=\"#headerColor-prop\">headerColor</a> or <a href=\"#footerColor-prop\">footerColor</a> are set then a gradient of colors will be drawn.</p>\n<p>For example, in order for the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a> to draw a color gradient beneath the content:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"name\">headerColor</span>: <span class=\"string\">&quot;#343C60&quot;</span>\n <span class=\"name\">backgroundColor</span>: <span class=\"string\">&quot;#6A69A2&quot;</span>\n <span class=\"name\">footerColor</span>: <span class=\"string\">&quot;#8896D5&quot;</span>\n}</pre>\n<p><b>See also </b><a href=\"#footerColor-prop\">footerColor</a> and <a href=\"#headerColor-prop\">headerColor</a>.</p>\n</div></div><!-- @@@backgroundColor -->\n<br/>\n<!-- $$$footerColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"footerColor-prop\"></a><span class=\"name\">footerColor</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the footer's background.</p>\n<p><b>See also </b><a href=\"#backgroundColor-prop\">backgroundColor</a> and <a href=\"#headerColor-prop\">headerColor</a>.</p>\n</div></div><!-- @@@footerColor -->\n<br/>\n<!-- $$$headerColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"headerColor-prop\"></a><span class=\"name\">headerColor</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the header's background.</p>\n<p><b>See also </b><a href=\"#backgroundColor-prop\">backgroundColor</a> and <a href=\"#footerColor-prop\">footerColor</a>.</p>\n</div></div><!-- @@@headerColor -->\n<br/>\n<!-- $$$useDeprecatedToolbar -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"useDeprecatedToolbar-prop\"></a><span class=\"name\">useDeprecatedToolbar</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Setting this option will enable the old toolbar, and disable the new features that are being added to the new header. Unsetting it removes the toolbar and enables developers to have a sneak peek at the new features that are coming to the header, even before all the required functionality is implemented. This property will be deprecated after the new header implementation is done and all apps transitioned to using it. Default value: true.</p>\n</div></div><!-- @@@useDeprecatedToolbar -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-mainview.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/480/", "name": "MainView", "description": "MainView is the root Item that should be used for all applications. It automatically adds a header and toolbar for its contents and can rotate its content based on the device orientation. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.MainView", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$MainView-brief -->\n<p>MainView is the root Item that should be used for all applications. It automatically adds a header and toolbar for its contents and can rotate its content based on the device orientation. <a href=\"#details\">More...</a></p>\n<!-- @@@MainView -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actionManager-prop\">actionManager</a></b></b> : UnityActions.ActionManager</li>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : list&lt;Action&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#anchorToKeyboard-prop\">anchorToKeyboard</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#applicationName-prop\">applicationName</a></b></b> : string<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#automaticOrientation-prop\">automaticOrientation</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#backgroundColor-prop\">backgroundColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#footerColor-prop\">footerColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#headerColor-prop\">headerColor</a></b></b> : color</li>\n</ul>\n<!-- $$$MainView-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The simplest way to use a MainView is to include a <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> object inside the MainView:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Simple page&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Push me&quot;</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">15</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;Click!&quot;</span>)\n }\n }\n}</pre>\n<p>It is not required to set the anchors of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> as it will automatically fill its parent. The MainView has a header that automatically shows the title of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a>.</p>\n<p>For the MainView to automatically rotate its content following the orientation of the device, set the <a href=\"#automaticOrientation-prop\">automaticOrientation</a> property to true.</p>\n<p>If the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> inside the MainView includes a Flickable with enough contents for scrolling, the header will automatically hide and show when the user scrolls up or down:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Page with Flickable&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Flickable\">Flickable</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">contentHeight</span>: <span class=\"name\">column</span>.<span class=\"name\">height</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">column</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Repeater\">Repeater</a></span> {\n <span class=\"name\">model</span>: <span class=\"number\">100</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;line &quot;</span><span class=\"operator\">+</span><span class=\"name\">index</span>\n }\n }\n }\n }\n }\n}</pre>\n<p>The same header behavior is automatic when using a <a href=\"/api/qml/sdk-14.04/QtQuick.ListView\">ListView</a> instead of a Flickable in the above example.</p>\n<p>A toolbar can be added to the application by setting the tools property of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a>:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Page title&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">rectangle</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">coolGrey</span>\n }\n <span class=\"name\">tools</span>: <span class=\"name\">ToolbarItems</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarButton\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;orange&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"name\">UbuntuColors</span>.<span class=\"name\">orange</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarButton\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;purple&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"name\">UbuntuColors</span>.<span class=\"name\">lightAubergine</span>\n }\n }\n }\n }\n}</pre>\n<p>The toolbar is hidden by default, but will be made visible when the user performs a bottom-edge-swipe gesture, and hidden when the user swipes it out, or when the active <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> inside the MainView is changed. The examples above show how to include a single <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> inside a MainView, but more advanced application structures are possible using <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.PageStack\">PageStack</a> and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Tabs\">Tabs</a>. See <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarItems\">ToolbarItems</a> for details on how to to control the behavior and contents of the toolbar.</p>\n<!-- @@@MainView -->\n<h2>Property Documentation</h2>\n<!-- $$$actionManager -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actionManager-prop\"></a><span class=\"name\">actionManager</span> : <span class=\"type\">UnityActions</span>.<span class=\"type\">ActionManager</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The ActionManager that supervises the global and local ActionContexts. The <a href=\"#actions-prop\">actions</a> property should be used preferably since it covers most use cases. The ActionManager is accessible to have a more refined control over the actions, e.g&#x2e; if one wants to add/remove actions dynamically, create specific action contexts, etc.</p>\n</div></div><!-- @@@actionManager -->\n<br/>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\">Action</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>A global list of actions that will be available to the system (including HUD) as long as the application is running. For actions that are not always available to the system, but only when a certain Page is active, see the actions property of Page.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$anchorToKeyboard -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"anchorToKeyboard-prop\"></a><span class=\"name\">anchorToKeyboard</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The property holds if the application should automatically resize the contents when the input method appears</p>\n<p>The default value is false.</p>\n</div></div><!-- @@@anchorToKeyboard -->\n<br/>\n<!-- $$$applicationName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"applicationName-prop\"></a><span class=\"name\">applicationName</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The property holds the application's name, which must be the same as the desktop file's name. The name also sets the name of the QCoreApplication and defaults for data and cache folders that work on the desktop and under confinement. C++ code that writes files may use QStandardPaths::writableLocation with QStandardPaths::DataLocation or QStandardPaths::CacheLocation.</p>\n</div></div><!-- @@@applicationName -->\n<br/>\n<!-- $$$automaticOrientation -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"automaticOrientation-prop\"></a><span class=\"name\">automaticOrientation</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Sets whether the application will be automatically rotating when the device is.</p>\n<p>The default value is false.</p>\n</div></div><!-- @@@automaticOrientation -->\n<br/>\n<!-- $$$backgroundColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"backgroundColor-prop\"></a><span class=\"name\">backgroundColor</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtquick-index.html/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the background.</p>\n<p>The background is usually a single color. However if <a href=\"#headerColor-prop\">headerColor</a> or <a href=\"#footerColor-prop\">footerColor</a> are set then a gradient of colors will be drawn.</p>\n<p>For example, in order for the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a> to draw a color gradient beneath the content:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"name\">headerColor</span>: <span class=\"string\">&quot;#343C60&quot;</span>\n <span class=\"name\">backgroundColor</span>: <span class=\"string\">&quot;#6A69A2&quot;</span>\n <span class=\"name\">footerColor</span>: <span class=\"string\">&quot;#8896D5&quot;</span>\n}</pre>\n<p><b>See also </b><a href=\"#footerColor-prop\">footerColor</a> and <a href=\"#headerColor-prop\">headerColor</a>.</p>\n</div></div><!-- @@@backgroundColor -->\n<br/>\n<!-- $$$footerColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"footerColor-prop\"></a><span class=\"name\">footerColor</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtquick-index.html/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the footer's background.</p>\n<p><b>See also </b><a href=\"#backgroundColor-prop\">backgroundColor</a> and <a href=\"#headerColor-prop\">headerColor</a>.</p>\n</div></div><!-- @@@footerColor -->\n<br/>\n<!-- $$$headerColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"headerColor-prop\"></a><span class=\"name\">headerColor</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtquick-index.html/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the header's background.</p>\n<p><b>See also </b><a href=\"#backgroundColor-prop\">backgroundColor</a> and <a href=\"#footerColor-prop\">footerColor</a>.</p>\n</div></div><!-- @@@headerColor -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-mainview.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/169/", "name": "MainView", "description": "MainView is the root Item that should be used for all applications. It automatically adds a header and toolbar for its contents and can rotate its content based on the device orientation. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.MainView", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$MainView-brief -->\n<p>MainView is the root Item that should be used for all applications. It automatically adds a header and toolbar for its contents and can rotate its content based on the device orientation. <a href=\"#details\">More...</a></p>\n<!-- @@@MainView -->\n<p>Inherits <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.StyledItem/\">StyledItem</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actionManager-prop\">actionManager</a></b></b> : UnityActions.ActionManager</li>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : list&lt;Action&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#anchorToKeyboard-prop\">anchorToKeyboard</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#applicationName-prop\">applicationName</a></b></b> : string<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#automaticOrientation-prop\">automaticOrientation</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#backgroundColor-prop\">backgroundColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#footerColor-prop\">footerColor</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#headerColor-prop\">headerColor</a></b></b> : color</li>\n</ul>\n<!-- $$$MainView-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>The simplest way to use a MainView is to include a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> object inside the MainView:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Simple page&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Push me&quot;</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">15</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;Click!&quot;</span>)\n }\n }\n}</pre>\n<p>It is not required to set the anchors of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> as it will automatically fill its parent. The MainView has a header that automatically shows the title of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a>.</p>\n<p>For the MainView to automatically rotate its content following the orientation of the device, set the <a href=\"#automaticOrientation-prop\">automaticOrientation</a> property to true.</p>\n<p>If the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> inside the MainView includes a Flickable with enough contents for scrolling, the header will automatically hide and show when the user scrolls up or down:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Page with Flickable&quot;</span>\n <span class=\"type\">Flickable</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">contentHeight</span>: <span class=\"name\">column</span>.<span class=\"name\">height</span>\n <span class=\"type\">Column</span> {\n <span class=\"name\">id</span>: <span class=\"name\">column</span>\n <span class=\"type\">Repeater</span> {\n <span class=\"name\">model</span>: <span class=\"number\">100</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;line &quot;</span><span class=\"operator\">+</span><span class=\"name\">index</span>\n }\n }\n }\n }\n }\n}</pre>\n<p>The same header behavior is automatic when using a ListView instead of a Flickable in the above example.</p>\n<p>A toolbar can be added to the application by setting the tools property of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a>:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">MainView</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Page title&quot;</span>\n <span class=\"type\">Rectangle</span> {\n <span class=\"name\">id</span>: <span class=\"name\">rectangle</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">coolGrey</span>\n }\n <span class=\"name\">tools</span>: <span class=\"name\">ToolbarItems</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarButton/\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;orange&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"name\">UbuntuColors</span>.<span class=\"name\">orange</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarButton/\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;purple&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span> <span class=\"operator\">=</span> <span class=\"name\">UbuntuColors</span>.<span class=\"name\">lightAubergine</span>\n }\n }\n }\n }\n}</pre>\n<p>The toolbar is hidden by default, but will be made visible when the user performs a bottom-edge-swipe gesture, and hidden when the user swipes it out, or when the active <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> inside the MainView is changed. The examples above show how to include a single <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> inside a MainView, but more advanced application structures are possible using <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.PageStack/\">PageStack</a> and <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Tabs/\">Tabs</a>. See <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarItems/\">ToolbarItems</a> for details on how to to control the behavior and contents of the toolbar.</p>\n<!-- @@@MainView -->\n<h2>Property Documentation</h2>\n<!-- $$$actionManager -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actionManager-prop\"></a><span class=\"name\">actionManager</span> : <span class=\"type\">UnityActions</span>.<span class=\"type\">ActionManager</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The ActionManager that supervises the global and local ActionContexts. The <a href=\"#actions-prop\">actions</a> property should be used preferably since it covers most use cases. The ActionManager is accessible to have a more refined control over the actions, e.g&#x2e; if one wants to add/remove actions dynamically, create specific action contexts, etc.</p>\n</div></div><!-- @@@actionManager -->\n<br/>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\">list</span>&lt;<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>A global list of actions that will be available to the system (including HUD) as long as the application is running. For actions that are not always available to the system, but only when a certain <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> is active, see the actions property of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a>.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$anchorToKeyboard -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"anchorToKeyboard-prop\"></a><span class=\"name\">anchorToKeyboard</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The property holds if the application should automatically resize the contents when the input method appears</p>\n<p>The default value is false.</p>\n</div></div><!-- @@@anchorToKeyboard -->\n<br/>\n<!-- $$$applicationName -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"applicationName-prop\"></a><span class=\"name\">applicationName</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The property holds the application's name, which must be the same as the desktop file's name.</p>\n</div></div><!-- @@@applicationName -->\n<br/>\n<!-- $$$automaticOrientation -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"automaticOrientation-prop\"></a><span class=\"name\">automaticOrientation</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Sets whether the application will be automatically rotating when the device is.</p>\n<p>The default value is false.</p>\n</div></div><!-- @@@automaticOrientation -->\n<br/>\n<!-- $$$backgroundColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"backgroundColor-prop\"></a><span class=\"name\">backgroundColor</span> : <span class=\"type\">color</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the background.</p>\n<p>The background is usually a single color. However if <a href=\"#headerColor-prop\">headerColor</a> or <a href=\"#footerColor-prop\">footerColor</a> are set then a gradient of colors will be drawn.</p>\n<p>For example, in order for the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a> to draw a color gradient beneath the content:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"name\">headerColor</span>: <span class=\"string\">&quot;#343C60&quot;</span>\n <span class=\"name\">backgroundColor</span>: <span class=\"string\">&quot;#6A69A2&quot;</span>\n <span class=\"name\">footerColor</span>: <span class=\"string\">&quot;#8896D5&quot;</span>\n}</pre>\n<p><b>See also </b><a href=\"#footerColor-prop\">footerColor</a> and <a href=\"#headerColor-prop\">headerColor</a>.</p>\n</div></div><!-- @@@backgroundColor -->\n<br/>\n<!-- $$$footerColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"footerColor-prop\"></a><span class=\"name\">footerColor</span> : <span class=\"type\">color</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the footer's background.</p>\n<p><b>See also </b><a href=\"#backgroundColor-prop\">backgroundColor</a> and <a href=\"#headerColor-prop\">headerColor</a>.</p>\n</div></div><!-- @@@footerColor -->\n<br/>\n<!-- $$$headerColor -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"headerColor-prop\"></a><span class=\"name\">headerColor</span> : <span class=\"type\">color</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Color of the header's background.</p>\n<p><b>See also </b><a href=\"#backgroundColor-prop\">backgroundColor</a> and <a href=\"#footerColor-prop\">footerColor</a>.</p>\n</div></div><!-- @@@headerColor -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1414/", "name": "MimeData", "description": "MimeData type provides interface to access and store data to the Clipboard. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.MimeData", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$MimeData-brief -->\n<p>MimeData type provides interface to access and store data to the Clipboard. <a href=\"#details\">More...</a></p>\n<!-- @@@MimeData -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#data-prop\">data</a></b></b> : var</li>\n<li class=\"fn\"><b><b><a href=\"#format-prop\">format</a></b></b> : list&lt;string&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#html-prop\">html</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#urls-prop\">urls</a></b></b> : list&lt;url&gt;</li>\n</ul>\n<!-- $$$MimeData-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<!-- @@@MimeData -->\n<h2>Property Documentation</h2>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"></div></div><!-- @@@color -->\n<br/>\n<!-- $$$data -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"data-prop\"></a><span class=\"name\">data</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-var.html\">var</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Reading the property returns a list of MIME type and data pairs representing the data stored in the object. Users can set custom MIME types which are not covered by the other properties.</p>\n<p>When setting the property value can take one of the following types:</p>\n<ul>\n<li>- string - the data will be set as <tt>text/plain</tt> MIME type, or as <tt>text/html</tt> in case HTML tags are detected</li>\n<li>- color - the data will be set as <tt>application/x-color</tt> MIME type</li>\n<li>- list&lt;url&gt; - the data will be set as <tt>text/uri-list</tt></li>\n<li>- list&lt;string&gt; - the data will be set as <tt>text/uri-list</tt> in case the first element of the list is a valid URL with scheme; otherwise if the list size is even, the list will be set as pairs of (MIME type,data)</li>\n<li>- list&lt;var&gt; - same as list&lt;url&gt; or list&lt;string&gt;</li>\n</ul>\n</div></div><!-- @@@data -->\n<br/>\n<!-- $$$format -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"format-prop\"></a><span class=\"name\">format</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns a list of formats supported by the object. This is a list of MIME types for which the object can return suitable data. The formats in the list are in a priority order.</p>\n<p><b>See also </b><a href=\"#data-prop\">data</a>.</p>\n</div></div><!-- @@@format -->\n<br/>\n<!-- $$$html -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"html-prop\"></a><span class=\"name\">html</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a string if the data stored in the object is HTML (MIME type text/html); otherwise contains an empty string.</p>\n</div></div><!-- @@@html -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a plain text (MIME type text/plain) representation of the data.</p>\n</div></div><!-- @@@text -->\n<br/>\n<!-- $$$urls -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"urls-prop\"></a><span class=\"name\">urls</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-url.html\">url</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a list of URLs contained within the MIME data object. URLs correspond to the MIME type text/uri-list.</p>\n</div></div><!-- @@@urls -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-mimedata.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/206/", "name": "MimeData", "description": "MimeData type provides interface to access and store data to the Clipboard. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.MimeData", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$MimeData-brief -->\n<p>MimeData type provides interface to access and store data to the Clipboard. <a href=\"#details\">More...</a></p>\n<!-- @@@MimeData -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#data-prop\">data</a></b></b> : var</li>\n<li class=\"fn\"><b><b><a href=\"#format-prop\">format</a></b></b> : list&lt;string&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#html-prop\">html</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#urls-prop\">urls</a></b></b> : list&lt;url&gt;</li>\n</ul>\n<!-- $$$MimeData-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<!-- @@@MimeData -->\n<h2>Property Documentation</h2>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\">color</span></p></td></tr></table></div><div class=\"qmldoc\"></div></div><!-- @@@color -->\n<br/>\n<!-- $$$data -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"data-prop\"></a><span class=\"name\">data</span> : <span class=\"type\">var</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Reading the property returns a list of MIME type and data pairs representing the data stored in the object. Users can set custom MIME types which are not covered by the other properties.</p>\n<p>When setting the property value can take one of the following types:</p>\n<ul>\n<li>- string - the data will be set as <tt>text/plain</tt> MIME type, or as <tt>text/html</tt> in case HTML tags are detected</li>\n<li>- color - the data will be set as <tt>application/x-color</tt> MIME type</li>\n<li>- list&lt;url&gt; - the data will be set as <tt>text/uri-list</tt></li>\n<li>- list&lt;string&gt; - the data will be set as <tt>text/uri-list</tt> in case the first element of the list is a valid URL with scheme; otherwise if the list size is even, the list will be set as pairs of (MIME type,data)</li>\n<li>- list&lt;var&gt; - same as list&lt;url&gt; or list&lt;string&gt;</li>\n</ul>\n</div></div><!-- @@@data -->\n<br/>\n<!-- $$$format -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"format-prop\"></a><span class=\"name\">format</span> : <span class=\"type\">list</span>&lt;<span class=\"type\">string</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns a list of formats supported by the object. This is a list of MIME types for which the object can return suitable data. The formats in the list are in a priority order.</p>\n<p><b>See also </b><a href=\"#data-prop\">data</a>.</p>\n</div></div><!-- @@@format -->\n<br/>\n<!-- $$$html -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"html-prop\"></a><span class=\"name\">html</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a string if the data stored in the object is HTML (MIME type text/html); otherwise contains an empty string.</p>\n</div></div><!-- @@@html -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a plain text (MIME type text/plain) representation of the data.</p>\n</div></div><!-- @@@text -->\n<br/>\n<!-- $$$urls -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"urls-prop\"></a><span class=\"name\">urls</span> : <span class=\"type\">list</span>&lt;<span class=\"type\">url</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a list of URLs contained within the MIME data object. URLs correspond to the MIME type text/uri-list.</p>\n</div></div><!-- @@@urls -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/519/", "name": "MimeData", "description": "MimeData type provides interface to access and store data to the Clipboard. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.MimeData", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$MimeData-brief -->\n<p>MimeData type provides interface to access and store data to the Clipboard. <a href=\"#details\">More...</a></p>\n<!-- @@@MimeData -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#color-prop\">color</a></b></b> : color</li>\n<li class=\"fn\"><b><b><a href=\"#data-prop\">data</a></b></b> : var</li>\n<li class=\"fn\"><b><b><a href=\"#format-prop\">format</a></b></b> : list&lt;string&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#html-prop\">html</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#text-prop\">text</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#urls-prop\">urls</a></b></b> : list&lt;url&gt;</li>\n</ul>\n<!-- $$$MimeData-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<!-- @@@MimeData -->\n<h2>Property Documentation</h2>\n<!-- $$$color -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"color-prop\"></a><span class=\"name\">color</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtquick-index.html/qml-color.html\">color</a></span></p></td></tr></table></div><div class=\"qmldoc\"></div></div><!-- @@@color -->\n<br/>\n<!-- $$$data -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"data-prop\"></a><span class=\"name\">data</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-var.html\">var</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Reading the property returns a list of MIME type and data pairs representing the data stored in the object. Users can set custom MIME types which are not covered by the other properties.</p>\n<p>When setting the property value can take one of the following types:</p>\n<ul>\n<li>- string - the data will be set as <tt>text/plain</tt> MIME type, or as <tt>text/html</tt> in case HTML tags are detected</li>\n<li>- color - the data will be set as <tt>application/x-color</tt> MIME type</li>\n<li>- list&lt;url&gt; - the data will be set as <tt>text/uri-list</tt></li>\n<li>- list&lt;string&gt; - the data will be set as <tt>text/uri-list</tt> in case the first element of the list is a valid URL with scheme; otherwise if the list size is even, the list will be set as pairs of (MIME type,data)</li>\n<li>- list&lt;var&gt; - same as list&lt;url&gt; or list&lt;string&gt;</li>\n</ul>\n</div></div><!-- @@@data -->\n<br/>\n<!-- $$$format -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"format-prop\"></a><span class=\"name\">format</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Returns a list of formats supported by the object. This is a list of MIME types for which the object can return suitable data. The formats in the list are in a priority order.</p>\n<p><b>See also </b><a href=\"#data-prop\">data</a>.</p>\n</div></div><!-- @@@format -->\n<br/>\n<!-- $$$html -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"html-prop\"></a><span class=\"name\">html</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a string if the data stored in the object is HTML (MIME type text/html); otherwise contains an empty string.</p>\n</div></div><!-- @@@html -->\n<br/>\n<!-- $$$text -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"text-prop\"></a><span class=\"name\">text</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a plain text (MIME type text/plain) representation of the data.</p>\n</div></div><!-- @@@text -->\n<br/>\n<!-- $$$urls -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"urls-prop\"></a><span class=\"name\">urls</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-url.html\">url</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Contains a list of URLs contained within the MIME data object. URLs correspond to the MIME type text/uri-list.</p>\n</div></div><!-- @@@urls -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-mimedata.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/938/", "name": "Mouse", "description": "Attached property filtering mouse events occured inside the owner. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Mouse", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Mouse-brief -->\n<p>Attached property filtering mouse events occured inside the owner. <a href=\"#details\">More...</a></p>\n<!-- @@@Mouse -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#acceptedButtons-prop\">acceptedButtons</a></b></b> : Qt::MouseButtons</li>\n<li class=\"fn\"><b><b><a href=\"#clickAndHoldThreshold-prop\">clickAndHoldThreshold</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#enabled-prop\">enabled</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#forwardTo-prop\">forwardTo</a></b></b> : list&lt;Item&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#hoverEnabled-prop\">hoverEnabled</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#priority-prop\">priority</a></b></b> : enumeration</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#onClicked-signal\">onClicked</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onDoubleClicked-signal\">onDoubleClicked</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onEntered-signal\">onEntered</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onExited-signal\">onExited</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onPositionChanged-signal\">onPositionChanged</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onPressAndHold-signal\">onPressAndHold</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onPressed-signal\">onPressed</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onReleased-signal\">onReleased</a></b></b>(MouseEvent <i>event</i>)</li>\n</ul>\n<!-- $$$Mouse-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Sometimes we need to provide additional functionality on mouse events beside a QML element's default behavior. Placing a <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> over a component however will grab the mouse events from the component underneath, no matter if we set <i>preventStealing</i> to false or not. Setting mouse.accepted to false in <i>onPressed</i> would result in having the event forwarded to the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a>'s parent, however <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> will no longer receive other mouse events.</p>\n<pre class=\"qml\">import QtQuick 2.0\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">preventStealing</span>: <span class=\"number\">false</span>\n <span class=\"comment\">// do not accept event so it gets propagated to the parent item</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">mouse</span>.<span class=\"name\">accepted</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>;\n <span class=\"name\">onReleased</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;this will not be printed&quot;</span>)\n }\n}</pre>\n<p>Ubuntu UI Toolkit declares filter components similar to Keys, which can be attached to any visual primitve. Mouse filter however will have effect only when attached to items handling mouse events. Events are handled through signals, where the event data is presented through the <i>mouse</i> parameter. Events should be accepted if the propagation of those to the owner is not wanted. This is not valid to <a href=\"#onClicked-signal\">onClicked</a>, <a href=\"#onPressAndHold-signal\">onPressAndHold</a> composed events.</p>\n<p>The previous code sample using Mouse filter, which will print the pressed and released mouse buttons would look as follows:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"comment\">// do not accept event so it gets propagated to the parent item</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;mouse button pressed: &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">mouse</span>.<span class=\"name\">button</span>)\n <span class=\"name\">Mouse</span>.onReleased: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;mouse button released: &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">mouse</span>.<span class=\"name\">button</span>)\n}</pre>\n<p>The event details are reported in the <i>mouse</i> parameter, of <a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a> type, which extends <a href=\"http://qt-project.org/doc/qt-5.0/qtquick-index.html/qtquick-module.html\">QtQuick</a>'s <a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a> with additional properties.</p>\n<p>The filter will accept the same mouse buttons the owner accepts, and will accept hover events if the owner does. However it is not possible to alter these settings through the filter. If button handling other than the default ones specified for the primitive is required, MouseAreas can be declared to handle those events.</p>\n<p>Example of handling right button clicks over a <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a>:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">acceptedButtons</span>: <span class=\"name\">Qt</span>.<span class=\"name\">RightButton</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;right button clicked&quot;</span>)\n }\n}</pre>\n<p>In this example left and middle mouse button clicks will reach <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a> as <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> only grabs right button events.</p>\n<p>Mouse filter can be used in combination with <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a>, where the filter brings additional functionality on top of existing primitive functionality, and <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> add new functionality to the primitive.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"comment\">// do not accept event so it gets propagated to the parent item</span>\n <span class=\"name\">Mouse</span>.onPressed: {\n <span class=\"keyword\">if</span> (<span class=\"name\">mouse</span>.<span class=\"name\">button</span> <span class=\"operator\">===</span> <span class=\"name\">Qt</span>.<span class=\"name\">LeftButton</span>) {\n <span class=\"comment\">// do something</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">acceptedButtons</span>: <span class=\"name\">Qt</span>.<span class=\"name\">RightButton</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;right button clicked&quot;</span>)\n }\n}</pre>\n<p>As mentioned, mouse filters can be attached to any visual item. Attaching it to items that do not handle any mouse events will not have any effect. However child items which handle mouse events can forward the events they handle to their parent. In this way mouse events will land in these items too, and mouse filter attached to those can also handle the event. This is useful when creating custom types where the mouse handling item is nested into a non-mouse handling one, and we want to provide additional filtering possibility to the user.</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">top</span>\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">50</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;mouse received from input&quot;</span>)\n <span class=\"type\">TextItem</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">Mouse</span>.forvardTo: [<span class=\"name\">top</span>]\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;pressed over input&quot;</span>)\n <span class=\"name\">Mouse</span>.onPressAndHold: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;longpress handled here&quot;</span>)\n }\n}</pre>\n<p>In this example the mouse press is first handled by the mouse filter attached to <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a>, then it is forwarded to the top item and finally to the <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a>. Accepting the mouse event will stop propagation to the top item as well as to the <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a>.</p>\n<p>An interesting feature that can be achieved using Mouse filter is the event &quot;transparency&quot; towards the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> lying behind the items which handle mouse events. This means for example that by forwarding mouse events occurred on a <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a> to a <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> that stays behind it in the item hierarchy, the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> will also get all the events occurred on the area covered by the <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a>, acting like it would be above the <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a>. However, due to the nature of the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> event acceptance policy (all events are accepted by default) <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a> will not get these mouse events unless we set the <i>accepted</i> field of the mouse event to false in <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a>. This normally leads to the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> no longer getting further mouse events. However, Mouse filter will continue to forward other mouse events to the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a>, so setting <i>accepted</i> to false in <i>onPressed</i>, <i>onReleased</i> will not have the default effect. This is only valid to press and release events, double-click or mouse position change will be blocked by the <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a> still.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">topArea</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">50</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">onPressed</span>: {\n <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;forwarded pressed&quot;</span>)\n <span class=\"name\">mouse</span>.<span class=\"name\">accepted</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>\n }\n <span class=\"name\">onReleased</span>: {\n <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;released&quot;</span>)\n <span class=\"name\">mouse</span>.<span class=\"name\">accepted</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">Mouse</span>.forwardTo: [<span class=\"name\">topArea</span>]\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;input pressed&quot;</span>)\n <span class=\"name\">Mouse</span>.onReleased: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;input released&quot;</span>)\n }\n}</pre>\n<p>Mouse filter provides ability to control the order of the event dispatching. The filter can receive the events prior the owner or after the owner. This can be controlled through the <a href=\"#priority-prop\">priority</a> property. In the following example we make sure the <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a> always receives the events before the filter:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">input</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">activeFocusOnPress</span>: <span class=\"number\">true</span>\n <span class=\"name\">Mouse</span>.prority: <span class=\"name\">Mouse</span>.<span class=\"name\">AfterItem</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"keyword\">if</span> (<span class=\"name\">input</span>.<span class=\"name\">activeFocus</span>) <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;Text input already handled it&quot;</span>)\n}</pre>\n<p>Another feature of the mouse filters is the ability to restrict when the composed events like <a href=\"#onClicked-signal\">onClicked</a> and <a href=\"#onPressAndHold-signal\">onPressAndHold</a> should be triggered. By default these events are triggered no matter what is the distance between the mouse pressed position and the current position after a certain timeout (for <a href=\"#onPressAndHold-signal\">onPressAndHold</a>) or upon mouse release (for <a href=\"#onClicked-signal\">onClicked</a>). In this way the <a href=\"#onClicked-signal\">onClicked</a> will be emitted even if the user presses the mouse at the left-top edge of the component, then moves it to the right-bottom corner and releases it. This may not be the preferred behavior on certain components (like <a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a>). Therefore MouseFilter provides a property which can alter this behavior, the <a href=\"#clickAndHoldThreshold-prop\">clickAndHoldThreshold</a>. This property specifies the radius of the area the up-mentioned composed events are emitted during a mouse move.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">activeFocusOnPress</span>: <span class=\"number\">true</span>\n <span class=\"name\">selectByMouse</span>: <span class=\"number\">true</span>\n <span class=\"comment\">// emit composed events only if the mouse moves within 2 GU radius area</span>\n <span class=\"name\">Mouse</span>.clickAndHoldThreshold: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">2</span>)\n <span class=\"name\">Mouse</span>.onClicked: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;click happened within threshold value&quot;</span>)\n <span class=\"name\">Mouse</span>.onPressAndHold: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;pressAndHold happened within threshold value&quot;</span>)\n}</pre>\n<p>Similar functionality for the case when the mouse event occurs outside of the owner is brought by the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.InverseMouse\">InverseMouse</a> attached property.</p>\n<!-- @@@Mouse -->\n<h2>Property Documentation</h2>\n<!-- $$$acceptedButtons -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"acceptedButtons-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">acceptedButtons</span> : <span class=\"type\">Qt::MouseButtons</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the accepted mouse buttons of the owner.</p>\n</div></div><!-- @@@acceptedButtons -->\n<br/>\n<!-- $$$clickAndHoldThreshold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"clickAndHoldThreshold-prop\"></a><span class=\"name\">clickAndHoldThreshold</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the radius of the tolerance area the mouse can move in both x and y axis when the mouse is pressed, during which the composed events such as <a href=\"#onClicked-signal\">onClicked</a> and <a href=\"#onPressAndHold-signal\">onPressAndHold</a> will still be emitted. If the mouse is moved out of this area while the button is pressed, no composed events will be emitted.</p>\n<p>When this value is 0, the signals will be emitted as in <a href=\"/api/qml/sdk-14.04/QtQuick.MouseArea\">MouseArea</a>, meaning the composed events will come until the mouse is moved inside the owner's area.</p>\n<p>The default value is 0.</p>\n</div></div><!-- @@@clickAndHoldThreshold -->\n<br/>\n<!-- $$$enabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"enabled-prop\"></a><span class=\"name\">enabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"></div></div><!-- @@@enabled -->\n<br/>\n<!-- $$$forwardTo -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"forwardTo-prop\"></a><span class=\"name\">forwardTo</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>The property provides a way to forward mouse presses, releases, moves and double click events to other items. This can be useful when you want other items to handle different parts of the same mouse event or to handle other mouse events.</p>\n<p>The items listed will receive the event only if the mouse event falls into their area. Once an item that has forwarded mouse events accepts the event, that will no longer be delivered to the rest of the items in the list. This rule is also applied on the owner when the priority is set to <i>BeforeItem</i>.</p>\n</div></div><!-- @@@forwardTo -->\n<br/>\n<!-- $$$hoverEnabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hoverEnabled-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">hoverEnabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property reports whether the owner accepts hover events or not. When events are accepted <a href=\"#onEntered-signal\">onEntered</a>, <a href=\"#onPositionChanged-signal\">onPositionChanged</a> and <a href=\"#onExited-signal\">onExited</a> signals containing the mouse cursor position.</p>\n</div></div><!-- @@@hoverEnabled -->\n<br/>\n<!-- $$$priority -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"priority-prop\"></a><span class=\"name\">priority</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-enumeration.html\">enumeration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies the event dispach relation between the filter, the elements the event is forwarded to and the owner. Similar to Keys' <i>priority</i> property, the event dispach is performed in two ways: berfore (<i>BeforeItem</i>) or after (<i>AfterItem</i>) the owner receives the events.</p>\n<p>When <i>BeforeItem</i> is set the event dispach happens based as follows:</p>\n<ol class=\"i\">\n<li>the event is handled by the mouse filter</li>\n<li>if there are items listed in <a href=\"#forwardTo-prop\">forwardTo</a> property, the event will be forwarded to those items</li>\n<li>the event is handed over the owner.</li>\n</ol>\n <br />\n <p>When <i>AfterItem</i> is set the event dispach happens based as follows:</p>\n<ol class=\"i\">\n<li>the event is handed over the owner;</li>\n<li>the event is handled by the mouse filter;</li>\n<li>if there are items listed in <a href=\"#forwardTo-prop\">forwardTo</a> property, the event will be forwarded to those items.</li>\n</ol>\n<p>The default value is <i>BeforeItem</i>.</p>\n</div></div><!-- @@@priority -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$onClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onClicked-signal\"></a>Mouse::<span class=\"name\">onClicked</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse click. The signal is not emitted if the <a href=\"#onPressAndHold-signal\">onPressAndHold</a> got triggered or if <a href=\"#onDoubleClicked-signal\">onDoubleClicked</a> is handled (a slot is connected to it).</p>\n</div></div><!-- @@@onClicked -->\n<br/>\n<!-- $$$onDoubleClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onDoubleClicked-signal\"></a>Mouse::<span class=\"name\">onDoubleClicked</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports mouse double click.</p>\n</div></div><!-- @@@onDoubleClicked -->\n<br/>\n<!-- $$$onEntered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onEntered-signal\"></a>Mouse::<span class=\"name\">onEntered</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports that the mouse has entered into the area. The signal is emitted when the hover events are enabled and the mouse enters the area or when one of the accepted mouse button is pressed.</p>\n</div></div><!-- @@@onEntered -->\n<br/>\n<!-- $$$onExited -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onExited-signal\"></a>Mouse::<span class=\"name\">onExited</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports that the mouse has left the area. The signal is emitted when the hover events are enabled for the owner or if not, when one of the accepted button is released.</p>\n</div></div><!-- @@@onExited -->\n<br/>\n<!-- $$$onPositionChanged -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onPositionChanged-signal\"></a>Mouse::<span class=\"name\">onPositionChanged</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse pointer position change. If the hover events are enabled for the owner, the signal will come continuously. Otherwise the position chanes are reported when one of the accepted mouse buttons are being kept pressed.</p>\n</div></div><!-- @@@onPositionChanged -->\n<br/>\n<!-- $$$onPressAndHold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onPressAndHold-signal\"></a>Mouse::<span class=\"name\">onPressAndHold</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse press and hold.</p>\n</div></div><!-- @@@onPressAndHold -->\n<br/>\n<!-- $$$onPressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onPressed-signal\"></a>Mouse::<span class=\"name\">onPressed</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse press.</p>\n</div></div><!-- @@@onPressed -->\n<br/>\n<!-- $$$onReleased -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onReleased-signal\"></a>Mouse::<span class=\"name\">onReleased</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse release.</p>\n</div></div><!-- @@@onReleased -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-mouse.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1422/", "name": "Mouse", "description": "Attached property filtering mouse events occured inside the owner. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Mouse", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Mouse-brief -->\n<p>Attached property filtering mouse events occured inside the owner. <a href=\"#details\">More...</a></p>\n<!-- @@@Mouse -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#acceptedButtons-prop\">acceptedButtons</a></b></b> : Qt::MouseButtons</li>\n<li class=\"fn\"><b><b><a href=\"#clickAndHoldThreshold-prop\">clickAndHoldThreshold</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#enabled-prop\">enabled</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#forwardTo-prop\">forwardTo</a></b></b> : list&lt;Item&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#hoverEnabled-prop\">hoverEnabled</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#priority-prop\">priority</a></b></b> : enumeration</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#onClicked-signal\">onClicked</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onDoubleClicked-signal\">onDoubleClicked</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onEntered-signal\">onEntered</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onExited-signal\">onExited</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onPositionChanged-signal\">onPositionChanged</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onPressAndHold-signal\">onPressAndHold</a></b></b>(MouseEvent <i>event</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onPressed-signal\">onPressed</a></b></b>(MouseEvent <i>event</i>, Item <i>host</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#onReleased-signal\">onReleased</a></b></b>(MouseEvent <i>event</i>)</li>\n</ul>\n<!-- $$$Mouse-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Sometimes we need to provide additional functionality on mouse events beside a QML element's default behavior. Placing a <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> over a component however will grab the mouse events from the component underneath, no matter if we set <i>preventStealing</i> to false or not. Setting mouse.accepted to false in <i>onPressed</i> would result in having the event forwarded to the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a>'s parent, however <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> will no longer receive other mouse events.</p>\n<pre class=\"qml\">import QtQuick 2.0\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">preventStealing</span>: <span class=\"number\">false</span>\n <span class=\"comment\">// do not accept event so it gets propagated to the parent item</span>\n <span class=\"name\">onPressed</span>: <span class=\"name\">mouse</span>.<span class=\"name\">accepted</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>;\n <span class=\"name\">onReleased</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;this will not be printed&quot;</span>)\n }\n}</pre>\n<p>Ubuntu UI Toolkit declares filter components similar to Keys, which can be attached to any visual primitve. Mouse filter however will have effect only when attached to items handling mouse events. Events are handled through signals, where the event data is presented through the <i>mouse</i> parameter. Events should be accepted if the propagation of those to the owner is not wanted. This is not valid to <a href=\"#onClicked-signal\">onClicked</a>, <a href=\"#onPressAndHold-signal\">onPressAndHold</a> composed events.</p>\n<p>The previous code sample using Mouse filter, which will print the pressed and released mouse buttons would look as follows:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"comment\">// do not accept event so it gets propagated to the parent item</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;mouse button pressed: &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">mouse</span>.<span class=\"name\">button</span>)\n <span class=\"name\">Mouse</span>.onReleased: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;mouse button released: &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">mouse</span>.<span class=\"name\">button</span>)\n}</pre>\n<p>The event details are reported in the <i>mouse</i> parameter, of <a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a> type, which extends <a href=\"http://qt-project.org/doc/qt-5.3/qtquick-module.html\">QtQuick</a>'s <a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a> with additional properties.</p>\n<p>The filter will accept the same mouse buttons the owner accepts, and will accept hover events if the owner does. However it is not possible to alter these settings through the filter. If button handling other than the default ones specified for the primitive is required, MouseAreas can be declared to handle those events.</p>\n<p>Example of handling right button clicks over a <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a>:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">acceptedButtons</span>: <span class=\"name\">Qt</span>.<span class=\"name\">RightButton</span>\n <span class=\"name\">onClicked</span>: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;right button clicked&quot;</span>)\n }\n}</pre>\n<p>In this example left and middle mouse button clicks will reach <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a> as <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> only grabs right button events.</p>\n<p>Mouse filter can be used in combination with <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a>, where the filter brings additional functionality on top of existing primitive functionality, and <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> add new functionality to the primitive.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">20</span>\n <span class=\"comment\">// do not accept event so it gets propagated to the parent item</span>\n <span class=\"name\">Mouse</span>.onPressed: {\n <span class=\"keyword\">if</span> (<span class=\"name\">mouse</span>.<span class=\"name\">button</span> <span class=\"operator\">===</span> <span class=\"name\">Qt</span>.<span class=\"name\">LeftButton</span>) {\n <span class=\"comment\">// do something</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">acceptedButtons</span>: <span class=\"name\">Qt</span>.<span class=\"name\">RightButton</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;right button clicked&quot;</span>)\n }\n}</pre>\n<p>As mentioned, mouse filters can be attached to any visual item. Attaching it to items that do not handle any mouse events will not have any effect. However child items which handle mouse events can forward the events they handle to their parent. In this way mouse events will land in these items too, and mouse filter attached to those can also handle the event. This is useful when creating custom types where the mouse handling item is nested into a non-mouse handling one, and we want to provide additional filtering possibility to the user. These type of items are called proxy handlers.</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">top</span>\n <span class=\"name\">width</span>: <span class=\"number\">100</span>\n <span class=\"name\">height</span>: <span class=\"number\">50</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;mouse received from input&quot;</span>)\n <span class=\"type\">TextItem</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">Mouse</span>.forvardTo: [<span class=\"name\">top</span>]\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;pressed over input&quot;</span>)\n <span class=\"name\">Mouse</span>.onPressAndHold: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;longpress handled here&quot;</span>)\n }\n}</pre>\n<p>In this example the mouse press is first handled by the mouse filter attached to <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a>, then it is forwarded to the top item and finally to the <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a>. Accepting the mouse event will stop propagation to the top item as well as to the <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a>. The topmost item itself does not handle mouse events, therefore it will be a sinple proxy handler item. However, proxies can themself handle mouse events. Therefore each mouse event signal has the <i>host</i> parameter specifying the sender of the mouse event reported.</p>\n<p><b>Note: </b>The forwarded events are handled in the proxy handlers only if the mouse position points inside their area. If the forwarded mouse position falls outside the target area, the event will not be reported, however will be forwarded further to the items in the list. In the following example the mouse press in red rectangle will be printed as well as the proxied mouse press from the main item.</p><pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">main</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">71</span>)\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;got the mouse press forwarded by &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">host</span>.<span class=\"name\">objectName</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">1</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">blueRect</span>\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;BlueRect&quot;</span>\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span>\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">color</span>: <span class=\"string\">&quot;blue&quot;</span>\n <span class=\"name\">Mouse</span>.forwardTo: [<span class=\"name\">main</span>]\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;This should not be printed&quot;</span>)\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;RedRect&quot;</span>\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span>\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">20</span>)\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">Mouse</span>.forwardTo: [<span class=\"name\">blueRect</span>]\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;Pressed in &quot;</span> <span class=\"operator\">+</span> <span class=\"name\">host</span>.<span class=\"name\">objectName</span>)\n }\n }\n }\n}</pre>\n<p>An interesting feature that can be achieved using Mouse filter is the event &quot;transparency&quot; towards the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> lying behind the items which handle mouse events. This means for example that by forwarding mouse events occurred on a <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a> to a <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> that stays behind it in the item hierarchy, the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> will also get all the events occurred on the area covered by the <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a>, acting like it would be above the <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a>. However, due to the nature of the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> event acceptance policy (all events are accepted by default) <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a> will not get these mouse events unless we set the <i>accepted</i> field of the mouse event to false in <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a>. This normally leads to the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> no longer getting further mouse events. However, Mouse filter will continue to forward other mouse events to the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a>, so setting <i>accepted</i> to false in <i>onPressed</i>, <i>onReleased</i> will not have the default effect. This is only valid to press and release events, double-click or mouse position change will be blocked by the <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a> still.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">topArea</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">50</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">10</span>)\n <span class=\"name\">onPressed</span>: {\n <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;forwarded pressed&quot;</span>)\n <span class=\"name\">mouse</span>.<span class=\"name\">accepted</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>\n }\n <span class=\"name\">onReleased</span>: {\n <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;released&quot;</span>)\n <span class=\"name\">mouse</span>.<span class=\"name\">accepted</span> <span class=\"operator\">=</span> <span class=\"number\">false</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">Mouse</span>.forwardTo: [<span class=\"name\">topArea</span>]\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;input pressed&quot;</span>)\n <span class=\"name\">Mouse</span>.onReleased: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;input released&quot;</span>)\n }\n}</pre>\n<p>Mouse filter provides ability to control the order of the event dispatching. The filter can receive the events prior the owner or after the owner. This can be controlled through the <a href=\"#priority-prop\">priority</a> property. In the following example we make sure the <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a> always receives the events before the filter:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">input</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">activeFocusOnPress</span>: <span class=\"number\">true</span>\n <span class=\"name\">Mouse</span>.prority: <span class=\"name\">Mouse</span>.<span class=\"name\">AfterItem</span>\n <span class=\"name\">Mouse</span>.onPressed: <span class=\"keyword\">if</span> (<span class=\"name\">input</span>.<span class=\"name\">activeFocus</span>) <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;Text input already handled it&quot;</span>)\n}</pre>\n<p>Another feature of the mouse filters is the ability to restrict when the composed events like <a href=\"#onClicked-signal\">onClicked</a> and <a href=\"#onPressAndHold-signal\">onPressAndHold</a> should be triggered. By default these events are triggered no matter what is the distance between the mouse pressed position and the current position after a certain timeout (for <a href=\"#onPressAndHold-signal\">onPressAndHold</a>) or upon mouse release (for <a href=\"#onClicked-signal\">onClicked</a>). In this way the <a href=\"#onClicked-signal\">onClicked</a> will be emitted even if the user presses the mouse at the left-top edge of the component, then moves it to the right-bottom corner and releases it. This may not be the preferred behavior on certain components (like <a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a>). Therefore MouseFilter provides a property which can alter this behavior, the <a href=\"#clickAndHoldThreshold-prop\">clickAndHoldThreshold</a>. This property specifies the radius of the area the up-mentioned composed events are emitted during a mouse move.</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.TextInput\">TextInput</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">activeFocusOnPress</span>: <span class=\"number\">true</span>\n <span class=\"name\">selectByMouse</span>: <span class=\"number\">true</span>\n <span class=\"comment\">// emit composed events only if the mouse moves within 2 GU radius area</span>\n <span class=\"name\">Mouse</span>.clickAndHoldThreshold: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">2</span>)\n <span class=\"name\">Mouse</span>.onClicked: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;click happened within threshold value&quot;</span>)\n <span class=\"name\">Mouse</span>.onPressAndHold: <span class=\"name\">console</span>.<span class=\"name\">log</span>(<span class=\"string\">&quot;pressAndHold happened within threshold value&quot;</span>)\n}</pre>\n<p>Similar functionality for the case when the mouse event occurs outside of the owner is brought by the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.InverseMouse\">InverseMouse</a> attached property.</p>\n<!-- @@@Mouse -->\n<h2>Property Documentation</h2>\n<!-- $$$acceptedButtons -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"acceptedButtons-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">acceptedButtons</span> : <span class=\"type\">Qt::MouseButtons</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the accepted mouse buttons of the owner.</p>\n</div></div><!-- @@@acceptedButtons -->\n<br/>\n<!-- $$$clickAndHoldThreshold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"clickAndHoldThreshold-prop\"></a><span class=\"name\">clickAndHoldThreshold</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property holds the radius of the tolerance area the mouse can move in both x and y axis when the mouse is pressed, during which the composed events such as <a href=\"#onClicked-signal\">onClicked</a> and <a href=\"#onPressAndHold-signal\">onPressAndHold</a> will still be emitted. If the mouse is moved out of this area while the button is pressed, no composed events will be emitted.</p>\n<p>When this value is 0, the signals will be emitted as in <a href=\"/api/qml/sdk-14.10/QtQuick.MouseArea\">MouseArea</a>, meaning the composed events will come until the mouse is moved inside the owner's area.</p>\n<p>The default value is 0.</p>\n<p><b>Note: </b>The value has no effect for the forwarded events. The threshold is only valid when the host handles mouse events.</p></div></div><!-- @@@clickAndHoldThreshold -->\n<br/>\n<!-- $$$enabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"enabled-prop\"></a><span class=\"name\">enabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"></div></div><!-- @@@enabled -->\n<br/>\n<!-- $$$forwardTo -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"forwardTo-prop\"></a><span class=\"name\">forwardTo</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>The property provides a way to forward mouse presses, releases, moves and double click events to other items. This can be useful when you want other items to handle different parts of the same mouse event or to handle other mouse events.</p>\n<p>The items listed will receive the event only if the mouse event falls into their area. Once an item that has forwarded mouse events accepts the event, that will no longer be delivered to the rest of the items in the list. This rule is also applied on the owner when the priority is set to <i>BeforeItem</i>.</p>\n</div></div><!-- @@@forwardTo -->\n<br/>\n<!-- $$$hoverEnabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hoverEnabled-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">hoverEnabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property reports whether the owner accepts hover events or not. When events are accepted <a href=\"#onEntered-signal\">onEntered</a>, <a href=\"#onPositionChanged-signal\">onPositionChanged</a> and <a href=\"#onExited-signal\">onExited</a> signals containing the mouse cursor position.</p>\n</div></div><!-- @@@hoverEnabled -->\n<br/>\n<!-- $$$priority -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"priority-prop\"></a><span class=\"name\">priority</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-enumeration.html\">enumeration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property specifies the event dispach relation between the filter, the elements the event is forwarded to and the owner. Similar to Keys' <i>priority</i> property, the event dispach is performed in two ways: berfore (<i>BeforeItem</i>) or after (<i>AfterItem</i>) the owner receives the events.</p>\n<p>When <i>BeforeItem</i> is set the event dispach happens based as follows:</p>\n<ol class=\"i\">\n<li>the event is handled by the mouse filter</li>\n<li>if there are items listed in <a href=\"#forwardTo-prop\">forwardTo</a> property, the event will be forwarded to those items</li>\n<li>the event is handed over the owner.</li>\n</ol>\n <br />\n <p>When <i>AfterItem</i> is set the event dispach happens based as follows:</p>\n<ol class=\"i\">\n<li>the event is handed over the owner;</li>\n<li>the event is handled by the mouse filter;</li>\n<li>if there are items listed in <a href=\"#forwardTo-prop\">forwardTo</a> property, the event will be forwarded to those items.</li>\n</ol>\n<p>The default value is <i>BeforeItem</i>.</p>\n</div></div><!-- @@@priority -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$onClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onClicked-signal\"></a><span class=\"name\">onClicked</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse click. The signal is not emitted if the <a href=\"#onPressAndHold-signal\">onPressAndHold</a> got triggered or if <a href=\"#onDoubleClicked-signal\">onDoubleClicked</a> is handled (a slot is connected to it). The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onClicked -->\n<br/>\n<!-- $$$onDoubleClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onDoubleClicked-signal\"></a><span class=\"name\">onDoubleClicked</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports mouse double click. The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onDoubleClicked -->\n<br/>\n<!-- $$$onEntered -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onEntered-signal\"></a><span class=\"name\">onEntered</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports that the mouse has entered into the area. The signal is emitted when the hover events are enabled and the mouse enters the area or when one of the accepted mouse button is pressed. The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onEntered -->\n<br/>\n<!-- $$$onExited -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onExited-signal\"></a><span class=\"name\">onExited</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports that the mouse has left the area. The signal is emitted when the hover events are enabled for the owner or if not, when one of the accepted button is released. The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onExited -->\n<br/>\n<!-- $$$onPositionChanged -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onPositionChanged-signal\"></a><span class=\"name\">onPositionChanged</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse pointer position change. If the hover events are enabled for the owner, the signal will come continuously. Otherwise the position chanes are reported when one of the accepted mouse buttons are being kept pressed. The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onPositionChanged -->\n<br/>\n<!-- $$$onPressAndHold -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onPressAndHold-signal\"></a><span class=\"name\">onPressAndHold</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse press and hold. The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onPressAndHold -->\n<br/>\n<!-- $$$onPressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onPressed-signal\"></a><span class=\"name\">onPressed</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>, <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span><i> host</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse press. The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onPressed -->\n<br/>\n<!-- $$$onReleased -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"onReleased-signal\"></a><span class=\"name\">onReleased</span>(<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.MouseEvent\">MouseEvent</a></span><i> event</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>The signal reports the mouse release. The <i>host</i> specifies the item that triggered the event.</p>\n</div></div><!-- @@@onReleased -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-mouse.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/482/", "name": "OptionSelector", "description": "Component displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a listing of all the possible values for selection with an additional option of always being e...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.OptionSelector", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$OptionSelector-brief -->\n<p>Component displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a listing of all the possible values for selection with an additional option of always being expanded. If multiple choice is selected the list is expanded automatically. <a href=\"#details\">More...</a></p>\n<!-- @@@OptionSelector -->\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#colourImage-prop\">colourImage</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#containerHeight-prop\">containerHeight</a></b></b> : real<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#currentlyExpanded-prop\">currentlyExpanded</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#delegate-prop\">delegate</a></b></b> : Component<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#expanded-prop\">expanded</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#itemHeight-prop\">itemHeight</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#model-prop\">model</a></b></b> : var<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#multiSelection-prop\">multiSelection</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#selectedIndex-prop\">selectedIndex</a></b></b> : int</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#delegateClicked-signal\">delegateClicked</a></b></b>(int <i>index</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#expansionCompleted-signal\">expansionCompleted</a></b></b>()</li>\n</ul>\n<!-- $$$OptionSelector-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>Examples:</p>\n<pre class=\"qml\">import Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">3</span>)\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>)]\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">expanded</span>: <span class=\"number\">true</span>\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>)]\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;optionselector_multipleselection&quot;</span>\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Multiple Selection&quot;</span>)\n <span class=\"name\">expanded</span>: <span class=\"number\">false</span>\n <span class=\"name\">multiSelection</span>: <span class=\"number\">true</span>\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>)]\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">model</span>: <span class=\"name\">customModel</span>\n <span class=\"name\">expanded</span>: <span class=\"number\">true</span>\n <span class=\"name\">colourImage</span>: <span class=\"number\">true</span>\n <span class=\"name\">delegate</span>: <span class=\"name\">selectorDelegate</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Component\">Component</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">selectorDelegate</span>\n <span class=\"type\">OptionSelectorDelegate</span> { <span class=\"name\">text</span>: <span class=\"name\">name</span>; <span class=\"name\">subText</span>: <span class=\"name\">description</span>; <span class=\"name\">iconSource</span>: <span class=\"name\">image</span> }\n }\n <span class=\"type\">ListModel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">customModel</span>\n <span class=\"type\">ListElement</span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 1&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 1&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n <span class=\"type\">ListElement</span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 2&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 2&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n <span class=\"type\">ListElement</span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 3&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 3&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n <span class=\"type\">ListElement</span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 4&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 4&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 5&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 6&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 7&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 8&quot;</span>)]\n <span class=\"name\">containerHeight</span>: <span class=\"name\">itemHeight</span> <span class=\"operator\">*</span> <span class=\"number\">4</span>\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">expanded</span>: <span class=\"number\">true</span>\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 5&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 6&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 7&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 8&quot;</span>)]\n <span class=\"name\">containerHeight</span>: <span class=\"name\">itemHeight</span> <span class=\"operator\">*</span> <span class=\"number\">4</span>\n }\n}</pre>\n<!-- @@@OptionSelector -->\n<h2>Property Documentation</h2>\n<!-- $$$colourImage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"colourImage-prop\"></a><span class=\"name\">colourImage</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Colours image according to the fieldText colour of the theme, otherwise source colour is maintained.</p>\n</div></div><!-- @@@colourImage -->\n<br/>\n<!-- $$$containerHeight -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"containerHeight-prop\"></a><span class=\"name\">containerHeight</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Custom height for list container which allows scrolling inside the selector.</p>\n</div></div><!-- @@@containerHeight -->\n<br/>\n<!-- $$$currentlyExpanded -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"currentlyExpanded-prop\"></a><span class=\"name\">currentlyExpanded</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Is our list currently expanded?</p>\n</div></div><!-- @@@currentlyExpanded -->\n<br/>\n<!-- $$$delegate -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"delegate-prop\"></a><span class=\"name\">delegate</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p><a href=\"/api/qml/sdk-14.04/QtQuick.ListView\">ListView</a> delegate.</p>\n</div></div><!-- @@@delegate -->\n<br/>\n<!-- $$$expanded -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"expanded-prop\"></a><span class=\"name\">expanded</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Specifies whether the list is always expanded.</p>\n</div></div><!-- @@@expanded -->\n<br/>\n<!-- $$$itemHeight -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"itemHeight-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">itemHeight</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Height of an individual list item.</p>\n</div></div><!-- @@@itemHeight -->\n<br/>\n<!-- $$$model -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"model-prop\"></a><span class=\"name\">model</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-var.html\">var</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The list of values that will be shown under the label text. This is a model.</p>\n</div></div><!-- @@@model -->\n<br/>\n<!-- $$$multiSelection -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"multiSelection-prop\"></a><span class=\"name\">multiSelection</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>If the multiple choice selection is enabled the list is always expanded.</p>\n</div></div><!-- @@@multiSelection -->\n<br/>\n<!-- $$$selectedIndex -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"selectedIndex-prop\"></a><span class=\"name\">selectedIndex</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The index of the currently selected element in our list.</p>\n</div></div><!-- @@@selectedIndex -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$delegateClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"delegateClicked-signal\"></a>OptionSelector::<span class=\"name\">delegateClicked</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span><i> index</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when delegate is clicked.</p>\n</div></div><!-- @@@delegateClicked -->\n<br/>\n<!-- $$$expansionCompleted -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"expansionCompleted-signal\"></a>OptionSelector::<span class=\"name\">expansionCompleted</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the selector has finished expanding or collapsing.</p>\n</div></div><!-- @@@expansionCompleted -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-optionselector.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1375/", "name": "OptionSelector", "description": "Component displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a listing of all the possible values for selection with an additional option of always being e...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.OptionSelector", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$OptionSelector-brief -->\n<p>Component displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a listing of all the possible values for selection with an additional option of always being expanded. If multiple choice is selected the list is expanded automatically. <a href=\"#details\">More...</a></p>\n<!-- @@@OptionSelector -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#colourImage-prop\">colourImage</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#containerHeight-prop\">containerHeight</a></b></b> : real<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#currentlyExpanded-prop\">currentlyExpanded</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#delegate-prop\">delegate</a></b></b> : Component<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#expanded-prop\">expanded</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#itemHeight-prop\">itemHeight</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#model-prop\">model</a></b></b> : var<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#multiSelection-prop\">multiSelection</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#selectedIndex-prop\">selectedIndex</a></b></b> : int</li>\n</ul>\n<a name=\"signals\"></a>\n<h2>Signals</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#delegateClicked-signal\">delegateClicked</a></b></b>(int <i>index</i>)</li>\n<li class=\"fn\"><b><b><a href=\"#expansionCompleted-signal\">expansionCompleted</a></b></b>()</li>\n</ul>\n<!-- $$$OptionSelector-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><b>This component is under heavy development.</b></p>\n<p>Examples:</p>\n<pre class=\"qml\">import Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">spacing</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">3</span>)\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>)]\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">expanded</span>: <span class=\"number\">true</span>\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>)]\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">objectName</span>: <span class=\"string\">&quot;optionselector_multipleselection&quot;</span>\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Multiple Selection&quot;</span>)\n <span class=\"name\">expanded</span>: <span class=\"number\">false</span>\n <span class=\"name\">multiSelection</span>: <span class=\"number\">true</span>\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>)]\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">model</span>: <span class=\"name\">customModel</span>\n <span class=\"name\">expanded</span>: <span class=\"number\">true</span>\n <span class=\"name\">colourImage</span>: <span class=\"number\">true</span>\n <span class=\"name\">delegate</span>: <span class=\"name\">selectorDelegate</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.Component\">Component</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">selectorDelegate</span>\n <span class=\"type\">OptionSelectorDelegate</span> { <span class=\"name\">text</span>: <span class=\"name\">name</span>; <span class=\"name\">subText</span>: <span class=\"name\">description</span>; <span class=\"name\">iconSource</span>: <span class=\"name\">image</span> }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.ListModel\">ListModel</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">customModel</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.ListElement\">ListElement</a></span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 1&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 1&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.ListElement\">ListElement</a></span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 2&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 2&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.ListElement\">ListElement</a></span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 3&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 3&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.ListElement\">ListElement</a></span> { <span class=\"name\">name</span>: <span class=\"string\">&quot;Name 4&quot;</span>; <span class=\"name\">description</span>: <span class=\"string\">&quot;Description 4&quot;</span>; <span class=\"name\">image</span>: <span class=\"string\">&quot;images.png&quot;</span> }\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 5&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 6&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 7&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 8&quot;</span>)]\n <span class=\"name\">containerHeight</span>: <span class=\"name\">itemHeight</span> <span class=\"operator\">*</span> <span class=\"number\">4</span>\n }\n <span class=\"type\">OptionSelector</span> {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Label&quot;</span>)\n <span class=\"name\">expanded</span>: <span class=\"number\">true</span>\n <span class=\"name\">model</span>: [<span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 1&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 2&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 3&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 4&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 5&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 6&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 7&quot;</span>),\n <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Value 8&quot;</span>)]\n <span class=\"name\">containerHeight</span>: <span class=\"name\">itemHeight</span> <span class=\"operator\">*</span> <span class=\"number\">4</span>\n }\n}</pre>\n<!-- @@@OptionSelector -->\n<h2>Property Documentation</h2>\n<!-- $$$colourImage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"colourImage-prop\"></a><span class=\"name\">colourImage</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Colours image according to the fieldText colour of the theme, otherwise source colour is maintained.</p>\n</div></div><!-- @@@colourImage -->\n<br/>\n<!-- $$$containerHeight -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"containerHeight-prop\"></a><span class=\"name\">containerHeight</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Custom height for list container which allows scrolling inside the selector.</p>\n</div></div><!-- @@@containerHeight -->\n<br/>\n<!-- $$$currentlyExpanded -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"currentlyExpanded-prop\"></a><span class=\"name\">currentlyExpanded</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Is our list currently expanded?</p>\n</div></div><!-- @@@currentlyExpanded -->\n<br/>\n<!-- $$$delegate -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"delegate-prop\"></a><span class=\"name\">delegate</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQml.Component\">Component</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p><a href=\"/api/qml/sdk-14.10/QtQuick.ListView\">ListView</a> delegate.</p>\n</div></div><!-- @@@delegate -->\n<br/>\n<!-- $$$expanded -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"expanded-prop\"></a><span class=\"name\">expanded</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Specifies whether the list is always expanded.</p>\n</div></div><!-- @@@expanded -->\n<br/>\n<!-- $$$itemHeight -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"itemHeight-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">itemHeight</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Height of an individual list item.</p>\n</div></div><!-- @@@itemHeight -->\n<br/>\n<!-- $$$model -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"model-prop\"></a><span class=\"name\">model</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-var.html\">var</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>The list of values that will be shown under the label text. This is a model.</p>\n</div></div><!-- @@@model -->\n<br/>\n<!-- $$$multiSelection -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"multiSelection-prop\"></a><span class=\"name\">multiSelection</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>If the multiple choice selection is enabled the list is always expanded.</p>\n</div></div><!-- @@@multiSelection -->\n<br/>\n<!-- $$$selectedIndex -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"selectedIndex-prop\"></a><span class=\"name\">selectedIndex</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The index of the currently selected element in our list.</p>\n</div></div><!-- @@@selectedIndex -->\n<br/>\n<h2>Signal Documentation</h2>\n<!-- $$$delegateClicked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"delegateClicked-signal\"></a><span class=\"name\">delegateClicked</span>(<span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span><i> index</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when delegate is clicked.</p>\n</div></div><!-- @@@delegateClicked -->\n<br/>\n<!-- $$$expansionCompleted -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"expansionCompleted-signal\"></a><span class=\"name\">expansionCompleted</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Called when the selector has finished expanding or collapsing.</p>\n</div></div><!-- @@@expansionCompleted -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-optionselector.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/483/", "name": "OrientationHelper", "description": "The OrientationHelper automatically rotates its children following the orientation of the device. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.OrientationHelper", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$OrientationHelper-brief -->\n<p>The OrientationHelper automatically rotates its children following the orientation of the device. <a href=\"#details\">More...</a></p>\n<!-- @@@OrientationHelper -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></p>\n<p>Inherited by <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Popups.PopupBase\">PopupBase</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#underscore._orientationAngle-prop\">__orientationAngle</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#automaticOrientation-prop\">automaticOrientation</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#orientationAngle-prop\">orientationAngle</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#rotating-prop\">rotating</a></b></b> : alias</li>\n<li class=\"fn\"><b><b><a href=\"#transitionEnabled-prop\">transitionEnabled</a></b></b> : bool</li>\n</ul>\n<!-- $$$OrientationHelper-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Any Item placed inside an Orientation Helper will be automatically rotated following the orientation of the device.</p>\n<p>Note that OrientationHelper is always filling its parent (anchors.parent: fill).</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"type\">OrientationHelper</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Automatically rotated&quot;</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Automatically rotated&quot;</span>\n }\n }\n}</pre>\n<!-- @@@OrientationHelper -->\n<h2>Property Documentation</h2>\n<!-- $$$__orientationAngle -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"underscore._orientationAngle-prop\"></a><span class=\"name\">__orientationAngle</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>This documentation is deprecated.</p>\n<p>Use <a href=\"#orientationAngle-prop\">orientationAngle</a> instead.</p>\n</div></div><!-- @@@__orientationAngle -->\n<br/>\n<!-- $$$automaticOrientation -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"automaticOrientation-prop\"></a><span class=\"name\">automaticOrientation</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Sets whether it will be automatically rotating when the device is.</p>\n<p>The default value is true.</p>\n</div></div><!-- @@@automaticOrientation -->\n<br/>\n<!-- $$$orientationAngle -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"orientationAngle-prop\"></a><span class=\"name\">orientationAngle</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Calculates the current orientation angle.</p>\n</div></div><!-- @@@orientationAngle -->\n<br/>\n<!-- $$$rotating -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"rotating-prop\"></a><span class=\"name\">rotating</span> : <span class=\"type\">alias</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Exposes whether the orientationTransition is running.</p>\n</div></div><!-- @@@rotating -->\n<br/>\n<!-- $$$transitionEnabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"transitionEnabled-prop\"></a><span class=\"name\">transitionEnabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Sets whether the rotation transition is performed.</p>\n<p>The default value is true.</p>\n</div></div><!-- @@@transitionEnabled -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-orientationhelper.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1376/", "name": "OrientationHelper", "description": "The OrientationHelper automatically rotates its children following the orientation of the device. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.OrientationHelper", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$OrientationHelper-brief -->\n<p>The OrientationHelper automatically rotates its children following the orientation of the device. <a href=\"#details\">More...</a></p>\n<!-- @@@OrientationHelper -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></p>\n</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherited By:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Popups.PopupBase\">PopupBase</a>.</p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#anchorToKeyboard-prop\">anchorToKeyboard</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#automaticOrientation-prop\">automaticOrientation</a></b></b> : bool<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#orientationAngle-prop\">orientationAngle</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#rotating-prop\">rotating</a></b></b> : alias<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#transitionEnabled-prop\">transitionEnabled</a></b></b> : bool<tt> (preliminary)</tt></li>\n</ul>\n<!-- $$$OrientationHelper-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Any Item placed inside an Orientation Helper will be automatically rotated following the orientation of the device.</p>\n<p>Note that OrientationHelper is always filling its parent (anchors.parent: fill).</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"type\">OrientationHelper</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Automatically rotated&quot;</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Automatically rotated&quot;</span>\n }\n }\n}</pre>\n<!-- @@@OrientationHelper -->\n<h2>Property Documentation</h2>\n<!-- $$$anchorToKeyboard -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"anchorToKeyboard-prop\"></a><span class=\"name\">anchorToKeyboard</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>The property holds if the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.OrientationHelper\">OrientationHelper</a> should automatically resize the contents when the input method appears</p>\n<p>The default value is false.</p>\n</div></div><!-- @@@anchorToKeyboard -->\n<br/>\n<!-- $$$automaticOrientation -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"automaticOrientation-prop\"></a><span class=\"name\">automaticOrientation</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Sets whether it will be automatically rotating when the device is.</p>\n<p>The default value is true.</p>\n</div></div><!-- @@@automaticOrientation -->\n<br/>\n<!-- $$$orientationAngle -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"orientationAngle-prop\"></a><span class=\"name\">orientationAngle</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Calculates the current orientation angle.</p>\n</div></div><!-- @@@orientationAngle -->\n<br/>\n<!-- $$$rotating -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"rotating-prop\"></a><span class=\"name\">rotating</span> : <span class=\"type\">alias</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Exposes whether the orientationTransition is running.</p>\n</div></div><!-- @@@rotating -->\n<br/>\n<!-- $$$transitionEnabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"transitionEnabled-prop\"></a><span class=\"name\">transitionEnabled</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>Sets whether the rotation transition is performed.</p>\n<p>The default value is true.</p>\n</div></div><!-- @@@transitionEnabled -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-orientationhelper.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/172/", "name": "OrientationHelper", "description": "The OrientationHelper automatically rotates its children following the orientation of the device. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.OrientationHelper", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$OrientationHelper-brief -->\n<p>The OrientationHelper automatically rotates its children following the orientation of the device. <a href=\"#details\">More...</a></p>\n<!-- @@@OrientationHelper -->\n<p>Inherited by <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Popups.PopupBase/\">PopupBase</a>.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#underscore._orientationAngle-prop\">__orientationAngle</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#automaticOrientation-prop\">automaticOrientation</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#orientationAngle-prop\">orientationAngle</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#rotating-prop\">rotating</a></b></b> : alias</li>\n<li class=\"fn\"><b><b><a href=\"#transitionEnabled-prop\">transitionEnabled</a></b></b> : bool</li>\n</ul>\n<!-- $$$OrientationHelper-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Any Item placed inside an Orientation Helper will be automatically rotated following the orientation of the device.</p>\n<p>Note that OrientationHelper is always filling its parent (anchors.parent: fill).</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\">Item</span> {\n <span class=\"type\">OrientationHelper</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Automatically rotated&quot;</span>\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Automatically rotated&quot;</span>\n }\n }\n}</pre>\n<!-- @@@OrientationHelper -->\n<h2>Property Documentation</h2>\n<!-- $$$__orientationAngle -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"underscore._orientationAngle-prop\"></a><span class=\"name\">__orientationAngle</span> : <span class=\"type\">int</span></p></td></tr></table></div><div class=\"qmldoc\"><p>This documentation is deprecated.</p>\n<p>Use <a href=\"#orientationAngle-prop\">orientationAngle</a> instead.</p>\n</div></div><!-- @@@__orientationAngle -->\n<br/>\n<!-- $$$automaticOrientation -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"automaticOrientation-prop\"></a><span class=\"name\">automaticOrientation</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Sets whether it will be automatically rotating when the device is.</p>\n<p>The default value is true.</p>\n</div></div><!-- @@@automaticOrientation -->\n<br/>\n<!-- $$$orientationAngle -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"orientationAngle-prop\"></a><span class=\"name\">orientationAngle</span> : <span class=\"type\">int</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Calculates the current orientation angle.</p>\n</div></div><!-- @@@orientationAngle -->\n<br/>\n<!-- $$$rotating -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"rotating-prop\"></a><span class=\"name\">rotating</span> : <span class=\"type\">alias</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Exposes whether the orientationTransition is running.</p>\n</div></div><!-- @@@rotating -->\n<br/>\n<!-- $$$transitionEnabled -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"transitionEnabled-prop\"></a><span class=\"name\">transitionEnabled</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Sets whether the rotation transition is performed.</p>\n<p>The default value is true.</p>\n</div></div><!-- @@@transitionEnabled -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/484/", "name": "Page", "description": "A page is the basic Item that must be used inside the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a>, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.PageStack\">PageStack</a> and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Tabs\">T...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Page", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Page-brief -->\n<p>A page is the basic Item that must be used inside the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a>, <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.PageStack\">PageStack</a> and <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Tabs\">Tabs</a>. Anchors and height of a Page are automatically determined to align with the header of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a>, but can be overridden. <a href=\"#details\">More...</a></p>\n<!-- @@@Page -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : list&lt;Action&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#flickable-prop\">flickable</a></b></b> : Flickable</li>\n<li class=\"fn\"><b><b><a href=\"#title-prop\">title</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#tools-prop\">tools</a></b></b> : Item</li>\n</ul>\n<!-- $$$Page-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a> provides a header and toolbar for Pages it includes. Each page automatically has its header and toolbar property linked to that of its parent <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a>. The text of the header, and the buttons in the toolbar are determined by the <a href=\"#title-prop\">title</a> and <a href=\"#tools-prop\">tools</a> properties of the page:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\">Page</span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Example page&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Hello world!&quot;</span>\n }\n <span class=\"name\">tools</span>: <span class=\"name\">ToolbarItems</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarButton\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;one&quot;</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarButton\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;two&quot;</span>\n }\n }\n }\n }\n}</pre>\n<p>See <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a> for more basic examples that show how to use a header and toolbar. Advanced navigation structures can be created by adding Pages to a <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.PageStack\">PageStack</a> or <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Tabs\">Tabs</a>.</p>\n<!-- @@@Page -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\">Action</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Local actions. These actions will be made available outside the application (for example, to HUD) when the Page is active. For actions that are always available when the application is running, use the actions property of MainView.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$flickable -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"flickable-prop\"></a><span class=\"name\">flickable</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Flickable\">Flickable</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Optional flickable that controls the header. This property is automatically set to the first child of the page that is Flickable and anchors to the top of the page or fills the page. For example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">50</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page</span>\n <span class=\"name\">title</span>: <span class=\"string\">&quot;example&quot;</span>\n <span class=\"comment\">//flickable: null // uncomment to disable hiding of the header</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Flickable\">Flickable</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">content</span>\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">contentHeight</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">70</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;hello&quot;</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n }\n }\n }\n}</pre>\n<p>In this example, page.flickable will automatically be set to content because it is a Flickable and it fills its parent. Thus, scrolling down in the Flickable will automatically hide the header.</p>\n<p>This property be set to null to avoid automatic flickable detection, which disables hiding of the header by scrolling in the Flickable. In cases where a flickable should control the header, but it is not automatically detected, the flickable property can be set.</p>\n</div></div><!-- @@@flickable -->\n<br/>\n<!-- $$$title -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"title-prop\"></a><span class=\"name\">title</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the page. Will be shown in the header of the MainView.</p>\n</div></div><!-- @@@title -->\n<br/>\n<!-- $$$tools -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"tools-prop\"></a><span class=\"name\">tools</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The toolbar items associated with this Page. It is recommended to use <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.ToolbarItems\">ToolbarItems</a> to specify the tools, but any Item is allowed here.</p>\n</div></div><!-- @@@tools -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-page.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/173/", "name": "Page", "description": "A page is the basic Item that must be used inside the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a>, <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.PageStack/\">PageStack</a> and <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Tabs/\">Tabs...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Page", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Page-brief -->\n<p>A page is the basic Item that must be used inside the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a>, <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.PageStack/\">PageStack</a> and <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Tabs/\">Tabs</a>. Anchors and height of a Page are automatically determined to align with the header of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a>, but can be overridden. <a href=\"#details\">More...</a></p>\n<!-- @@@Page -->\n<p>Inherits <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.StyledItem/\">StyledItem</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : list&lt;Action&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#flickable-prop\">flickable</a></b></b> : Flickable</li>\n<li class=\"fn\"><b><b><a href=\"#title-prop\">title</a></b></b> : string</li>\n<li class=\"fn\"><b><b><a href=\"#tools-prop\">tools</a></b></b> : Item</li>\n</ul>\n<!-- $$$Page-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a> provides a header and toolbar for Pages it includes. Each page automatically has its header and toolbar property linked to that of its parent <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a>. The text of the header, and the buttons in the toolbar are determined by the <a href=\"#title-prop\">title</a> and <a href=\"#tools-prop\">tools</a> properties of the page:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\">Page</span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Example page&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Hello world!&quot;</span>\n }\n <span class=\"name\">tools</span>: <span class=\"name\">ToolbarItems</span> {\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarButton/\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;one&quot;</span>\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarButton/\">ToolbarButton</a></span> {\n <span class=\"name\">action</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;two&quot;</span>\n }\n }\n }\n }\n}</pre>\n<p>See <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a> for more basic examples that show how to use a header and toolbar. Advanced navigation structures can be created by adding Pages to a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.PageStack/\">PageStack</a> or <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Tabs/\">Tabs</a>.</p>\n<!-- @@@Page -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\">list</span>&lt;<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Action/\">Action</a></span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Local actions. These actions will be made available outside the application (for example, to HUD) when the Page is active. For actions that are always available when the application is running, use the actions property of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a>.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$flickable -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"flickable-prop\"></a><span class=\"name\">flickable</span> : <span class=\"type\">Flickable</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Optional flickable that controls the header. This property is automatically set to the first child of the page that is Flickable and anchors to the top of the page or fills the page. For example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">50</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page</span>\n <span class=\"name\">title</span>: <span class=\"string\">&quot;example&quot;</span>\n <span class=\"comment\">//flickable: null // uncomment to disable hiding of the header</span>\n <span class=\"type\">Flickable</span> {\n <span class=\"name\">id</span>: <span class=\"name\">content</span>\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">contentHeight</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">70</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Label/\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;hello&quot;</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n }\n }\n }\n}</pre>\n<p>In this example, page.flickable will automatically be set to content because it is a Flickable and it fills its parent. Thus, scrolling down in the Flickable will automatically hide the header.</p>\n<p>This property be set to null to avoid automatic flickable detection, which disables hiding of the header by scrolling in the Flickable. In cases where a flickable should control the header, but it is not automatically detected, the flickable property can be set.</p>\n</div></div><!-- @@@flickable -->\n<br/>\n<!-- $$$title -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"title-prop\"></a><span class=\"name\">title</span> : <span class=\"type\">string</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the page. Will be shown in the header of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a>.</p>\n</div></div><!-- @@@title -->\n<br/>\n<!-- $$$tools -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"tools-prop\"></a><span class=\"name\">tools</span> : <span class=\"type\">Item</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The toolbar items associated with this Page. It is recommended to use <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.ToolbarItems/\">ToolbarItems</a> to specify the tools, but any Item is allowed here.</p>\n</div></div><!-- @@@tools -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1377/", "name": "Page", "description": "A page is the basic Item that must be used inside the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a>, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageStack\">PageStack</a> and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Tabs\">T...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Page", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Page-brief -->\n<p>A page is the basic Item that must be used inside the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a>, <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageStack\">PageStack</a> and <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Tabs\">Tabs</a>. Anchors and height of a Page are automatically determined to align with the header of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a>, but can be overridden. <a href=\"#details\">More...</a></p>\n<!-- @@@Page -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : list&lt;Action&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#flickable-prop\">flickable</a></b></b> : Flickable</li>\n<li class=\"fn\"><b><b><a href=\"#head-prop\">head</a></b></b> : PageHeadConfiguration</li>\n<li class=\"fn\"><b><b><a href=\"#title-prop\">title</a></b></b> : string</li>\n</ul>\n<!-- $$$Page-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a> provides a header for Pages it includes. The text and actions of the header are determined by the <a href=\"#title-prop\">title</a> and <a href=\"#head-prop\">head</a> properties of the page:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\">Page</span> {\n <span class=\"name\">title</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Example page&quot;</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Hello world!&quot;</span>)\n }\n <span class=\"name\">head</span>.actions: [\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;search&quot;</span>\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Search&quot;</span>)\n },\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;contacts&quot;</span>\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Contacts&quot;</span>)\n }\n ]\n }\n}</pre>\n<p>See <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a> for more examples on how to use the header. Advanced navigation structures can be created by adding Pages to a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageStack\">PageStack</a> or <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Tabs\">Tabs</a>.</p>\n<!-- @@@Page -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\">Action</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Local actions. These actions will be made available outside the application (for example, to HUD) when the Page is active. For actions that are always available when the application is running, use the actions property of MainView. For actions in the header, see <a href=\"#head-prop\">head</a>.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$flickable -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"flickable-prop\"></a><span class=\"name\">flickable</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Flickable\">Flickable</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Optional flickable that controls the header. This property is automatically set to the first child of the page that is Flickable and anchors to the top of the page or fills the page. For example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">30</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">50</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page</span>\n <span class=\"name\">title</span>: <span class=\"string\">&quot;example&quot;</span>\n <span class=\"comment\">//flickable: null // uncomment for a fixed header</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Flickable\">Flickable</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">content</span>\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">contentHeight</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">70</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">text</span>: <span class=\"string\">&quot;hello&quot;</span>\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n }\n }\n }\n}</pre>\n<p>In this example, page.flickable will automatically be set to content because it is a Flickable and it fills its parent. Thus, scrolling down in the Flickable will automatically hide the header.</p>\n<p>Set this property to null to avoid automatic flickable detection, which disables hiding of the header by scrolling in the Flickable. In cases where a flickable should control the header, but it is not automatically detected, the flickable property can be set.</p>\n</div></div><!-- @@@flickable -->\n<br/>\n<!-- $$$head -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"head-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">head</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageHeadConfiguration\">PageHeadConfiguration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Configuration of the header for this page.</p>\n</div></div><!-- @@@head -->\n<br/>\n<!-- $$$title -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"title-prop\"></a><span class=\"name\">title</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-string.html\">string</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The title of the page. Will be shown in the header of the MainView. If the page is used inside a Tab, the default title is the Tab title. For a Page not inside a Tab, the default title is an empty string.</p>\n</div></div><!-- @@@title -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-page.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1580/", "name": "PageHeadConfiguration", "description": "Page.head is used to configure the header for a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a>. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.PageHeadConfiguration", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$PageHeadConfiguration-brief -->\n<p>Page.head is used to configure the header for a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a>. <a href=\"#details\">More...</a></p>\n<!-- @@@PageHeadConfiguration -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Since:</td><td class=\"memItemRight bottomAlign\"> Ubuntu.Components 1.1</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/QtQml.QtObject\">QtObject</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#backAction-prop\">backAction</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#contents-prop\">contents</a></b></b> : Item</li>\n</ul>\n<!-- $$$PageHeadConfiguration-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>For examples how to use Page.head, see <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a>.</p>\n<!-- @@@PageHeadConfiguration -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>List of actions to show in the header.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$backAction -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"backAction-prop\"></a><span class=\"name\">backAction</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Overrides the default <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageStack\">PageStack</a> back button and the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Tabs\">Tabs</a> drawer button in the header.</p>\n</div></div><!-- @@@backAction -->\n<br/>\n<!-- $$$contents -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"contents-prop\"></a><span class=\"name\">contents</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Set this property to show this Item in the header instead of the title. Use a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.TextField\">TextField</a> here for implementing search in header.</p>\n<p>The parent of this Item will be binded while the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> is active. The header contents will automatically be anchored to the left and vertically centered inside the header.</p>\n<p>Example:</p>\n<pre class=\"qml\"><span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Invisible title&quot;</span>\n <span class=\"name\">contents</span>: <span class=\"name\">Rectangle</span> {\n <span class=\"name\">color</span>: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">orange</span>\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n <span class=\"name\">width</span>: <span class=\"name\">parent</span> ? <span class=\"name\">parent</span>.<span class=\"name\">width</span> <span class=\"operator\">-</span> <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">2</span>) : <span class=\"name\">undefined</span>\n }\n}</pre>\n<p>See <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageHeadState\">PageHeadState</a> for an example that shows how search mode can be implemented.</p>\n</div></div><!-- @@@contents -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-pageheadconfiguration.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1581/", "name": "PageHeadState", "description": "PageHeadState is a helper component to make it easier to configure the page header when changing states. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.PageHeadState", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$PageHeadState-brief -->\n<p>PageHeadState is a helper component to make it easier to configure the page header when changing states. <a href=\"#details\">More...</a></p>\n<!-- @@@PageHeadState -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Since:</td><td class=\"memItemRight bottomAlign\"> Ubuntu.Components 1.1</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/QtQuick.State\">State</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#actions-prop\">actions</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#backAction-prop\">backAction</a></b></b> : Action</li>\n<li class=\"fn\"><b><b><a href=\"#contents-prop\">contents</a></b></b> : Item</li>\n<li class=\"fn\"><b><b><a href=\"#head-prop\">head</a></b></b> : PageHeadConfiguration</li>\n</ul>\n<!-- $$$PageHeadState-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>This example shows how to add an action to the header that enables the user to enter search/input mode:</p>\n<pre class=\"qml\">import QtQuick 2.2\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">mainView</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">50</span>)\n <span class=\"name\">useDeprecatedToolbar</span>: <span class=\"number\">false</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">searchPage</span>\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Click the icon&quot;</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Label\">Label</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"name\">searchPage</span>.<span class=\"name\">state</span> <span class=\"operator\">==</span> <span class=\"string\">&quot;search&quot;</span> ? <span class=\"string\">&quot;search mode&quot;</span> : <span class=\"string\">&quot;normal mode&quot;</span>\n }\n <span class=\"name\">state</span>: <span class=\"string\">&quot;default&quot;</span>\n <span class=\"name\">states</span>: [\n <span class=\"type\">PageHeadState</span> {\n <span class=\"name\">name</span>: <span class=\"string\">&quot;default&quot;</span>\n <span class=\"name\">head</span>: <span class=\"name\">searchPage</span>.<span class=\"name\">head</span>\n <span class=\"name\">actions</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;search&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">searchPage</span>.<span class=\"name\">state</span> <span class=\"operator\">=</span> <span class=\"string\">&quot;search&quot;</span>\n }\n },\n <span class=\"type\">PageHeadState</span> {\n <span class=\"name\">id</span>: <span class=\"name\">headerState</span>\n <span class=\"name\">name</span>: <span class=\"string\">&quot;search&quot;</span>\n <span class=\"name\">head</span>: <span class=\"name\">searchPage</span>.<span class=\"name\">head</span>\n <span class=\"name\">actions</span>: [\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span> {\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;contact&quot;</span>\n }\n ]\n <span class=\"name\">backAction</span>: <span class=\"name\">Action</span> {\n <span class=\"name\">id</span>: <span class=\"name\">leaveSearchAction</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;back&quot;</span>\n <span class=\"name\">iconName</span>: <span class=\"string\">&quot;back&quot;</span>\n <span class=\"name\">onTriggered</span>: <span class=\"name\">searchPage</span>.<span class=\"name\">state</span> <span class=\"operator\">=</span> <span class=\"string\">&quot;default&quot;</span>\n }\n <span class=\"name\">contents</span>: <span class=\"name\">TextField</span> {\n <span class=\"name\">placeholderText</span>: <span class=\"string\">&quot;search...&quot;</span>\n }\n }\n ]\n }\n}</pre>\n<!-- @@@PageHeadState -->\n<h2>Property Documentation</h2>\n<!-- $$$actions -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"actions-prop\"></a><span class=\"name\">actions</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The actions to be shown in the header with this state.</p>\n</div></div><!-- @@@actions -->\n<br/>\n<!-- $$$backAction -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"backAction-prop\"></a><span class=\"name\">backAction</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Action\">Action</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The back action for this state.</p>\n</div></div><!-- @@@backAction -->\n<br/>\n<!-- $$$contents -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"contents-prop\"></a><span class=\"name\">contents</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The contents of the header when this state is active.</p>\n</div></div><!-- @@@contents -->\n<br/>\n<!-- $$$head -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"head-prop\"></a><span class=\"name\">head</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.PageHeadConfiguration\">PageHeadConfiguration</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The head property of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> which will be the target of the property changes of this State. This property must always be set before the State can be used.</p>\n</div></div><!-- @@@head -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-pageheadstate.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/174/", "name": "PageStack", "description": "A stack of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> items that is used for inter-Page navigation. Pages on the stack can be popped, and new Pages can be pushed. The page on top of the stack is the visible one. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.PageStack", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$PageStack-brief -->\n<p>A stack of <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> items that is used for inter-Page navigation. Pages on the stack can be popped, and new Pages can be pushed. The page on top of the stack is the visible one. <a href=\"#details\">More...</a></p>\n<!-- @@@PageStack -->\n<p>Inherits <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.StyledItem/\">StyledItem</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#currentPage-prop\">currentPage</a></b></b> : Item<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#depth-prop\">depth</a></b></b> : int<tt> (preliminary)</tt></li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clear-method\">clear</a></b></b>()<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#pop-method\">pop</a></b></b>()<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#push-method\">push</a></b></b>(<i>page</i>, <i>properties</i>)<tt> (preliminary)</tt></li>\n</ul>\n<!-- $$$PageStack-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>PageStack should be used inside a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a> in order to automatically add a header and toolbar to control the stack. The PageStack will automatically set the header title to the title of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> that is currently on top of the stack, and the tools of the toolbar to the tools of the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a> on top of the stack. When more than one Pages are on the stack, the toolbar will automatically feature a back-button that pop the stack when triggered.</p>\n<p>Pages that are defined inside the PageStack must initially set their visibility to false to avoid the pages occluding the PageStack before they are pushed. When pushing a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a>, its visibility is automatically updated.</p>\n<p>Example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\nimport Ubuntu.Components.ListItems 0.1 as ListItem\n<span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\">PageStack</span> {\n <span class=\"name\">id</span>: <span class=\"name\">pageStack</span>\n <span class=\"name\">Component</span>.onCompleted: <span class=\"name\">push</span>(<span class=\"name\">page0</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page0</span>\n <span class=\"name\">title</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Root page&quot;</span>)\n <span class=\"name\">visible</span>: <span class=\"number\">false</span>\n <span class=\"type\">Column</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"type\">ListItem</span>.Standard {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Page one&quot;</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">pageStack</span>.<span class=\"name\">push</span>(<span class=\"name\">page1</span>, {color: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">orange</span>})\n <span class=\"name\">progression</span>: <span class=\"number\">true</span>\n }\n <span class=\"type\">ListItem</span>.Standard {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;External page&quot;</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">pageStack</span>.<span class=\"name\">push</span>(<span class=\"name\">Qt</span>.<span class=\"name\">resolvedUrl</span>(<span class=\"string\">&quot;MyCustomPage.qml&quot;</span>))\n <span class=\"name\">progression</span>: <span class=\"number\">true</span>\n }\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Page/\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Rectangle&quot;</span>\n <span class=\"name\">id</span>: <span class=\"name\">page1</span>\n <span class=\"name\">visible</span>: <span class=\"number\">false</span>\n property <span class=\"type\">alias</span> <span class=\"name\">color</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span>\n <span class=\"type\">Rectangle</span> {\n <span class=\"name\">id</span>: <span class=\"name\">rectangle</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">fill</span>: <span class=\"name\">parent</span>\n <span class=\"name\">margins</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n }\n }\n }\n }\n}</pre>\n<p>As shown in the example above, the <a href=\"#push-method\">push()</a> function can take an Item, Component or URL as input.</p>\n<!-- @@@PageStack -->\n<h2>Property Documentation</h2>\n<!-- $$$currentPage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"currentPage-prop\"></a><span class=\"name\">currentPage</span> : <span class=\"type\">Item</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The currently active page</p>\n</div></div><!-- @@@currentPage -->\n<br/>\n<!-- $$$depth -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"depth-prop\"></a><span class=\"name\">depth</span> : <span class=\"type\">int</span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The current size of the stack</p>\n</div></div><!-- @@@depth -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$clear -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clear-method\"></a>PageStack::<span class=\"name\">clear</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Deactivate the active page and clear the stack.</p>\n</div></div><!-- @@@clear -->\n<br/>\n<!-- $$$pop -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pop-method\"></a>PageStack::<span class=\"name\">pop</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Pop the top item from the stack if the stack size is at least 1. Do not do anything if 0 or 1 items are on the stack.</p>\n</div></div><!-- @@@pop -->\n<br/>\n<!-- $$$push -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"push-method\"></a>PageStack::<span class=\"name\">push</span>(<i> page</i>, <i> properties</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Push a page to the stack, and apply the given (optional) properties to the page. The pushed page may be an Item, Component or URL.</p>\n</div></div><!-- @@@push -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/485/", "name": "PageStack", "description": "A stack of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> items that is used for inter-Page navigation. Pages on the stack can be popped, and new Pages can be pushed. The page on top of the stack is the visible one. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.PageStack", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$PageStack-brief -->\n<p>A stack of <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> items that is used for inter-Page navigation. Pages on the stack can be popped, and new Pages can be pushed. The page on top of the stack is the visible one. <a href=\"#details\">More...</a></p>\n<!-- @@@PageStack -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#currentPage-prop\">currentPage</a></b></b> : Item<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#depth-prop\">depth</a></b></b> : int<tt> (preliminary)</tt></li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clear-method\">clear</a></b></b>()<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#pop-method\">pop</a></b></b>()<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#push-method\">push</a></b></b>(<i>page</i>, <i>properties</i>)<tt> (preliminary)</tt></li>\n</ul>\n<!-- $$$PageStack-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>PageStack should be used inside a <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a> in order to automatically add a header and toolbar to control the stack. The PageStack will automatically set the header title to the title of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> that is currently on top of the stack, and the tools of the toolbar to the tools of the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a> on top of the stack. When more than one Pages are on the stack, the toolbar will automatically feature a back-button that pop the stack when triggered.</p>\n<p>Pages that are defined inside the PageStack must initially set their visibility to false to avoid the pages occluding the PageStack before they are pushed. When pushing a <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a>, its visibility is automatically updated.</p>\n<p>Example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\nimport Ubuntu.Components.ListItems 0.1 as ListItem\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\">PageStack</span> {\n <span class=\"name\">id</span>: <span class=\"name\">pageStack</span>\n <span class=\"name\">Component</span>.onCompleted: <span class=\"name\">push</span>(<span class=\"name\">page0</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page0</span>\n <span class=\"name\">title</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Root page&quot;</span>)\n <span class=\"name\">visible</span>: <span class=\"number\">false</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"type\">ListItem</span>.Standard {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Page one&quot;</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">pageStack</span>.<span class=\"name\">push</span>(<span class=\"name\">page1</span>, {color: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">orange</span>})\n <span class=\"name\">progression</span>: <span class=\"number\">true</span>\n }\n <span class=\"type\">ListItem</span>.Standard {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;External page&quot;</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">pageStack</span>.<span class=\"name\">push</span>(<span class=\"name\">Qt</span>.<span class=\"name\">resolvedUrl</span>(<span class=\"string\">&quot;MyCustomPage.qml&quot;</span>))\n <span class=\"name\">progression</span>: <span class=\"number\">true</span>\n }\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Rectangle&quot;</span>\n <span class=\"name\">id</span>: <span class=\"name\">page1</span>\n <span class=\"name\">visible</span>: <span class=\"number\">false</span>\n property <span class=\"type\">alias</span> <span class=\"name\">color</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">rectangle</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">fill</span>: <span class=\"name\">parent</span>\n <span class=\"name\">margins</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n }\n }\n }\n }\n}</pre>\n<p>As shown in the example above, the <a href=\"#push-method\">push()</a> function can take an Item, Component or URL as input.</p>\n<!-- @@@PageStack -->\n<h2>Property Documentation</h2>\n<!-- $$$currentPage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"currentPage-prop\"></a><span class=\"name\">currentPage</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The currently active page</p>\n</div></div><!-- @@@currentPage -->\n<br/>\n<!-- $$$depth -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"depth-prop\"></a><span class=\"name\">depth</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>The current size of the stack</p>\n</div></div><!-- @@@depth -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$clear -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clear-method\"></a>PageStack::<span class=\"name\">clear</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Deactivate the active page and clear the stack.</p>\n</div></div><!-- @@@clear -->\n<br/>\n<!-- $$$pop -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pop-method\"></a>PageStack::<span class=\"name\">pop</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Pop the top item from the stack if the stack size is at least 1. Do not do anything if 0 or 1 items are on the stack.</p>\n</div></div><!-- @@@pop -->\n<br/>\n<!-- $$$push -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"push-method\"></a>PageStack::<span class=\"name\">push</span>(<i> page</i>, <i> properties</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This documentation is under development and is subject to change.</b></p>\n<p>Push a page to the stack, and apply the given (optional) properties to the page. The pushed page may be an Item, Component or URL.</p>\n</div></div><!-- @@@push -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-pagestack.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/1378/", "name": "PageStack", "description": "A stack of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> items that is used for inter-Page navigation. Pages on the stack can be popped, and new Pages can be pushed. The page on top of the stack is the visible one. ", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.PageStack", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$PageStack-brief -->\n<p>A stack of <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> items that is used for inter-Page navigation. Pages on the stack can be popped, and new Pages can be pushed. The page on top of the stack is the visible one. <a href=\"#details\">More...</a></p>\n<!-- @@@PageStack -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.StyledItem\">StyledItem</a></p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#currentPage-prop\">currentPage</a></b></b> : Item<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#data-prop\">data</a></b></b> : list&lt;Object&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#depth-prop\">depth</a></b></b> : int<tt> (preliminary)</tt></li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#clear-method\">clear</a></b></b>()<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#pop-method\">pop</a></b></b>()<tt> (preliminary)</tt></li>\n<li class=\"fn\"><b><b><a href=\"#push-method\">push</a></b></b>(<i>page</i>, <i>properties</i>)<tt> (preliminary)</tt></li>\n</ul>\n<!-- $$$PageStack-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>PageStack should be used inside a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a> in order to automatically add a header and toolbar to control the stack. The PageStack will automatically set the header title to the title of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> that is currently on top of the stack, and the tools of the toolbar to the tools of the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a> on top of the stack. When more than one Pages are on the stack, the toolbar will automatically feature a back-button that pop the stack when triggered.</p>\n<p>Pages that are defined inside the PageStack must initially set their visibility to false to avoid the pages occluding the PageStack before they are pushed. When pushing a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a>, its visibility is automatically updated.</p>\n<p>Example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\nimport Ubuntu.Components.ListItems 1.0 as ListItem\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">48</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">60</span>)\n <span class=\"type\">PageStack</span> {\n <span class=\"name\">id</span>: <span class=\"name\">pageStack</span>\n <span class=\"name\">Component</span>.onCompleted: <span class=\"name\">push</span>(<span class=\"name\">page0</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">page0</span>\n <span class=\"name\">title</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Root page&quot;</span>)\n <span class=\"name\">visible</span>: <span class=\"number\">false</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Column\">Column</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"type\">ListItem</span>.Standard {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;Page one&quot;</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">pageStack</span>.<span class=\"name\">push</span>(<span class=\"name\">page1</span>, {color: <span class=\"name\">UbuntuColors</span>.<span class=\"name\">orange</span>})\n <span class=\"name\">progression</span>: <span class=\"number\">true</span>\n }\n <span class=\"type\">ListItem</span>.Standard {\n <span class=\"name\">text</span>: <span class=\"name\">i18n</span>.<span class=\"name\">tr</span>(<span class=\"string\">&quot;External page&quot;</span>)\n <span class=\"name\">onClicked</span>: <span class=\"name\">pageStack</span>.<span class=\"name\">push</span>(<span class=\"name\">Qt</span>.<span class=\"name\">resolvedUrl</span>(<span class=\"string\">&quot;MyCustomPage.qml&quot;</span>))\n <span class=\"name\">progression</span>: <span class=\"number\">true</span>\n }\n }\n }\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Page\">Page</a></span> {\n <span class=\"name\">title</span>: <span class=\"string\">&quot;Rectangle&quot;</span>\n <span class=\"name\">id</span>: <span class=\"name\">page1</span>\n <span class=\"name\">visible</span>: <span class=\"number\">false</span>\n property <span class=\"type\">alias</span> <span class=\"name\">color</span>: <span class=\"name\">rectangle</span>.<span class=\"name\">color</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">id</span>: <span class=\"name\">rectangle</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">fill</span>: <span class=\"name\">parent</span>\n <span class=\"name\">margins</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">5</span>)\n }\n }\n }\n }\n}</pre>\n<p>As shown in the example above, the <a href=\"#push-method\">push()</a> function can take an Item, Component or URL as input.</p>\n<!-- @@@PageStack -->\n<h2>Property Documentation</h2>\n<!-- $$$currentPage -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"currentPage-prop\"></a><span class=\"name\">currentPage</span> : <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>The currently active page</p>\n</div></div><!-- @@@currentPage -->\n<br/>\n<!-- $$$data -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"data-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">data</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\">Object</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Children of PageStack are placed in a separate item such that they are not active by default until they are pushed on the PageStack.</p>\n</div></div><!-- @@@data -->\n<br/>\n<!-- $$$depth -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"depth-prop\"></a><span class=\"name\">depth</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML property is under development and is subject to change.</b></p>\n<p>The current size of the stack</p>\n</div></div><!-- @@@depth -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$clear -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"clear-method\"></a><span class=\"name\">clear</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML method is under development and is subject to change.</b></p>\n<p>Deactivate the active page and clear the stack.</p>\n</div></div><!-- @@@clear -->\n<br/>\n<!-- $$$pop -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"pop-method\"></a><span class=\"name\">pop</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML method is under development and is subject to change.</b></p>\n<p>Pop the top item from the stack if the stack size is at least 1. Do not do anything if 0 or 1 items are on the stack.</p>\n</div></div><!-- @@@pop -->\n<br/>\n<!-- $$$push -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"push-method\"></a><span class=\"name\">push</span>(<i> page</i>, <i> properties</i>)</p></td></tr></table></div><div class=\"qmldoc\"><p><b>This QML method is under development and is subject to change.</b></p>\n<p>Push a page to the stack, and apply the given (optional) properties to the page. The pushed page may be an Item, Component or URL.</p>\n</div></div><!-- @@@push -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components-pagestack.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/488/", "name": "Panel", "description": "A panel that can be swiped in and out from an edge of the window by the user. For most applications, it is highly recommended to use the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a> instead which includes a toolbar at its bottom...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/29/", "section": "http://developer.ubuntu.com/api/service/sections/12/", "fullname": "Ubuntu.Components.Panel", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Panel-brief -->\n<p>A panel that can be swiped in and out from an edge of the window by the user. For most applications, it is highly recommended to use the <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a> instead which includes a toolbar at its bottom that can be swiped in or out. <a href=\"#details\">More...</a></p>\n<!-- @@@Panel -->\n<p>Inherits <a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></p>\n<p>Inherited by Toolbar.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#align-prop\">align</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#animate-prop\">animate</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#animating-prop\">animating</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#contents-prop\">contents</a></b></b> : list&lt;Object&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#hideTimeout-prop\">hideTimeout</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#hintSize-prop\">hintSize</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#locked-prop\">locked</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#opened-prop\">opened</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#position-prop\">position</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#triggerSize-prop\">triggerSize</a></b></b> : real</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#close-method\">close</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#open-method\">open</a></b></b>()</li>\n</ul>\n<!-- $$$Panel-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Unless your application has very specific needs for a Panel, use a <a href=\"/api/qml/sdk-14.04/Ubuntu.Components.MainView\">MainView</a> with the default toolbar.</p>\n<p>When using a Panel, do not theme it directly, but theme its contents, because the Panel itself should not have visible elements, since it is in the view (to detect mouse events) even when its contents should be invisible.</p>\n<p>Set the anchors and/or width/height of the Panel to specify the area that the Panel covers when opened.</p>\n<p>A black panel that can be swiped in from the lower-right of the window can be created like this:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span> <span class=\"operator\">/</span> <span class=\"number\">2</span>\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">overlay</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click&quot;</span>\n }\n }\n }\n}</pre>\n<p>A panel that looks like the standard (bottom-aligned) toolbar, but with custom contents, can be created like this:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"comment\">// two properties used by the toolbar delegate:</span>\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span> <span class=\"name\">opened</span>: <span class=\"name\">panel</span>.<span class=\"name\">opened</span>\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span> <span class=\"name\">animating</span>: <span class=\"name\">panel</span>.<span class=\"name\">animating</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click&quot;</span>\n }\n }\n }\n}</pre>\n<p>Any Items can be placed inside the Panel, but MouseAreas can block mouse events from reaching the panel and thus obstruct the swiping behavior for hiding the panel. As a result, the user cannot start swiping on the buttons in the examples above in order to hide the panel. To remedy this, clicked() signals are forwarded from the panel by calling the child's trigger() function. Example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">background</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">overlay</span>\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.04/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">4</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"keyword\">function</span> <span class=\"name\">trigger</span>() {\n <span class=\"name\">print</span>(<span class=\"string\">&quot;The red rectangle was clicked&quot;</span>);\n }\n }\n }\n }\n <span class=\"name\">Component</span>.onCompleted: <span class=\"name\">panel</span>.<span class=\"name\">open</span>();\n}</pre>\n<p>Like this, the red rectangle accepts click events, but the user can still swipe down on top of the rectangle in order to hide the panel.</p>\n<!-- @@@Panel -->\n<h2>Property Documentation</h2>\n<!-- $$$align -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"align-prop\"></a><span class=\"name\">align</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property defines the alignment of the panel. The implementation supports the following values:</p>\n<ul>\n<li>Qt.AlignBottom to swipe in the panel from the bottom (default)</li>\n<li>Qt.AlignTop to swipe in the panel from the top</li>\n<li>Qt.AlignLeft to swipe in the panel from the left</li>\n<li>Qt.AlignRight to swipe in the panel from the right</li>\n<li>Qt.AlignLeading left when layout mirrorring is disabled, right otherwise</li>\n<li>Qt.AlignTrailing right when layout mirroring is disabled, left otherwise</li>\n</ul>\n<p>The default value is <b>Qt.AlignBottom</b>, and it is not recommended to change the default value because the left, right and top edge are already used for system functions, while the bottom edge is reserved for app-specific functionality such as a default toolbar. The use of Qt.AlignLeading and Qt.AlignTrailing is preferred over Qt.AlignLeft and Qt.AlignRight in order to more easily support right-to-left user interfaces that use <a href=\"/api/qml/sdk-14.04/QtQuick.LayoutMirroring\">LayoutMirroring</a>.</p>\n</div></div><!-- @@@align -->\n<br/>\n<!-- $$$animate -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"animate-prop\"></a><span class=\"name\">animate</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Animate transitions between the different panel states.</p>\n</div></div><!-- @@@animate -->\n<br/>\n<!-- $$$animating -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"animating-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">animating</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The toolbar is currently not in a stable hidden or visible state.</p>\n</div></div><!-- @@@animating -->\n<br/>\n<!-- $$$contents -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"contents-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">contents</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-list.html\">list</a></span>&lt;<span class=\"type\">Object</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Default property, holds the content which will be swiped in and out.</p>\n</div></div><!-- @@@contents -->\n<br/>\n<!-- $$$hideTimeout -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hideTimeout-prop\"></a><span class=\"name\">hideTimeout</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The time in milliseconds before the panel automatically hides after inactivity when it is not locked. Interacting with the panel resets the timer. Note that adding contents to the panel that accepts mouse events will prevent the panel from detecting interaction and the timer will not be reset. Setting a negative value will disable automatic hiding. Default value: -1 (automatic hiding is disabled).</p>\n</div></div><!-- @@@hideTimeout -->\n<br/>\n<!-- $$$hintSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hintSize-prop\"></a><span class=\"name\">hintSize</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>How much of the panel to show when the user touches the panel's edge. This gives the user a hint that there is a panel hiding at that edge and invites him/her to swipe to show the panel completely. Default value: units.gu(2).</p>\n</div></div><!-- @@@hintSize -->\n<br/>\n<!-- $$$locked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"locked-prop\"></a><span class=\"name\">locked</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Disable edge swipe to open/close the panel. False by default.</p>\n</div></div><!-- @@@locked -->\n<br/>\n<!-- $$$opened -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"opened-prop\"></a><span class=\"name\">opened</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>When opened, the panel is visible, otherwise it is hidden. Use edge swipes to open/close the panel. The opened property is not updated until the swipe gesture is completed.</p>\n</div></div><!-- @@@opened -->\n<br/>\n<!-- $$$position -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"position-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">position</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The current position of the edge of the panel. The value is 0 when the panel is opened, and has its maximum value when the panel is closed. The maximum value is the width of the Panel for a left or right-aligned panel, and the height of the panel for top or bottom-aligned panels. When the user drags the Panel from the edge to open it, the position will change from the maximum size (closed) to 0 (fully expanded).</p>\n</div></div><!-- @@@position -->\n<br/>\n<!-- $$$pressed -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"pressed-prop\"></a><span class=\"name\">pressed</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The user presses on the opened toolbar, or when the toolbar is closed but not locked, the user presses in the toolbar trigger area.</p>\n</div></div><!-- @@@pressed -->\n<br/>\n<!-- $$$triggerSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"triggerSize-prop\"></a><span class=\"name\">triggerSize</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.0/qtqml/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The size (height for top or bottom-aligned panels, width for left or right-aligned panels) of the mouse area used to detect edge swipes to open the panel, when the panel is not opened. Default value: units.gu(2).</p>\n</div></div><!-- @@@triggerSize -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$close -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"close-method\"></a>Panel::<span class=\"name\">close</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Close the panel</p>\n</div></div><!-- @@@close -->\n<br/>\n<!-- $$$open -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"open-method\"></a>Panel::<span class=\"name\">open</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Open the panel</p>\n</div></div><!-- @@@open -->\n<br/>\n</div></div>\n", "source_file": "qml-ubuntu-components0-panel.html", "source_format": "qdoc" }, { "url": "http://developer.ubuntu.com/api/service/elements/177/", "name": "Panel", "description": "A panel that can be swiped in and out from an edge of the window by the user. For most applications, it is highly recommended to use the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a> instead which includes a toolbar at its bottom ...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/7/", "section": "http://developer.ubuntu.com/api/service/sections/2/", "fullname": "Ubuntu.Components.Panel", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Panel-brief -->\n<p>A panel that can be swiped in and out from an edge of the window by the user. For most applications, it is highly recommended to use the <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a> instead which includes a toolbar at its bottom that can be swiped in or out. <a href=\"#details\">More...</a></p>\n<!-- @@@Panel -->\n<p>Inherited by Toolbar.</p>\n<ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#align-prop\">align</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#animating-prop\">animating</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#contents-prop\">contents</a></b></b> : list&lt;Object&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#hintSize-prop\">hintSize</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#locked-prop\">locked</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#opened-prop\">opened</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#triggerSize-prop\">triggerSize</a></b></b> : real</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#close-method\">close</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#open-method\">open</a></b></b>()</li>\n</ul>\n<!-- $$$Panel-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Unless your application has very specific needs for a Panel, use a <a href=\"/api/qml/sdk-1.0/Ubuntu.Components.MainView/\">MainView</a> with the default toolbar.</p>\n<p>When using a Panel, do not theme it directly, but theme its contents, because the Panel itself should not have visible elements, since it is in the view (to detect mouse events) even when its contents should be invisible.</p>\n<p>Set the anchors and/or width/height of the Panel to specify the area that the Panel covers when opened.</p>\n<p>A black panel that can be swiped in from the lower-right of the window can be created like this:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">Item</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span> <span class=\"operator\">/</span> <span class=\"number\">2</span>\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\">Rectangle</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">overlay</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click&quot;</span>\n }\n }\n }\n}</pre>\n<p>A panel that looks like the standard (bottom-aligned) toolbar, but with custom contents, can be created like this:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">Item</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\">Item</span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"comment\">// two properties used by the toolbar delegate:</span>\n property <span class=\"type\">bool</span> <span class=\"name\">opened</span>: <span class=\"name\">panel</span>.<span class=\"name\">opened</span>\n property <span class=\"type\">bool</span> <span class=\"name\">animating</span>: <span class=\"name\">panel</span>.<span class=\"name\">animating</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-1.0/Ubuntu.Components.Button/\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click&quot;</span>\n }\n }\n }\n}</pre>\n<p>Any Items can be placed inside the Panel, but MouseAreas can block mouse events from reaching the panel and thus obstruct the swiping behavior for hiding the panel. As a result, the user cannot start swiping on the buttons in the examples above in order to hide the panel. To remedy this, clicked() signals are forwarded from the panel to its children. The children's clicked() signal does not have a mouse parameter. Example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 0.1\n<span class=\"type\">Rectangle</span> {\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">background</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\">Rectangle</span> {\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">overlay</span>\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"type\">Rectangle</span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">4</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">foreground</span>\n signal <span class=\"type\">clicked</span>()\n <span class=\"name\">onClicked</span>: <span class=\"name\">print</span>(<span class=\"string\">&quot;The red rectangle was clicked&quot;</span>);\n }\n }\n }\n}</pre>\n<p>Like this, the red rectangle accepts clicked() events, but the user can still swipe down on top of the rectangle in order to hide the panel.</p>\n<!-- @@@Panel -->\n<h2>Property Documentation</h2>\n<!-- $$$align -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"align-prop\"></a><span class=\"name\">align</span> : <span class=\"type\">int</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property defines the alignment of the panel. The implementation supports the following values:</p>\n<ul>\n<li>Qt.AlignBottom to swipe in the panel from the bottom (default)</li>\n<li>Qt.AlignTop to swipe in the panel from the top</li>\n<li>Qt.AlignLeft to swipe in the panel from the left</li>\n<li>Qt.AlignRight to swipe in the panel from the right</li>\n<li>Qt.AlignLeading left when layout mirrorring is disabled, right otherwise</li>\n<li>Qt.AlignTrailing right when layout mirroring is disabled, left otherwise</li>\n</ul>\n<p>The default value is <b>Qt.AlignBottom</b>, and it is not recommended to change the default value because the left, right and top edge are already used for system functions, while the bottom edge is reserved for app-specific functionality such as a default toolbar. The use of Qt.AlignLeading and Qt.AlignTrailing is preferred over Qt.AlignLeft and Qt.AlignRight in order to more easily support right-to-left user interfaces that use LayoutMirroring.</p>\n</div></div><!-- @@@align -->\n<br/>\n<!-- $$$animating -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"animating-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">animating</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The toolbar is currently not in a stable hidden or visible state.</p>\n</div></div><!-- @@@animating -->\n<br/>\n<!-- $$$contents -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"contents-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">contents</span> : <span class=\"type\">list</span>&lt;<span class=\"type\">Object</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Default property, holds the content which will be swiped in and out.</p>\n</div></div><!-- @@@contents -->\n<br/>\n<!-- $$$hintSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hintSize-prop\"></a><span class=\"name\">hintSize</span> : <span class=\"type\">real</span></p></td></tr></table></div><div class=\"qmldoc\"><p>How much of the panel to show when the user touches the panel's edge. This gives the user a hint that there is a panel hiding at that edge and invites him/her to swipe to show the panel completely. Default value: units.gu(2).</p>\n</div></div><!-- @@@hintSize -->\n<br/>\n<!-- $$$locked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"locked-prop\"></a><span class=\"name\">locked</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>Disable edge swipe to open/close the panel. False by default.</p>\n</div></div><!-- @@@locked -->\n<br/>\n<!-- $$$opened -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"opened-prop\"></a><span class=\"name\">opened</span> : <span class=\"type\">bool</span></p></td></tr></table></div><div class=\"qmldoc\"><p>When opened, the panel is visible, otherwise it is hidden. Use edge swipes to open/close the panel. The opened property is not updated until the swipe gesture is completed.</p>\n</div></div><!-- @@@opened -->\n<br/>\n<!-- $$$triggerSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"triggerSize-prop\"></a><span class=\"name\">triggerSize</span> : <span class=\"type\">real</span></p></td></tr></table></div><div class=\"qmldoc\"><p>The size (height for top or bottom-aligned panels, width for left or right-aligned panels) of the mouse area used to detect edge swipes to open the panel, when the panel is not opened. Default value: units.gu(2).</p>\n</div></div><!-- @@@triggerSize -->\n<br/>\n<h2>Method Documentation</h2>\n<!-- $$$close -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"close-method\"></a>Panel::<span class=\"name\">close</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Close the panel</p>\n</div></div><!-- @@@close -->\n<br/>\n<!-- $$$open -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlFuncNode\"><p><a name=\"open-method\"></a>Panel::<span class=\"name\">open</span>()</p></td></tr></table></div><div class=\"qmldoc\"><p>Open the panel</p>\n</div></div><!-- @@@open -->\n<br/>\n", "source_file": null, "source_format": null }, { "url": "http://developer.ubuntu.com/api/service/elements/1381/", "name": "Panel", "description": "A panel that can be swiped in and out from an edge of the window by the user. For most applications, it is highly recommended to use the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a> instead which includes a toolbar at its bottom...", "namespace": "http://developer.ubuntu.com/api/service/namespaces/93/", "section": "http://developer.ubuntu.com/api/service/sections/28/", "fullname": "Ubuntu.Components.Panel", "keywords": "", "data": "<span class=\"subtitle\"></span>\n<!-- $$$Panel-brief -->\n<p>A panel that can be swiped in and out from an edge of the window by the user. For most applications, it is highly recommended to use the <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a> instead which includes a toolbar at its bottom that can be swiped in or out. <a href=\"#details\">More...</a></p>\n<!-- @@@Panel -->\n<table class=\"alignedsummary\">\n<tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> </b><tt>import Ubuntu.Components 1.1</tt></td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherits:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></p>\n</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Inherited By:</td><td class=\"memItemRight bottomAlign\"> <p><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Toolbar\">Toolbar</a>.</p>\n</td></tr></table><ul>\n</ul>\n<a name=\"properties\"></a>\n<h2>Properties</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#align-prop\">align</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#animate-prop\">animate</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#animating-prop\">animating</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#contents-prop\">contents</a></b></b> : list&lt;Object&gt;</li>\n<li class=\"fn\"><b><b><a href=\"#hideTimeout-prop\">hideTimeout</a></b></b> : int</li>\n<li class=\"fn\"><b><b><a href=\"#hintSize-prop\">hintSize</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#locked-prop\">locked</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#opened-prop\">opened</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#position-prop\">position</a></b></b> : real</li>\n<li class=\"fn\"><b><b><a href=\"#pressed-prop\">pressed</a></b></b> : bool</li>\n<li class=\"fn\"><b><b><a href=\"#triggerSize-prop\">triggerSize</a></b></b> : real</li>\n</ul>\n<a name=\"methods\"></a>\n<h2>Methods</h2>\n<ul>\n<li class=\"fn\"><b><b><a href=\"#close-method\">close</a></b></b>()</li>\n<li class=\"fn\"><b><b><a href=\"#open-method\">open</a></b></b>()</li>\n</ul>\n<!-- $$$Panel-description -->\n<a name=\"details\"></a>\n<h2>Detailed Description</h2>\n<p>Unless your application has very specific needs for a Panel, use a <a href=\"/api/qml/sdk-14.10/Ubuntu.Components.MainView\">MainView</a> with the default toolbar.</p>\n<p>When using a Panel, do not theme it directly, but theme its contents, because the Panel itself should not have visible elements, since it is in the view (to detect mouse events) even when its contents should be invisible.</p>\n<p>Set the anchors and/or width/height of the Panel to specify the area that the Panel covers when opened.</p>\n<p>A black panel that can be swiped in from the lower-right of the window can be created like this:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">width</span>: <span class=\"name\">parent</span>.<span class=\"name\">width</span> <span class=\"operator\">/</span> <span class=\"number\">2</span>\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">overlay</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click&quot;</span>\n }\n }\n }\n}</pre>\n<p>A panel that looks like the standard (bottom-aligned) toolbar, but with custom contents, can be created like this:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">80</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Item\">Item</a></span> {\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"comment\">// two properties used by the toolbar delegate:</span>\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span> <span class=\"name\">opened</span>: <span class=\"name\">panel</span>.<span class=\"name\">opened</span>\n property <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span> <span class=\"name\">animating</span>: <span class=\"name\">panel</span>.<span class=\"name\">animating</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/Ubuntu.Components.Button\">Button</a></span> {\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">text</span>: <span class=\"string\">&quot;Click&quot;</span>\n }\n }\n }\n}</pre>\n<p>Any Items can be placed inside the Panel, but MouseAreas can block mouse events from reaching the panel and thus obstruct the swiping behavior for hiding the panel. As a result, the user cannot start swiping on the buttons in the examples above in order to hide the panel. To remedy this, clicked() signals are forwarded from the panel by calling the child's trigger() function. Example:</p>\n<pre class=\"qml\">import QtQuick 2.0\nimport Ubuntu.Components 1.1\n<span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">background</span>\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">40</span>)\n <span class=\"type\">Panel</span> {\n <span class=\"name\">id</span>: <span class=\"name\">panel</span>\n <span class=\"type\">anchors</span> {\n <span class=\"name\">left</span>: <span class=\"name\">parent</span>.<span class=\"name\">left</span>\n <span class=\"name\">right</span>: <span class=\"name\">parent</span>.<span class=\"name\">right</span>\n <span class=\"name\">bottom</span>: <span class=\"name\">parent</span>.<span class=\"name\">bottom</span>\n }\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">color</span>: <span class=\"name\">Theme</span>.<span class=\"name\">palette</span>.<span class=\"name\">normal</span>.<span class=\"name\">overlay</span>\n <span class=\"name\">anchors</span>.fill: <span class=\"name\">parent</span>\n <span class=\"type\"><a href=\"/api/qml/sdk-14.10/QtQuick.Rectangle\">Rectangle</a></span> {\n <span class=\"name\">width</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">8</span>)\n <span class=\"name\">height</span>: <span class=\"name\">units</span>.<span class=\"name\">gu</span>(<span class=\"number\">4</span>)\n <span class=\"name\">anchors</span>.centerIn: <span class=\"name\">parent</span>\n <span class=\"name\">color</span>: <span class=\"string\">&quot;red&quot;</span>\n <span class=\"keyword\">function</span> <span class=\"name\">trigger</span>() {\n <span class=\"name\">print</span>(<span class=\"string\">&quot;The red rectangle was clicked&quot;</span>);\n }\n }\n }\n }\n <span class=\"name\">Component</span>.onCompleted: <span class=\"name\">panel</span>.<span class=\"name\">open</span>();\n}</pre>\n<p>Like this, the red rectangle accepts click events, but the user can still swipe down on top of the rectangle in order to hide the panel.</p>\n<!-- @@@Panel -->\n<h2>Property Documentation</h2>\n<!-- $$$align -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"align-prop\"></a><span class=\"name\">align</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The property defines the alignment of the panel. The implementation supports the following values:</p>\n<ul>\n<li>Qt.AlignBottom to swipe in the panel from the bottom (default)</li>\n<li>Qt.AlignTop to swipe in the panel from the top</li>\n<li>Qt.AlignLeft to swipe in the panel from the left</li>\n<li>Qt.AlignRight to swipe in the panel from the right</li>\n<li>Qt.AlignLeading left when layout mirrorring is disabled, right otherwise</li>\n<li>Qt.AlignTrailing right when layout mirroring is disabled, left otherwise</li>\n</ul>\n<p>The default value is <b>Qt.AlignBottom</b>, and it is not recommended to change the default value because the left, right and top edge are already used for system functions, while the bottom edge is reserved for app-specific functionality such as a default toolbar. The use of Qt.AlignLeading and Qt.AlignTrailing is preferred over Qt.AlignLeft and Qt.AlignRight in order to more easily support right-to-left user interfaces that use <a href=\"/api/qml/sdk-14.10/QtQuick.LayoutMirroring\">LayoutMirroring</a>.</p>\n</div></div><!-- @@@align -->\n<br/>\n<!-- $$$animate -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"animate-prop\"></a><span class=\"name\">animate</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Animate transitions between the different panel states.</p>\n</div></div><!-- @@@animate -->\n<br/>\n<!-- $$$animating -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"animating-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">animating</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The toolbar is currently not in a stable hidden or visible state.</p>\n</div></div><!-- @@@animating -->\n<br/>\n<!-- $$$contents -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"contents-prop\"></a><span class=\"qmldefault\">default</span><span class=\"name\">contents</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-list.html\">list</a></span>&lt;<span class=\"type\">Object</span>&gt;</p></td></tr></table></div><div class=\"qmldoc\"><p>Default property, holds the content which will be swiped in and out.</p>\n</div></div><!-- @@@contents -->\n<br/>\n<!-- $$$hideTimeout -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hideTimeout-prop\"></a><span class=\"name\">hideTimeout</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-int.html\">int</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The time in milliseconds before the panel automatically hides after inactivity when it is not locked. Interacting with the panel resets the timer. Note that adding contents to the panel that accepts mouse events will prevent the panel from detecting interaction and the timer will not be reset. Setting a negative value will disable automatic hiding. Default value: -1 (automatic hiding is disabled).</p>\n</div></div><!-- @@@hideTimeout -->\n<br/>\n<!-- $$$hintSize -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"hintSize-prop\"></a><span class=\"name\">hintSize</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>How much of the panel to show when the user touches the panel's edge. This gives the user a hint that there is a panel hiding at that edge and invites him/her to swipe to show the panel completely. Default value: units.gu(2).</p>\n</div></div><!-- @@@hintSize -->\n<br/>\n<!-- $$$locked -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"locked-prop\"></a><span class=\"name\">locked</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>Disable edge swipe to open/close the panel. False by default.</p>\n</div></div><!-- @@@locked -->\n<br/>\n<!-- $$$opened -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"opened-prop\"></a><span class=\"name\">opened</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-bool.html\">bool</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>When opened, the panel is visible, otherwise it is hidden. Use edge swipes to open/close the panel. The opened property is not updated until the swipe gesture is completed.</p>\n</div></div><!-- @@@opened -->\n<br/>\n<!-- $$$position -->\n<div class=\"qmlitem\"><div class=\"qmlproto\"><table class=\"qmlname\"><tr valign=\"top\" class=\"odd\"><td class=\"tblQmlPropNode\"><p><a name=\"position-prop\"></a><span class=\"qmlreadonly\">read-only</span><span class=\"name\">position</span> : <span class=\"type\"><a href=\"http://qt-project.org/doc/qt-5.3/qml-real.html\">real</a></span></p></td></tr></table></div><div class=\"qmldoc\"><p>The current position of the edge of the panel. The value is 0 when the panel is opened, and has its maximum value when the panel is closed. The maximum value is the width of the Panel for a left or right-aligned panel, and the height of the panel for top or bottom-aligned panels. When the user drags the Panel from the edge to open it, the position will change from the maximum size (closed) to 0 (fully expanded).</p>\n</div></div><!-- @@@position -->\n<br/>\n<!