Merge lp:~zsombi/ubuntu-ui-toolkit/separate-uitk-versions into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Merged at revision: 1501
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/separate-uitk-versions
Merge into: lp:ubuntu-ui-toolkit/staging
Prerequisite: lp:~zsombi/ubuntu-ui-toolkit/fix-import-versions
Diff against target: 21182 lines (+18252/-1101)
194 files modified
components.api (+918/-365)
debian/qtdeclarative5-ubuntu-ui-toolkit-plugin.install (+15/-10)
documentation/ubuntu-theming.qdoc (+1/-1)
documentation/ubuntu-ui-toolkit-common.qdocconf (+7/-1)
examples/1.3/1.3.pro (+0/-10)
examples/examples.pro (+7/-20)
examples/locale/locale.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Buttons.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Dialog.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Icons.qml (+2/-2)
examples/ubuntu-ui-toolkit-gallery/ListItems.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Pickers.qml (+12/-1)
examples/ubuntu-ui-toolkit-gallery/Popover.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/Sheet.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/UbuntuListViews.qml (+1/-1)
examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml (+1/-1)
modules/Ubuntu/Components/1.0/1.0.pro (+2/-2)
modules/Ubuntu/Components/1.1/1.1.pro (+2/-2)
modules/Ubuntu/Components/1.1/Haptics.qml (+1/-1)
modules/Ubuntu/Components/1.2/1.2.pro (+15/-0)
modules/Ubuntu/Components/1.2/AbstractButton.qml (+109/-0)
modules/Ubuntu/Components/1.2/ActionItem.qml (+96/-0)
modules/Ubuntu/Components/1.2/ActionList.qml (+47/-0)
modules/Ubuntu/Components/1.2/ActivityIndicator.qml (+59/-0)
modules/Ubuntu/Components/1.2/AnimatedItem.qml (+37/-0)
modules/Ubuntu/Components/1.2/AppHeader.qml (+258/-0)
modules/Ubuntu/Components/1.2/Captions.qml (+150/-0)
modules/Ubuntu/Components/1.2/CheckBox.qml (+53/-0)
modules/Ubuntu/Components/1.2/ComboButton.qml (+367/-0)
modules/Ubuntu/Components/1.2/CrossFadeImage10.qml (+173/-0)
modules/Ubuntu/Components/1.2/CrossFadeImage11.qml (+192/-0)
modules/Ubuntu/Components/1.2/DraggingArea.qml (+114/-0)
modules/Ubuntu/Components/1.2/Header.qml (+39/-0)
modules/Ubuntu/Components/1.2/InputHandler.qml (+518/-0)
modules/Ubuntu/Components/1.2/Label.qml (+59/-0)
modules/Ubuntu/Components/1.2/MainView.qml (+1/-1)
modules/Ubuntu/Components/1.2/MainView12.qml (+163/-0)
modules/Ubuntu/Components/1.2/MainViewBase.qml (+83/-0)
modules/Ubuntu/Components/1.2/OptionSelector.qml (+297/-0)
modules/Ubuntu/Components/1.2/OptionSelectorDelegate.qml (+365/-0)
modules/Ubuntu/Components/1.2/OrientationHelper.qml (+205/-0)
modules/Ubuntu/Components/1.2/Page10.qml (+32/-5)
modules/Ubuntu/Components/1.2/Page11.qml (+2/-4)
modules/Ubuntu/Components/1.2/PageHeadConfiguration.qml (+207/-0)
modules/Ubuntu/Components/1.2/PageHeadSections.qml (+78/-0)
modules/Ubuntu/Components/1.2/PageHeadState.qml (+113/-0)
modules/Ubuntu/Components/1.2/PageStack.qml (+304/-0)
modules/Ubuntu/Components/1.2/PageTreeNode.qml (+158/-0)
modules/Ubuntu/Components/1.2/PageWrapper.qml (+99/-0)
modules/Ubuntu/Components/1.2/Panel.qml (+646/-0)
modules/Ubuntu/Components/1.2/ProgressBar10.qml (+68/-0)
modules/Ubuntu/Components/1.2/ProgressBar11.qml (+21/-0)
modules/Ubuntu/Components/1.2/PullToRefresh.qml (+242/-0)
modules/Ubuntu/Components/1.2/Scrollbar.qml (+150/-0)
modules/Ubuntu/Components/1.2/Slider.qml (+211/-0)
modules/Ubuntu/Components/1.2/Switch.qml (+44/-0)
modules/Ubuntu/Components/1.2/Tab.qml (+168/-0)
modules/Ubuntu/Components/1.2/TabBar.qml (+167/-0)
modules/Ubuntu/Components/1.2/Tabs.qml (+448/-0)
modules/Ubuntu/Components/1.2/TextArea.qml (+877/-0)
modules/Ubuntu/Components/1.2/TextCursor.qml (+318/-0)
modules/Ubuntu/Components/1.2/TextField.qml (+1023/-0)
modules/Ubuntu/Components/1.2/TextInputPopover.qml (+103/-0)
modules/Ubuntu/Components/1.2/Toolbar.qml (+147/-0)
modules/Ubuntu/Components/1.2/ToolbarButton.qml (+87/-0)
modules/Ubuntu/Components/1.2/ToolbarItems.qml (+224/-0)
modules/Ubuntu/Components/1.2/UbuntuListView.qml (+143/-0)
modules/Ubuntu/Components/1.2/UbuntuListView11.qml (+33/-0)
modules/Ubuntu/Components/1.2/UbuntuNumberAnimation.qml (+56/-0)
modules/Ubuntu/Components/1.3/1.3.pro (+15/-0)
modules/Ubuntu/Components/1.3/AppHeader.qml (+1/-1)
modules/Ubuntu/Components/1.3/Button.qml (+126/-0)
modules/Ubuntu/Components/1.3/ComboButton.qml (+3/-4)
modules/Ubuntu/Components/1.3/DraggingArea.qml (+1/-2)
modules/Ubuntu/Components/1.3/MainView.qml (+1/-1)
modules/Ubuntu/Components/1.3/OptionSelector.qml (+1/-1)
modules/Ubuntu/Components/1.3/OptionSelectorDelegate.qml (+1/-1)
modules/Ubuntu/Components/1.3/Page.qml (+1/-1)
modules/Ubuntu/Components/1.3/PageHeadConfiguration.qml (+32/-3)
modules/Ubuntu/Components/1.3/PageStack.qml (+2/-2)
modules/Ubuntu/Components/1.3/PageTreeNode.qml (+2/-2)
modules/Ubuntu/Components/1.3/PageWrapper.qml (+2/-2)
modules/Ubuntu/Components/1.3/ProgressBar.qml (+56/-2)
modules/Ubuntu/Components/1.3/PullToRefresh.qml (+3/-3)
modules/Ubuntu/Components/1.3/Slider.qml (+1/-2)
modules/Ubuntu/Components/1.3/Tab.qml (+1/-1)
modules/Ubuntu/Components/1.3/Tabs.qml (+3/-2)
modules/Ubuntu/Components/1.3/TextArea.qml (+2/-3)
modules/Ubuntu/Components/1.3/TextCursor.qml (+1/-1)
modules/Ubuntu/Components/1.3/TextField.qml (+2/-2)
modules/Ubuntu/Components/1.3/TextInputPopover.qml (+1/-1)
modules/Ubuntu/Components/1.3/ToolbarItems.qml (+1/-1)
modules/Ubuntu/Components/1.3/UbuntuColors.qml (+132/-0)
modules/Ubuntu/Components/1.3/UbuntuListView.qml (+1/-1)
modules/Ubuntu/Components/ComponentModule.pro (+1/-9)
modules/Ubuntu/Components/Components.pro (+4/-2)
modules/Ubuntu/Components/CrossFadeImage10.qml (+0/-173)
modules/Ubuntu/Components/ListItems/1.2/1.2.pro (+15/-0)
modules/Ubuntu/Components/ListItems/1.2/Base.qml (+183/-0)
modules/Ubuntu/Components/ListItems/1.2/Caption.qml (+59/-0)
modules/Ubuntu/Components/ListItems/1.2/Divider.qml (+36/-0)
modules/Ubuntu/Components/ListItems/1.2/Empty.qml (+486/-0)
modules/Ubuntu/Components/ListItems/1.2/Expandable.qml (+221/-0)
modules/Ubuntu/Components/ListItems/1.2/ExpandablesColumn.qml (+131/-0)
modules/Ubuntu/Components/ListItems/1.2/Header.qml (+77/-0)
modules/Ubuntu/Components/ListItems/1.2/IconVisual.qml (+58/-0)
modules/Ubuntu/Components/ListItems/1.2/ImageWithFallback.qml (+46/-0)
modules/Ubuntu/Components/ListItems/1.2/ItemSelector.qml (+286/-0)
modules/Ubuntu/Components/ListItems/1.2/LabelVisual.qml (+38/-0)
modules/Ubuntu/Components/ListItems/1.2/MultiValue.qml (+95/-0)
modules/Ubuntu/Components/ListItems/1.2/ProgressionVisual.qml (+29/-0)
modules/Ubuntu/Components/ListItems/1.2/SingleControl.qml (+79/-0)
modules/Ubuntu/Components/ListItems/1.2/SingleValue.qml (+81/-0)
modules/Ubuntu/Components/ListItems/1.2/Standard.qml (+304/-0)
modules/Ubuntu/Components/ListItems/1.2/Subtitled.qml (+112/-0)
modules/Ubuntu/Components/ListItems/1.2/ThinDivider.qml (+64/-0)
modules/Ubuntu/Components/ListItems/1.2/ValueSelector.qml (+297/-0)
modules/Ubuntu/Components/ListItems/1.3/1.3.pro (+15/-0)
modules/Ubuntu/Components/ListItems/1.3/Caption.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/Divider.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/Empty.qml (+2/-2)
modules/Ubuntu/Components/ListItems/1.3/Expandable.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/ExpandablesColumn.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/Header.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/ItemSelector.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/MultiValue.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/SingleControl.qml (+2/-2)
modules/Ubuntu/Components/ListItems/1.3/SingleValue.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/Standard.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/Subtitled.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/ThinDivider.qml (+1/-1)
modules/Ubuntu/Components/ListItems/1.3/ValueSelector.qml (+2/-2)
modules/Ubuntu/Components/ListItems/ListItems.pro (+5/-25)
modules/Ubuntu/Components/ListItems/ListItemsModule.pro (+13/-0)
modules/Ubuntu/Components/ListItems/qmldir (+48/-30)
modules/Ubuntu/Components/PageHeadConfiguration11.qml (+0/-55)
modules/Ubuntu/Components/Pickers/1.2/1.2.pro (+15/-0)
modules/Ubuntu/Components/Pickers/1.2/DatePicker.qml (+672/-0)
modules/Ubuntu/Components/Pickers/1.2/DayModel.qml (+86/-0)
modules/Ubuntu/Components/Pickers/1.2/Dialer.qml (+179/-0)
modules/Ubuntu/Components/Pickers/1.2/DialerHand.qml (+224/-0)
modules/Ubuntu/Components/Pickers/1.2/DialerHandGroup.qml (+29/-0)
modules/Ubuntu/Components/Pickers/1.2/HoursModel.qml (+63/-0)
modules/Ubuntu/Components/Pickers/1.2/MinutesModel.qml (+63/-0)
modules/Ubuntu/Components/Pickers/1.2/MonthModel.qml (+98/-0)
modules/Ubuntu/Components/Pickers/1.2/Picker.qml (+447/-0)
modules/Ubuntu/Components/Pickers/1.2/PickerDelegate.qml (+58/-0)
modules/Ubuntu/Components/Pickers/1.2/PickerModelBase.qml (+154/-0)
modules/Ubuntu/Components/Pickers/1.2/PickerPanel.qml (+267/-0)
modules/Ubuntu/Components/Pickers/1.2/PickerRow.qml (+137/-0)
modules/Ubuntu/Components/Pickers/1.2/SecondsModel.qml (+63/-0)
modules/Ubuntu/Components/Pickers/1.2/YearModel.qml (+69/-0)
modules/Ubuntu/Components/Pickers/1.3/1.3.pro (+15/-0)
modules/Ubuntu/Components/Pickers/1.3/PickerPanel.qml (+2/-2)
modules/Ubuntu/Components/Pickers/Pickers.pro (+5/-25)
modules/Ubuntu/Components/Pickers/PickersModule.pro (+14/-0)
modules/Ubuntu/Components/Pickers/qmldir (+21/-16)
modules/Ubuntu/Components/Popups/1.2/1.2.pro (+15/-0)
modules/Ubuntu/Components/Popups/1.2/ActionSelectionPopover.qml (+165/-0)
modules/Ubuntu/Components/Popups/1.2/ComposerSheet.qml (+97/-0)
modules/Ubuntu/Components/Popups/1.2/DefaultSheet.qml (+104/-0)
modules/Ubuntu/Components/Popups/1.2/Dialog.qml (+218/-0)
modules/Ubuntu/Components/Popups/1.2/Popover.qml (+300/-0)
modules/Ubuntu/Components/Popups/1.2/PopupBase.qml (+261/-0)
modules/Ubuntu/Components/Popups/1.2/SheetBase.qml (+113/-0)
modules/Ubuntu/Components/Popups/1.2/internalPopupUtils.js (+290/-0)
modules/Ubuntu/Components/Popups/1.3/1.3.pro (+15/-0)
modules/Ubuntu/Components/Popups/1.3/ActionSelectionPopover.qml (+1/-1)
modules/Ubuntu/Components/Popups/1.3/ComposerSheet.qml (+1/-1)
modules/Ubuntu/Components/Popups/1.3/DefaultSheet.qml (+1/-1)
modules/Ubuntu/Components/Popups/1.3/Dialog.qml (+1/-1)
modules/Ubuntu/Components/Popups/1.3/Popover.qml (+2/-2)
modules/Ubuntu/Components/Popups/1.3/internalPopupUtils.js (+5/-5)
modules/Ubuntu/Components/Popups/PopupModule.pro (+14/-0)
modules/Ubuntu/Components/Popups/Popups.pro (+5/-25)
modules/Ubuntu/Components/Popups/qmldir (+27/-17)
modules/Ubuntu/Components/ProgressBar10.qml (+0/-69)
modules/Ubuntu/Components/ProgressBar11.qdoc (+0/-6)
modules/Ubuntu/Components/Styles/1.2/1.2.pro (+11/-0)
modules/Ubuntu/Components/Styles/Styles.pro (+4/-25)
modules/Ubuntu/Components/Styles/StylesModule.pro (+25/-0)
modules/Ubuntu/Components/Styles/qmldir (+5/-3)
modules/Ubuntu/Components/Themes/Ambiance/1.3/DatePickerStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/1.3/OverflowPanel.qml (+2/-2)
modules/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/1.3/PickerStyle.qml (+1/-1)
modules/Ubuntu/Components/plugin/plugin.cpp (+9/-1)
modules/Ubuntu/Components/plugin/plugin.h (+1/-0)
modules/Ubuntu/Components/qmldir (+131/-103)
modules/Ubuntu/PerformanceMetrics/BarGraph.qml (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py (+2/-3)
tests/unit/runtest.sh (+1/-1)
tests/unit_x11/tst_components/tst_header_contents_width.qml (+2/-2)
tests/unit_x11/tst_components/tst_pagestack.new_header.qml (+1/-1)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/separate-uitk-versions
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Cris Dywan Approve
Review via email: mp+257455@code.launchpad.net

Commit message

Separate 1.2 from 1.3 versions in all Ubuntu.Component modules.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

dh_install: qtdeclarative5-ubuntu-ui-toolkit-plugin missing files (usr/lib/*/qt5/qml/Ubuntu/Components/ListItems/artwork), aborting

You moved modules/Ubuntu/Components/ListItems/artwork/ListItemDivider6px@8.png move to Comoponents/ but didn't update .install - by accident?

Remember, you can use "bzr bd" to spot this more quickly as you won't have to wait for J to finish if it's just packaging changes.

review: Needs Fixing
Revision history for this message
Cris Dywan (kalikiana) wrote :

examples/1.2/ubuntu-ui-toolkit-gallery/po/es.po

Do we really have to duplicate translations? It should be fine to share strings and translators will appreciate not having to go through an exponential increase in strings.

Revision history for this message
Zsombor Egri (zsombi) wrote :

> dh_install: qtdeclarative5-ubuntu-ui-toolkit-plugin missing files
> (usr/lib/*/qt5/qml/Ubuntu/Components/ListItems/artwork), aborting
>
> You moved modules/Ubuntu/Components/ListItems/artwork/ListItemDivider6px@8.png
> move to Comoponents/ but didn't update .install - by accident?
>
> Remember, you can use "bzr bd" to spot this more quickly as you won't have to
> wait for J to finish if it's just packaging changes.

I wish I could, I tried, it fails building even on a perfect branch :/

Revision history for this message
Zsombor Egri (zsombi) wrote :

> examples/1.2/ubuntu-ui-toolkit-gallery/po/es.po
>
> Do we really have to duplicate translations? It should be fine to share
> strings and translators will appreciate not having to go through an
> exponential increase in strings.

I have chosen the easiest way no, we can shape it if we want to later. We can share, of course, but we may also have to add more stuff to the newer releases, so why do share?

Also, the gallery needs to be redesigned from the grounds, so we use Layouts, etc. And that is better to do in a separate branch too.

Revision history for this message
Cris Dywan (kalikiana) wrote :

> > examples/1.2/ubuntu-ui-toolkit-gallery/po/es.po
> >
> > Do we really have to duplicate translations? It should be fine to share
> > strings and translators will appreciate not having to go through an
> > exponential increase in strings.
>
> I have chosen the easiest way no, we can shape it if we want to later. We can
> share, of course, but we may also have to add more stuff to the newer
> releases, so why do share?

That really depends on what we do with it. Will we maintain additions to each copy and run all AP tests against multiple versions for compatibility testing? How many varianrts will we have? Which one will app developers read when looking for example code?

In that sense, multiplying the amount of translatable strings is not my only concern, but the most obvious problem.

> Also, the gallery needs to be redesigned from the grounds, so we use Layouts,
> etc. And that is better to do in a separate branch too.

For that matter, I don't see why the gallery has to be duplicated in this step. We've had good arguments to do that before the version revamp and didn't do it. Again my main concern is doing this by the way with no clear plan.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :

The on-going outages in CI make me uneasy… other than that the branch looks good and I didn't spot any genuine failures.

review: Approve
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

> The on-going outages in CI make me uneasy… other than that the branch looks
> good and I didn't spot any genuine failures.

Well :) The bz push is always at our disposal... but it would be nice to see a clean merge executed by Jenkins.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2015-04-29 05:08:32 +0000
3+++ components.api 2015-05-06 10:32:32 +0000
4@@ -1,3 +1,47 @@
5+Button 0.1 1.0
6+AbstractButton
7+ property color color
8+ property Gradient gradient
9+ property font font
10+ property string iconPosition
11+UbuntuColors 0.1 1.0
12+QtObject
13+ readonly property color orange
14+ readonly property color lightAubergine
15+ readonly property color midAubergine
16+ readonly property color darkAubergine
17+ readonly property color warmGrey
18+ readonly property color coolGrey
19+ property Gradient orangeGradient
20+ property Gradient greyGradient
21+Button 1.1
22+AbstractButton
23+ property color strokeColor
24+ property color color
25+ property Gradient gradient
26+ property font font
27+ property string iconPosition
28+Haptics 0.1 1.0
29+Object
30+ readonly property bool enabled
31+ property HapticsEffect effect
32+ function play(customEffect)
33+UbuntuColors 1.1
34+QtObject
35+ readonly property color orange
36+ readonly property color lightAubergine
37+ readonly property color midAubergine
38+ readonly property color darkAubergine
39+ readonly property color warmGrey
40+ readonly property color coolGrey
41+ property Gradient orangeGradient
42+ property Gradient greyGradient
43+ readonly property color lightGrey
44+ readonly property color darkGrey
45+ readonly property color red
46+ readonly property color green
47+ readonly property color blue
48+ readonly property color purple
49 AbstractButton 0.1 1.0
50 ActionItem
51 signal clicked()
52@@ -21,19 +65,6 @@
53 ActivityIndicator 0.1 1.0
54 AnimatedItem
55 property bool running
56-Button 0.1 1.0
57-AbstractButton
58- property color color
59- property Gradient gradient
60- property font font
61- property string iconPosition
62-Button 1.1
63-AbstractButton
64- property color strokeColor
65- property color color
66- property Gradient gradient
67- property font font
68- property string iconPosition
69 Captions 1.2
70 ColumnLayout
71 property int captionStyle
72@@ -43,7 +74,7 @@
73 AbstractButton
74 property bool checked
75 ComboButton 1.1
76-Button
77+Toolkit.Button
78 property bool expanded
79 property real collapsedHeight
80 property real expandedHeight
81@@ -67,11 +98,6 @@
82 property string fadeStyle
83 readonly property bool running
84 readonly property int status
85-Haptics 0.1 1.0
86-Object
87- readonly property bool enabled
88- property HapticsEffect effect
89- function play(customEffect)
90 Header 0.1 1.0
91 AppHeader
92 property string _for_autopilot
93@@ -86,115 +112,6 @@
94 Label 0.1 1.0
95 Text
96 property string fontSize
97-Base 0.1 1.0
98-Empty
99- property variant icon
100- property url fallbackIconSource
101- property string fallbackIconName
102- property bool progression
103- property bool iconFrame
104- property real __iconWidth
105- property real __iconHeight
106- property real __leftIconMargin
107- property real __rightIconMargin
108- property bool __iconIsItem
109- default property internal children
110-Caption 0.1 1.0
111-Item
112- property string text
113-Divider 0.1 1.0
114-Image
115-Empty 0.1 1.0
116-AbstractButton
117- property bool selected
118- property bool highlightWhenPressed
119- property bool removable
120- property bool confirmRemoval
121- readonly property string swipingState
122- readonly property bool waitingConfirmationForRemoval
123- signal itemRemoved
124- property int __height
125- property bool showDivider
126- default property internal children
127- property internal __contents
128- property list<Item> backgroundIndicator
129- property ThinDivider divider
130- property real __contentsMargins
131- function cancelItemRemoval()
132-Expandable 0.1 1.0
133-Empty
134- property bool expanded
135- property real collapsedHeight
136- property real expandedHeight
137- property bool collapseOnClick
138- default property QtObject children
139-ExpandablesColumn 0.1 1.0
140-Flickable
141- readonly property Item expandedItem
142- function expandItem(item)
143- function collapse()
144- default property QtObject children
145-Header 0.1 1.0
146-Item
147- property string text
148- property internal __foregroundColor
149-ItemSelector 0.1 1.0
150-ListItem.Empty
151- property var model
152- property bool expanded
153- property bool multiSelection
154- property bool colourImage
155- property Component delegate
156- property real containerHeight
157- property int selectedIndex
158- property bool currentlyExpanded
159- readonly property real itemHeight
160- signal delegateClicked(int index)
161- signal expansionCompleted()
162-MultiValue 0.1 1.0
163-Base
164- property variant values
165-SingleControl 0.1 1.0
166-Empty
167- property Item control
168- function __updateControl()
169-SingleValue 0.1 1.0
170-Base
171- property string value
172-Standard 0.1 1.0
173-Empty
174- property variant icon
175- property url fallbackIconSource
176- property string fallbackIconName
177- property bool progression
178- property real __iconWidth
179- property real __iconHeight
180- property real __leftIconMargin
181- property real __rightIconMargin
182- property Item control
183- property bool iconFrame
184- property bool __controlAreaPressed
185- property bool __iconIsItem
186- property internal __foregroundColor
187-Subtitled 0.1 1.0
188-Base
189- property string subText
190-ThinDivider 0.1 1.0
191-Rectangle
192- property bool __lightBackground
193-ValueSelector 0.1 1.0
194-Empty
195- property variant icon
196- property url fallbackIconSource
197- property string fallbackIconName
198- property real __iconWidth
199- property real __iconHeight
200- property real __leftIconMargin
201- property real __rightIconMargin
202- property bool iconFrame
203- property variant values
204- property int selectedIndex
205- property bool expanded
206 MainView 0.1 1.0
207 MainViewBase
208 property bool automaticOrientation
209@@ -248,11 +165,6 @@
210 Page 1.1
211 Page10
212 readonly property PageHeadConfiguration head
213-Page 1.3
214-PageTreeNode
215- property string title
216- property Flickable flickable
217- readonly property PageHeadConfiguration head
218 PageHeadConfiguration 1.1
219 Object
220 property list<Action> actions
221@@ -261,10 +173,6 @@
222 property string preset
223 readonly property PageHeadSections sections
224 property color foregroundColor
225-PageHeadConfiguration 1.3
226-Toolkit12.PageHeadConfiguration
227- property bool locked
228- property bool visible
229 PageHeadSections 1.1
230 QtObject
231 property bool enabled
232@@ -302,6 +210,770 @@
233 property bool __closeOnContentsClicks
234 property bool __openOnHover
235 property bool pressed
236+ProgressBar 0.1 1.0
237+AnimatedItem
238+ property bool indeterminate
239+ property real minimumValue
240+ property real maximumValue
241+ property real value
242+ProgressBar 1.1
243+ProgressBar
244+ property bool showProgressPercentage
245+PullToRefresh 1.1
246+StyledItem
247+ readonly property bool releaseToRefresh
248+ readonly property real offset
249+ property Component content
250+ property Flickable target
251+ property bool refreshing
252+ signal refresh()
253+Scrollbar 0.1 1.0
254+StyledItem
255+ property Flickable flickableItem
256+ property int align
257+ property bool __interactive
258+ property internal __private
259+Slider 0.1 1.0
260+StyledItem
261+ property real minimumValue
262+ property real maximumValue
263+ property real value
264+ property bool live
265+ property bool pressed
266+ signal touched(bool onThumb)
267+ function formatValue(v)
268+ property internal __internals
269+Switch 0.1 1.0
270+CheckBox
271+Tab 0.1 1.0
272+PageTreeNode
273+ property string title
274+ property url iconSource
275+ property Item page
276+ readonly property int index
277+ property internal __protected
278+TabBar 0.1 1.0
279+StyledItem
280+ property Item tabsItem
281+ property var model
282+ readonly property bool pressed
283+ property bool selectionMode
284+ property int selectedIndex
285+ property bool alwaysSelectionMode
286+ property bool animate
287+Tabs 0.1 1.0
288+PageTreeNode
289+ property int selectedTabIndex
290+ readonly property Tab selectedTab
291+ readonly property Item currentPage
292+ property TabBar tabBar
293+ default property list<Item> tabChildren
294+ readonly property int count
295+ signal modelChanged()
296+ property var __model
297+TextArea 0.1 1.0
298+Ubuntu.StyledItem
299+ property bool highlighted
300+ property string placeholderText
301+ readonly property string displayText
302+ property bool selectByMouse
303+ property bool autoExpand
304+ property bool autoSize
305+ property int maximumLineCount
306+ property real contentWidth
307+ property real contentHeight
308+ property var popover
309+ property bool activeFocusOnPress
310+ property url baseUrl
311+ property bool canPaste
312+ property bool canRedo
313+ property bool canUndo
314+ property color color
315+ property Component cursorDelegate
316+ property int cursorPosition
317+ property rectangle cursorRectangle
318+ property bool cursorVisible
319+ property enumeration effectiveHorizontalAlignment
320+ property font font
321+ property enumeration horizontalAlignment
322+ property bool inputMethodComposing
323+ property enumeration inputMethodHints
324+ property int length
325+ property int lineCount
326+ property enumeration mouseSelectionMode
327+ property enumeration persistentSelection
328+ property bool readOnly
329+ property enumeration renderType
330+ property string selectedText
331+ property color selectedTextColor
332+ property color selectionColor
333+ property int selectionEnd
334+ property int selectionStart
335+ property string text
336+ property enumeration textFormat
337+ property enumeration verticalAlignment
338+ property enumeration wrapMode
339+ signal linkActivated(string link)
340+ function copy()
341+ function cut()
342+ function deselect()
343+ function insert(position, text)
344+ function positionAt(x, y)
345+ function isRightToLeft(start, end)
346+ function moveCursorSelection(position, mode)
347+ function paste(data)
348+ function positionToRectangle(position)
349+ function redo()
350+ function select(start, end)
351+ function selectAll()
352+ function selectWord()
353+ function getFormattedText(start, end)
354+ function getText(start, end)
355+ function remove(start, end)
356+ function undo()
357+TextField 0.1 1.0
358+ActionItem
359+ property bool highlighted
360+ property string placeholderText
361+ property bool hasClearButton
362+ property Component customSoftwareInputPanel
363+ property var popover
364+ property list<Object> primaryItem
365+ property list<Object> secondaryItem
366+ property bool errorHighlight
367+ property bool acceptableInput
368+ property bool activeFocusOnPress
369+ property bool autoScroll
370+ property bool canPaste
371+ property bool canRedo
372+ property bool canUndo
373+ property color color
374+ property real contentHeight
375+ property real contentWidth
376+ property Component cursorDelegate
377+ property int cursorPosition
378+ property rectangle cursorRectangle
379+ property bool cursorVisible
380+ property string displayText
381+ property enumeration echoMode
382+ property font font
383+ property string inputMask
384+ property bool inputMethodComposing
385+ property enumeration inputMethodHints
386+ property int length
387+ property int maximumLength
388+ property enumeration mouseSelectionMode
389+ property bool persistentSelection
390+ property bool readOnly
391+ property enumeration renderType
392+ property bool selectByMouse
393+ readonly property string selectedText
394+ property int selectionStart
395+ property int selectionEnd
396+ property string text
397+ property Validator validator
398+ property enumeration horizontalAlignment
399+ property enumeration effectiveHorizontalAlignment
400+ property enumeration verticalAlignment
401+ property string passwordCharacter
402+ property color selectionColor
403+ property color selectedTextColor
404+ signal accepted()
405+ function copy()
406+ function cut()
407+ function paste(data)
408+ function deselect()
409+ function insert(position, text)
410+ function positionAt(x, position)
411+ function positionToRectangle(pos)
412+ function select(start, end)
413+ function selectAll()
414+ function selectWord()
415+ function isRightToLeft(start, end)
416+ function moveCursorSelection(position, mode)
417+ function redo()
418+ function undo()
419+ function remove(start, end)
420+ function getText(start, end)
421+ToolbarButton 0.1 1.0
422+ActionItem
423+ToolbarItems 0.1 1.0
424+Item
425+ default property list<Object> contents
426+ property Item back
427+ property Item pageStack
428+ property bool opened
429+ property bool locked
430+UbuntuListView 0.1 1.0
431+ListView
432+ property int expandedIndex
433+UbuntuListView 1.1
434+UbuntuListView
435+ property PullToRefresh pullToRefresh
436+UbuntuNumberAnimation 0.1 1.0
437+NumberAnimation
438+AbstractButton 1.3
439+ActionItem
440+ signal clicked()
441+ signal pressAndHold()
442+ property bool pressed
443+ property bool hovered
444+ property bool __acceptEvents
445+ property internal __mouseArea
446+ActionItem 1.3
447+StyledItem
448+ property Action action
449+ property string text
450+ property url iconSource
451+ property string iconName
452+ signal triggered(var value)
453+ function trigger(value)
454+ActionList 1.3
455+QtObject
456+ default property list<Action> children
457+ property list<Action> actions
458+ActivityIndicator 1.3
459+AnimatedItem
460+ property bool running
461+Button 1.3
462+AbstractButton
463+ property color strokeColor
464+ property color color
465+ property Gradient gradient
466+ property font font
467+ property string iconPosition
468+Captions 1.3
469+ColumnLayout
470+ property int captionStyle
471+ property Label title
472+ property Label subtitle
473+CheckBox 1.3
474+AbstractButton
475+ property bool checked
476+ComboButton 1.3
477+Button
478+ property bool expanded
479+ property real collapsedHeight
480+ property real expandedHeight
481+ readonly property real comboListHeight
482+ default property list<Item> comboList
483+ property color dropdownColor
484+CrossFadeImage 1.3
485+Item
486+ property url source
487+ property int fillMode
488+ property int fadeDuration
489+ property size sourceSize
490+ property string fadeStyle
491+ readonly property bool running
492+ readonly property int status
493+Header 1.3
494+AppHeader
495+ property string _for_autopilot
496+Label 1.3
497+Text
498+ property string fontSize
499+MainView 1.3
500+MainViewBase
501+ property internal automaticOrientation
502+ default property internal contentsItem
503+OptionSelector 1.3
504+ListItem.Empty
505+ property var model
506+ property bool expanded
507+ property bool multiSelection
508+ property bool colourImage
509+ property Component delegate
510+ property real containerHeight
511+ property int selectedIndex
512+ property bool currentlyExpanded
513+ readonly property real itemHeight
514+ signal delegateClicked(int index)
515+ signal expansionCompleted()
516+OptionSelectorDelegate 1.3
517+ListItem.Empty
518+ property string subText
519+ property url icon
520+ property bool constrainImage
521+ property bool colourImage
522+ property color assetColour
523+ readonly property ListView listView
524+ readonly property string fragColourShader
525+OrientationHelper 1.3
526+Item
527+ property bool automaticOrientation
528+ property bool transitionEnabled
529+ readonly property bool rotating
530+ property int __orientationAngle
531+ property int orientationAngle
532+ property bool anchorToKeyboard
533+Page 1.3
534+PageTreeNode
535+ property string title
536+ property Flickable flickable
537+ readonly property PageHeadConfiguration head
538+PageHeadConfiguration 1.3
539+Object
540+ property list<Action> actions
541+ property Action backAction
542+ property Item contents
543+ property string preset
544+ readonly property PageHeadSections sections
545+ property color foregroundColor
546+ property bool locked
547+ property bool visible
548+PageHeadSections 1.3
549+QtObject
550+ property bool enabled
551+ property var model
552+ property int selectedIndex
553+PageHeadState 1.3
554+State
555+ property PageHeadConfiguration head
556+ property list<Action> actions
557+ property Action backAction
558+ property Item contents
559+PageStack 1.3
560+PageTreeNode
561+ property bool __showHeader
562+ property int depth
563+ property Item currentPage
564+ function push(page, properties)
565+ function pop()
566+ function clear()
567+ default property list<Object> data
568+Panel 1.3
569+Item
570+ default property list<Object> contents
571+ property int align
572+ property bool opened
573+ function open()
574+ function close()
575+ property int hideTimeout
576+ property bool locked
577+ property real hintSize
578+ property real triggerSize
579+ readonly property real position
580+ property bool animate
581+ readonly property bool animating
582+ property bool __closeOnContentsClicks
583+ property bool __openOnHover
584+ property bool pressed
585+ProgressBar 1.3
586+AnimatedItem
587+ property bool indeterminate
588+ property real minimumValue
589+ property real maximumValue
590+ property real value
591+ property bool showProgressPercentage
592+PullToRefresh 1.3
593+StyledItem
594+ readonly property bool releaseToRefresh
595+ readonly property real offset
596+ property Component content
597+ property Flickable target
598+ property bool refreshing
599+ signal refresh()
600+Scrollbar 1.3
601+Toolkit.StyledItem
602+ property Flickable flickableItem
603+ property int align
604+ property bool __interactive
605+ property internal __private
606+Slider 1.3
607+Toolkit.StyledItem
608+ property real minimumValue
609+ property real maximumValue
610+ property real value
611+ property bool live
612+ property bool pressed
613+ signal touched(bool onThumb)
614+ function formatValue(v)
615+ property internal __internals
616+Switch 1.3
617+CheckBox
618+Tab 1.3
619+PageTreeNode
620+ property string title
621+ property url iconSource
622+ property Item page
623+ readonly property int index
624+ property internal __protected
625+TabBar 1.3
626+Toolkit.StyledItem
627+ property Item tabsItem
628+ property var model
629+ readonly property bool pressed
630+ property bool selectionMode
631+ property int selectedIndex
632+ property bool alwaysSelectionMode
633+ property bool animate
634+Tabs 1.3
635+PageTreeNode
636+ property int selectedTabIndex
637+ readonly property Tab selectedTab
638+ readonly property Item currentPage
639+ property TabBar tabBar
640+ default property list<Item> tabChildren
641+ readonly property int count
642+ signal modelChanged()
643+ property var __model
644+TextArea 1.3
645+Ubuntu.StyledItem
646+ property bool highlighted
647+ property string placeholderText
648+ readonly property string displayText
649+ property bool selectByMouse
650+ property bool autoExpand
651+ property bool autoSize
652+ property int maximumLineCount
653+ property real contentWidth
654+ property real contentHeight
655+ property var popover
656+ property bool activeFocusOnPress
657+ property url baseUrl
658+ property bool canPaste
659+ property bool canRedo
660+ property bool canUndo
661+ property color color
662+ property Component cursorDelegate
663+ property int cursorPosition
664+ property rectangle cursorRectangle
665+ property bool cursorVisible
666+ property enumeration effectiveHorizontalAlignment
667+ property font font
668+ property enumeration horizontalAlignment
669+ property bool inputMethodComposing
670+ property enumeration inputMethodHints
671+ property int length
672+ property int lineCount
673+ property enumeration mouseSelectionMode
674+ property enumeration persistentSelection
675+ property bool readOnly
676+ property enumeration renderType
677+ property string selectedText
678+ property color selectedTextColor
679+ property color selectionColor
680+ property int selectionEnd
681+ property int selectionStart
682+ property string text
683+ property enumeration textFormat
684+ property enumeration verticalAlignment
685+ property enumeration wrapMode
686+ signal linkActivated(string link)
687+ function copy()
688+ function cut()
689+ function deselect()
690+ function insert(position, text)
691+ function positionAt(x, y)
692+ function isRightToLeft(start, end)
693+ function moveCursorSelection(position, mode)
694+ function paste(data)
695+ function positionToRectangle(position)
696+ function redo()
697+ function select(start, end)
698+ function selectAll()
699+ function selectWord()
700+ function getFormattedText(start, end)
701+ function getText(start, end)
702+ function remove(start, end)
703+ function undo()
704+TextField 1.3
705+ActionItem
706+ property bool highlighted
707+ property string placeholderText
708+ property bool hasClearButton
709+ property Component customSoftwareInputPanel
710+ property var popover
711+ property list<Object> primaryItem
712+ property list<Object> secondaryItem
713+ property bool errorHighlight
714+ property bool acceptableInput
715+ property bool activeFocusOnPress
716+ property bool autoScroll
717+ property bool canPaste
718+ property bool canRedo
719+ property bool canUndo
720+ property color color
721+ property real contentHeight
722+ property real contentWidth
723+ property Component cursorDelegate
724+ property int cursorPosition
725+ property rectangle cursorRectangle
726+ property bool cursorVisible
727+ property string displayText
728+ property enumeration echoMode
729+ property font font
730+ property string inputMask
731+ property bool inputMethodComposing
732+ property enumeration inputMethodHints
733+ property int length
734+ property int maximumLength
735+ property enumeration mouseSelectionMode
736+ property bool persistentSelection
737+ property bool readOnly
738+ property enumeration renderType
739+ property bool selectByMouse
740+ readonly property string selectedText
741+ property int selectionStart
742+ property int selectionEnd
743+ property string text
744+ property Validator validator
745+ property enumeration horizontalAlignment
746+ property enumeration effectiveHorizontalAlignment
747+ property enumeration verticalAlignment
748+ property string passwordCharacter
749+ property color selectionColor
750+ property color selectedTextColor
751+ signal accepted()
752+ function copy()
753+ function cut()
754+ function paste(data)
755+ function deselect()
756+ function insert(position, text)
757+ function positionAt(x, position)
758+ function positionToRectangle(pos)
759+ function select(start, end)
760+ function selectAll()
761+ function selectWord()
762+ function isRightToLeft(start, end)
763+ function moveCursorSelection(position, mode)
764+ function redo()
765+ function undo()
766+ function remove(start, end)
767+ function getText(start, end)
768+ToolbarButton 1.3
769+ActionItem
770+ToolbarItems 1.3
771+Item
772+ default property list<Object> contents
773+ property Item back
774+ property Item pageStack
775+ property bool opened
776+ property bool locked
777+UbuntuListView 1.3
778+UbuntuListView
779+ property PullToRefresh pullToRefresh
780+UbuntuNumberAnimation 1.3
781+NumberAnimation
782+Base 0.1 1.0
783+Empty
784+ property variant icon
785+ property url fallbackIconSource
786+ property string fallbackIconName
787+ property bool progression
788+ property bool iconFrame
789+ property real __iconWidth
790+ property real __iconHeight
791+ property real __leftIconMargin
792+ property real __rightIconMargin
793+ property bool __iconIsItem
794+ default property internal children
795+Caption 0.1 1.0
796+Item
797+ property string text
798+Divider 0.1 1.0
799+Image
800+Empty 0.1 1.0
801+AbstractButton
802+ property bool selected
803+ property bool highlightWhenPressed
804+ property bool removable
805+ property bool confirmRemoval
806+ readonly property string swipingState
807+ readonly property bool waitingConfirmationForRemoval
808+ signal itemRemoved
809+ property int __height
810+ property bool showDivider
811+ default property internal children
812+ property internal __contents
813+ property list<Item> backgroundIndicator
814+ property ThinDivider divider
815+ property real __contentsMargins
816+ function cancelItemRemoval()
817+Expandable 0.1 1.0
818+Empty
819+ property bool expanded
820+ property real collapsedHeight
821+ property real expandedHeight
822+ property bool collapseOnClick
823+ default property QtObject children
824+ExpandablesColumn 0.1 1.0
825+Flickable
826+ readonly property Item expandedItem
827+ function expandItem(item)
828+ function collapse()
829+ default property QtObject children
830+Header 0.1 1.0
831+Item
832+ property string text
833+ property internal __foregroundColor
834+ItemSelector 0.1 1.0
835+ListItem.Empty
836+ property var model
837+ property bool expanded
838+ property bool multiSelection
839+ property bool colourImage
840+ property Component delegate
841+ property real containerHeight
842+ property int selectedIndex
843+ property bool currentlyExpanded
844+ readonly property real itemHeight
845+ signal delegateClicked(int index)
846+ signal expansionCompleted()
847+MultiValue 0.1 1.0
848+Base
849+ property variant values
850+SingleControl 0.1 1.0
851+Empty
852+ property Item control
853+ function __updateControl()
854+SingleValue 0.1 1.0
855+Base
856+ property string value
857+Standard 0.1 1.0
858+Empty
859+ property variant icon
860+ property url fallbackIconSource
861+ property string fallbackIconName
862+ property bool progression
863+ property real __iconWidth
864+ property real __iconHeight
865+ property real __leftIconMargin
866+ property real __rightIconMargin
867+ property Item control
868+ property bool iconFrame
869+ property bool __controlAreaPressed
870+ property bool __iconIsItem
871+ property internal __foregroundColor
872+Subtitled 0.1 1.0
873+Base
874+ property string subText
875+ThinDivider 0.1 1.0
876+Rectangle
877+ property bool __lightBackground
878+ValueSelector 0.1 1.0
879+Empty
880+ property variant icon
881+ property url fallbackIconSource
882+ property string fallbackIconName
883+ property real __iconWidth
884+ property real __iconHeight
885+ property real __leftIconMargin
886+ property real __rightIconMargin
887+ property bool iconFrame
888+ property variant values
889+ property int selectedIndex
890+ property bool expanded
891+Base 1.3
892+Empty
893+ property variant icon
894+ property url fallbackIconSource
895+ property string fallbackIconName
896+ property bool progression
897+ property bool iconFrame
898+ property real __iconWidth
899+ property real __iconHeight
900+ property real __leftIconMargin
901+ property real __rightIconMargin
902+ property bool __iconIsItem
903+ default property internal children
904+Caption 1.3
905+Item
906+ property string text
907+Divider 1.3
908+Image
909+Empty 1.3
910+AbstractButton
911+ property bool selected
912+ property bool highlightWhenPressed
913+ property bool removable
914+ property bool confirmRemoval
915+ readonly property string swipingState
916+ readonly property bool waitingConfirmationForRemoval
917+ signal itemRemoved
918+ property int __height
919+ property bool showDivider
920+ default property internal children
921+ property internal __contents
922+ property list<Item> backgroundIndicator
923+ property ThinDivider divider
924+ property real __contentsMargins
925+ function cancelItemRemoval()
926+Expandable 1.3
927+Empty
928+ property bool expanded
929+ property real collapsedHeight
930+ property real expandedHeight
931+ property bool collapseOnClick
932+ default property QtObject children
933+ExpandablesColumn 1.3
934+Flickable
935+ readonly property Item expandedItem
936+ function expandItem(item)
937+ function collapse()
938+ default property QtObject children
939+Header 1.3
940+Item
941+ property string text
942+ property internal __foregroundColor
943+ItemSelector 1.3
944+ListItem.Empty
945+ property var model
946+ property bool expanded
947+ property bool multiSelection
948+ property bool colourImage
949+ property Component delegate
950+ property real containerHeight
951+ property int selectedIndex
952+ property bool currentlyExpanded
953+ readonly property real itemHeight
954+ signal delegateClicked(int index)
955+ signal expansionCompleted()
956+MultiValue 1.3
957+Base
958+ property variant values
959+SingleControl 1.3
960+Empty
961+ property Item control
962+ function __updateControl()
963+SingleValue 1.3
964+Base
965+ property string value
966+Standard 1.3
967+Empty
968+ property variant icon
969+ property url fallbackIconSource
970+ property string fallbackIconName
971+ property bool progression
972+ property real __iconWidth
973+ property real __iconHeight
974+ property real __leftIconMargin
975+ property real __rightIconMargin
976+ property Item control
977+ property bool iconFrame
978+ property bool __controlAreaPressed
979+ property bool __iconIsItem
980+ property internal __foregroundColor
981+Subtitled 1.3
982+Base
983+ property string subText
984+ThinDivider 1.3
985+Rectangle
986+ property bool __lightBackground
987+ValueSelector 1.3
988+Empty
989+ property variant icon
990+ property url fallbackIconSource
991+ property string fallbackIconName
992+ property real __iconWidth
993+ property real __iconHeight
994+ property real __leftIconMargin
995+ property real __rightIconMargin
996+ property bool iconFrame
997+ property variant values
998+ property int selectedIndex
999+ property bool expanded
1000 DatePicker 0.1 1.0
1001 StyledItem
1002 property string mode
1003@@ -351,6 +1023,55 @@
1004 PickerPanel 0.1 1.0
1005 Object
1006 function openDatePicker(caller, property, mode)
1007+DatePicker 1.3
1008+StyledItem
1009+ property string mode
1010+ property date date
1011+ property date minimum
1012+ property date maximum
1013+ readonly property int year
1014+ readonly property int month
1015+ readonly property int day
1016+ readonly property int week
1017+ readonly property int hours
1018+ readonly property int minutes
1019+ readonly property int seconds
1020+ property var locale
1021+ readonly property bool moving
1022+Dialer 1.3
1023+StyledItem
1024+ property real minimumValue
1025+ property real maximumValue
1026+ property real size
1027+ property real handSpace
1028+ readonly property Item centerItem
1029+ property list<var> centerContent
1030+ readonly property list<DialerHands> hands
1031+ signal handUpdated(var hand)
1032+DialerHand 1.3
1033+StyledItem
1034+ property real value
1035+ property DialerHandGroup hand
1036+ readonly property Dialer dialer
1037+ default property list<QtObject> overlay
1038+ readonly property int index
1039+ property internal __grabber
1040+Picker 1.3
1041+StyledItem
1042+ property bool circular
1043+ property var model
1044+ property Component delegate
1045+ property int selectedIndex
1046+ property bool live
1047+ readonly property bool moving
1048+ function positionViewAtIndex(index)
1049+ property int __clickedIndex
1050+PickerDelegate 1.3
1051+AbstractButton
1052+ readonly property Picker picker
1053+PickerPanel 1.3
1054+Object
1055+ function openDatePicker(caller, property, mode)
1056 ActionSelectionPopover 0.1 1.0
1057 Popover
1058 property Item target
1059@@ -411,39 +1132,66 @@
1060 property bool modal
1061 property internal __leftButton
1062 property internal __rightButton
1063-ProgressBar 0.1 1.0
1064-AnimatedItem
1065- property bool indeterminate
1066- property real minimumValue
1067- property real maximumValue
1068- property real value
1069-ProgressBar 1.1
1070-ProgressBar
1071- property bool showProgressPercentage
1072-PullToRefresh 1.1
1073-StyledItem
1074- readonly property bool releaseToRefresh
1075- readonly property real offset
1076- property Component content
1077- property Flickable target
1078- property bool refreshing
1079- signal refresh()
1080-Scrollbar 0.1 1.0
1081-Toolkit.StyledItem
1082- property Flickable flickableItem
1083- property int align
1084- property bool __interactive
1085- property internal __private
1086-Slider 0.1 1.0
1087-Toolkit.StyledItem
1088- property real minimumValue
1089- property real maximumValue
1090- property real value
1091- property bool live
1092- property bool pressed
1093- signal touched(bool onThumb)
1094- function formatValue(v)
1095- property internal __internals
1096+ActionSelectionPopover 1.3
1097+Popover
1098+ property Item target
1099+ property var actions
1100+ property Component delegate
1101+ComposerSheet 1.3
1102+SheetBase
1103+ signal cancelClicked
1104+ signal confirmClicked
1105+DefaultSheet 1.3
1106+SheetBase
1107+ property bool doneButton
1108+ signal closeClicked
1109+ signal doneClicked
1110+Dialog 1.3
1111+PopupBase
1112+ default property list<Object> contents
1113+ property string title
1114+ property string text
1115+ property Item caller
1116+ property Item pointerTarget
1117+ property real edgeMargins
1118+ property real callerMargin
1119+ property bool modal
1120+Popover 1.3
1121+PopupBase
1122+ default property list<Object> container
1123+ property real contentWidth
1124+ property real contentHeight
1125+ property Item caller
1126+ property Item pointerTarget
1127+ property real edgeMargins
1128+ property real callerMargin
1129+ property bool autoClose
1130+ property Component foregroundStyle
1131+ function show()
1132+ function hide()
1133+ function __makeInvisible()
1134+PopupBase 1.3
1135+OrientationHelper
1136+ property Item dismissArea
1137+ property bool grabDismissAreaEvents
1138+ property PropertyAnimation fadingAnimation
1139+ function show()
1140+ function hide()
1141+ function __closeIfHidden()
1142+ function __closePopup()
1143+ property Item __foreground
1144+ property bool __closeOnDismissAreaPress
1145+ property internal __dimBackground
1146+ property internal __eventGrabber
1147+SheetBase 1.3
1148+PopupBase
1149+ default property list<Object> container
1150+ property real contentsWidth
1151+ property real contentsHeight
1152+ property string title
1153+ property bool modal
1154+ property internal __leftButton
1155+ property internal __rightButton
1156 ComboButtonStyle 1.1
1157 Item
1158 property real dropDownWidth
1159@@ -470,158 +1218,6 @@
1160 property Component defaultContent
1161 property real activationThreshold
1162 property bool releaseToRefresh
1163-Switch 0.1 1.0
1164-CheckBox
1165-Tab 0.1 1.0
1166-PageTreeNode
1167- property string title
1168- property url iconSource
1169- property Item page
1170- readonly property int index
1171- property internal __protected
1172-TabBar 0.1 1.0
1173-Toolkit.StyledItem
1174- property Item tabsItem
1175- property var model
1176- readonly property bool pressed
1177- property bool selectionMode
1178- property int selectedIndex
1179- property bool alwaysSelectionMode
1180- property bool animate
1181-Tabs 0.1 1.0
1182-PageTreeNode
1183- property int selectedTabIndex
1184- readonly property Tab selectedTab
1185- readonly property Item currentPage
1186- property TabBar tabBar
1187- default property list<Item> tabChildren
1188- readonly property int count
1189- signal modelChanged()
1190- property var __model
1191-TextArea 0.1 1.0
1192-Ubuntu.StyledItem
1193- property bool highlighted
1194- property string placeholderText
1195- readonly property string displayText
1196- property bool selectByMouse
1197- property bool autoExpand
1198- property bool autoSize
1199- property int maximumLineCount
1200- property real contentWidth
1201- property real contentHeight
1202- property var popover
1203- property bool activeFocusOnPress
1204- property url baseUrl
1205- property bool canPaste
1206- property bool canRedo
1207- property bool canUndo
1208- property color color
1209- property Component cursorDelegate
1210- property int cursorPosition
1211- property rectangle cursorRectangle
1212- property bool cursorVisible
1213- property enumeration effectiveHorizontalAlignment
1214- property font font
1215- property enumeration horizontalAlignment
1216- property bool inputMethodComposing
1217- property enumeration inputMethodHints
1218- property int length
1219- property int lineCount
1220- property enumeration mouseSelectionMode
1221- property enumeration persistentSelection
1222- property bool readOnly
1223- property enumeration renderType
1224- property string selectedText
1225- property color selectedTextColor
1226- property color selectionColor
1227- property int selectionEnd
1228- property int selectionStart
1229- property string text
1230- property enumeration textFormat
1231- property enumeration verticalAlignment
1232- property enumeration wrapMode
1233- signal linkActivated(string link)
1234- function copy()
1235- function cut()
1236- function deselect()
1237- function insert(position, text)
1238- function positionAt(x, y)
1239- function isRightToLeft(start, end)
1240- function moveCursorSelection(position, mode)
1241- function paste(data)
1242- function positionToRectangle(position)
1243- function redo()
1244- function select(start, end)
1245- function selectAll()
1246- function selectWord()
1247- function getFormattedText(start, end)
1248- function getText(start, end)
1249- function remove(start, end)
1250- function undo()
1251-TextField 0.1 1.0
1252-ActionItem
1253- property bool highlighted
1254- property string placeholderText
1255- property bool hasClearButton
1256- property Component customSoftwareInputPanel
1257- property var popover
1258- property list<Object> primaryItem
1259- property list<Object> secondaryItem
1260- property bool errorHighlight
1261- property bool acceptableInput
1262- property bool activeFocusOnPress
1263- property bool autoScroll
1264- property bool canPaste
1265- property bool canRedo
1266- property bool canUndo
1267- property color color
1268- property real contentHeight
1269- property real contentWidth
1270- property Component cursorDelegate
1271- property int cursorPosition
1272- property rectangle cursorRectangle
1273- property bool cursorVisible
1274- property string displayText
1275- property enumeration echoMode
1276- property font font
1277- property string inputMask
1278- property bool inputMethodComposing
1279- property enumeration inputMethodHints
1280- property int length
1281- property int maximumLength
1282- property enumeration mouseSelectionMode
1283- property bool persistentSelection
1284- property bool readOnly
1285- property enumeration renderType
1286- property bool selectByMouse
1287- readonly property string selectedText
1288- property int selectionStart
1289- property int selectionEnd
1290- property string text
1291- property Validator validator
1292- property enumeration horizontalAlignment
1293- property enumeration effectiveHorizontalAlignment
1294- property enumeration verticalAlignment
1295- property string passwordCharacter
1296- property color selectionColor
1297- property color selectedTextColor
1298- signal accepted()
1299- function copy()
1300- function cut()
1301- function paste(data)
1302- function deselect()
1303- function insert(position, text)
1304- function positionAt(x, position)
1305- function positionToRectangle(pos)
1306- function select(start, end)
1307- function selectAll()
1308- function selectWord()
1309- function isRightToLeft(start, end)
1310- function moveCursorSelection(position, mode)
1311- function redo()
1312- function undo()
1313- function remove(start, end)
1314- function getText(start, end)
1315 Palette 0.1
1316 QtObject
1317 property PaletteValues normal
1318@@ -656,49 +1252,6 @@
1319 property color field
1320 property color fieldText
1321 property color selection
1322-ToolbarButton 0.1 1.0
1323-ActionItem
1324-ToolbarItems 0.1 1.0
1325-Item
1326- default property list<Object> contents
1327- property Item back
1328- property Item pageStack
1329- property bool opened
1330- property bool locked
1331-UbuntuColors 1.1
1332-QtObject
1333- readonly property color orange
1334- readonly property color lightAubergine
1335- readonly property color midAubergine
1336- readonly property color darkAubergine
1337- readonly property color warmGrey
1338- readonly property color coolGrey
1339- property Gradient orangeGradient
1340- property Gradient greyGradient
1341- readonly property color lightGrey
1342- readonly property color darkGrey
1343- readonly property color red
1344- readonly property color green
1345- readonly property color blue
1346- readonly property color purple
1347-UbuntuColors 0.1 1.0
1348-QtObject
1349- readonly property color orange
1350- readonly property color lightAubergine
1351- readonly property color midAubergine
1352- readonly property color darkAubergine
1353- readonly property color warmGrey
1354- readonly property color coolGrey
1355- property Gradient orangeGradient
1356- property Gradient greyGradient
1357-UbuntuListView 0.1 1.0
1358-ListView
1359- property int expandedIndex
1360-UbuntuListView 1.1
1361-UbuntuListView
1362- property PullToRefresh pullToRefresh
1363-UbuntuNumberAnimation 0.1 1.0
1364-NumberAnimation
1365 PerformanceOverlay 0.1 1.0
1366 Item
1367 property bool active
1368
1369=== modified file 'debian/qtdeclarative5-ubuntu-ui-toolkit-plugin.install'
1370--- debian/qtdeclarative5-ubuntu-ui-toolkit-plugin.install 2014-09-03 08:17:24 +0000
1371+++ debian/qtdeclarative5-ubuntu-ui-toolkit-plugin.install 2015-05-06 10:32:32 +0000
1372@@ -5,23 +5,28 @@
1373 usr/lib/*/qt5/qml/Ubuntu/Layouts/qmldir
1374 usr/lib/*/qt5/qml/Ubuntu/Layouts/plugins.qmltypes
1375 usr/lib/*/qt5/qml/Ubuntu/Layouts/libUbuntuLayouts.so
1376-usr/lib/*/qt5/qml/Ubuntu/Components/*.qml
1377-usr/lib/*/qt5/qml/Ubuntu/Components/10/*.qml
1378-usr/lib/*/qt5/qml/Ubuntu/Components/11/*.qml
1379-usr/lib/*/qt5/qml/Ubuntu/Components/*.js
1380+usr/lib/*/qt5/qml/Ubuntu/Components/1.0/*.qml
1381+usr/lib/*/qt5/qml/Ubuntu/Components/1.1/*.qml
1382+usr/lib/*/qt5/qml/Ubuntu/Components/1.2/*.qml
1383+usr/lib/*/qt5/qml/Ubuntu/Components/1.2/*.js
1384+usr/lib/*/qt5/qml/Ubuntu/Components/1.3/*.qml
1385+usr/lib/*/qt5/qml/Ubuntu/Components/1.3/*.js
1386 usr/lib/*/qt5/qml/Ubuntu/Components/qmldir
1387 usr/lib/*/qt5/qml/Ubuntu/Components/plugins.qmltypes
1388 usr/lib/*/qt5/qml/Ubuntu/Components/libUbuntuComponents.so
1389 usr/lib/*/qt5/qml/Ubuntu/Components/artwork
1390-usr/lib/*/qt5/qml/Ubuntu/Components/ListItems/*.qml
1391+usr/lib/*/qt5/qml/Ubuntu/Components/ListItems/1.2/*.qml
1392+usr/lib/*/qt5/qml/Ubuntu/Components/ListItems/1.3/*.qml
1393 usr/lib/*/qt5/qml/Ubuntu/Components/ListItems/qmldir
1394-usr/lib/*/qt5/qml/Ubuntu/Components/ListItems/artwork
1395 usr/lib/*/qt5/qml/Ubuntu/Components/Popups/qmldir
1396-usr/lib/*/qt5/qml/Ubuntu/Components/Popups/*.qml
1397-usr/lib/*/qt5/qml/Ubuntu/Components/Popups/*.js
1398-usr/lib/*/qt5/qml/Ubuntu/Components/Pickers/*.qml
1399+usr/lib/*/qt5/qml/Ubuntu/Components/Popups/1.2/*.qml
1400+usr/lib/*/qt5/qml/Ubuntu/Components/Popups/1.2/*.js
1401+usr/lib/*/qt5/qml/Ubuntu/Components/Popups/1.3/*.qml
1402+usr/lib/*/qt5/qml/Ubuntu/Components/Popups/1.3/*.js
1403+usr/lib/*/qt5/qml/Ubuntu/Components/Pickers/1.2/*.qml
1404+usr/lib/*/qt5/qml/Ubuntu/Components/Pickers/1.3/*.qml
1405 usr/lib/*/qt5/qml/Ubuntu/Components/Pickers/qmldir
1406-usr/lib/*/qt5/qml/Ubuntu/Components/Styles/*.qml
1407+usr/lib/*/qt5/qml/Ubuntu/Components/Styles/1.2/*.qml
1408 usr/lib/*/qt5/qml/Ubuntu/Components/Styles/qmldir
1409 usr/lib/*/qt5/qml/Ubuntu/Test
1410 usr/share/locale/*/LC_MESSAGES/ubuntu-ui-toolkit.mo
1411
1412=== modified file 'documentation/ubuntu-theming.qdoc'
1413--- documentation/ubuntu-theming.qdoc 2015-04-25 07:10:57 +0000
1414+++ documentation/ubuntu-theming.qdoc 2015-05-06 10:32:32 +0000
1415@@ -125,7 +125,7 @@
1416 * Other styles are requested to provide additional \e content elements, which are then
1417 * positioned by the styled component separately from the main visuals given by the style.
1418 * A typical example of such a style API is the PullToRefresh component's style:
1419- * \snippet Styles/PullToRefreshStyle.qml 0
1420+ * \snippet Styles/1.2/PullToRefreshStyle.qml 0
1421 * The default style implementation can be found under Ubuntu.Components.Themes.Ambiance
1422 * theme \l {http://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/modules/Ubuntu/Components/Themes/Ambiance/PullToRefreshStyle.qml}
1423 * {PullToRefreshStyle.qml}.
1424
1425=== modified file 'documentation/ubuntu-ui-toolkit-common.qdocconf'
1426--- documentation/ubuntu-ui-toolkit-common.qdocconf 2015-04-27 06:08:34 +0000
1427+++ documentation/ubuntu-ui-toolkit-common.qdocconf 2015-05-06 10:32:32 +0000
1428@@ -11,8 +11,14 @@
1429 sourcedirs += ../modules/Ubuntu/Test
1430 headerdirs += ../modules/Ubuntu/Test/plugin
1431 exampledirs += snippets
1432-exampledirs += ../examples/1.3
1433+exampledirs += ../examples
1434 exampledirs += ../modules/Ubuntu/Components
1435+excludedirs += ../modules/Ubuntu/Components/1.0
1436+excludedirs += ../modules/Ubuntu/Components/1.1
1437+excludedirs += ../modules/Ubuntu/Components/1.2
1438+excludedirs += ../modules/Ubuntu/Components/ListItems/1.2
1439+excludedirs += ../modules/Ubuntu/Components/Pickers/1.2
1440+excludedirs += ../modules/Ubuntu/Components/Popups/1.2
1441 excludedirs += ../modules/Ubuntu/Components/Themes/Ambiance
1442 excludedirs += ../modules/Ubuntu/Components/Themes/SuruDark
1443 imagedirs = images
1444
1445=== removed directory 'examples/1.3'
1446=== removed file 'examples/1.3/1.3.pro'
1447--- examples/1.3/1.3.pro 2015-04-27 06:08:34 +0000
1448+++ examples/1.3/1.3.pro 1970-01-01 00:00:00 +0000
1449@@ -1,10 +0,0 @@
1450-TEMPLATE = subdirs
1451-
1452-SUBDIRS += \
1453- ubuntu-ui-toolkit-gallery\
1454- locale \
1455- jokes \
1456- unit-converter \
1457- calculator \
1458- customtheme
1459-
1460
1461=== renamed directory 'examples/1.3/calculator' => 'examples/calculator'
1462=== renamed directory 'examples/1.3/customtheme' => 'examples/customtheme'
1463=== modified file 'examples/examples.pro'
1464--- examples/examples.pro 2015-04-27 06:08:34 +0000
1465+++ examples/examples.pro 2015-05-06 10:32:32 +0000
1466@@ -1,22 +1,9 @@
1467 TEMPLATE = subdirs
1468
1469-SUBDIRS += \
1470- 1.3
1471-
1472-
1473-#examples = jokes unit-converter
1474-#filetypes = qml png svg js jpg wav
1475-
1476-#OTHER_FILES = ""
1477-
1478-#for(example, examples) {
1479-# for(filetype, filetypes) {
1480-# OTHER_FILES += $$example/*.$$filetype
1481-# }
1482-#}
1483-
1484-#other_files.path = /usr/lib/ubuntu-ui-toolkit/examples
1485-#other_files.files = $$OTHER_FILES
1486-
1487-#INSTALLS += other_files
1488-
1489+SUBDIRS += \
1490+ ubuntu-ui-toolkit-gallery\
1491+ locale \
1492+ jokes \
1493+ unit-converter \
1494+ calculator \
1495+ customtheme
1496
1497=== renamed directory 'examples/1.3/jokes' => 'examples/jokes'
1498=== renamed directory 'examples/1.3/locale' => 'examples/locale'
1499=== modified file 'examples/locale/locale.qml'
1500--- examples/1.3/locale/locale.qml 2015-04-09 09:42:36 +0000
1501+++ examples/locale/locale.qml 2015-05-06 10:32:32 +0000
1502@@ -17,7 +17,7 @@
1503
1504 import QtQuick 2.0
1505 import Ubuntu.Components 1.3
1506-import Ubuntu.Components.ListItems 1.0 as ListItem
1507+import Ubuntu.Components.ListItems 1.3 as ListItem
1508
1509 /*!
1510 \brief An application to test locales on the device
1511
1512=== renamed directory 'examples/1.3/ubuntu-ui-toolkit-gallery' => 'examples/ubuntu-ui-toolkit-gallery'
1513=== modified file 'examples/ubuntu-ui-toolkit-gallery/Buttons.qml'
1514--- examples/1.3/ubuntu-ui-toolkit-gallery/Buttons.qml 2015-04-25 08:18:45 +0000
1515+++ examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2015-05-06 10:32:32 +0000
1516@@ -16,7 +16,7 @@
1517
1518 import QtQuick 2.4
1519 import Ubuntu.Components 1.3
1520-import Ubuntu.Components.ListItems 1.0
1521+import Ubuntu.Components.ListItems 1.3
1522
1523 Template {
1524 objectName: "buttonsTemplate"
1525
1526=== modified file 'examples/ubuntu-ui-toolkit-gallery/Dialog.qml'
1527--- examples/1.3/ubuntu-ui-toolkit-gallery/Dialog.qml 2015-04-25 08:18:45 +0000
1528+++ examples/ubuntu-ui-toolkit-gallery/Dialog.qml 2015-05-06 10:32:32 +0000
1529@@ -16,7 +16,7 @@
1530
1531 import QtQuick 2.4
1532 import Ubuntu.Components 1.3
1533-import Ubuntu.Components.Popups 1.0
1534+import Ubuntu.Components.Popups 1.3
1535
1536 Template {
1537 objectName: "dialogsTemplate"
1538
1539=== modified file 'examples/ubuntu-ui-toolkit-gallery/Icons.qml'
1540--- examples/1.3/ubuntu-ui-toolkit-gallery/Icons.qml 2015-04-25 08:18:45 +0000
1541+++ examples/ubuntu-ui-toolkit-gallery/Icons.qml 2015-05-06 10:32:32 +0000
1542@@ -16,8 +16,8 @@
1543
1544 import QtQuick 2.0
1545 import Ubuntu.Components 1.3
1546-import Ubuntu.Components.ListItems 0.1 as ListItem
1547-import Ubuntu.Components.Popups 1.0
1548+import Ubuntu.Components.ListItems 1.3 as ListItem
1549+import Ubuntu.Components.Popups 1.3
1550 import Qt.labs.folderlistmodel 2.1
1551
1552 Template {
1553
1554=== modified file 'examples/ubuntu-ui-toolkit-gallery/ListItems.qml'
1555--- examples/1.3/ubuntu-ui-toolkit-gallery/ListItems.qml 2015-04-09 09:42:36 +0000
1556+++ examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2015-05-06 10:32:32 +0000
1557@@ -16,7 +16,7 @@
1558
1559 import QtQuick 2.4
1560 import Ubuntu.Components 1.3 as Toolkit
1561-import Ubuntu.Components.ListItems 1.0 as ListItem
1562+import Ubuntu.Components.ListItems 1.3 as ListItem
1563
1564 Template {
1565 objectName: "listItemsTemplate"
1566
1567=== modified file 'examples/ubuntu-ui-toolkit-gallery/Pickers.qml'
1568--- examples/1.3/ubuntu-ui-toolkit-gallery/Pickers.qml 2015-04-09 09:42:36 +0000
1569+++ examples/ubuntu-ui-toolkit-gallery/Pickers.qml 2015-05-06 10:32:32 +0000
1570@@ -16,7 +16,7 @@
1571
1572 import QtQuick 2.0
1573 import Ubuntu.Components 1.3
1574-import Ubuntu.Components.Pickers 1.0
1575+import Ubuntu.Components.Pickers 1.3
1576
1577 Template {
1578 objectName: "pickersTemplate"
1579@@ -209,4 +209,15 @@
1580 }
1581 }
1582 }
1583+
1584+ TemplateSection {
1585+ title: "PickerPanel"
1586+ TextField {
1587+ id: textField
1588+ readOnly: true
1589+ property date date: new Date()
1590+ text: date.toISOString()
1591+ Mouse.onClicked: PickerPanel.openDatePicker(textField, "date");
1592+ }
1593+ }
1594 }
1595
1596=== modified file 'examples/ubuntu-ui-toolkit-gallery/Popover.qml'
1597--- examples/1.3/ubuntu-ui-toolkit-gallery/Popover.qml 2015-04-25 08:18:45 +0000
1598+++ examples/ubuntu-ui-toolkit-gallery/Popover.qml 2015-05-06 10:32:32 +0000
1599@@ -16,7 +16,7 @@
1600
1601 import QtQuick 2.0
1602 import Ubuntu.Components 1.3
1603-import Ubuntu.Components.Popups 0.1
1604+import Ubuntu.Components.Popups 1.3
1605
1606 Template {
1607 objectName: "popoversTemplate"
1608
1609=== modified file 'examples/ubuntu-ui-toolkit-gallery/Sheet.qml'
1610--- examples/1.3/ubuntu-ui-toolkit-gallery/Sheet.qml 2015-04-25 08:18:45 +0000
1611+++ examples/ubuntu-ui-toolkit-gallery/Sheet.qml 2015-05-06 10:32:32 +0000
1612@@ -16,7 +16,7 @@
1613
1614 import QtQuick 2.0
1615 import Ubuntu.Components 1.3
1616-import Ubuntu.Components.Popups 0.1
1617+import Ubuntu.Components.Popups 1.3
1618
1619 Template {
1620 objectName: "sheetsTemplate"
1621
1622=== modified file 'examples/ubuntu-ui-toolkit-gallery/UbuntuListViews.qml'
1623--- examples/1.3/ubuntu-ui-toolkit-gallery/UbuntuListViews.qml 2015-04-25 08:18:45 +0000
1624+++ examples/ubuntu-ui-toolkit-gallery/UbuntuListViews.qml 2015-05-06 10:32:32 +0000
1625@@ -16,7 +16,7 @@
1626
1627 import QtQuick 2.4
1628 import Ubuntu.Components 1.3
1629-import Ubuntu.Components.ListItems 1.0 as ListItem
1630+import Ubuntu.Components.ListItems 1.3 as ListItem
1631
1632 Template {
1633 objectName: "ubuntuListViewTemplate"
1634
1635=== modified file 'examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml'
1636--- examples/1.3/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2015-04-25 08:18:45 +0000
1637+++ examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml 2015-05-06 10:32:32 +0000
1638@@ -16,7 +16,7 @@
1639
1640 import QtQuick 2.4
1641 import Ubuntu.Components 1.3
1642-import Ubuntu.Components.ListItems 0.1 as ListItem
1643+import Ubuntu.Components.ListItems 1.3 as ListItem
1644
1645 MainView {
1646 id: gallery
1647
1648=== renamed directory 'examples/1.3/unit-converter' => 'examples/unit-converter'
1649=== renamed directory 'modules/Ubuntu/Components/10' => 'modules/Ubuntu/Components/1.0'
1650=== renamed file 'modules/Ubuntu/Components/10/10.pro' => 'modules/Ubuntu/Components/1.0/1.0.pro'
1651--- modules/Ubuntu/Components/10/10.pro 2014-11-21 15:26:25 +0000
1652+++ modules/Ubuntu/Components/1.0/1.0.pro 2015-05-06 10:32:32 +0000
1653@@ -2,8 +2,8 @@
1654
1655 CONFIG+=ubuntu_qml_module
1656
1657-uri = Ubuntu.Components.10
1658-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
1659+uri = Ubuntu.Components
1660+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)/1.0
1661
1662 qml_files.installPath = $$installPath
1663 qml_files.files = *.qml \
1664
1665=== renamed directory 'modules/Ubuntu/Components/11' => 'modules/Ubuntu/Components/1.1'
1666=== renamed file 'modules/Ubuntu/Components/11/11.pro' => 'modules/Ubuntu/Components/1.1/1.1.pro'
1667--- modules/Ubuntu/Components/11/11.pro 2014-11-21 15:26:25 +0000
1668+++ modules/Ubuntu/Components/1.1/1.1.pro 2015-05-06 10:32:32 +0000
1669@@ -2,8 +2,8 @@
1670
1671 CONFIG+=ubuntu_qml_module
1672
1673-uri = Ubuntu.Components.11
1674-installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
1675+uri = Ubuntu.Components
1676+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)/1.1
1677
1678 qml_files.installPath = $$installPath
1679 qml_files.files = *.qml
1680
1681=== modified file 'modules/Ubuntu/Components/1.1/Haptics.qml'
1682--- modules/Ubuntu/Components/11/Haptics.qml 2015-03-03 13:47:48 +0000
1683+++ modules/Ubuntu/Components/1.1/Haptics.qml 2015-05-06 10:32:32 +0000
1684@@ -17,7 +17,7 @@
1685 pragma Singleton
1686 import QtQuick 2.4
1687 import QtFeedback 5.0
1688-import Ubuntu.Components 1.2
1689+import Ubuntu.Components 1.3 // FIXME move back to import 1.2 once we get 1.2 sources in
1690
1691 /*!
1692 \qmltype Haptics
1693
1694=== added directory 'modules/Ubuntu/Components/1.2'
1695=== added file 'modules/Ubuntu/Components/1.2/1.2.pro'
1696--- modules/Ubuntu/Components/1.2/1.2.pro 1970-01-01 00:00:00 +0000
1697+++ modules/Ubuntu/Components/1.2/1.2.pro 2015-05-06 10:32:32 +0000
1698@@ -0,0 +1,15 @@
1699+TEMPLATE = aux
1700+
1701+CONFIG+=ubuntu_qml_module
1702+
1703+uri = Ubuntu.Components
1704+installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)/1.2
1705+
1706+qml_files.installPath = $$installPath
1707+qml_files.files = *.qml
1708+
1709+# javascript files
1710+js_files.installPath = $$installPath
1711+js_files.files = *.js
1712+
1713+UBUNTU_QML_MODULE_FILES += qml_files js_files
1714
1715=== added file 'modules/Ubuntu/Components/1.2/AbstractButton.qml'
1716--- modules/Ubuntu/Components/1.2/AbstractButton.qml 1970-01-01 00:00:00 +0000
1717+++ modules/Ubuntu/Components/1.2/AbstractButton.qml 2015-05-06 10:32:32 +0000
1718@@ -0,0 +1,109 @@
1719+/*
1720+ * Copyright 2012 Canonical Ltd.
1721+ *
1722+ * This program is free software; you can redistribute it and/or modify
1723+ * it under the terms of the GNU Lesser General Public License as published by
1724+ * the Free Software Foundation; version 3.
1725+ *
1726+ * This program is distributed in the hope that it will be useful,
1727+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1728+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1729+ * GNU Lesser General Public License for more details.
1730+ *
1731+ * You should have received a copy of the GNU Lesser General Public License
1732+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1733+ */
1734+
1735+import QtQuick 2.4
1736+import Ubuntu.Components 1.2
1737+
1738+/*!
1739+ \qmlabstract AbstractButton
1740+ \inqmlmodule Ubuntu.Components 1.1
1741+ \ingroup ubuntu
1742+ \brief The AbstractButton class defines the behavior of the button.
1743+
1744+ This class defines the behavior of the button: it defines the MouseArea
1745+ and the states.
1746+ All components deriving from this class support haptic feedback out of the box.
1747+*/
1748+ActionItem {
1749+ id: button
1750+
1751+ /*!
1752+ If an action is specified, the button's clicked signal will trigger the action.
1753+ Subclasses of AbstractButton can use other properties of action (for example
1754+ the text and iconName).
1755+ \qmlproperty Action action
1756+ */
1757+
1758+ /*!
1759+ This handler is called when there is a mouse click on the button
1760+ and the button is not disabled. If \b action is defined,
1761+ the action will be triggered.
1762+ */
1763+ signal clicked()
1764+
1765+ /*!
1766+ If a button is clicked, its triggered() signal will automatically be called.
1767+ */
1768+ onClicked: button.trigger()
1769+
1770+ Keys.onEnterPressed: clicked()
1771+ Keys.onReturnPressed: clicked()
1772+
1773+ /*!
1774+ This handler is called when there is a long press.
1775+ */
1776+ signal pressAndHold()
1777+
1778+ /*!
1779+ True if the user presses a mouse button in the button's mouse area.
1780+ */
1781+ property bool pressed: mouseArea.pressed
1782+
1783+ /*!
1784+ True if the mouse cursor hovers over the button's mouse area.
1785+ */
1786+ property bool hovered: __acceptEvents && mouseArea.containsMouse
1787+
1788+ /*!
1789+ \internal
1790+ Disable or enable signal emition by default.
1791+ Some classes want to emit the signal by themselves (ListItem.Standard)
1792+ */
1793+ property bool __acceptEvents: true
1794+
1795+ /*!
1796+ \internal
1797+ To get the properties of the mouse area in subclasses.
1798+ */
1799+ property alias __mouseArea: mouseArea
1800+
1801+ activeFocusOnPress: true
1802+
1803+ MouseArea {
1804+ id: mouseArea
1805+ anchors.fill: parent
1806+ // if mouseArea is given a new value, disable defaultMouseArea
1807+ // as it might occlude the newly assigned mouse area.
1808+ hoverEnabled: true
1809+
1810+ // invoke Haptics singleton earlier than we press the button,
1811+ // so we give some time for the singleton to sync settings with the service
1812+ property bool hapticsEnabled: Haptics.enabled
1813+
1814+ onClicked: {
1815+ if (button.__acceptEvents) {
1816+ // FIXME (Vivid) call this in the style rather than from AbstractButton
1817+ Haptics.play();
1818+ button.clicked()
1819+ }
1820+ }
1821+ onPressAndHold: {
1822+ if (button.__acceptEvents) {
1823+ button.pressAndHold()
1824+ }
1825+ }
1826+ }
1827+}
1828
1829=== added file 'modules/Ubuntu/Components/1.2/ActionItem.qml'
1830--- modules/Ubuntu/Components/1.2/ActionItem.qml 1970-01-01 00:00:00 +0000
1831+++ modules/Ubuntu/Components/1.2/ActionItem.qml 2015-05-06 10:32:32 +0000
1832@@ -0,0 +1,96 @@
1833+/*
1834+ * Copyright 2012 Canonical Ltd.
1835+ *
1836+ * This program is free software; you can redistribute it and/or modify
1837+ * it under the terms of the GNU Lesser General Public License as published by
1838+ * the Free Software Foundation; version 3.
1839+ *
1840+ * This program is distributed in the hope that it will be useful,
1841+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1842+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1843+ * GNU Lesser General Public License for more details.
1844+ *
1845+ * You should have received a copy of the GNU Lesser General Public License
1846+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1847+ */
1848+
1849+import QtQuick 2.4
1850+import Ubuntu.Components 1.2
1851+
1852+/*!
1853+ \qmlabstract ActionItem
1854+ \inqmlmodule Ubuntu.Components 1.1
1855+ \ingroup ubuntu
1856+ \brief A visual representation of an Action. The API of ActionItem is a
1857+ copy of the API of \l Action, with additional properties to define
1858+ visual aspects of the ActionItem.
1859+
1860+ If \l action is set, the values of the other properties will by default
1861+ be identical to the \l Action's property values. Setting the other properties
1862+ will override the properties copied from the \l Action.
1863+
1864+ See \l ToolbarItems for examples of how to use \l ToolbarButton or other ActionItems
1865+ in a toolbar.
1866+*/
1867+StyledItem {
1868+ id: actionItem
1869+
1870+ /*!
1871+ The \l Action associated with this ActionItem. If action is set,
1872+ the values of the Action properties are copied to the values of
1873+ the ActionItem properties.
1874+ */
1875+ property Action action: null
1876+
1877+ visible: action ? action.visible : true
1878+ enabled: action ? action.enabled : true
1879+
1880+ /*!
1881+ The title of the actionItem.
1882+ Default value: action.text
1883+ */
1884+ property string text: action ? action.text : ""
1885+
1886+ /*!
1887+ The image associated with the actionItem.
1888+ Default value: action.iconSource.
1889+
1890+ This is the URL of any image file
1891+ If both iconSource and iconName are defined, iconName will be ignored.
1892+ */
1893+ property url iconSource: action ? action.iconSource : (iconName ? "image://theme/" + iconName : "")
1894+
1895+ /*!
1896+ The icon associated with the actionItem in the suru icon theme.
1897+ Default value: action.iconName.
1898+
1899+ \note The complete list of icons available in Ubuntu is not published yet.
1900+ For now please refer to the folders where the icon themes are installed:
1901+ \list
1902+ \li Ubuntu Touch: \l file:/usr/share/icons/suru
1903+ \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
1904+ \endlist
1905+ These 2 separate icon themes will be merged soon.
1906+
1907+ If both iconSource and iconName are defined, iconName will be ignored.
1908+ */
1909+ property string iconName: action ? action.iconName : ""
1910+
1911+ /*!
1912+ Called when the actionItem is triggered.
1913+ */
1914+ signal triggered(var value)
1915+
1916+ /*!
1917+ If \l action is set, this will trigger it.
1918+ */
1919+ onTriggered: if (action) action.trigger(value)
1920+
1921+ /*!
1922+ Trigger this action item if it is enabled.
1923+ */
1924+ function trigger(value) {
1925+ var passingValue = value ? value : null
1926+ if (actionItem.enabled) actionItem.triggered(passingValue);
1927+ }
1928+}
1929
1930=== added file 'modules/Ubuntu/Components/1.2/ActionList.qml'
1931--- modules/Ubuntu/Components/1.2/ActionList.qml 1970-01-01 00:00:00 +0000
1932+++ modules/Ubuntu/Components/1.2/ActionList.qml 2015-05-06 10:32:32 +0000
1933@@ -0,0 +1,47 @@
1934+/*
1935+ * Copyright 2012 Canonical Ltd.
1936+ *
1937+ * This program is free software; you can redistribute it and/or modify
1938+ * it under the terms of the GNU Lesser General Public License as published by
1939+ * the Free Software Foundation; version 3.
1940+ *
1941+ * This program is distributed in the hope that it will be useful,
1942+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1943+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1944+ * GNU Lesser General Public License for more details.
1945+ *
1946+ * You should have received a copy of the GNU Lesser General Public License
1947+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1948+ */
1949+
1950+import QtQuick 2.4
1951+import Ubuntu.Components 1.2
1952+
1953+/*!
1954+ \qmltype ActionList
1955+ \inqmlmodule Ubuntu.Components 1.1
1956+ \ingroup ubuntu
1957+ \brief List of \l Action items
1958+*/
1959+
1960+QtObject {
1961+ id: list
1962+ // internal objects using nested elements,
1963+ // which isn't allowed by QtObject; this fix makes this possible
1964+ /*!
1965+ Default property to allow adding of children.
1966+ \qmlproperty list<Action> children
1967+ \default
1968+ */
1969+ default property alias children: list.actions
1970+
1971+ /*!
1972+ List of already defined actions when not defining them as children of the ActionList.
1973+ Note that when you set this property, the children of the ActionList will be ignored,
1974+ so do not set the list and define children.
1975+
1976+ The advantage of setting actions over using the children is that the same
1977+ \l Action items can be used in several sets of actions.
1978+ */
1979+ property list<Action> actions
1980+}
1981
1982=== added file 'modules/Ubuntu/Components/1.2/ActivityIndicator.qml'
1983--- modules/Ubuntu/Components/1.2/ActivityIndicator.qml 1970-01-01 00:00:00 +0000
1984+++ modules/Ubuntu/Components/1.2/ActivityIndicator.qml 2015-05-06 10:32:32 +0000
1985@@ -0,0 +1,59 @@
1986+/*
1987+ * Copyright 2012 Canonical Ltd.
1988+ *
1989+ * This program is free software; you can redistribute it and/or modify
1990+ * it under the terms of the GNU Lesser General Public License as published by
1991+ * the Free Software Foundation; version 3.
1992+ *
1993+ * This program is distributed in the hope that it will be useful,
1994+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1995+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1996+ * GNU Lesser General Public License for more details.
1997+ *
1998+ * You should have received a copy of the GNU Lesser General Public License
1999+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2000+ */
2001+
2002+import QtQuick 2.4
2003+
2004+/*!
2005+ \qmltype ActivityIndicator
2006+ \inqmlmodule Ubuntu.Components 1.1
2007+ \ingroup ubuntu
2008+ \brief The ActivityIndicator component visually indicates that a task of
2009+ unknown duration is in progress, e.g. busy indication, connection in progress
2010+ indication, etc.
2011+
2012+ Note: for time consuming JavaScript operations use WorkerScript, otherwise no
2013+ UI interaction will be possible and the ActicityIndicator animation will freeze.
2014+
2015+ Example:
2016+ \qml
2017+ Item {
2018+ ActivityIndicator {
2019+ id: activity
2020+ }
2021+
2022+ Button {
2023+ id: toggleActive
2024+ text: (activity.running) ? "Deactivate" : "Activate"
2025+ onClicked: activity.running = !activity.running
2026+ }
2027+ }
2028+ \endqml
2029+*/
2030+AnimatedItem {
2031+ id: indicator
2032+
2033+ /*!
2034+ Presents whether there is activity to be visualized or not. The default value is false.
2035+ When activated (set to true), an animation is shown indicating an ongoing activity, which
2036+ continues until deactivated (set to false).
2037+ */
2038+ property bool running: false
2039+
2040+ implicitWidth: units.gu(3)
2041+ implicitHeight: units.gu(3)
2042+
2043+ style: Theme.createStyleComponent("ActivityIndicatorStyle.qml", indicator)
2044+}
2045
2046=== added file 'modules/Ubuntu/Components/1.2/AnimatedItem.qml'
2047--- modules/Ubuntu/Components/1.2/AnimatedItem.qml 1970-01-01 00:00:00 +0000
2048+++ modules/Ubuntu/Components/1.2/AnimatedItem.qml 2015-05-06 10:32:32 +0000
2049@@ -0,0 +1,37 @@
2050+/*
2051+ * Copyright 2012 Canonical Ltd.
2052+ *
2053+ * This program is free software; you can redistribute it and/or modify
2054+ * it under the terms of the GNU Lesser General Public License as published by
2055+ * the Free Software Foundation; version 3.
2056+ *
2057+ * This program is distributed in the hope that it will be useful,
2058+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2059+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2060+ * GNU Lesser General Public License for more details.
2061+ *
2062+ * You should have received a copy of the GNU Lesser General Public License
2063+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2064+ */
2065+
2066+/*!
2067+ \qmltype AnimatedItem
2068+ \inqmlmodule Ubuntu.Components 1.1
2069+ \ingroup ubuntu
2070+ \brief The AnimatedItem drives the animated components behavior inside a Flickable.
2071+ Reports whether the component whos parent is a Flickable is in the visible area or not,
2072+ so derived components can pause animations while off-screen.
2073+
2074+*/
2075+
2076+import QtQuick 2.4
2077+import Ubuntu.Components 1.2
2078+
2079+StyledItem {
2080+ id: root
2081+ /*!
2082+ \deprecated
2083+ Specifies whether the component is on the visible area of the Flickable or not.
2084+ */
2085+ property bool onScreen: true
2086+}
2087
2088=== added file 'modules/Ubuntu/Components/1.2/AppHeader.qml'
2089--- modules/Ubuntu/Components/1.2/AppHeader.qml 1970-01-01 00:00:00 +0000
2090+++ modules/Ubuntu/Components/1.2/AppHeader.qml 2015-05-06 10:32:32 +0000
2091@@ -0,0 +1,258 @@
2092+/*
2093+ * Copyright 2013-2014 Canonical Ltd.
2094+ *
2095+ * This program is free software; you can redistribute it and/or modify
2096+ * it under the terms of the GNU Lesser General Public License as published by
2097+ * the Free Software Foundation; version 3.
2098+ *
2099+ * This program is distributed in the hope that it will be useful,
2100+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2101+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2102+ * GNU Lesser General Public License for more details.
2103+ *
2104+ * You should have received a copy of the GNU Lesser General Public License
2105+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2106+ */
2107+
2108+import QtQuick 2.4
2109+import Ubuntu.Components 1.2 as Components
2110+
2111+/*!
2112+ \internal
2113+ \qmltype AppHeader
2114+ \inqmlmodule Ubuntu.Components 1.1
2115+ \ingroup ubuntu
2116+*/
2117+Components.StyledItem {
2118+ id: header
2119+
2120+ anchors {
2121+ left: parent.left
2122+ right: parent.right
2123+ }
2124+ y: 0
2125+
2126+ /*!
2127+ Animate showing and hiding of the header.
2128+ */
2129+ property bool animate: true
2130+
2131+ /*!
2132+ The background color of the divider. Value set by MainView.
2133+ */
2134+ property color dividerColor
2135+
2136+ /*!
2137+ The background color of the panel. Value set by MainView.
2138+ */
2139+ property color panelColor
2140+
2141+ Behavior on y {
2142+ enabled: animate && !(header.flickable && header.flickable.moving)
2143+ SmoothedAnimation {
2144+ duration: Components.UbuntuAnimation.BriskDuration
2145+ }
2146+ }
2147+
2148+ /*! \internal */
2149+ onHeightChanged: {
2150+ internal.checkFlickableMargins();
2151+ internal.movementEnded();
2152+ }
2153+
2154+ visible: title || contents || tabsModel
2155+ onVisibleChanged: {
2156+ internal.checkFlickableMargins();
2157+ }
2158+
2159+ /*!
2160+ Show the header
2161+ */
2162+ function show() {
2163+ header.y = 0;
2164+ }
2165+
2166+ /*!
2167+ Hide the header
2168+ */
2169+ function hide() {
2170+ header.y = - header.height;
2171+ }
2172+
2173+ /*!
2174+ The text to display in the header
2175+ */
2176+ property string title: ""
2177+ onTitleChanged: {
2178+ header.show();
2179+ }
2180+
2181+ /*!
2182+ The contents of the header. If this is set, \l title will be ignored.
2183+ */
2184+ property Item contents: null
2185+ onContentsChanged: {
2186+ header.show();
2187+ }
2188+
2189+ /*!
2190+ A model of tabs to represent in the header.
2191+ This is automatically set by \l Tabs.
2192+ */
2193+ property var tabsModel: null
2194+
2195+ /*!
2196+ If it is possible to pop this PageStack, a back button will be
2197+ shown in the header.
2198+ */
2199+ property var pageStack: null
2200+
2201+ /*!
2202+ \deprecated
2203+ \qmlproperty list<Action> actions
2204+ The list of actions actions that will be shown in the header.
2205+ DEPRECATED. Use Page.head.actions instead.
2206+ */
2207+ property var actions
2208+ onActionsChanged: print("WARNING: Header.actions property is DEPRECATED. "+
2209+ "Use Page.head.actions instead.")
2210+
2211+ /*!
2212+ \internal
2213+ \deprecated
2214+ Action shown before the title. Setting this will disable the back
2215+ button and tabs drawer button in the new header and replace it with a button
2216+ representing the action below.
2217+ DEPRECATED. Use Page.head.backAction property instead.
2218+ */
2219+ property var __customBackAction: null
2220+
2221+ // FIXME: Currently autopilot can only get visual items, but once bug #1273956
2222+ // is fixed to support non-visual items, a QtObject may be used.
2223+ // --timp - 2014-03-20
2224+ Item {
2225+ // FIXME: This is a workaround to be able to get the properties of
2226+ // tabsModel in an autopilot test.
2227+ objectName: "tabsModelProperties"
2228+ property int count: tabsModel ? tabsModel.count : 0
2229+ property int selectedIndex: tabsModel ? tabsModel.selectedIndex : -1
2230+ }
2231+ Item {
2232+ // FIXME: This is a workaround to be able to get the properties of
2233+ // the sections in an autopilot test.
2234+ objectName: "sectionsProperties"
2235+ property int selectedIndex: header.config ? header.config.sections.selectedIndex : -1
2236+ }
2237+
2238+ /*!
2239+ The flickable that controls the movement of the header.
2240+ Will be set automatically by Pages inside a MainView, but can
2241+ be overridden.
2242+ */
2243+ property Flickable flickable: null
2244+ onFlickableChanged: {
2245+ internal.checkFlickableMargins();
2246+ internal.connectFlickable();
2247+ header.show();
2248+ }
2249+
2250+ /*!
2251+ Set by \l MainView
2252+ */
2253+ property bool useDeprecatedToolbar: true
2254+
2255+ /*!
2256+ Configuration of the header.
2257+ */
2258+ property PageHeadConfiguration config: null
2259+
2260+ QtObject {
2261+ id: internal
2262+
2263+ /*!
2264+ Track the y-position inside the flickable.
2265+ */
2266+ property real previousContentY: 0
2267+
2268+ /*!
2269+ The previous flickable to disconnect events
2270+ */
2271+ property Flickable previousFlickable: null
2272+
2273+ /*!
2274+ Disconnect previous flickable, and connect the new one.
2275+ */
2276+ function connectFlickable() {
2277+ if (previousFlickable) {
2278+ previousFlickable.contentYChanged.disconnect(internal.scrollContents);
2279+ previousFlickable.movementEnded.disconnect(internal.movementEnded);
2280+ previousFlickable.interactiveChanged.disconnect(internal.interactiveChanged);
2281+ }
2282+ if (flickable) {
2283+ // Connect flicking to movements of the header
2284+ previousContentY = flickable.contentY;
2285+ flickable.contentYChanged.connect(internal.scrollContents);
2286+ flickable.movementEnded.connect(internal.movementEnded);
2287+ flickable.interactiveChanged.connect(internal.interactiveChanged);
2288+ flickable.contentHeightChanged.connect(internal.contentHeightChanged);
2289+ }
2290+ previousFlickable = flickable;
2291+ }
2292+
2293+ /*!
2294+ Update the position of the header to scroll with the flickable.
2295+ */
2296+ function scrollContents() {
2297+ // Avoid updating header.y when rebounding or being dragged over the bounds.
2298+ if (!flickable.atYBeginning && !flickable.atYEnd) {
2299+ var deltaContentY = flickable.contentY - previousContentY;
2300+ // FIXME: MathUtils.clamp is expensive. Fix clamp, or replace it here.
2301+ header.y = MathUtils.clamp(header.y - deltaContentY, -header.height, 0);
2302+ }
2303+ previousContentY = flickable.contentY;
2304+ }
2305+
2306+ /*!
2307+ Fully show or hide the header, depending on its current y.
2308+ */
2309+ function movementEnded() {
2310+ if (flickable && flickable.contentY < 0) header.show();
2311+ else if (header.y < -header.height/2) header.hide();
2312+ else header.show();
2313+ }
2314+
2315+ /*
2316+ Content height of flickable changed
2317+ */
2318+ function contentHeightChanged() {
2319+ if (flickable && flickable.height >= flickable.contentHeight) header.show();
2320+ }
2321+
2322+ /*
2323+ Flickable became interactive or non-interactive.
2324+ */
2325+ function interactiveChanged() {
2326+ if (flickable && !flickable.interactive) header.show();
2327+ }
2328+
2329+ /*
2330+ Check the topMargin of the flickable and set it if needed to avoid
2331+ contents becoming unavailable behind the header.
2332+ */
2333+ function checkFlickableMargins() {
2334+ if (header.flickable) {
2335+ var headerHeight = header.visible ? header.height : 0
2336+ if (flickable.topMargin !== headerHeight) {
2337+ var previousHeaderHeight = flickable.topMargin;
2338+ flickable.topMargin = headerHeight;
2339+ // push down contents when header grows,
2340+ // pull up contents when header shrinks.
2341+ flickable.contentY -= headerHeight - previousHeaderHeight;
2342+ }
2343+ }
2344+ }
2345+ }
2346+
2347+ style: header.useDeprecatedToolbar ? Theme.createStyleComponent("HeaderStyle.qml", header) :
2348+ Theme.createStyleComponent("PageHeadStyle.qml", header)
2349+}
2350
2351=== added file 'modules/Ubuntu/Components/1.2/Captions.qml'
2352--- modules/Ubuntu/Components/1.2/Captions.qml 1970-01-01 00:00:00 +0000
2353+++ modules/Ubuntu/Components/1.2/Captions.qml 2015-05-06 10:32:32 +0000
2354@@ -0,0 +1,150 @@
2355+/*
2356+ * Copyright 2015 Canonical Ltd.
2357+ *
2358+ * This program is free software; you can redistribute it and/or modify
2359+ * it under the terms of the GNU Lesser General Public License as published by
2360+ * the Free Software Foundation; version 3.
2361+ *
2362+ * This program is distributed in the hope that it will be useful,
2363+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2364+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2365+ * GNU Lesser General Public License for more details.
2366+ *
2367+ * You should have received a copy of the GNU Lesser General Public License
2368+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2369+ */
2370+
2371+import QtQuick 2.4
2372+import QtQuick.Layouts 1.1
2373+import Ubuntu.Components 1.2
2374+
2375+/*!
2376+ \qmltype Captions
2377+ \inqmlmodule Ubuntu.Components 1.2
2378+ \ingroup ubuntu-listitem
2379+ \since Ubuntu.Components 1.2
2380+ \brief Container providing captionStyles for a twin-label column that can be used in
2381+ RowLayout or GridLayout.
2382+
2383+ The labels are placed in a column and can be accessed through \l title and
2384+ \l subtitle properties. The default spacing between the labels is 0.5 grid units.
2385+
2386+ The container only shows the labels which has its text property set to a valid
2387+ string. The labels not having any text set are not occupying the space. When
2388+ embedded in a positioner or in a RowLayout, the container is aligned vertically
2389+ centered. It is recommended to be used in context with RowLayout or GridLayout,
2390+ however can be used with any component.
2391+
2392+ \qml
2393+ import QtQuick 2.4
2394+ import Ubuntu.Components 1.2
2395+
2396+ ListItem {
2397+ RowLayout {
2398+ Captions {
2399+ title.text: "Caption"
2400+ subtitle.text: "Subtitle text"
2401+ // attached properties of an Item type property
2402+ // can be changed only with assignment
2403+ Component.onCompleted: subtitle.Layout.alignment = Qt.AlignRight
2404+ }
2405+ Captions {
2406+ captionStyle: Ubuntu.SummaryCaptionStyle
2407+ title.text: "Text"
2408+ subtitle.text: "Text"
2409+ }
2410+ }
2411+ }
2412+ \endqml
2413+
2414+ Additional items can also be added to the layout after the two labels.
2415+ \qml
2416+ Captions {
2417+ title.text: "Caption"
2418+ subtitle.text: "Subtitle"
2419+ Label {
2420+ text: "third line"
2421+ fontSize: "xx-small"
2422+ }
2423+ }
2424+ \endqml
2425+ */
2426+ColumnLayout {
2427+ id: captions
2428+
2429+ /*!
2430+ \qmlproperty enumeration captionStyle
2431+ The property configures the arrangement and font sizes of the Labels in the
2432+ component. It can take the following values:
2433+ \list
2434+ \li \b Ubuntu.TitleCaptionStyle - (default) typical configuration for a left aligned
2435+ twin-label setup, where the text covers the remaining area on a list
2436+ layout.
2437+ \li \b Ubuntu.SummaryCaptionStyle - configuration for a right-aligned twin label setup,
2438+ with 6 grid units width.
2439+ \endlist
2440+ */
2441+ property int captionStyle: Ubuntu.TitleCaptionStyle
2442+
2443+ /*!
2444+ \qmlproperty Label title
2445+ \readonly
2446+ Label occupying the top area of the container.
2447+ */
2448+ property alias title: titleLabel
2449+
2450+ /*!
2451+ \qmlproperty Label subtitle
2452+ \readonly
2453+ Label occupying the bottom area of the container.
2454+ */
2455+ property alias subtitle: subtitleLabel
2456+
2457+ clip: true
2458+ spacing: units.gu(0.5)
2459+ Layout.fillWidth: (captionStyle == Ubuntu.TitleCaptionStyle)
2460+ Layout.alignment: Qt.AlignVCenter | ((captionStyle == Ubuntu.SummaryCaptionStyle) ? Qt.AlignRight : Qt.AlignLeft)
2461+ Layout.minimumWidth: 0
2462+ Layout.maximumWidth: (captionStyle == Ubuntu.SummaryCaptionStyle) ? units.gu(6) : parent.width
2463+ Layout.preferredWidth: (captionStyle == Ubuntu.SummaryCaptionStyle) ? Layout.maximumWidth : 0
2464+ Layout.minimumHeight: 0
2465+ Layout.maximumHeight: parent ? parent.height : childrenRect.height
2466+ Layout.preferredHeight: childrenRect.height
2467+
2468+ // handle visibility, do not override visible property!
2469+ // 'hide' column if title and subtitle is an empty string and
2470+ // there's no more children added
2471+ states: State {
2472+ name: "__q_invisible"
2473+ when: (title.text === "" && subtitle.text === "") && (captions.children.length == 2)
2474+ PropertyChanges {
2475+ target: captions
2476+ visible: false
2477+ }
2478+ }
2479+
2480+ Label {
2481+ id: titleLabel
2482+ anchors {
2483+ left: parent.left
2484+ right: parent.right
2485+ }
2486+ fontSize: (captionStyle == Ubuntu.SummaryCaptionStyle) ? "small" : "medium"
2487+ horizontalAlignment: (captionStyle == Ubuntu.SummaryCaptionStyle) ? Text.AlignRight : Text.AlignLeft
2488+ visible: text !== ""
2489+ elide: (captionStyle == Ubuntu.TitleCaptionStyle) ? Text.ElideRight : Text.ElideNone
2490+ }
2491+ Label {
2492+ id: subtitleLabel
2493+ anchors {
2494+ left: parent.left
2495+ right: parent.right
2496+ }
2497+ fontSize: "small"
2498+ horizontalAlignment: (captionStyle == Ubuntu.SummaryCaptionStyle) ? Text.AlignRight : Text.AlignLeft
2499+ visible: text !== ""
2500+ maximumLineCount: (captionStyle == Ubuntu.TitleCaptionStyle) ? 2 : 1
2501+ wrapMode: (captionStyle == Ubuntu.TitleCaptionStyle) ? Text.Wrap : Text.NoWrap
2502+ elide: (captionStyle == Ubuntu.TitleCaptionStyle) ? Text.ElideRight : Text.ElideNone
2503+ }
2504+}
2505
2506=== added file 'modules/Ubuntu/Components/1.2/CheckBox.qml'
2507--- modules/Ubuntu/Components/1.2/CheckBox.qml 1970-01-01 00:00:00 +0000
2508+++ modules/Ubuntu/Components/1.2/CheckBox.qml 2015-05-06 10:32:32 +0000
2509@@ -0,0 +1,53 @@
2510+/*
2511+ * Copyright 2012 Canonical Ltd.
2512+ *
2513+ * This program is free software; you can redistribute it and/or modify
2514+ * it under the terms of the GNU Lesser General Public License as published by
2515+ * the Free Software Foundation; version 3.
2516+ *
2517+ * This program is distributed in the hope that it will be useful,
2518+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2519+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2520+ * GNU Lesser General Public License for more details.
2521+ *
2522+ * You should have received a copy of the GNU Lesser General Public License
2523+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2524+ */
2525+
2526+import QtQuick 2.4
2527+
2528+/*!
2529+ \qmltype CheckBox
2530+ \inqmlmodule Ubuntu.Components 1.1
2531+ \ingroup ubuntu
2532+ \brief CheckBox is a component with two states, checked or unchecked. It can
2533+ be used to set boolean options. The behavior is the same as \l Switch, the
2534+ only difference is the graphical style.
2535+
2536+ \l {https://design.ubuntu.com/apps/building-blocks/selection}{See also the Design Guidelines on selection}.
2537+
2538+ Example:
2539+ \qml
2540+ Item {
2541+ CheckBox {
2542+ checked: true
2543+ }
2544+ }
2545+ \endqml
2546+*/
2547+AbstractButton {
2548+ id: checkBox
2549+
2550+ /*!
2551+ Specifies whether the checkbox is checked or not. By default the property
2552+ is set to false.
2553+ */
2554+ property bool checked: false
2555+
2556+ /*!
2557+ \internal
2558+ */
2559+ onTriggered: checked = !checked
2560+
2561+ style: Theme.createStyleComponent("CheckBoxStyle.qml", checkBox)
2562+}
2563
2564=== added file 'modules/Ubuntu/Components/1.2/ComboButton.qml'
2565--- modules/Ubuntu/Components/1.2/ComboButton.qml 1970-01-01 00:00:00 +0000
2566+++ modules/Ubuntu/Components/1.2/ComboButton.qml 2015-05-06 10:32:32 +0000
2567@@ -0,0 +1,367 @@
2568+/*
2569+ * Copyright 2014 Canonical Ltd.
2570+ *
2571+ * This program is free software; you can redistribute it and/or modify
2572+ * it under the terms of the GNU Lesser General Public License as published by
2573+ * the Free Software Foundation; version 3.
2574+ *
2575+ * This program is distributed in the hope that it will be useful,
2576+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2577+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2578+ * GNU Lesser General Public License for more details.
2579+ *
2580+ * You should have received a copy of the GNU Lesser General Public License
2581+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2582+ */
2583+
2584+import QtQuick 2.4
2585+import Ubuntu.Components.Popups 1.0
2586+import Ubuntu.Components 1.2 as Toolkit
2587+
2588+/*!
2589+ \qmltype ComboButton
2590+ \inqmlmodule Ubuntu.Components 1.1
2591+ \ingroup ubuntu
2592+ \brief Ubuntu button providing a drop-down panel visualizing custom options.
2593+
2594+ The component is composed of three main blocks: \b {main button}, \b {dropdown}
2595+ and \b {combo list}.
2596+
2597+ The \a {main button} holds the main functionailty of the component, and it is
2598+ located at the left-top side of the expanded button. The \a clicked() signal
2599+ is triggered only when this button is pressed.
2600+
2601+ The \a {dropdown} is a button located on the right of the main button. Its
2602+ functionality is to drive the component's expanded state.
2603+
2604+ The \a {combo list} is a panel showing the content specified in \l comboList
2605+ property when expanded. The content is stretched horizontally to the component's
2606+ width, and its height is controlled by the \l expandedHeight property as follows:
2607+ \list
2608+ \li If the content height is smaller than the value of \l expandedHeight, the combo
2609+ list will be expanded only to the height of the content.
2610+ \qml
2611+ import QtQuick 2.4
2612+ import Ubuntu.Components 1.2
2613+ ComboButton {
2614+ text: "smaller content"
2615+ Rectangle {
2616+ height: units.gu(5) // smaller than the default expandedHeight
2617+ color: "blue"
2618+ }
2619+ }
2620+ \endqml
2621+ \li If the content height is greater than \l expandedHeight, the combo list will
2622+ expand till the height specified by the property and the content will be
2623+ scrolled; in case the combo list content is one single Flickable, ListView,
2624+ GridView or PathView, the content scrolling will be provided by the content
2625+ itself.
2626+ \qml
2627+ import QtQuick 2.4
2628+ import Ubuntu.Components 1.2
2629+ ComboButton {
2630+ text: "long scrolled content"
2631+ Column {
2632+ Repeater {
2633+ model: 5
2634+ spacing: units.gu(1)
2635+ Rectangle {
2636+ height: units.gu(5)
2637+ color: "blue"
2638+ }
2639+ }
2640+ }
2641+ }
2642+ \endqml
2643+ \li In case the content is a single Flickable, ListView, GridView or PathView,
2644+ the content will be filling the entire combo list area defined.
2645+ \qml
2646+ import QtQuick 2.4
2647+ import Ubuntu.Components 1.2
2648+ import Ubuntu.Components.ListItems 1.0
2649+ ComboButton {
2650+ text: "listview"
2651+ ListView {
2652+ model: 10
2653+ delegate: Standard {
2654+ text: "Item #" + modelData
2655+ }
2656+ }
2657+ }
2658+ \endqml
2659+ \li Vertical anchoring of combo list content to its parent is not possible
2660+ as the expansion calculation is done based on the combo list content height.
2661+ If the content wants to take the size of the entire combo list, it should
2662+ bind its height to the \l comboListHeight property.
2663+ \qml
2664+ import QtQuick 2.4
2665+ import Ubuntu.Components 1.2
2666+ ComboButton {
2667+ id: combo
2668+ text: "smaller content"
2669+ Rectangle {
2670+ height: combo.comboListHeight
2671+ color: "blue"
2672+ }
2673+ }
2674+ \endqml
2675+ \li In case the expansion needs to be the size of the combo list content, the \l
2676+ expandedHeight should be set to -1.
2677+ \qml
2678+ import QtQuick 2.4
2679+ import Ubuntu.Components 1.2
2680+ ComboButton {
2681+ text: "auto-sized content"
2682+ expandedHeight: -1
2683+ Column {
2684+ Repeater {
2685+ model: 5
2686+ spacing: units.gu(1)
2687+ Button {
2688+ text: "Button #" + modelData
2689+ }
2690+ }
2691+ }
2692+ }
2693+ \endqml
2694+ \endlist
2695+
2696+ The combo list can be expanded/collapsed either through the \l expanded property
2697+ or by clicking on the dropdown button. It is not collapsed when pressing the main
2698+ button or clicking on the combo list. In order to do an auto-collapsing button
2699+ you must reset the expanded property (set it to false) when the main button is
2700+ clicked or when a selection is taken from the combo list content. The following
2701+ example illustrates a possible implementation.
2702+
2703+ \qml
2704+ import QtQuick 2.4
2705+ import Ubuntu.Components 1.2
2706+
2707+ ComboButton {
2708+ id: combo
2709+ text: "Auto closing"
2710+ expanded: true
2711+ expandedHeight: units.gu(30)
2712+ onClicked: expanded = false
2713+ UbuntuListView {
2714+ width: parent.width
2715+ height: combo.comboListHeight
2716+ model: 20
2717+ delegate: Standard {
2718+ text: "Action #" + modelData
2719+ onClicked: {
2720+ combo.text = text;
2721+ combo.expanded = false;
2722+ }
2723+ }
2724+ }
2725+ }
2726+ \endqml
2727+
2728+ \section2 Styling
2729+ The style of the component is defined in \l ComboButtonStyle.
2730+ */
2731+Toolkit.Button {
2732+ id: combo
2733+
2734+ /*!
2735+ Specifies whether the combo list is expanded or not. The default falue is
2736+ false.
2737+ */
2738+ property bool expanded: false
2739+
2740+ /*!
2741+ The property holds the height of the component when collapsed. By default
2742+ the value is the implicit height of the component.
2743+ */
2744+ property real collapsedHeight: implicitHeight
2745+
2746+ /*!
2747+ The property holds the maximum height value the component should expand.
2748+ When setting the property, remember to take into account the \l collapsedHeight
2749+ value. The best practice is to use bind it with collapsedHeight.
2750+ \qml
2751+ ComboButton {
2752+ text: "altered expandedHeight"
2753+ expandedHeight: collapsedHeight + units.gu(25)
2754+ }
2755+ \endqml
2756+
2757+ A value of -1 will instruct the component to expand the combo list as
2758+ much as its content height is.
2759+
2760+ The default value is \l collapsedHeight + 19.5 GU, so at least 3 ListItems
2761+ can fit in the combo list.
2762+ \sa collapsedHeight
2763+ */
2764+ property real expandedHeight: collapsedHeight + units.gu(19.5)
2765+
2766+ /*!
2767+ The property holds the maximum combo list height allowed based on the
2768+ \l expandedHeight and \l collapsedHeight values. It is a convenience property
2769+ that can be used to size the combo list content.
2770+ \qml
2771+ import QtQuick 2.4
2772+ import Ubuntu.Components 1.2
2773+ import Ubuntu.Components.ListItems 0.1
2774+ ComboButton {
2775+ id: combo
2776+ text: "Full comboList size"
2777+ ListView {
2778+ anchors {
2779+ left: parent.left
2780+ right: parent.right
2781+ }
2782+ height: combo.comboListHeight
2783+ model: 20
2784+ delegate: Standard {
2785+ text: "Action #" + modelData
2786+ }
2787+ }
2788+ }
2789+ \endqml
2790+
2791+ \sa collapsedHeight, expandedHeight
2792+ */
2793+ readonly property real comboListHeight: (expandedHeight < 0) ?
2794+ comboListHolder.height :
2795+ (expandedHeight - collapsedHeight -
2796+ (combo.__styleInstance ? combo.__styleInstance.comboListMargin : 0))
2797+
2798+ /*!
2799+ \qmlproperty list<Item> comboList
2800+ \default
2801+ Property holding the list of items to be shown in the combo list. Being
2802+ a default property children items declared will land in the combo list.
2803+ \note The component is not responsible for layouting the content. It only
2804+ provides scrolling abilities for the case the content exceeds the defined
2805+ expanded height.
2806+ */
2807+ default property alias comboList: comboListHolder.data
2808+
2809+ /* ----------------- Color and font configurations ----------------- */
2810+ /*!
2811+ The property specifies the color of the dropdown button and the combo list
2812+ for both collapsed and expanded states. You can use \l expanded to define
2813+ different colors for expanded or collapsed states.
2814+ */
2815+ property color dropdownColor: __styleInstance ? __styleInstance.defaultDropdownColor : color
2816+
2817+
2818+ style: Theme.createStyleComponent("ComboButtonStyle.qml", combo)
2819+
2820+ Component.onCompleted: {
2821+ // update mouse area to report clicks only on the main button area
2822+ // area excluding dropDown button and combo list
2823+ // we must do separate bindings as __mouseArea is a read-only property
2824+ __mouseArea.anchors.fill = undefined;
2825+ __mouseArea.anchors.left = Qt.binding(function() {return combo.left;});
2826+ __mouseArea.anchors.top = Qt.binding(function() {return combo.top;});
2827+ __mouseArea.anchors.right = Qt.binding(function() {return combo.right;});
2828+ __mouseArea.anchors.rightMargin = Qt.binding(function() {return combo.__styleInstance.dropDownWidth + combo.__styleInstance.dropDownSeparatorWidth;});
2829+ __mouseArea.height = Qt.binding(function() {return collapsedHeight;});
2830+ // for autopilot, set the main button name
2831+ __mouseArea.objectName = "combobutton_mainbutton";
2832+
2833+ // bind a height calculation to avoid unwanted change
2834+ combo.height = Qt.binding(function() {return collapsedHeight + __styleInstance.comboListPanel.height});
2835+ }
2836+
2837+ // dropdown button
2838+ AbstractButton {
2839+ id: dropDown
2840+ objectName: "combobutton_dropdown"
2841+ anchors {
2842+ right: parent.right
2843+ top: parent.top
2844+ }
2845+ width: combo.__styleInstance ? combo.__styleInstance.dropDownWidth : 0
2846+ height: combo.collapsedHeight
2847+ // open dropdown when pressed, not when clicked
2848+ onClicked: {
2849+ // toggle expanded
2850+ combo.expanded = !combo.expanded;
2851+ }
2852+ }
2853+
2854+ // expansion list
2855+ Flickable {
2856+ id: comboHolder
2857+ objectName: "combobutton_contentflicker"
2858+ parent: combo.__styleInstance ? combo.__styleInstance.comboListHolder : combo
2859+ anchors.fill: parent
2860+ interactive: combo.expanded && !contentIsFlickable() && (combo.expandedHeight > 0)
2861+ flickableDirection: Flickable.VerticalFlick
2862+ contentHeight: comboListHolder.height
2863+
2864+ // consider PathView as Flickable in this case as well!
2865+ function contentIsFlickable() {
2866+ return (comboListHolder.children.length === 1) &&
2867+ comboListHolder.children[0].hasOwnProperty("flicking");
2868+ }
2869+
2870+ Item {
2871+ id: comboListHolder
2872+ objectName: "combobutton_combolist"
2873+ anchors {
2874+ left: parent.left
2875+ right: parent.right
2876+ }
2877+
2878+ // stretch children width to holder's width
2879+ // must do binding to height manually to avoid binding loops caused
2880+ // by the vertical stretching when the component is a single flickable
2881+ property bool stretch: (combo.expandedHeight > 0 && comboHolder.contentIsFlickable())
2882+ onStretchChanged: stretchChildren()
2883+ onChildrenChanged: stretchChildren()
2884+ function stretchChildren() {
2885+ for (var i in comboListHolder.children) {
2886+ var child = comboListHolder.children[i];
2887+ if (comboListHolder.stretch) {
2888+ child.anchors.left = undefined;
2889+ child.anchors.right = undefined;
2890+ child.anchors.fill = comboListHolder;
2891+ comboListHolder.height = Qt.binding(function() {
2892+ return combo.comboListHeight;
2893+ });
2894+ } else {
2895+ child.anchors.left = comboListHolder.left;
2896+ child.anchors.right = comboListHolder.right;
2897+ comboListHolder.height = Qt.binding(function() {
2898+ return comboListHolder.childrenRect.height;
2899+ });
2900+ }
2901+ }
2902+ }
2903+ }
2904+ }
2905+ Scrollbar {
2906+ flickableItem: comboHolder
2907+ }
2908+
2909+ /*
2910+ Drive the expansion height of the combo list holder
2911+ This is a common functionaity in all combo buttons, therefore we can have it
2912+ in the main component.
2913+ */
2914+ Binding {
2915+ target: combo.__styleInstance.comboListPanel
2916+ property: "height"
2917+ value: {
2918+ if (!expanded) {
2919+ return 0;
2920+ }
2921+ if (comboListHolder.stretch) {
2922+ return combo.comboListHeight + combo.__styleInstance.comboListMargin;
2923+ }
2924+
2925+ var h = comboListHolder.height;
2926+ var max = combo.comboListHeight + combo.__styleInstance.comboListMargin;
2927+ if (combo.expandedHeight < 0) {
2928+ return max;
2929+ }
2930+
2931+ return Toolkit.MathUtils.clamp(h, 0, max);
2932+ }
2933+ }
2934+}
2935
2936=== added file 'modules/Ubuntu/Components/1.2/CrossFadeImage10.qml'
2937--- modules/Ubuntu/Components/1.2/CrossFadeImage10.qml 1970-01-01 00:00:00 +0000
2938+++ modules/Ubuntu/Components/1.2/CrossFadeImage10.qml 2015-05-06 10:32:32 +0000
2939@@ -0,0 +1,173 @@
2940+/*
2941+ * Copyright (C) 2013 Canonical, Ltd.
2942+ *
2943+ * This program is free software; you can redistribute it and/or modify
2944+ * it under the terms of the GNU General Public License as published by
2945+ * the Free Software Foundation; version 3.
2946+ *
2947+ * This program is distributed in the hope that it will be useful,
2948+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2949+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2950+ * GNU General Public License for more details.
2951+ *
2952+ * You should have received a copy of the GNU General Public License
2953+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
2954+ */
2955+
2956+import QtQuick 2.4
2957+// FIXME: When a module contains QML, C++ and JavaScript elements exported,
2958+// we need to use named imports otherwise namespace collision is reported
2959+// by the QML engine. As workaround, we use Ubuntu named import.
2960+// Bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27645
2961+import Ubuntu.Components 1.2 as Ubuntu
2962+
2963+/*!
2964+ \internal
2965+ Documentation is in CrossFadeImage.qdoc
2966+*/
2967+Item {
2968+ id: crossFadeImage
2969+
2970+ property url source
2971+
2972+ property int fillMode : Image.PreserveAspectFit
2973+
2974+ property int fadeDuration: Ubuntu.UbuntuAnimation.FastDuration
2975+
2976+ // FIXME: Support resetting sourceSize
2977+ property size sourceSize: internals.loadingImage ? Qt.size(internals.loadingImage.sourceSize.width, internals.loadingImage.sourceSize.height) : Qt.size(0, 0)
2978+
2979+ readonly property bool running: nextImageFadeIn.running
2980+
2981+ readonly property int status: internals.loadingImage ? internals.loadingImage.status : Image.Null
2982+
2983+ Binding {
2984+ target: crossFadeImage
2985+ property: "sourceSize"
2986+ value: internals.loadingImage ? Qt.size(internals.loadingImage.sourceSize.width, internals.loadingImage.sourceSize.height) : Qt.size(0, 0)
2987+ when: internals.forcedSourceSize === undefined
2988+ }
2989+
2990+ /*!
2991+ \internal
2992+ */
2993+ onSourceSizeChanged: {
2994+ if (internals.loadingImage && (sourceSize != Qt.size(internals.loadingImage.sourceSize.width, internals.loadingImage.sourceSize.height))) {
2995+ internals.forcedSourceSize = sourceSize;
2996+ }
2997+ }
2998+
2999+ QtObject {
3000+ id: internals
3001+
3002+ /*! \internal
3003+ Source size specified by the setting crossFadeImage.sourceSize.
3004+ */
3005+ property size forcedSourceSize
3006+
3007+ /*! \internal
3008+ Defines the image currently being shown
3009+ */
3010+ property Image currentImage: image1
3011+
3012+ /*! \internal
3013+ Defines the image being changed to
3014+ */
3015+ property Image nextImage: image2
3016+
3017+ property Image loadingImage: currentImage
3018+
3019+ function swapImages() {
3020+ internals.currentImage.z = 0;
3021+ internals.nextImage.z = 1;
3022+ nextImageFadeIn.start();
3023+
3024+ var tmpImage = internals.currentImage;
3025+ internals.currentImage = internals.nextImage;
3026+ internals.nextImage = tmpImage;
3027+ }
3028+ }
3029+
3030+ Image {
3031+ id: image1
3032+ anchors.fill: parent
3033+ cache: false
3034+ asynchronous: true
3035+ fillMode: parent.fillMode
3036+ z: 1
3037+ Binding {
3038+ target: image1
3039+ property: "sourceSize"
3040+ value: internals.forcedSourceSize
3041+ when: internals.forcedSourceSize !== undefined
3042+ }
3043+ }
3044+
3045+ Image {
3046+ id: image2
3047+ anchors.fill: parent
3048+ cache: false
3049+ asynchronous: true
3050+ fillMode: parent.fillMode
3051+ z: 0
3052+ Binding {
3053+ target: image2
3054+ property: "sourceSize"
3055+ value: internals.forcedSourceSize
3056+ when: internals.forcedSourceSize !== undefined
3057+ }
3058+ }
3059+
3060+ /*!
3061+ \internal
3062+ Do the fading when the source is updated
3063+ */
3064+ onSourceChanged: {
3065+ // On creation, the souce handler is called before image pointers are set.
3066+ if (internals.currentImage === null) {
3067+ internals.currentImage = image1;
3068+ internals.nextImage = image2;
3069+ }
3070+
3071+ nextImageFadeIn.stop();
3072+
3073+ // Don't fade in initial picture, only fade changes
3074+ if (internals.currentImage.source == "") {
3075+ internals.currentImage.source = source;
3076+ internals.loadingImage = internals.currentImage;
3077+ } else {
3078+ nextImageFadeIn.stop();
3079+ internals.nextImage.opacity = 0.0;
3080+ internals.nextImage.source = source;
3081+ internals.loadingImage = internals.nextImage;
3082+
3083+ // If case the image is still in QML's cache, status will be "Ready" immediately
3084+ if (internals.nextImage.status === Image.Ready || internals.nextImage.source === "") {
3085+ internals.swapImages();
3086+ }
3087+ }
3088+ }
3089+
3090+ Connections {
3091+ target: internals.nextImage
3092+ onStatusChanged: {
3093+ if (internals.nextImage.status == Image.Ready) {
3094+ internals.swapImages();
3095+ }
3096+ }
3097+ }
3098+
3099+ UbuntuNumberAnimation {
3100+ id: nextImageFadeIn
3101+ target: internals.nextImage
3102+ property: "opacity"
3103+ to: 1.0
3104+ duration: crossFadeImage.fadeDuration
3105+
3106+ onRunningChanged: {
3107+ if (!running) {
3108+ internals.nextImage.source = "";
3109+ }
3110+ }
3111+ }
3112+}
3113
3114=== added file 'modules/Ubuntu/Components/1.2/CrossFadeImage11.qml'
3115--- modules/Ubuntu/Components/1.2/CrossFadeImage11.qml 1970-01-01 00:00:00 +0000
3116+++ modules/Ubuntu/Components/1.2/CrossFadeImage11.qml 2015-05-06 10:32:32 +0000
3117@@ -0,0 +1,192 @@
3118+/*
3119+ * Copyright (C) 2014 Canonical, Ltd.
3120+ *
3121+ * This program is free software; you can redistribute it and/or modify
3122+ * it under the terms of the GNU General Public License as published by
3123+ * the Free Software Foundation; version 3.
3124+ *
3125+ * This program is distributed in the hope that it will be useful,
3126+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3127+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3128+ * GNU General Public License for more details.
3129+ *
3130+ * You should have received a copy of the GNU General Public License
3131+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3132+ */
3133+
3134+import QtQuick 2.4
3135+// FIXME: When a module contains QML, C++ and JavaScript elements exported,
3136+// we need to use named imports otherwise namespace collision is reported
3137+// by the QML engine. As workaround, we use Ubuntu named import.
3138+// Bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27645
3139+import Ubuntu.Components 1.2 as Ubuntu
3140+
3141+/*!
3142+ \internal
3143+ Documentation is in CrossFadeImage.qdoc
3144+*/
3145+Item {
3146+ id: crossFadeImage
3147+
3148+ property url source
3149+
3150+ property int fillMode : Image.PreserveAspectFit
3151+
3152+ property int fadeDuration: Ubuntu.UbuntuAnimation.FastDuration
3153+
3154+ // FIXME: Support resetting sourceSize
3155+ property size sourceSize: internals.loadingImage ? Qt.size(internals.loadingImage.sourceSize.width, internals.loadingImage.sourceSize.height) : Qt.size(0, 0)
3156+
3157+ property string fadeStyle: "overlay"
3158+
3159+ readonly property bool running: nextImageFadeIn.running
3160+
3161+ readonly property int status: internals.loadingImage ? internals.loadingImage.status : Image.Null
3162+
3163+ Binding {
3164+ target: crossFadeImage
3165+ property: "sourceSize"
3166+ value: internals.loadingImage ? Qt.size(internals.loadingImage.sourceSize.width, internals.loadingImage.sourceSize.height) : Qt.size(0, 0)
3167+ when: internals.forcedSourceSize === undefined
3168+ }
3169+
3170+ /*!
3171+ \internal
3172+ */
3173+ onSourceSizeChanged: {
3174+ if (internals.loadingImage && (sourceSize != Qt.size(internals.loadingImage.sourceSize.width, internals.loadingImage.sourceSize.height))) {
3175+ internals.forcedSourceSize = sourceSize;
3176+ }
3177+ }
3178+
3179+ QtObject {
3180+ id: internals
3181+
3182+ /*! \internal
3183+ Source size specified by the setting crossFadeImage.sourceSize.
3184+ */
3185+ property size forcedSourceSize
3186+
3187+ /*! \internal
3188+ Defines the image currently being shown
3189+ */
3190+ property Image currentImage: image1
3191+
3192+ /*! \internal
3193+ Defines the image being changed to
3194+ */
3195+ property Image nextImage: image2
3196+
3197+ property Image loadingImage: currentImage
3198+
3199+ function swapImages() {
3200+ internals.currentImage.z = 0;
3201+ internals.nextImage.z = 1;
3202+ nextImageFadeIn.start();
3203+
3204+ var tmpImage = internals.currentImage;
3205+ internals.currentImage = internals.nextImage;
3206+ internals.nextImage = tmpImage;
3207+ }
3208+ }
3209+
3210+ QtObject {
3211+ // dummy object used to disable crossfade animation
3212+ id: fadeOutDummy
3213+ property real opacity
3214+ }
3215+
3216+ Image {
3217+ id: image1
3218+ anchors.fill: parent
3219+ cache: false
3220+ asynchronous: true
3221+ fillMode: parent.fillMode
3222+ z: 1
3223+ Binding {
3224+ target: image1
3225+ property: "sourceSize"
3226+ value: internals.forcedSourceSize
3227+ when: internals.forcedSourceSize !== undefined
3228+ }
3229+ }
3230+
3231+ Image {
3232+ id: image2
3233+ anchors.fill: parent
3234+ cache: false
3235+ asynchronous: true
3236+ fillMode: parent.fillMode
3237+ z: 0
3238+ Binding {
3239+ target: image2
3240+ property: "sourceSize"
3241+ value: internals.forcedSourceSize
3242+ when: internals.forcedSourceSize !== undefined
3243+ }
3244+ }
3245+
3246+ /*!
3247+ \internal
3248+ Do the fading when the source is updated
3249+ */
3250+ onSourceChanged: {
3251+ // On creation, the souce handler is called before image pointers are set.
3252+ if (internals.currentImage === null) {
3253+ internals.currentImage = image1;
3254+ internals.nextImage = image2;
3255+ }
3256+
3257+ nextImageFadeIn.stop();
3258+
3259+ // Don't fade in initial picture, only fade changes
3260+ if (internals.currentImage.source == "") {
3261+ internals.currentImage.source = source;
3262+ internals.loadingImage = internals.currentImage;
3263+ } else {
3264+ nextImageFadeIn.stop();
3265+ internals.nextImage.opacity = 0.0;
3266+ internals.nextImage.source = source;
3267+ internals.loadingImage = internals.nextImage;
3268+
3269+ // If case the image is still in QML's cache, status will be "Ready" immediately
3270+ if (internals.nextImage.status === Image.Ready || internals.nextImage.source === "") {
3271+ internals.swapImages();
3272+ }
3273+ }
3274+ }
3275+
3276+ Connections {
3277+ target: internals.nextImage
3278+ onStatusChanged: {
3279+ if (internals.nextImage.status == Image.Ready) {
3280+ internals.swapImages();
3281+ }
3282+ }
3283+ }
3284+
3285+ ParallelAnimation {
3286+ id: nextImageFadeIn
3287+
3288+ Ubuntu.UbuntuNumberAnimation {
3289+ id: currentImageFadeOut
3290+ target: fadeStyle == "cross" ? internals.currentImage : fadeOutDummy
3291+ property: "opacity"
3292+ to: 0.0
3293+ duration: crossFadeImage.fadeDuration
3294+ }
3295+
3296+ Ubuntu.UbuntuNumberAnimation {
3297+ target: internals.nextImage
3298+ property: "opacity"
3299+ to: 1.0
3300+ duration: crossFadeImage.fadeDuration
3301+ }
3302+
3303+ onRunningChanged: {
3304+ if (!running) {
3305+ internals.nextImage.source = "";
3306+ }
3307+ }
3308+ }
3309+}
3310
3311=== added file 'modules/Ubuntu/Components/1.2/DraggingArea.qml'
3312--- modules/Ubuntu/Components/1.2/DraggingArea.qml 1970-01-01 00:00:00 +0000
3313+++ modules/Ubuntu/Components/1.2/DraggingArea.qml 2015-05-06 10:32:32 +0000
3314@@ -0,0 +1,114 @@
3315+/*
3316+ * Copyright (C) 2013 Canonical, Ltd.
3317+ *
3318+ * This program is free software; you can redistribute it and/or modify
3319+ * it under the terms of the GNU Lesser General Public License as published by
3320+ * the Free Software Foundation; version 3.
3321+ *
3322+ * This program is distributed in the hope that it will be useful,
3323+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3324+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3325+ * GNU Lesser General Public License for more details.
3326+ *
3327+ * You should have received a copy of the GNU Lesser General Public License
3328+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3329+ */
3330+
3331+import QtQuick 2.4
3332+import "mathUtils.js" as MathLocal
3333+
3334+MouseArea {
3335+ id: draggingArea
3336+
3337+ property int orientation: Qt.Vertical
3338+ property bool dragging
3339+ property real dragVelocity: 0
3340+ property real dragValue: (orientation == Qt.Vertical ? (mouseY - __pressedPosition.y)
3341+ : (mouseX - __pressedPosition.x))
3342+ property real lateralPosition: orientation == Qt.Horizontal ? MathLocal.clamp(mouseY, 0, height) : MathLocal.clamp(mouseX, 0, width)
3343+ property point __pressedPosition: Qt.point(0, 0)
3344+ property var __dragEvents: []
3345+ property bool clickValidated: true
3346+ property bool zeroVelocityCounts: false
3347+
3348+
3349+ signal dragStart
3350+ signal dragEnd
3351+
3352+ onDragValueChanged: {
3353+ if (dragValue != 0 && pressed) {
3354+ dragging = true
3355+ }
3356+ }
3357+
3358+ onDraggingChanged: {
3359+ if (dragging) {
3360+ dragStart()
3361+ }
3362+ else {
3363+ dragEnd()
3364+ }
3365+ }
3366+
3367+ function updateSpeed() {
3368+ var totalSpeed = 0
3369+ for (var i=0; i<__dragEvents.length; i++) {
3370+ totalSpeed += __dragEvents[i][3]
3371+ }
3372+
3373+ if (zeroVelocityCounts || Math.abs(totalSpeed) > 0.001) {
3374+ dragVelocity = totalSpeed / __dragEvents.length * 1000
3375+ }
3376+ }
3377+
3378+ function cullOldDragEvents(currentTime) {
3379+ // cull events older than 50 ms but always keep the latest 2 events
3380+ for (var numberOfCulledEvents=0; numberOfCulledEvents<__dragEvents.length-2; numberOfCulledEvents++) {
3381+ // __dragEvents[numberOfCulledEvents][0] is the dragTime
3382+ if (currentTime - __dragEvents[numberOfCulledEvents][0] <= 50) break
3383+ }
3384+
3385+ __dragEvents.splice(0, numberOfCulledEvents)
3386+ }
3387+
3388+ function getEventSpeed(currentTime, event) {
3389+ if (__dragEvents.length != 0) {
3390+ var lastDrag = __dragEvents[__dragEvents.length-1]
3391+ var duration = Math.max(1, currentTime - lastDrag[0])
3392+ if (orientation == Qt.Vertical) {
3393+ return (event.y - lastDrag[2]) / duration
3394+ } else {
3395+ return (event.x - lastDrag[1]) / duration
3396+ }
3397+ } else {
3398+ return 0
3399+ }
3400+ }
3401+
3402+ function pushDragEvent(event) {
3403+ var currentTime = new Date().getTime()
3404+ __dragEvents.push([currentTime, event.x, event.y, getEventSpeed(currentTime, event)])
3405+ cullOldDragEvents(currentTime)
3406+ updateSpeed()
3407+ }
3408+
3409+ onPositionChanged: {
3410+ if (dragging) {
3411+ pushDragEvent(mouse)
3412+ }
3413+ if (!draggingArea.containsMouse)
3414+ clickValidated = false
3415+ }
3416+
3417+ onPressed: {
3418+ __pressedPosition = Qt.point(mouse.x, mouse.y)
3419+ __dragEvents = []
3420+ pushDragEvent(mouse)
3421+ clickValidated = true
3422+ }
3423+
3424+ onReleased: {
3425+ dragging = false
3426+ __pressedPosition = Qt.point(mouse.x, mouse.y)
3427+ }
3428+}
3429
3430=== added file 'modules/Ubuntu/Components/1.2/Header.qml'
3431--- modules/Ubuntu/Components/1.2/Header.qml 1970-01-01 00:00:00 +0000
3432+++ modules/Ubuntu/Components/1.2/Header.qml 2015-05-06 10:32:32 +0000
3433@@ -0,0 +1,39 @@
3434+/*
3435+ * Copyright 2014 Canonical Ltd.
3436+ *
3437+ * This program is free software; you can redistribute it and/or modify
3438+ * it under the terms of the GNU Lesser General Public License as published by
3439+ * the Free Software Foundation; version 3.
3440+ *
3441+ * This program is distributed in the hope that it will be useful,
3442+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3443+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3444+ * GNU Lesser General Public License for more details.
3445+ *
3446+ * You should have received a copy of the GNU Lesser General Public License
3447+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3448+ */
3449+
3450+import QtQuick 2.4
3451+
3452+/*!
3453+ \qmltype Header
3454+ \internal
3455+ \deprecated
3456+*/
3457+AppHeader {
3458+
3459+ /*!
3460+ \internal
3461+ We need this property so QML exposes this class as Header instead of
3462+ AppHeader. This way autopilot can select the deprecated header.
3463+ */
3464+ property string _for_autopilot
3465+
3466+ Component.onCompleted: {
3467+ print("WARNING: Header is an internal component of Ubuntu.Components and" +
3468+ "its API may change or be removed at any moment." +
3469+ "Please use MainView and Page instead."
3470+ );
3471+ }
3472+}
3473
3474=== renamed file 'modules/Ubuntu/Components/Icon10.qml' => 'modules/Ubuntu/Components/1.2/Icon10.qml'
3475=== renamed file 'modules/Ubuntu/Components/Icon11.qml' => 'modules/Ubuntu/Components/1.2/Icon11.qml'
3476=== added file 'modules/Ubuntu/Components/1.2/InputHandler.qml'
3477--- modules/Ubuntu/Components/1.2/InputHandler.qml 1970-01-01 00:00:00 +0000
3478+++ modules/Ubuntu/Components/1.2/InputHandler.qml 2015-05-06 10:32:32 +0000
3479@@ -0,0 +1,518 @@
3480+/*
3481+ * Copyright 2014 Canonical Ltd.
3482+ *
3483+ * This program is free software; you can redistribute it and/or modify
3484+ * it under the terms of the GNU Lesser General Public License as published by
3485+ * the Free Software Foundation; version 3.
3486+ *
3487+ * This program is distributed in the hope that it will be useful,
3488+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3489+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3490+ * GNU Lesser General Public License for more details.
3491+ *
3492+ * You should have received a copy of the GNU Lesser General Public License
3493+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
3494+ */
3495+
3496+import QtQuick 2.4
3497+import Ubuntu.Components 1.2
3498+
3499+/*
3500+ This component is a unified text selection and scrolling handler for both
3501+ TextField and TextArea components.
3502+ */
3503+
3504+MultiPointTouchArea {
3505+ id: inputHandler
3506+ objectName: "input_handler"
3507+
3508+ // the root control
3509+ property Item main
3510+ // the input instance
3511+ property Item input
3512+ // the Flickable holding the input instance
3513+ property Flickable flickable
3514+
3515+ // item filling the visible text input area used to check handler visibility
3516+ property Item visibleArea: Item {
3517+ parent: flickable
3518+ anchors.fill: parent
3519+ }
3520+
3521+ // line size and spacing
3522+ property real lineSpacing: units.dp(3)
3523+ property real lineSize: input.font.pixelSize + lineSpacing
3524+ // input x/y distance from the frame
3525+ property point frameDistance: Qt.point(flickable.x, flickable.y)
3526+
3527+ // signal triggered when popup should be opened
3528+ signal pressAndHold(int pos, bool fromTouch)
3529+ signal tap(int pos)
3530+ property string oldText: ""
3531+ signal textModified()
3532+
3533+ function activateInput() {
3534+ if (!input.activeFocus) {
3535+ input.forceActiveFocus();
3536+ }
3537+ showInputPanel();
3538+ }
3539+
3540+ function showInputPanel() {
3541+ if (!Qt.inputMethod.visible) {
3542+ Qt.inputMethod.show();
3543+ }
3544+ textChanged = false;
3545+ }
3546+ function hideInputPanel() {
3547+ Qt.inputMethod.hide();
3548+ // emit accepted signal if changed
3549+ if (textChanged && input.hasOwnProperty("accepted")) {
3550+ input.accepted();
3551+ }
3552+ }
3553+
3554+ // internal properties/functions
3555+ readonly property bool singleLine: input.hasOwnProperty("validator")
3556+ property var flickableList: new Array()
3557+ property bool textChanged: false
3558+ property var popover
3559+ property bool suppressReleaseEvent: false
3560+ property int pressedPosition: -1
3561+ // move properties
3562+ property int moveStarts: -1
3563+ property int moveEnds: -1
3564+ // set scroller to the first Flickable that scrolls the input
3565+ // this can be the internal Flickable if the full autosize is disabled
3566+ // or one of the input's parent Flickable
3567+ readonly property bool scrollingDisabled: main && main.hasOwnProperty("autoSize") ?
3568+ (main.autoSize && (main.maximumLineCount <= 0)) : false
3569+ onScrollingDisabledChanged: if (state == "") flickable.interactive = !scrollingDisabled
3570+ readonly property Flickable grandScroller: firstFlickableParent(main)
3571+ readonly property Flickable scroller: (scrollingDisabled && grandScroller) ? grandScroller : flickable
3572+
3573+ // ensures the text cursorRectangle is always in the internal Flickable's visible area
3574+ function ensureVisible(rect)
3575+ {
3576+ if (flickable.moving || flickable.flicking)
3577+ return;
3578+ if (flickable.contentX >= rect.x)
3579+ flickable.contentX = rect.x;
3580+ else if (flickable.contentX + flickable.width <= rect.x + rect.width)
3581+ flickable.contentX = rect.x + rect.width - flickable.width;
3582+ if (flickable.contentY >= rect.y)
3583+ flickable.contentY = rect.y;
3584+ else if (flickable.contentY + flickable.height <= rect.y + rect.height)
3585+ flickable.contentY = rect.y + rect.height - flickable.height;
3586+ }
3587+ // returns the cursor position from x,y pair
3588+ function unadulteratedCursorPosition(x, y) {
3589+ return singleLine ? input.positionAt(x, TextInput.CursorOnCharacter) : input.positionAt(x, y, TextInput.CursorOnCharacter);
3590+ }
3591+ // returns the cursor position taking frame into account
3592+ function cursorPosition(x, y) {
3593+ var frameSpacing = main.__styleInstance.frameSpacing;
3594+ var cursorPosition = unadulteratedCursorPosition(x, y);
3595+ if (cursorPosition == 0)
3596+ cursorPosition = unadulteratedCursorPosition(x + frameSpacing, y + frameSpacing);
3597+ if (cursorPosition == text.length)
3598+ cursorPosition = unadulteratedCursorPosition(x - frameSpacing, y - frameSpacing);
3599+ return cursorPosition
3600+ }
3601+
3602+ // returns the mouse position
3603+ function mousePosition(mouse) {
3604+ return cursorPosition(mouse.x, mouse.y);
3605+ }
3606+ // checks whether the position is in the selected text
3607+ function positionInSelection(pos) {
3608+ return (input.selectionStart !== input.selectionEnd)
3609+ && (pos >= Math.min(input.selectionStart, input.selectionEnd))
3610+ && (pos <= Math.max(input.selectionStart, input.selectionEnd));
3611+ }
3612+
3613+ // check whether the mouse is inside a selected text area
3614+ function mouseInSelection(mouse) {
3615+ var pos = mousePosition(mouse);
3616+ return positionInSelection(pos);
3617+ }
3618+ // selects text
3619+ function selectText(mouse) {
3620+ state = "select";
3621+ moveEnds = mousePosition(mouse);
3622+ if (moveStarts < 0) {
3623+ moveStarts = moveEnds;
3624+ }
3625+ input.select(moveStarts, moveEnds);
3626+ }
3627+ // returns the first Flickable parent of a given item
3628+ function firstFlickableParent(item) {
3629+ var p = item ? item.parent : null;
3630+ while (p && !p.hasOwnProperty("flicking")) {
3631+ p = p.parent;
3632+ }
3633+ return p;
3634+ }
3635+ // focuses the input if not yet focused, and shows the context menu
3636+ function openContextMenu(mouse, noAutoselect, fromTouch) {
3637+ var pos = mousePosition(mouse);
3638+ if (!main.focus || !mouseInSelection(mouse)) {
3639+ activateInput();
3640+ input.cursorPosition = pressedPosition = mousePosition(mouse);
3641+ if (!noAutoselect) {
3642+ input.selectWord();
3643+ }
3644+ }
3645+ // open context menu at the cursor position
3646+ inputHandler.pressAndHold(input.cursorPosition, fromTouch);
3647+ // if opened with left press (touch falls into this criteria as well), we need to set state to inactive
3648+ // so the mouse moves won't result in selected text loss/change
3649+ if (mouse.button === Qt.LeftButton) {
3650+ state = "inactive";
3651+ }
3652+ }
3653+
3654+ // disables interactive Flickable parents, stops at the first non-interactive flickable.
3655+ function toggleFlickablesInteractive(turnOn) {
3656+ var p;
3657+ if (!turnOn) {
3658+ // handle the scroller separately
3659+ p = firstFlickableParent(scroller)
3660+ while (p) {
3661+ if (p.interactive) {
3662+ flickableList.push(p);
3663+ p.interactive = false;
3664+ } else {
3665+ break;
3666+ }
3667+ p = firstFlickableParent(p);
3668+ }
3669+ } else {
3670+ while (flickableList.length > 0) {
3671+ p = flickableList.pop();
3672+ p.interactive = true;
3673+ }
3674+ }
3675+ }
3676+
3677+ // moves the specified position, called by the cursor handler
3678+ // positioner = "currentPosition/selectionStart/selectionEnd"
3679+ function positionCaret(positioner, x, y) {
3680+ if (positioner === "cursorPosition") {
3681+ input[positioner] = cursorPosition(x, y);
3682+ } else {
3683+ var pos = cursorPosition(x, y);
3684+ if (positioner === "selectionStart" && (pos < input.selectionEnd)) {
3685+ input.select(pos, input.selectionEnd);
3686+ } else if (positioner === "selectionEnd" && (pos > input.selectionStart)) {
3687+ input.select(input.selectionStart, pos);
3688+ }
3689+ }
3690+ }
3691+
3692+ // moves the cursor one page forward with or without positioning the cursor
3693+ function movePage(forward) {
3694+ var cx = input.cursorRectangle.x;
3695+ var cy = input.cursorRectangle.y;
3696+ if (forward) {
3697+ if (singleLine) {
3698+ cx += visibleArea.width;
3699+ } else {
3700+ cy += visibleArea.height;
3701+ }
3702+ } else {
3703+ if (singleLine) {
3704+ cx -= visibleArea.width;
3705+ } else {
3706+ cy -= visibleArea.height;
3707+ }
3708+ }
3709+ input.cursorPosition = cursorPosition(cx, cy);
3710+ }
3711+
3712+ Component.onCompleted: {
3713+ state = (main.focus) ? "" : "inactive";
3714+ // FIXME: Qt5.3 related! mouseEnabled is a 5.3 related property which has a positive
3715+ // default value. That value messes up teh current understanding (5.2) of the
3716+ // MultiPointTouchArea functioning. We need to set it to false until 5.3 will be the
3717+ // default supported Qt version, when we can have a clean property value assignment
3718+ if (inputHandler.hasOwnProperty("mouseEnabled")) {
3719+ inputHandler.mouseEnabled = false;
3720+ }
3721+ }
3722+
3723+ // states
3724+ states: [
3725+ // override default state to turn on the saved Flickable interactive mode
3726+ State {
3727+ name: ""
3728+ StateChangeScript {
3729+ // restore interactive for all Flickable parents
3730+ script: toggleFlickablesInteractive(true);
3731+ }
3732+ },
3733+ State {
3734+ name: "inactive"
3735+ // we do not disable scroller here as in case the internal scrolling
3736+ // is disabled (scrollingDisabled = true) the outer scroller (grandScroller)
3737+ // would be blocked as well, which we don't want to
3738+ PropertyChanges {
3739+ target: flickable
3740+ interactive: false
3741+ }
3742+ },
3743+ State {
3744+ name: "scrolling"
3745+ StateChangeScript {
3746+ script: {
3747+ // stop scrolling all the parents
3748+ toggleFlickablesInteractive(false);
3749+ // stop touch timers
3750+ touchPoint.reset();
3751+ }
3752+ }
3753+ },
3754+ State {
3755+ name: "select"
3756+ // during select state all the flickables are blocked (interactive = false)
3757+ // we can use scroller here as we need to disable the outer scroller too!
3758+ PropertyChanges {
3759+ target: scroller
3760+ interactive: false
3761+ }
3762+ StateChangeScript {
3763+ script: {
3764+ // turn off interactive for all parent flickables
3765+ toggleFlickablesInteractive(false);
3766+ if (!positionInSelection(pressedPosition)) {
3767+ input.cursorPosition = pressedPosition;
3768+ }
3769+ }
3770+ }
3771+ }
3772+ ]
3773+
3774+ // brings the state back to default when the component looses focuse
3775+ Connections {
3776+ target: main
3777+ ignoreUnknownSignals: true
3778+ onFocusChanged: {
3779+ Qt.inputMethod.commit()
3780+ state = (main.focus) ? "" : "inactive";
3781+ }
3782+ }
3783+
3784+ // input specific signals
3785+ Connections {
3786+ target: input
3787+ onCursorRectangleChanged: ensureVisible(input.cursorRectangle)
3788+ onTextChanged: {
3789+ textChanged = true;
3790+ if (oldText != input.text) {
3791+ textModified()
3792+ oldText = text
3793+ }
3794+ }
3795+ // make sure we show the OSK
3796+ onActiveFocusChanged: showInputPanel()
3797+ }
3798+
3799+ // inner or outer Flickable controlling
3800+ Connections {
3801+ target: scroller
3802+ // turn scrolling state on
3803+ onFlickStarted: toggleScrollingState(true)
3804+ onMovementStarted: toggleScrollingState(true)
3805+ // reset to default state
3806+ onMovementEnded: toggleScrollingState(false)
3807+
3808+ function toggleScrollingState(turnOn) {
3809+ if (!main.focus) {
3810+ return;
3811+ }
3812+ inputHandler.state = (turnOn) ? "scrolling" : ""
3813+ }
3814+ }
3815+
3816+ // PageUp and PageDown handling
3817+ Keys.onPressed: {
3818+ if (event.key === Qt.Key_PageUp && event.modifiers === Qt.NoModifier) {
3819+ movePage(false);
3820+ } else if (event.key === Qt.Key_PageDown && event.modifiers === Qt.NoModifier) {
3821+ movePage(true);
3822+ }
3823+ }
3824+
3825+ // touch and mous handling
3826+ function handlePressed(event, touch) {
3827+ if (touch) {
3828+ // we do not have longTap or double tap, therefore we need to generate those
3829+ event.touch();
3830+ } else {
3831+ // consume event so it does not get forwarded to the input
3832+ event.accepted = true;
3833+ }
3834+ // remember pressed position as we need it when entering into selection state
3835+ pressedPosition = mousePosition(event);
3836+ }
3837+ function handleReleased(event, touch) {
3838+ if (touch) {
3839+ event.untouch();
3840+ }
3841+ if ((!main.focus && !main.activeFocusOnPress) || suppressReleaseEvent === true) {
3842+ suppressReleaseEvent = false;
3843+ return;
3844+ }
3845+
3846+ activateInput();
3847+ if (state === "" || touch) {
3848+ input.cursorPosition = mousePosition(event);
3849+ }
3850+ moveStarts = moveEnds = -1;
3851+ state = "";
3852+ // check if we get right-click from the frame or the area that has no text
3853+ if (event.button === Qt.RightButton) {
3854+ // open the popover
3855+ inputHandler.pressAndHold(input.cursorPosition, touch);
3856+ } else {
3857+ inputHandler.tap(input.cursorPosition);
3858+ }
3859+ }
3860+ function handleMove(event, touch ) {
3861+ // leave if not focus, not the left button or not in select state
3862+ if (!input.activeFocus || (!touch && event.button !== Qt.LeftButton) || !main.selectByMouse) {
3863+ return;
3864+ }
3865+ selectText(event);
3866+ }
3867+ function handleDblClick(event, touch) {
3868+ if (main.selectByMouse) {
3869+ openContextMenu(event, false, touch);
3870+ // turn selection state temporarily so the selection is not cleared on release
3871+ state = "selection";
3872+ suppressReleaseEvent = true;
3873+ }
3874+ }
3875+
3876+ // Mouse handling
3877+ Mouse.forwardTo: [main]
3878+ Mouse.onPressed: handlePressed(mouse, false)
3879+ Mouse.onReleased: handleReleased(mouse, false)
3880+ Mouse.onPositionChanged: handleMove(mouse, false)
3881+ Mouse.onDoubleClicked: handleDblClick(mouse, false)
3882+
3883+ // right button handling
3884+ MouseArea {
3885+ anchors.fill: parent
3886+ acceptedButtons: Qt.RightButton
3887+ // trigger pressAndHold
3888+ onReleased: openContextMenu(mouse, true, false)
3889+ }
3890+ Keys.onMenuPressed: inputHandler.pressAndHold(input.cursorPosition, false);
3891+
3892+ // touch handling
3893+ touchPoints: TouchPoint {
3894+ id: touchPoint
3895+ function touch() {
3896+ longTap.restart();
3897+ if (!doubleTap.running) {
3898+ doubleTap.restart();
3899+ } else if (doubleTap.tapCount > 0) {
3900+ doubleTap.running = false;
3901+ handleDblClick(touchPoint, true);
3902+ }
3903+ }
3904+ function untouch() {
3905+ longTap.running = false;
3906+ }
3907+ function reset() {
3908+ longTap.running = false;
3909+ doubleTap.running = false;
3910+ }
3911+ }
3912+ Timer {
3913+ id: longTap
3914+ // sync with QQuickMouseArea constant
3915+ interval: 800
3916+ onTriggered: {
3917+ // do not open context menu if the input is not focus
3918+ if (!main.focus) {
3919+ return;
3920+ }
3921+
3922+ // do not open context menu if this is scrolling
3923+ if (touchPoint.startY - touchPoint.y < -units.gu(2))
3924+ return;
3925+
3926+ openContextMenu(touchPoint, false, true);
3927+ suppressReleaseEvent = true;
3928+ }
3929+ }
3930+
3931+ property bool doubleTapInProgress: doubleTap.running
3932+ Timer {
3933+ id: doubleTap
3934+ property int tapCount: 0
3935+ interval: 400
3936+ onRunningChanged: {
3937+ tapCount = running;
3938+ }
3939+ }
3940+ onPressed: handlePressed(touchPoints[0], true)
3941+ onReleased: handleReleased(touchPoints[0], true)
3942+
3943+ property Item cursorPositionCursor: null
3944+ property Item selectionStartCursor: null
3945+ property Item selectionEndCursor: null
3946+
3947+ // cursors to use when text is selected
3948+ Connections {
3949+ target: input
3950+ onSelectedTextChanged: {
3951+ if (selectedText !== "") {
3952+ if (!selectionStartCursor) {
3953+ selectionStartCursor = input.cursorDelegate.createObject(
3954+ input, {
3955+ "positionProperty": "selectionStart",
3956+ "handler": inputHandler,
3957+ }
3958+ );
3959+ moveSelectionCursor(selectionStartCursor);
3960+ selectionEndCursor = input.cursorDelegate.createObject(
3961+ input, {
3962+ "positionProperty": "selectionEnd",
3963+ "handler": inputHandler,
3964+ }
3965+ );
3966+ moveSelectionCursor(selectionEndCursor);
3967+ }
3968+ } else {
3969+ if (selectionStartCursor) {
3970+ selectionStartCursor.destroy();
3971+ selectionStartCursor = null;
3972+ selectionEndCursor.destroy();
3973+ selectionEndCursor = null;
3974+ }
3975+ }
3976+ }
3977+ onSelectionStartChanged: moveSelectionCursor(selectionStartCursor, true);
3978+ onSelectionEndChanged: moveSelectionCursor(selectionEndCursor, true);
3979+
3980+ function moveSelectionCursor(cursor, updateProperty) {
3981+ if (!cursor) {
3982+ return;
3983+ }
3984+ // workaround for https://bugreports.qt-project.org/browse/QTBUG-38704
3985+ // selectedTextChanged signal is not emitted for TextEdit when selectByMouse is false
3986+ if (updateProperty && QuickUtils.className(input) === "QQuickTextEdit") {
3987+ input.selectedTextChanged();
3988+ }
3989+
3990+ var pos = input.positionToRectangle(input[cursor.positionProperty]);
3991+ cursor.x = pos.x;
3992+ cursor.y = pos.y;
3993+ cursor.height = pos.height;
3994+ ensureVisible(pos);
3995+ }
3996+ }
3997+}
3998
3999=== added file 'modules/Ubuntu/Components/1.2/Label.qml'
4000--- modules/Ubuntu/Components/1.2/Label.qml 1970-01-01 00:00:00 +0000
4001+++ modules/Ubuntu/Components/1.2/Label.qml 2015-05-06 10:32:32 +0000
4002@@ -0,0 +1,59 @@
4003+/*
4004+ * Copyright 2012 Canonical Ltd.
4005+ *
4006+ * This program is free software; you can redistribute it and/or modify
4007+ * it under the terms of the GNU Lesser General Public License as published by
4008+ * the Free Software Foundation; version 3.
4009+ *
4010+ * This program is distributed in the hope that it will be useful,
4011+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4012+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4013+ * GNU Lesser General Public License for more details.
4014+ *
4015+ * You should have received a copy of the GNU Lesser General Public License
4016+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4017+ */
4018+
4019+import QtQuick 2.4
4020+
4021+/*!
4022+ \qmltype Label
4023+ \inqmlmodule Ubuntu.Components 1.1
4024+ \ingroup ubuntu
4025+ \brief Text with Ubuntu styling.
4026+
4027+ Example:
4028+ \qml
4029+ Rectangle {
4030+ color: UbuntuColors.coolGrey
4031+ width: units.gu(30)
4032+ height: units.gu(30)
4033+
4034+ Label {
4035+ anchors.centerIn: parent
4036+ text: "Hello, world!"
4037+ fontSize: "large"
4038+ }
4039+ }
4040+ \endqml
4041+*/
4042+Text {
4043+ id: label
4044+
4045+ /*!
4046+ The size of the text. One of the following strings (from smallest to largest):
4047+ \list
4048+ \li "xx-small"
4049+ \li "x-small"
4050+ \li "small"
4051+ \li "medium"
4052+ \li "large"
4053+ \li "x-large"
4054+ \endlist
4055+ Default value is "medium".
4056+ */
4057+ property string fontSize: "medium"
4058+
4059+ font.pixelSize: FontUtils.sizeToPixels(fontSize)
4060+ color: Theme.palette.selected.backgroundText
4061+}
4062
4063=== renamed file 'modules/Ubuntu/Components/MainView.qml' => 'modules/Ubuntu/Components/1.2/MainView.qml'
4064--- modules/Ubuntu/Components/MainView.qml 2015-04-28 06:32:00 +0000
4065+++ modules/Ubuntu/Components/1.2/MainView.qml 2015-05-06 10:32:32 +0000
4066@@ -136,7 +136,7 @@
4067 flickable: internal.activePage ? internal.activePage.flickable : null
4068 pageStack: internal.activePage ? internal.activePage.pageStack : null
4069
4070- PageHeadConfiguration11 {
4071+ PageHeadConfiguration {
4072 id: headerConfig
4073 // for backwards compatibility with deprecated tools property
4074 actions: internal.activePage ?
4075
4076=== added file 'modules/Ubuntu/Components/1.2/MainView12.qml'
4077--- modules/Ubuntu/Components/1.2/MainView12.qml 1970-01-01 00:00:00 +0000
4078+++ modules/Ubuntu/Components/1.2/MainView12.qml 2015-05-06 10:32:32 +0000
4079@@ -0,0 +1,163 @@
4080+/*
4081+ * Copyright 2012-2015 Canonical Ltd.
4082+ *
4083+ * This program is free software; you can redistribute it and/or modify
4084+ * it under the terms of the GNU Lesser General Public License as published by
4085+ * the Free Software Foundation; version 3.
4086+ *
4087+ * This program is distributed in the hope that it will be useful,
4088+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4089+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4090+ * GNU Lesser General Public License for more details.
4091+ *
4092+ * You should have received a copy of the GNU Lesser General Public License
4093+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4094+ */
4095+
4096+import QtQuick 2.4
4097+import Ubuntu.Components 1.2 as Toolkit
4098+import Ubuntu.PerformanceMetrics 1.0
4099+import QtQuick.Window 2.2
4100+
4101+/*! \internal */
4102+// Documentation is in MainView.qdoc
4103+MainViewBase {
4104+ id: mainView
4105+
4106+ property alias automaticOrientation: canvas.automaticOrientation
4107+
4108+ /*!
4109+ \internal
4110+ Use default property to ensure children added do not draw over the header.
4111+ */
4112+ default property alias contentsItem: contents.data
4113+ OrientationHelper {
4114+ id: canvas
4115+
4116+ automaticOrientation: false
4117+ anchorToKeyboard: mainView.anchorToKeyboard
4118+
4119+ // clip the contents so that it does not overlap the header
4120+ Item {
4121+ id: contentsClipper
4122+ anchors {
4123+ left: parent.left
4124+ right: parent.right
4125+ top: headerItem.bottom
4126+ bottom: parent.bottom
4127+ }
4128+ // only clip when necessary
4129+ // ListView headers may be positioned at the top, independent from
4130+ // flickable.contentY, so do not clip depending on activePage.flickable.contentY.
4131+ clip: headerItem.bottomY > 0 && internal.activePage && internal.activePage.flickable
4132+
4133+ Item {
4134+ id: contents
4135+ anchors {
4136+ fill: parent
4137+
4138+ // compensate so that the actual y is always 0
4139+ topMargin: -parent.y
4140+ }
4141+ }
4142+ }
4143+
4144+ /*!
4145+ The header of the MainView. Can be used to obtain the height of the header
4146+ in \l Page to determine the area for the \l Page to fill.
4147+ */
4148+ AppHeader {
4149+ // This objectName is used in the MainView autopilot custom proxy object
4150+ // in order to select the application header.
4151+ objectName: "MainView_Header"
4152+ id: headerItem
4153+ property real bottomY: headerItem.y + headerItem.height
4154+ animate: true
4155+ dividerColor: Qt.darker(mainView.headerColor, 1.1)
4156+ panelColor: Qt.lighter(mainView.headerColor, 1.1)
4157+
4158+ title: internal.activePage ? internal.activePage.title : ""
4159+ flickable: internal.activePage ? internal.activePage.flickable : null
4160+ pageStack: internal.activePage ? internal.activePage.pageStack : null
4161+
4162+ contents: internal.activePage ?
4163+ internal.activePage.__customHeaderContents : null
4164+
4165+ PageHeadConfiguration {
4166+ id: defaultConfig
4167+ // Used when there is no active Page, or a Page 1.0 is used which
4168+ // does not have a PageHeadConfiguration.
4169+ }
4170+ config: internal.activePage && internal.activePage.hasOwnProperty("head") ?
4171+ internal.activePage.head : defaultConfig
4172+
4173+ // 'window' is defined by QML between startup and showing on the screen.
4174+ // There is no signal for when it becomes available and re-declaring it is not safe.
4175+ property bool windowActive: typeof window != 'undefined'
4176+ onWindowActiveChanged: {
4177+ window.title = headerItem.title
4178+ }
4179+
4180+ Connections {
4181+ target: headerItem
4182+ onTitleChanged: {
4183+ if (headerItem.windowActive)
4184+ window.title = headerItem.title
4185+ }
4186+ }
4187+
4188+ // Use of the deprecated toolbar is no longer supported in MainView 1.2.
4189+ useDeprecatedToolbar: false
4190+ }
4191+
4192+ Connections {
4193+ target: Qt.application
4194+ onActiveChanged: {
4195+ if (Qt.application.active) {
4196+ headerItem.animate = false;
4197+ headerItem.show();
4198+ headerItem.animate = true;
4199+ }
4200+ }
4201+ }
4202+ }
4203+
4204+ Object {
4205+ id: internal
4206+
4207+ // Even when using MainView 1.1, we still support Page 1.0.
4208+ // PageBase (=Page 1.0) is the superclass of Page 1.1.
4209+ property PageTreeNode activePage: isPage(mainView.activeLeafNode) ? mainView.activeLeafNode : null
4210+
4211+ function isPage(item) {
4212+ return item && item.hasOwnProperty("__isPageTreeNode") && item.__isPageTreeNode &&
4213+ item.hasOwnProperty("title") && item.hasOwnProperty("tools");
4214+ }
4215+ }
4216+
4217+ __propagated: QtObject {
4218+ /*!
4219+ \internal
4220+ The header that will be propagated to the children in the page tree node.
4221+ It is used by Tabs to bind header's tabsModel.
4222+ */
4223+ property AppHeader header: headerItem
4224+
4225+ /*!
4226+ \internal
4227+ The action manager that has the global context for the MainView's actions,
4228+ and to which a local context can be added for each Page that has actions.actions.
4229+ */
4230+ property var actionManager: mainView.actionManager
4231+
4232+ /*!
4233+ \internal
4234+ Used by PageStack. This property only exists in MainView 1.2 and later.
4235+ */
4236+ readonly property bool animateHeader: headerItem.__styleInstance &&
4237+ headerItem.__styleInstance.hasOwnProperty("animateIn") &&
4238+ headerItem.__styleInstance.hasOwnProperty("animateOut") &&
4239+ headerItem.__styleInstance.hasOwnProperty("animateInFinished") &&
4240+ headerItem.__styleInstance.hasOwnProperty("animateOutFinished")
4241+ }
4242+}
4243
4244=== added file 'modules/Ubuntu/Components/1.2/MainViewBase.qml'
4245--- modules/Ubuntu/Components/1.2/MainViewBase.qml 1970-01-01 00:00:00 +0000
4246+++ modules/Ubuntu/Components/1.2/MainViewBase.qml 2015-05-06 10:32:32 +0000
4247@@ -0,0 +1,83 @@
4248+/*
4249+ * Copyright 2012-2015 Canonical Ltd.
4250+ *
4251+ * This program is free software; you can redistribute it and/or modify
4252+ * it under the terms of the GNU Lesser General Public License as published by
4253+ * the Free Software Foundation; version 3.
4254+ *
4255+ * This program is distributed in the hope that it will be useful,
4256+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4257+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4258+ * GNU Lesser General Public License for more details.
4259+ *
4260+ * You should have received a copy of the GNU Lesser General Public License
4261+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4262+ */
4263+
4264+import QtQuick 2.4
4265+import Ubuntu.Components 1.2 as Toolkit
4266+import Ubuntu.PerformanceMetrics 1.0
4267+import QtQuick.Window 2.0
4268+
4269+/*! \internal */
4270+// Documentation is in MainView.qdoc
4271+PageTreeNode {
4272+ id: mainView
4273+ property string applicationName: ""
4274+ property bool anchorToKeyboard: false
4275+ property alias headerColor: background.headerColor
4276+ property alias backgroundColor: background.backgroundColor
4277+ property alias footerColor: background.footerColor
4278+
4279+ // FIXME: Make sure that the theming is only in the background, and the style
4280+ // should not occlude contents of the MainView. When making changes here, make
4281+ // sure that bug https://bugs.launchpad.net/manhattan/+bug/1124076 does not come back.
4282+ Toolkit.StyledItem {
4283+ id: background
4284+ anchors.fill: parent
4285+ style: Theme.createStyleComponent("MainViewStyle.qml", background)
4286+
4287+ property color headerColor: backgroundColor
4288+ property color backgroundColor: Theme.palette.normal.background
4289+ property color footerColor: backgroundColor
4290+
4291+ /*
4292+ As we don't know the order the property bindings and onXXXChanged signals are evaluated
4293+ we should rely only on one property when changing the theme to avoid intermediate
4294+ theme changes due to properties being evaluated separately.
4295+
4296+ Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
4297+ */
4298+ property string theme: (ColorUtils.luminance(backgroundColor) >= 0.85) ?
4299+ "Ambiance" : "SuruDark"
4300+ onThemeChanged: {
4301+ // only change the theme if the current one is a system one.
4302+ if (theme !== "" && (Theme.name.search("Ubuntu.Components.Themes") >= 0)) {
4303+ Theme.name = "Ubuntu.Components.Themes.%1".arg(theme);
4304+ }
4305+ }
4306+ }
4307+
4308+ active: true
4309+ property alias actions: unityActionManager.actions
4310+ property alias actionManager: unityActionManager
4311+ Toolkit.ActionManager {
4312+ id: unityActionManager
4313+ onQuit: {
4314+ // FIXME Wire this up to the application lifecycle management API instead of quit().
4315+ Qt.quit()
4316+ }
4317+ }
4318+
4319+ onApplicationNameChanged: {
4320+ if (applicationName !== "") {
4321+ i18n.domain = applicationName;
4322+ UbuntuApplication.applicationName = applicationName
4323+ }
4324+ }
4325+
4326+ PerformanceOverlay {
4327+ id: performanceOverlay
4328+ active: false
4329+ }
4330+}
4331
4332=== renamed file 'modules/Ubuntu/Components/Object.qml' => 'modules/Ubuntu/Components/1.2/Object.qml'
4333=== added file 'modules/Ubuntu/Components/1.2/OptionSelector.qml'
4334--- modules/Ubuntu/Components/1.2/OptionSelector.qml 1970-01-01 00:00:00 +0000
4335+++ modules/Ubuntu/Components/1.2/OptionSelector.qml 2015-05-06 10:32:32 +0000
4336@@ -0,0 +1,297 @@
4337+/*
4338+ * Copyright 2012 Canonical Ltd.
4339+ *
4340+ * This program is free software; you can redistribute it and/or modify
4341+ * it under the terms of the GNU Lesser General Public License as published by
4342+ * the Free Software Foundation; version 3.
4343+ *
4344+ * This program is distributed in the hope that it will be useful,
4345+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4346+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4347+ * GNU Lesser General Public License for more details.
4348+ *
4349+ * You should have received a copy of the GNU Lesser General Public License
4350+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4351+ */
4352+
4353+import QtQuick 2.4
4354+import Ubuntu.Components.ListItems 1.0 as ListItem
4355+import Ubuntu.Components 1.2 as Toolkit
4356+
4357+/*!
4358+ \qmltype OptionSelector
4359+ \inqmlmodule Ubuntu.Components 1.1
4360+ \ingroup ubuntu-components
4361+ \brief 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
4362+ 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.
4363+
4364+ Examples:
4365+ \qml
4366+ import Ubuntu.Components 1.2
4367+ Column {
4368+ spacing: units.gu(3)
4369+
4370+ OptionSelector {
4371+ text: i18n.tr("Label")
4372+ model: [i18n.tr("Value 1"),
4373+ i18n.tr("Value 2"),
4374+ i18n.tr("Value 3"),
4375+ i18n.tr("Value 4")]
4376+ }
4377+
4378+ OptionSelector {
4379+ text: i18n.tr("Label")
4380+ expanded: true
4381+ model: [i18n.tr("Value 1"),
4382+ i18n.tr("Value 2"),
4383+ i18n.tr("Value 3"),
4384+ i18n.tr("Value 4")]
4385+ }
4386+
4387+ OptionSelector {
4388+ objectName: "optionselector_multipleselection"
4389+ text: i18n.tr("Multiple Selection")
4390+ expanded: false
4391+ multiSelection: true
4392+ model: [i18n.tr("Value 1"),
4393+ i18n.tr("Value 2"),
4394+ i18n.tr("Value 3"),
4395+ i18n.tr("Value 4")]
4396+ }
4397+
4398+ OptionSelector {
4399+ text: i18n.tr("Label")
4400+ model: customModel
4401+ expanded: true
4402+ colourImage: true
4403+ delegate: selectorDelegate
4404+ }
4405+
4406+ Component {
4407+ id: selectorDelegate
4408+ OptionSelectorDelegate { text: name; subText: description; iconSource: image }
4409+ }
4410+
4411+ ListModel {
4412+ id: customModel
4413+ ListElement { name: "Name 1"; description: "Description 1"; image: "images.png" }
4414+ ListElement { name: "Name 2"; description: "Description 2"; image: "images.png" }
4415+ ListElement { name: "Name 3"; description: "Description 3"; image: "images.png" }
4416+ ListElement { name: "Name 4"; description: "Description 4"; image: "images.png" }
4417+ }
4418+
4419+ OptionSelector {
4420+ text: i18n.tr("Label")
4421+ model: [i18n.tr("Value 1"),
4422+ i18n.tr("Value 2"),
4423+ i18n.tr("Value 3"),
4424+ i18n.tr("Value 4"),
4425+ i18n.tr("Value 5"),
4426+ i18n.tr("Value 6"),
4427+ i18n.tr("Value 7"),
4428+ i18n.tr("Value 8")]
4429+ containerHeight: itemHeight * 4
4430+ }
4431+
4432+ OptionSelector {
4433+ text: i18n.tr("Label")
4434+ expanded: true
4435+ model: [i18n.tr("Value 1"),
4436+ i18n.tr("Value 2"),
4437+ i18n.tr("Value 3"),
4438+ i18n.tr("Value 4"),
4439+ i18n.tr("Value 5"),
4440+ i18n.tr("Value 6"),
4441+ i18n.tr("Value 7"),
4442+ i18n.tr("Value 8")]
4443+ containerHeight: itemHeight * 4
4444+ }
4445+ }
4446+ \endqml
4447+*/
4448+
4449+ListItem.Empty {
4450+ id: optionSelector
4451+
4452+ /*!
4453+ The list of values that will be shown under the label text. This is a model.
4454+ */
4455+ property var model
4456+
4457+ /*!
4458+ Specifies whether the list is always expanded.
4459+ */
4460+ property bool expanded: false
4461+
4462+ /*!
4463+ If the multiple choice selection is enabled the list is always expanded.
4464+ */
4465+ property bool multiSelection: false
4466+
4467+ /*!
4468+ Colours image according to the fieldText colour of the theme, otherwise source colour is maintained.
4469+ */
4470+ property bool colourImage: false
4471+
4472+ /*!
4473+ ListView delegate.
4474+ */
4475+ property Component delegate: Toolkit.OptionSelectorDelegate {}
4476+
4477+ /*!
4478+ Custom height for list container which allows scrolling inside the selector.
4479+ */
4480+ property real containerHeight: {
4481+ /*The reason for this slightly unconventional method of setting the container height
4482+ is due to the fact that if we set it to the selector height by default (which is
4483+ bound to the colum height) then we wouldn't be able to scroll to the end of the bottom
4484+ boundary. The text is also invisible if none is set so this is taken into account too.*/
4485+ var textHeight = text === "" ? 0 : label.height + column.spacing;
4486+ if (parent && parent.height < list.contentHeight) {
4487+ return parent.height - textHeight;
4488+ } else {
4489+ list.contentHeight;
4490+ }
4491+ }
4492+
4493+ /*!
4494+ \qmlproperty int selectedIndex
4495+ The index of the currently selected element in our list.
4496+ */
4497+ property alias selectedIndex: list.currentIndex
4498+
4499+ /*!
4500+ \qmlproperty bool currentlyExpanded
4501+ Is our list currently expanded?
4502+ */
4503+ property alias currentlyExpanded: listContainer.currentlyExpanded
4504+
4505+ /*!
4506+ \qmlproperty real itemHeight
4507+ Height of an individual list item.
4508+ */
4509+ readonly property alias itemHeight: list.itemHeight
4510+
4511+ /*!
4512+ Called when delegate is clicked.
4513+ */
4514+ signal delegateClicked(int index)
4515+
4516+ /*!
4517+ Called when the selector has finished expanding or collapsing.
4518+ */
4519+ signal expansionCompleted()
4520+
4521+ /*!
4522+ \internal
4523+ Trigger the action, passing the current index.
4524+ */
4525+ onDelegateClicked: {
4526+ trigger(index)
4527+ }
4528+
4529+ __height: column.height
4530+ showDivider: false
4531+
4532+ Column {
4533+ id: column
4534+
4535+ spacing: units.gu(2)
4536+ anchors {
4537+ left: parent.left
4538+ right: parent.right
4539+ }
4540+
4541+ Label {
4542+ id : label
4543+
4544+ text: optionSelector.text
4545+ visible: optionSelector.text !== "" ? true : false
4546+ }
4547+
4548+ Toolkit.StyledItem {
4549+ id: listContainer
4550+ objectName: "listContainer"
4551+ activeFocusOnPress: true
4552+
4553+ readonly property url chevron: __styleInstance.chevron
4554+ readonly property url tick: __styleInstance.tick
4555+ readonly property color themeColour: Theme.palette.selected.fieldText
4556+ readonly property alias colourImage: optionSelector.colourImage
4557+ property bool currentlyExpanded: expanded || multiSelection
4558+
4559+ anchors {
4560+ left: parent.left
4561+ right: parent.right
4562+ }
4563+ state: optionSelector.expanded ? "expanded" : "collapsed"
4564+ style: Theme.createStyleComponent("OptionSelectorStyle.qml", listContainer)
4565+ states: [ State {
4566+ name: "expanded"
4567+ when: listContainer.currentlyExpanded
4568+ PropertyChanges {
4569+ target: listContainer
4570+ height: list.contentHeight < containerHeight ? list.contentHeight : containerHeight
4571+ }
4572+ }, State {
4573+ name: "collapsed"
4574+ when: !listContainer.currentlyExpanded
4575+ PropertyChanges {
4576+ target: listContainer
4577+ height: list.itemHeight
4578+ }
4579+ }
4580+ ]
4581+
4582+ transitions: [ Transition {
4583+ SequentialAnimation {
4584+ Toolkit.UbuntuNumberAnimation {
4585+ properties: "height"
4586+ duration: Toolkit.UbuntuAnimation.BriskDuration
4587+ }
4588+ ScriptAction {
4589+ script: {
4590+ if (listContainer.currentlyExpanded) {
4591+ expansionCompleted();
4592+ } else {
4593+ list.positionViewAtIndex(selectedIndex, ListView.Beginning);
4594+ }
4595+ }
4596+ }
4597+ }
4598+ }
4599+ ]
4600+
4601+ ListView {
4602+ id: list
4603+
4604+ property int previousIndex: -1
4605+ readonly property alias expanded: optionSelector.expanded
4606+ readonly property alias multiSelection: optionSelector.multiSelection
4607+ readonly property alias container: listContainer
4608+ property real itemHeight
4609+ signal delegateClicked(int index)
4610+
4611+ onMovementStarted: optionSelector.requestFocus(Qt.MouseFocusReason)
4612+ onFlickStarted: optionSelector.requestFocus(Qt.MouseFocusReason)
4613+ Toolkit.Mouse.onClicked: optionSelector.requestFocus(Qt.MouseFocusReason)
4614+
4615+ onDelegateClicked: optionSelector.delegateClicked(index);
4616+ interactive: listContainer.height !== list.contentHeight && listContainer.currentlyExpanded ? true : false
4617+ clip: true
4618+ currentIndex: 0
4619+ model: optionSelector.model
4620+ anchors.fill: parent
4621+
4622+ delegate: optionSelector.delegate
4623+
4624+ Behavior on contentY {
4625+ Toolkit.UbuntuNumberAnimation {
4626+ properties: "contentY"
4627+ duration: Toolkit.UbuntuAnimation.BriskDuration
4628+ }
4629+ }
4630+ }
4631+ }
4632+ }
4633+}
4634
4635=== added file 'modules/Ubuntu/Components/1.2/OptionSelectorDelegate.qml'
4636--- modules/Ubuntu/Components/1.2/OptionSelectorDelegate.qml 1970-01-01 00:00:00 +0000
4637+++ modules/Ubuntu/Components/1.2/OptionSelectorDelegate.qml 2015-05-06 10:32:32 +0000
4638@@ -0,0 +1,365 @@
4639+/*
4640+ * Copyright 2012 Canonical Ltd.
4641+ *
4642+ * This program is free software; you can redistribute it and/or modify
4643+ * it under the terms of the GNU Lesser General Public License as published by
4644+ * the Free Software Foundation; version 3.
4645+ *
4646+ * This program is distributed in the hope that it will be useful,
4647+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4648+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4649+ * GNU Lesser General Public License for more details.
4650+ *
4651+ * You should have received a copy of the GNU Lesser General Public License
4652+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
4653+ */
4654+
4655+/*!
4656+ \qmltype OptionSelectorDelegate
4657+ \inqmlmodule Ubuntu.Components 1.1
4658+ \ingroup ubuntu-components
4659+ \brief OptionSelector delegate which can display text, subtext and an image from a custom model.
4660+
4661+ Examples:
4662+ \qml
4663+ import Ubuntu.Components 1.2
4664+ Column {
4665+ width: 250
4666+ OptionSelector {
4667+ text: i18n.tr("Label")
4668+ model: customModel
4669+ delegate: OptionSelectorDelegate { text: name; subText: description; iconSource: image }
4670+ }
4671+ ListModel {
4672+ id: customModel
4673+ ListElement { name: "Name 1"; description: "Description 1"; image: "images.png" }
4674+ ListElement { name: "Name 2"; description: "Description 2"; image: "images.png" }
4675+ ListElement { name: "Name 3"; description: "Description 3"; image: "images.png" }
4676+ ListElement { name: "Name 4"; description: "Description 4"; image: "images.png" }
4677+ }
4678+ }
4679+ \endqml
4680+*/
4681+
4682+import QtQuick 2.4
4683+import Ubuntu.Components.ListItems 1.0 as ListItem
4684+import Ubuntu.Components 1.2 as Toolkit
4685+
4686+ListItem.Empty {
4687+ id: option
4688+
4689+ __height: units.gu(5)
4690+
4691+ /*!
4692+ Subtext which appears below the main text.
4693+ */
4694+ property string subText
4695+
4696+ /*!
4697+ \deprecated
4698+
4699+ \b{Use iconName or iconSource instead.}
4700+
4701+ Left icon url.
4702+ */
4703+ property url icon: iconSource
4704+ onIconChanged: if (icon != iconSource) {
4705+ console.warn("WARNING: OptionSelectorDelegate.icon is DEPRECATED. " +
4706+ "Use iconName and iconSource instead.")
4707+ }
4708+
4709+ /*!
4710+ Constrains the size of the image to nothing greater than that of the delegate. Changes fillMode to Image.PreserveAspectFit.
4711+ */
4712+ property bool constrainImage: false
4713+
4714+ /*!
4715+ Whether or not left image is coloured by our theme.
4716+ */
4717+ property bool colourImage: listView.container.colourImage
4718+
4719+ /*!
4720+ Colour of left image.
4721+ */
4722+ property color assetColour: listView.container.themeColour
4723+
4724+ /*!
4725+ OptionSelector's ListView.
4726+ */
4727+ readonly property ListView listView: ListView.view
4728+
4729+ /*!
4730+ Colourising fragment shader.
4731+ */
4732+ readonly property string fragColourShader:
4733+ "varying highp vec2 qt_TexCoord0;
4734+ uniform sampler2D source;
4735+ uniform lowp vec4 colour;
4736+ uniform lowp float qt_Opacity;
4737+
4738+ void main() {
4739+ lowp vec4 sourceColour = texture2D(source, qt_TexCoord0);
4740+ gl_FragColor = colour * sourceColour.a * qt_Opacity;
4741+ }"
4742+
4743+ showDivider: index !== listView.count - 1 ? 1 : 0
4744+ highlightWhenPressed: false
4745+ selected: ListView.isCurrentItem
4746+ anchors {
4747+ left: parent.left
4748+ right: parent.right
4749+ }
4750+ onClicked: {
4751+ if (listView.container.currentlyExpanded) {
4752+ listView.delegateClicked(index);
4753+
4754+ if (!listView.multiSelection) {
4755+ listView.previousIndex = listView.currentIndex;
4756+ listView.currentIndex = index;
4757+ } else {
4758+ selected = !selected;
4759+ }
4760+ }
4761+
4762+ if (!listView.expanded && !listView.multiSelection) {
4763+ listView.container.currentlyExpanded = !listView.container.currentlyExpanded;
4764+ }
4765+ }
4766+
4767+ Component.onCompleted: {
4768+ height = listView.itemHeight = childrenRect.height;
4769+ }
4770+
4771+ //Since we don't want to add states to our divider, we use the exposed alias provided in Empty to access it and alter it's opacity from here.
4772+ states: [ State {
4773+ name: "dividerExpanded"
4774+ when: listView.container.state === "expanded" && index === listView.currentIndex
4775+ PropertyChanges {
4776+ target: option.divider
4777+ opacity: 1
4778+ }
4779+ }, State {
4780+ name: "dividerCollapsed"
4781+ when: listView.container.state === "collapsed" && index === listView.currentIndex
4782+ PropertyChanges {
4783+ target: option.divider
4784+ opacity: 0
4785+ }
4786+ }
4787+ ]
4788+
4789+ //As with our states, we apply the transition with our divider as the target.
4790+ transitions: [ Transition {
4791+ from: "dividerExpanded"
4792+ to: "dividerCollapsed"
4793+ Toolkit.UbuntuNumberAnimation {
4794+ target: option.divider
4795+ properties: "opacity"
4796+ duration: Toolkit.UbuntuAnimation.SlowDuration
4797+ }
4798+ }
4799+ ]
4800+
4801+ resources: [
4802+ Connections {
4803+ target: listView.container
4804+ onCurrentlyExpandedChanged: {
4805+ imageExpansion.stop();
4806+ selectedImageCollapse.stop();
4807+ deselectedImageCollapse.stop();
4808+
4809+ if (listView.container.currentlyExpanded === true) {
4810+ if (!option.selected) {
4811+ optionExpansion.start();
4812+
4813+ //Ensure a source change. This solves a bug which happens occasionaly when source is switched correctly. Probably related to the image.source binding.
4814+ image.source = listView.container.tick
4815+ } else {
4816+ imageExpansion.start();
4817+ }
4818+ } else {
4819+ if (!option.selected) {
4820+ optionCollapse.start();
4821+ } else {
4822+ if (listView.previousIndex !== listView.currentIndex)
4823+ selectedImageCollapse.start();
4824+ else {
4825+ deselectedImageCollapse.start();
4826+ }
4827+ }
4828+ }
4829+ }
4830+ }, SequentialAnimation {
4831+ id: imageExpansion
4832+
4833+ PropertyAnimation {
4834+ target: image
4835+ properties: "opacity"
4836+ from : 1.0
4837+ to: 0.0
4838+ duration: Toolkit.UbuntuAnimation.FastDuration
4839+ }
4840+ PauseAnimation { duration: Toolkit.UbuntuAnimation.BriskDuration - Toolkit.UbuntuAnimation.FastDuration }
4841+ PropertyAction {
4842+ target: image
4843+ property: "source"
4844+ value: listView.container.tick
4845+ }
4846+ PropertyAnimation {
4847+ target: image
4848+ properties: "opacity"
4849+ from : 0.0
4850+ to: 1.0
4851+ duration: Toolkit.UbuntuAnimation.FastDuration
4852+ }
4853+ }, PropertyAnimation {
4854+ id: optionExpansion
4855+
4856+ target: option
4857+ properties: "opacity"
4858+ from : 0.0
4859+ to: 1.0
4860+ duration: Toolkit.UbuntuAnimation.SlowDuration
4861+ }, SequentialAnimation {
4862+ id: deselectedImageCollapse
4863+
4864+ PauseAnimation { duration: Toolkit.UbuntuAnimation.BriskDuration }
4865+ PropertyAnimation {
4866+ target: image
4867+ properties: "opacity"
4868+ from : 1.0
4869+ to: 0.0
4870+ duration: Toolkit.UbuntuAnimation.FastDuration
4871+ }
4872+ PauseAnimation { duration: Toolkit.UbuntuAnimation.FastDuration }
4873+ PropertyAction {
4874+ target: image
4875+ property: "source"
4876+ value: listView.container.chevron
4877+ }
4878+ PropertyAnimation {
4879+ target: image
4880+ properties: "opacity"
4881+ from : 0.0
4882+ to: 1.0
4883+ duration: Toolkit.UbuntuAnimation.FastDuration
4884+ }
4885+ }, SequentialAnimation {
4886+ id: selectedImageCollapse
4887+
4888+ PropertyAnimation {
4889+ target: image
4890+ properties: "opacity"
4891+ from : 0.0
4892+ to: 1.0
4893+ duration: Toolkit.UbuntuAnimation.FastDuration
4894+ }
4895+ PauseAnimation { duration: Toolkit.UbuntuAnimation.BriskDuration - Toolkit.UbuntuAnimation.FastDuration }
4896+ PropertyAnimation {
4897+ target: image
4898+ properties: "opacity"
4899+ from : 1.0
4900+ to: 0.0
4901+ duration: Toolkit.UbuntuAnimation.FastDuration
4902+ }
4903+ PauseAnimation { duration: Toolkit.UbuntuAnimation.FastDuration }
4904+ PropertyAction {
4905+ target: image
4906+ property: "source"
4907+ value: listView.container.chevron
4908+ }
4909+ PropertyAnimation {
4910+ target: image
4911+ properties: "opacity"
4912+ from : 0.0
4913+ to: 1.0
4914+ duration: Toolkit.UbuntuAnimation.FastDuration
4915+ }
4916+ }, PropertyAnimation {
4917+ id: optionCollapse
4918+ target: option
4919+ properties: "opacity"
4920+ from : 1.0
4921+ to: 0.0
4922+ duration: Toolkit.UbuntuAnimation.SlowDuration
4923+ }
4924+ ]
4925+
4926+ Row {
4927+ spacing: units.gu(1)
4928+
4929+ anchors {
4930+ left: parent.left
4931+ leftMargin: units.gu(2)
4932+ verticalCenter: parent.verticalCenter
4933+ }
4934+
4935+ Image {
4936+ id: leftIcon
4937+ objectName: "icon"
4938+
4939+ height: constrainImage ? option.height : sourceSize.height
4940+ source: option.iconSource
4941+ fillMode: constrainImage ? Image.PreserveAspectFit : Image.Stretch
4942+
4943+ ShaderEffect {
4944+ property color colour: assetColour
4945+ property Image source: parent
4946+
4947+ width: source.width
4948+ height: source.height
4949+ visible: colourImage
4950+
4951+ fragmentShader: fragColourShader
4952+ }
4953+ }
4954+
4955+ Column {
4956+ anchors {
4957+ verticalCenter: parent.verticalCenter
4958+ }
4959+ Label {
4960+ text: option.text === "" ? modelData : option.text
4961+ }
4962+ Label {
4963+ text: option.subText
4964+ visible: option.subText !== "" ? true : false
4965+ fontSize: "small"
4966+ }
4967+ }
4968+ }
4969+
4970+ Image {
4971+ id: image
4972+
4973+ width: units.gu(2)
4974+ height: units.gu(2)
4975+ source: listView.expanded || listView.multiSelection ? listView.container.tick : listView.container.chevron
4976+ opacity: option.selected ? 1.0 : 0.0
4977+ anchors {
4978+ right: parent.right
4979+ rightMargin: units.gu(2)
4980+ verticalCenter: parent.verticalCenter
4981+ }
4982+
4983+ //Our behaviour is only enabled for our expanded list due to flickering bugs in relation to all this other animations running on the expanding version.
4984+ Behavior on opacity {
4985+ enabled: listView.expanded
4986+
4987+ Toolkit.UbuntuNumberAnimation {
4988+ properties: "opacity"
4989+ duration: Toolkit.UbuntuAnimation.FastDuration
4990+ }
4991+ }
4992+
4993+ ShaderEffect {
4994+ property color colour: assetColour
4995+ property Image source: parent
4996+
4997+ width: source.width
4998+ height: source.height
4999+
5000+ fragmentShader: fragColourShader
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches