Merge lp:~elopio/ubuntu-ui-toolkit/fix1314390-click_element_on_unity into lp:ubuntu-ui-toolkit

Proposed by Leo Arias
Status: Superseded
Proposed branch: lp:~elopio/ubuntu-ui-toolkit/fix1314390-click_element_on_unity
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 19667 lines (+8150/-3744)
442 files modified
CHANGES (+23/-9)
components.api (+108/-98)
debian/control (+5/-1)
debian/rules (+2/-2)
documentation/overview.qdoc (+15/-10)
documentation/resolution-independence.qdoc (+3/-3)
documentation/snippets/layouts/SimpleLayout.qml (+2/-2)
documentation/snippets/layouts/layout1.qml (+2/-2)
documentation/snippets/layouts/layout2.qml (+2/-2)
documentation/snippets/layouts/layout3.qml (+2/-2)
documentation/snippets/layouts/layout6.qml (+2/-2)
documentation/snippets/layouts/layout7.qml (+2/-2)
documentation/snippets/statesaver/ColorChanger.qml (+1/-1)
documentation/snippets/statesaver/MultiplePropertySaver.qml (+1/-1)
documentation/snippets/statesaver/PropertyGroupSaver.qml (+1/-1)
documentation/snippets/statesaver/PropertyGroupSaver2.qml (+1/-1)
documentation/ubuntu-components-listitems.qdoc (+1/-1)
documentation/ubuntu-components-pickers.qdoc (+1/-1)
documentation/ubuntu-components-popups.qdoc (+1/-1)
documentation/ubuntu-components.qdoc (+1/-1)
documentation/ubuntu-layouts.qdoc (+6/-1)
examples/calculator/calculator.qml (+2/-2)
examples/calculator/components/DefaultLayout.qml (+2/-2)
examples/calculator/components/Functions.qml (+2/-2)
examples/jokes/jokes.qml (+1/-1)
examples/locale/locale.qml (+2/-2)
examples/ubuntu-ui-toolkit-gallery/Buttons.qml (+65/-1)
examples/ubuntu-ui-toolkit-gallery/Label.qml (+1/-1)
examples/unit-converter/unit-converter.qml (+1/-1)
manual-tests/button.qml (+1/-1)
modules/Ubuntu/Components/AbstractButton.qml (+1/-1)
modules/Ubuntu/Components/Action.qml (+1/-1)
modules/Ubuntu/Components/ActionItem.qml (+10/-1)
modules/Ubuntu/Components/ActionList.qml (+1/-1)
modules/Ubuntu/Components/ActivityIndicator.qml (+1/-1)
modules/Ubuntu/Components/AnimatedItem.qml (+1/-1)
modules/Ubuntu/Components/Button.qml (+6/-1)
modules/Ubuntu/Components/CheckBox.qml (+1/-1)
modules/Ubuntu/Components/ComboButton.qml (+366/-0)
modules/Ubuntu/Components/CrossFadeImage.qml (+2/-2)
modules/Ubuntu/Components/Header.qml (+44/-12)
modules/Ubuntu/Components/Icon.qml (+1/-1)
modules/Ubuntu/Components/InputHandler.qml (+317/-0)
modules/Ubuntu/Components/Label.qml (+1/-1)
modules/Ubuntu/Components/ListItems/Base.qml (+2/-28)
modules/Ubuntu/Components/ListItems/Caption.qml (+3/-3)
modules/Ubuntu/Components/ListItems/Divider.qml (+1/-1)
modules/Ubuntu/Components/ListItems/Empty.qml (+4/-4)
modules/Ubuntu/Components/ListItems/Expandable.qml (+4/-4)
modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml (+4/-4)
modules/Ubuntu/Components/ListItems/Header.qml (+2/-2)
modules/Ubuntu/Components/ListItems/IconVisual.qml (+1/-1)
modules/Ubuntu/Components/ListItems/ItemSelector.qml (+3/-3)
modules/Ubuntu/Components/ListItems/LabelVisual.qml (+1/-1)
modules/Ubuntu/Components/ListItems/MultiValue.qml (+2/-2)
modules/Ubuntu/Components/ListItems/ProgressionVisual.qml (+1/-1)
modules/Ubuntu/Components/ListItems/SingleControl.qml (+5/-5)
modules/Ubuntu/Components/ListItems/SingleValue.qml (+2/-2)
modules/Ubuntu/Components/ListItems/Standard.qml (+4/-30)
modules/Ubuntu/Components/ListItems/Subtitled.qml (+4/-10)
modules/Ubuntu/Components/ListItems/ThinDivider.qml (+2/-2)
modules/Ubuntu/Components/ListItems/ValueSelector.qml (+3/-29)
modules/Ubuntu/Components/ListItems/qmldir (+18/-0)
modules/Ubuntu/Components/MainView.qml (+18/-13)
modules/Ubuntu/Components/Object.qml (+1/-1)
modules/Ubuntu/Components/OptionSelector.qml (+3/-3)
modules/Ubuntu/Components/OptionSelectorDelegate.qml (+5/-35)
modules/Ubuntu/Components/OrientationHelper.qml (+4/-4)
modules/Ubuntu/Components/Page.qml (+11/-4)
modules/Ubuntu/Components/PageStack.qml (+3/-3)
modules/Ubuntu/Components/PageTreeNode.qml (+1/-1)
modules/Ubuntu/Components/PageWrapper.qml (+1/-1)
modules/Ubuntu/Components/Panel.qml (+8/-7)
modules/Ubuntu/Components/Pickers/DatePicker.qml (+10/-10)
modules/Ubuntu/Components/Pickers/DayModel.qml (+1/-1)
modules/Ubuntu/Components/Pickers/Dialer.qml (+3/-3)
modules/Ubuntu/Components/Pickers/DialerHand.qml (+2/-2)
modules/Ubuntu/Components/Pickers/DialerHandGroup.qml (+1/-1)
modules/Ubuntu/Components/Pickers/HoursModel.qml (+1/-1)
modules/Ubuntu/Components/Pickers/MinutesModel.qml (+1/-1)
modules/Ubuntu/Components/Pickers/MonthModel.qml (+1/-1)
modules/Ubuntu/Components/Pickers/Picker.qml (+4/-4)
modules/Ubuntu/Components/Pickers/PickerDelegate.qml (+2/-2)
modules/Ubuntu/Components/Pickers/PickerPanel.qml (+5/-5)
modules/Ubuntu/Components/Pickers/PickerRow.qml (+1/-1)
modules/Ubuntu/Components/Pickers/SecondsModel.qml (+1/-1)
modules/Ubuntu/Components/Pickers/YearModel.qml (+1/-1)
modules/Ubuntu/Components/Pickers/qmldir (+7/-0)
modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml (+3/-3)
modules/Ubuntu/Components/Popups/ComposerSheet.qml (+4/-4)
modules/Ubuntu/Components/Popups/DefaultSheet.qml (+4/-4)
modules/Ubuntu/Components/Popups/Dialog.qml (+4/-4)
modules/Ubuntu/Components/Popups/Popover.qml (+6/-5)
modules/Ubuntu/Components/Popups/PopupBase.qml (+3/-2)
modules/Ubuntu/Components/Popups/SheetBase.qml (+2/-2)
modules/Ubuntu/Components/Popups/qmldir (+11/-0)
modules/Ubuntu/Components/ProgressBar.qml (+1/-1)
modules/Ubuntu/Components/Scrollbar.qml (+1/-1)
modules/Ubuntu/Components/Slider.qml (+1/-1)
modules/Ubuntu/Components/StyledItem.qml (+1/-1)
modules/Ubuntu/Components/Switch.qml (+1/-1)
modules/Ubuntu/Components/Tab.qml (+1/-1)
modules/Ubuntu/Components/TabBar.qml (+26/-6)
modules/Ubuntu/Components/Tabs.qml (+25/-19)
modules/Ubuntu/Components/TextArea.qml (+47/-131)
modules/Ubuntu/Components/TextCursor.qml (+1/-1)
modules/Ubuntu/Components/TextField.qml (+85/-136)
modules/Ubuntu/Components/TextInputPopover.qml (+2/-2)
modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml (+2/-1)
modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml (+30/-12)
modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml (+243/-0)
modules/Ubuntu/Components/Themes/Ambiance/DatePickerStyle.qml (+2/-2)
modules/Ubuntu/Components/Themes/Ambiance/DialerHandStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/DialerStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/DialogForegroundStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml (+24/-2)
modules/Ubuntu/Components/Themes/Ambiance/ListItemOptionSelectorStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/MainViewStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/NewHeaderStyle.qml (+168/-0)
modules/Ubuntu/Components/Themes/Ambiance/OptionSelectorStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/PickerDelegateStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/PickerStyle.qml (+2/-2)
modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/ProgressionVisualStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/SelectionCursorStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/SheetForegroundStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+2/-2)
modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml (+6/-6)
modules/Ubuntu/Components/Themes/Ambiance/ToolbarButtonStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml (+1/-1)
modules/Ubuntu/Components/Themes/Ambiance/qmldir (+19/-0)
modules/Ubuntu/Components/Toolbar.qml (+1/-1)
modules/Ubuntu/Components/ToolbarButton.qml (+2/-2)
modules/Ubuntu/Components/ToolbarItems.qml (+4/-4)
modules/Ubuntu/Components/UbuntuListView.qml (+4/-4)
modules/Ubuntu/Components/UbuntuNumberAnimation.qml (+5/-5)
modules/Ubuntu/Components/UbuntuShape.qml (+5/-5)
modules/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp (+61/-24)
modules/Ubuntu/Components/plugin/adapters/alarmsadapter_p.h (+2/-0)
modules/Ubuntu/Components/plugin/alarmmanager_p.h (+10/-0)
modules/Ubuntu/Components/plugin/i18n.cpp (+1/-1)
modules/Ubuntu/Components/plugin/inversemouseareatype.cpp (+4/-4)
modules/Ubuntu/Components/plugin/plugin.cpp (+31/-26)
modules/Ubuntu/Components/plugin/plugin.h (+3/-0)
modules/Ubuntu/Components/plugin/qquickclipboard.cpp (+1/-1)
modules/Ubuntu/Components/plugin/qquickmimedata.cpp (+1/-1)
modules/Ubuntu/Components/plugin/quickutils.cpp (+5/-1)
modules/Ubuntu/Components/plugin/ucalarm.cpp (+35/-29)
modules/Ubuntu/Components/plugin/ucalarm_p.h (+1/-1)
modules/Ubuntu/Components/plugin/ucalarmmodel.cpp (+3/-3)
modules/Ubuntu/Components/plugin/ucapplication.cpp (+1/-1)
modules/Ubuntu/Components/plugin/ucargument.cpp (+1/-1)
modules/Ubuntu/Components/plugin/ucarguments.cpp (+1/-1)
modules/Ubuntu/Components/plugin/ucfontutils.cpp (+3/-3)
modules/Ubuntu/Components/plugin/ucmouse.h (+52/-11)
modules/Ubuntu/Components/plugin/ucmousefilters.cpp (+228/-92)
modules/Ubuntu/Components/plugin/ucstatesaver.cpp (+2/-2)
modules/Ubuntu/Components/plugin/uctheme.cpp (+3/-3)
modules/Ubuntu/Components/plugin/ucubuntuanimation.cpp (+1/-1)
modules/Ubuntu/Components/plugin/ucunits.cpp (+2/-2)
modules/Ubuntu/Components/plugin/ucurihandler.cpp (+1/-1)
modules/Ubuntu/Components/qmldir (+45/-0)
modules/Ubuntu/Layouts/plugin/ulconditionallayout.cpp (+1/-1)
modules/Ubuntu/Layouts/plugin/ulitemlayout.cpp (+1/-1)
modules/Ubuntu/Layouts/plugin/ullayouts.cpp (+1/-1)
modules/Ubuntu/Layouts/plugin/ulplugin.cpp (+9/-3)
modules/Ubuntu/Layouts/plugin/ulplugin.h (+2/-0)
modules/Ubuntu/PerformanceMetrics/BarGraph.qml (+2/-2)
modules/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml (+1/-1)
modules/Ubuntu/PerformanceMetrics/plugin/upmplugin.cpp (+10/-5)
modules/Ubuntu/PerformanceMetrics/plugin/upmplugin.h (+2/-0)
modules/Ubuntu/PerformanceMetrics/qmldir (+3/-0)
modules/Ubuntu/Test/UbuntuTestCase.qml (+71/-2)
modules/Ubuntu/Test/deployment.pri (+6/-1)
modules/Ubuntu/Test/plugin/uctestcase.cpp (+12/-0)
modules/Ubuntu/Test/plugin/uctestcase.h (+1/-1)
modules/Ubuntu/Test/qmldir (+4/-0)
run_tests.sh (+4/-2)
tests/autopilot/ubuntuuitoolkit/__init__.py (+0/-17)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/__init__.py (+46/-781)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_checkbox.py (+65/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py (+69/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_flickable.py (+154/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_header.py (+123/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_mainview.py (+182/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_optionselector.py (+104/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_qquicklistview.py (+65/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_tabbar.py (+68/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_tabs.py (+41/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_textfield.py (+88/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_toolbar.py (+106/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/listitems.py (+114/-0)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py (+82/-0)
tests/autopilot/ubuntuuitoolkit/emulators.py (+89/-0)
tests/autopilot/ubuntuuitoolkit/fixture_setup.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/__init__.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_checkbox.py (+136/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_common.py (+68/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_flickable.py (+52/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+41/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_listitems.py (+170/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_main_view.py (+143/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_optionselector.py (+194/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py (+172/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_qquicklistview.py (+193/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_tabs.py (+159/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_textfield.py (+93/-0)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_toolbar.py (+121/-0)
tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py (+82/-1066)
tests/qmlapicheck.py (+17/-2)
tests/qmlapicheck.sh (+6/-10)
tests/resources/alarm/AlarmDays.qml (+3/-3)
tests/resources/alarm/Alarms.qml (+9/-5)
tests/resources/buttons/ComboTest.qml (+143/-0)
tests/resources/filters/MouseFilters.qml (+1/-1)
tests/resources/inputs/TextInputs.qml (+85/-0)
tests/resources/navigation/MyCustomPage.qml (+1/-1)
tests/resources/navigation/PageStack.qml (+3/-2)
tests/resources/navigation/RepeaterTabs.qml (+1/-1)
tests/resources/navigation/SimpleTabs.qml (+3/-1)
tests/resources/navigation/StackWithTabs.qml (+2/-1)
tests/resources/navigation/TabView.qml (+5/-12)
tests/resources/navigation/Tabs.qml (+6/-4)
tests/resources/pickers/DatePickerTest.qml (+2/-2)
tests/resources/pickers/PanelTest.qml (+2/-2)
tests/resources/pickers/PickerTest.qml (+2/-2)
tests/resources/popover/PopoverTest.qml (+3/-3)
tests/resources/statesaver/StateSaver.qml (+1/-1)
tests/resources/toolbar/LockedToolbar.qml (+1/-1)
tests/resources/toolbar/oldToolbarWithActions.qml (+1/-1)
tests/resources/toolbar/panels.qml (+1/-1)
tests/resources/toolbar/toolbar.qml (+1/-1)
tests/resources/urihandler/UriHandlerTest.qml (+1/-1)
tests/unit/runtest.sh (+1/-2)
tests/unit/tst_alarms/tst_alarms.cpp (+204/-21)
tests/unit/tst_components/tst_CrossFadeImage.qml (+1/-1)
tests/unit/tst_components/tst_abstractbutton.qml (+1/-1)
tests/unit/tst_components/tst_action.qml (+1/-1)
tests/unit/tst_components/tst_actionitem.qml (+1/-1)
tests/unit/tst_components/tst_activityindicator.qml (+1/-1)
tests/unit/tst_components/tst_button.qml (+5/-1)
tests/unit/tst_components/tst_checkbox.qml (+1/-1)
tests/unit/tst_components/tst_clipboard.qml (+1/-1)
tests/unit/tst_components/tst_dateutils.qml (+2/-2)
tests/unit/tst_components/tst_fontutils.qml (+1/-1)
tests/unit/tst_components/tst_label.qml (+1/-1)
tests/unit/tst_components/tst_listitems_base.qml (+1/-1)
tests/unit/tst_components/tst_listitems_caption.qml (+1/-1)
tests/unit/tst_components/tst_listitems_divider.qml (+1/-1)
tests/unit/tst_components/tst_listitems_empty.qml (+1/-1)
tests/unit/tst_components/tst_listitems_header.qml (+1/-1)
tests/unit/tst_components/tst_listitems_multivalue.qml (+1/-1)
tests/unit/tst_components/tst_listitems_singlecontrol.qml (+2/-2)
tests/unit/tst_components/tst_listitems_singlevalue.qml (+1/-1)
tests/unit/tst_components/tst_listitems_subtitled.qml (+1/-1)
tests/unit/tst_components/tst_listitems_thindivider.qml (+1/-1)
tests/unit/tst_components/tst_listitems_valueselector.qml (+1/-1)
tests/unit/tst_components/tst_mainview.qml (+1/-1)
tests/unit/tst_components/tst_page.qml (+1/-1)
tests/unit/tst_components/tst_pagestack.qml (+4/-4)
tests/unit/tst_components/tst_plugin_ucunits.qml (+1/-1)
tests/unit/tst_components/tst_popups_actionselectionpopover.qml (+2/-2)
tests/unit/tst_components/tst_popups_composersheet.qml (+2/-2)
tests/unit/tst_components/tst_popups_defaultsheet.qml (+2/-2)
tests/unit/tst_components/tst_popups_dialog.qml (+2/-2)
tests/unit/tst_components/tst_popups_popover.qml (+2/-2)
tests/unit/tst_components/tst_progressbar.qml (+1/-1)
tests/unit/tst_components/tst_quickutils.qml (+2/-2)
tests/unit/tst_components/tst_scrollbar.qml (+1/-1)
tests/unit/tst_components/tst_slider.qml (+1/-1)
tests/unit/tst_components/tst_switch.qml (+1/-1)
tests/unit/tst_components/tst_tab.qml (+1/-1)
tests/unit/tst_components/tst_toolbaritems.qml (+1/-1)
tests/unit/tst_components/tst_ubuntushape.qml (+1/-1)
tests/unit/tst_i18n/src/LocalizedApp.qml (+1/-1)
tests/unit/tst_mainview/AppName.qml (+1/-1)
tests/unit/tst_mainview/LocalStorage.qml (+1/-1)
tests/unit/tst_mainview/PageStack.qml (+1/-1)
tests/unit/tst_mainview/PageTitle.qml (+1/-1)
tests/unit/tst_mainview/TabsTitle.qml (+1/-1)
tests/unit/tst_mainview/tst_mainview.cpp (+3/-6)
tests/unit/tst_page/AnchorToPage.qml (+1/-1)
tests/unit/tst_page/tst_page.cpp (+3/-39)
tests/unit/tst_performance/ButtonGrid.qml (+1/-1)
tests/unit/tst_performance/ButtonStyleGrid.qml (+1/-1)
tests/unit/tst_performance/CheckBoxGrid.qml (+1/-1)
tests/unit/tst_performance/CheckBoxStyleGrid.qml (+1/-1)
tests/unit/tst_performance/LabelGrid.qml (+1/-1)
tests/unit/tst_performance/PairOfUbuntuShapeGrid.qml (+1/-1)
tests/unit/tst_performance/SliderGrid.qml (+1/-1)
tests/unit/tst_performance/SliderStyleGrid.qml (+1/-1)
tests/unit/tst_performance/SwitchGrid.qml (+1/-1)
tests/unit/tst_performance/SwitchStyleGrid.qml (+1/-1)
tests/unit/tst_performance/TextWithImport.qml (+1/-1)
tests/unit/tst_performance/TextWithImportPopups.qml (+1/-1)
tests/unit/tst_performance/UbuntuShapeGrid.qml (+1/-1)
tests/unit/tst_qmltemplate/tst_example_benchmark.qml (+1/-1)
tests/unit/tst_qmltemplate/tst_example_checks.qml (+1/-1)
tests/unit/tst_qmltemplate/tst_example_keyboard.qml (+1/-1)
tests/unit/tst_qmltemplate/tst_example_mouse.qml (+1/-1)
tests/unit/tst_qmltemplate/tst_example_property.qml (+1/-1)
tests/unit/tst_qmltemplate/tst_example_signals.qml (+2/-2)
tests/unit/tst_theme/tst_popoverforegroundstyle.qml (+2/-2)
tests/unit/tst_ubuntu_shape/no_distortion.qml (+1/-1)
tests/unit_x11/tst_components/tst_alarms.qml (+2/-2)
tests/unit_x11/tst_components/tst_combobutton.qml (+244/-0)
tests/unit_x11/tst_components/tst_datepicker.qml (+3/-3)
tests/unit_x11/tst_components/tst_dialer.qml (+3/-3)
tests/unit_x11/tst_components/tst_expandable.qml (+3/-3)
tests/unit_x11/tst_components/tst_expandablescolumn.qml (+3/-3)
tests/unit_x11/tst_components/tst_header.qml (+1/-1)
tests/unit_x11/tst_components/tst_hide_chrome.qml (+2/-2)
tests/unit_x11/tst_components/tst_listitems_itemselector.qml (+3/-3)
tests/unit_x11/tst_components/tst_listitems_standard.qml (+2/-2)
tests/unit_x11/tst_components/tst_optionselector.qml (+2/-2)
tests/unit_x11/tst_components/tst_panel.qml (+1/-1)
tests/unit_x11/tst_components/tst_picker.qml (+3/-3)
tests/unit_x11/tst_components/tst_pickerpanel.qml (+3/-3)
tests/unit_x11/tst_components/tst_popover.qml (+83/-0)
tests/unit_x11/tst_components/tst_tabbar.qml (+8/-1)
tests/unit_x11/tst_components/tst_tabs.qml (+10/-10)
tests/unit_x11/tst_components/tst_textarea.qml (+358/-63)
tests/unit_x11/tst_components/tst_textarea_in_flickable.qml (+65/-39)
tests/unit_x11/tst_components/tst_textfield.qml (+354/-64)
tests/unit_x11/tst_components/tst_toolbar.qml (+1/-1)
tests/unit_x11/tst_components/tst_ubuntulistview.qml (+3/-3)
tests/unit_x11/tst_inversemousearea/Defaults.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaClip.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaDoNotPropagateEvents.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaInFlickable.qml (+2/-2)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaInListView.qml (+2/-2)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaInPage.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaInWindow.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaNormalEventStack.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaOnTop.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaOnTopNoAccept.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaParentClipped.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaPropagateEvents.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaSensingArea.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaSignals.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/InverseMouseAreaTopmostItem.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/OverlappedMouseArea.qml (+1/-1)
tests/unit_x11/tst_inversemousearea/SensingAreaError.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorAll.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorBottom.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorCenterWithOffset.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorCenteredInDefault.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorFilledMargins.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorFilledReparenting.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorFilledSeparateMargins.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorHorizontalCenter.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorHorizontalCenterOffset.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorLeft.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorRight.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorTop.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorVerticalCenter.qml (+1/-1)
tests/unit_x11/tst_layouts/AnchorVerticalCenterOffset.qml (+1/-1)
tests/unit_x11/tst_layouts/CurrentLayoutChange.qml (+1/-1)
tests/unit_x11/tst_layouts/DefaultLayout.qml (+2/-2)
tests/unit_x11/tst_layouts/DialerCrash.qml (+3/-3)
tests/unit_x11/tst_layouts/ExcludedItemDeleted.qml (+2/-2)
tests/unit_x11/tst_layouts/ExternalLayouts.qml (+2/-2)
tests/unit_x11/tst_layouts/ItemInstanceAsProperty.qml (+2/-2)
tests/unit_x11/tst_layouts/LaidOutItemsOutsideOfLayout.qml (+1/-1)
tests/unit_x11/tst_layouts/LargeLayout.qml (+2/-2)
tests/unit_x11/tst_layouts/MediumLayout.qml (+2/-2)
tests/unit_x11/tst_layouts/NestedLayouts.qml (+2/-2)
tests/unit_x11/tst_layouts/NoLayouts.qml (+2/-2)
tests/unit_x11/tst_layouts/OverlaidInItemLayout.qml (+1/-1)
tests/unit_x11/tst_layouts/OverlappingCondition.qml (+2/-2)
tests/unit_x11/tst_layouts/PositioningOnLayoutChange.qml (+1/-1)
tests/unit_x11/tst_layouts/ResizingContainers.qml (+2/-2)
tests/unit_x11/tst_layouts/SimpleLayouts.qml (+2/-2)
tests/unit_x11/tst_layouts/SizedDefaultLayout.qml (+2/-2)
tests/unit_x11/tst_layouts/SmallLayout.qml (+2/-2)
tests/unit_x11/tst_mousefilters/AttachedToItem.qml (+1/-1)
tests/unit_x11/tst_mousefilters/DoubleClicked.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterFlickable.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterFlickableAfter.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterInverseTextInput.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterInverseTextInputAfter.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterInverseTextInputOSKExcluded.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterInverseTextInputTolerance.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterTextInput.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterTextInputAfter.qml (+1/-1)
tests/unit_x11/tst_mousefilters/FilterTextInputTolerance.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardComposedEvents.qml (+55/-0)
tests/unit_x11/tst_mousefilters/ForwardDblClickToTransparentMouseArea.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardEventChained.qml (+51/-0)
tests/unit_x11/tst_mousefilters/ForwardToInverseMouseArea.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardToMouseArea.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardToTransparentMouseArea.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardedEventsStoppedInForwards.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardedEventsToTargetBlocked.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardedMouseEvents.qml (+1/-1)
tests/unit_x11/tst_mousefilters/ForwardedMouseEventsStopped.qml (+1/-1)
tests/unit_x11/tst_mousefilters/Hover.qml (+1/-1)
tests/unit_x11/tst_mousefilters/HoverEvent.qml (+38/-0)
tests/unit_x11/tst_mousefilters/InverseAttachedToItem.qml (+1/-1)
tests/unit_x11/tst_mousefilters/InverseHover.qml (+1/-1)
tests/unit_x11/tst_mousefilters/InverseMouseFilterAttachedToNonItem.qml (+1/-1)
tests/unit_x11/tst_mousefilters/MouseFilterAttachedToNonItem.qml (+1/-1)
tests/unit_x11/tst_mousefilters/PressAndHoldAcceptedEatsClick.qml (+1/-1)
tests/unit_x11/tst_mousefilters/PressAndHoldAndClicked.qml (+1/-1)
tests/unit_x11/tst_mousefilters/tst_mousefilters.pro (+4/-1)
tests/unit_x11/tst_mousefilters/tst_mousefilterstest.cpp (+396/-201)
tests/unit_x11/tst_orientation/Defaults.qml (+1/-1)
tests/unit_x11/tst_orientation/ManualAngle.qml (+1/-1)
tests/unit_x11/tst_orientation/tst_orientation.cpp (+9/-47)
tests/unit_x11/tst_recreateview/SimpleApp.qml (+1/-1)
tests/unit_x11/tst_statesaver/ComponentsWithStateSavers.qml (+1/-1)
tests/unit_x11/tst_statesaver/ComponentsWithStateSaversNoId.qml (+1/-1)
tests/unit_x11/tst_statesaver/CustomControl.qml (+1/-1)
tests/unit_x11/tst_statesaver/DisabledStateSaver.qml (+1/-1)
tests/unit_x11/tst_statesaver/Dynamic.qml (+1/-1)
tests/unit_x11/tst_statesaver/FirstComponent.qml (+1/-1)
tests/unit_x11/tst_statesaver/GridViewItems.qml (+1/-1)
tests/unit_x11/tst_statesaver/InvalidGroupProperty.qml (+1/-1)
tests/unit_x11/tst_statesaver/InvalidUID.qml (+1/-1)
tests/unit_x11/tst_statesaver/ListViewItems.qml (+1/-1)
tests/unit_x11/tst_statesaver/NestedDynamics.qml (+1/-1)
tests/unit_x11/tst_statesaver/NormalAppClose.qml (+1/-1)
tests/unit_x11/tst_statesaver/RepeaterStates.qml (+1/-1)
tests/unit_x11/tst_statesaver/SameIdsInDifferentComponents.qml (+1/-1)
tests/unit_x11/tst_statesaver/SaveArrays.qml (+1/-1)
tests/unit_x11/tst_statesaver/SaveObject.qml (+1/-1)
tests/unit_x11/tst_statesaver/SavePropertyGroups.qml (+1/-1)
tests/unit_x11/tst_statesaver/SaveSupportedTypes.qml (+1/-1)
tests/unit_x11/tst_statesaver/SecondComponent.qml (+1/-1)
tests/unit_x11/tst_statesaver/SimpleApp.qml (+1/-1)
tests/unit_x11/tst_statesaver/TwoDynamics.qml (+1/-1)
tests/unit_x11/tst_statesaver/ValidGroupProperty.qml (+1/-1)
tests/unit_x11/tst_statesaver/ValidUID.qml (+1/-1)
tests/unit_x11/tst_statesaver/tst_statesaver.cpp (+29/-37)
tests/unit_x11/tst_test/tst_ubuntutestcase.qml (+104/-16)
tests/unit_x11/tst_theme_engine/tst_theme_enginetest.cpp (+3/-0)
To merge this branch: bzr merge lp:~elopio/ubuntu-ui-toolkit/fix1314390-click_element_on_unity
Reviewer Review Type Date Requested Status
Ubuntu SDK team Pending
Review via email: mp+217692@code.launchpad.net

This proposal has been superseded by a proposal from 2014-04-29.

Commit message

On the autopilot helpers, find the top container starting from the flickable.

To post a comment you must log in.
1029. By Leo Arias

Typo.

1030. By Leo Arias

Fixed python2, made compatible with python3. Thanks to thomi.

1031. By Leo Arias

Added a comment about the pending clean up of the test.

1032. By Leo Arias

Make the test work in utopic and trusty.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CHANGES'
--- CHANGES 2014-02-24 22:03:55 +0000
+++ CHANGES 2014-04-29 22:09:46 +0000
@@ -4,11 +4,22 @@
4.. contents:: List of Releases4.. contents:: List of Releases
5 :depth: 15 :depth: 1
66
7UNRELEASED7Ubuntu.Components 1.1
8##########8#####################
99
10API Changes10API Changes
11***********11***********
12
13Compatibility Breaks
14********************
15
16
17Ubuntu.Components 1.0
18#####################
19
20API Changes
21***********
22* ADDED IN: all modules exported as 0.1 as well as 1.0 version
12* ADDED IN: PickerDelegate: readonly property Picker picker23* ADDED IN: PickerDelegate: readonly property Picker picker
13* CHANGED IN: OptionSelector: readonly property bool currentlyExpanded TO property bool currentlyExpanded24* CHANGED IN: OptionSelector: readonly property bool currentlyExpanded TO property bool currentlyExpanded
14* CHANGED IN: ItemSelector: readonly property bool currentlyExpanded TO property bool currentlyExpanded25* CHANGED IN: ItemSelector: readonly property bool currentlyExpanded TO property bool currentlyExpanded
@@ -85,14 +96,17 @@
85* ADDED IN: Empty: property bool waitingConfirmationForRemoval96* ADDED IN: Empty: property bool waitingConfirmationForRemoval
86* ADDED IN: Empty: function cancelItemRemoval()97* ADDED IN: Empty: function cancelItemRemoval()
87* CHANGED in CrossFadeImage: readonly property size sourceSize TO property size sourceSize98* CHANGED in CrossFadeImage: readonly property size sourceSize TO property size sourceSize
99* DEPRECATED in Header: property Item contents
100* DEPRECATED IN Tabs: property TabBar tabBar
88101
89Compatibility Breaks102Compatibility Breaks
90********************103********************
91104
92- CHANGED IN Tabs: Automatically show the header when the title of the active tab changes105* CHANGED IN Tabs: Automatically show the header when the title of the active tab changes
93- CHANGED IN Page/MainView: Only enable auto-hide behavior of header when the Page's flickable can be flicked vertically, so that manual setting of anchors is no longer needed for flickables that only flick horizontally106* CHANGED IN Page/MainView: Only enable auto-hide behavior of header when the Page's flickable can be flicked vertically, so that manual setting of anchors is no longer needed for flickables that only flick horizontally
94- CHANGED IN Page: Automatic detection of flickable inside a Page to control the header is now limited to Flickables that are anchored to the top of the Page or fill the Page. Header automatically shows when flickable.contentHeight becomes <= flickable.height.107* CHANGED IN Page: Automatic detection of flickable inside a Page to control the header is now limited to Flickables that are anchored to the top of the Page or fill the Page. Header automatically shows when flickable.contentHeight becomes <= flickable.height.
95- CHANGED IN Action, ActionItem, OptionSelectorDelegate: Setting iconName now always selects the requested icon from ubuntu-mobile theme, not the system icon theme.108* CHANGED IN Action, ActionItem, OptionSelectorDelegate: Setting iconName now always selects the requested icon from ubuntu-mobile theme, not the system icon theme.
109* CHANGED IN TabBar: The model now needs to have a selectedIndex property.
96110
97SDK 0.1.46111SDK 0.1.46
98##########112##########
99113
=== modified file 'components.api'
--- components.api 2014-04-01 12:57:27 +0000
+++ components.api 2014-04-29 22:09:46 +0000
@@ -1,4 +1,4 @@
1modules/Ubuntu/Components/AbstractButton.qml1AbstractButton 0.1 1.0
2ActionItem2ActionItem
3 signal clicked()3 signal clicked()
4 signal pressAndHold()4 signal pressAndHold()
@@ -6,13 +6,13 @@
6 property bool hovered6 property bool hovered
7 property bool __acceptEvents7 property bool __acceptEvents
8 property internal __mouseArea8 property internal __mouseArea
9modules/Ubuntu/Components/Action.qml9Action 0.1 1.0
10UnityActions.Action10UnityActions.Action
11 property url iconSource11 property url iconSource
12 property string iconName12 property string iconName
13 property bool visible13 property bool visible
14 property Component itemHint14 property Component itemHint
15modules/Ubuntu/Components/ActionItem.qml15ActionItem 0.1 1.0
16StyledItem16StyledItem
17 property Action action17 property Action action
18 property string text18 property string text
@@ -20,19 +20,19 @@
20 property string iconName20 property string iconName
21 signal triggered(var value)21 signal triggered(var value)
22 function trigger(value)22 function trigger(value)
23modules/Ubuntu/Components/ActionList.qml23ActionList 0.1 1.0
24QtObject24QtObject
25 default property list<Action> children25 default property list<Action> children
26 property list<Action> actions26 property list<Action> actions
27modules/Ubuntu/Components/ActivityIndicator.qml27ActivityIndicator 0.1 1.0
28AnimatedItem28AnimatedItem
29 property bool running29 property bool running
30modules/Ubuntu/Components/Button.qml30Button 0.1 1.0
31AbstractButton31AbstractButton
32 property color color32 property color color
33 property Gradient gradient33 property Gradient gradient
34 property string iconPosition34 property string iconPosition
35modules/Ubuntu/Components/CheckBox.qml35CheckBox 0.1 1.0
36AbstractButton36AbstractButton
37 property bool checked37 property bool checked
38modules/Ubuntu/Components/Colors/UbuntuColors.qml38modules/Ubuntu/Components/Colors/UbuntuColors.qml
@@ -45,7 +45,15 @@
45 readonly property color coolGrey45 readonly property color coolGrey
46 property Gradient orangeGradient46 property Gradient orangeGradient
47 property Gradient greyGradient47 property Gradient greyGradient
48modules/Ubuntu/Components/CrossFadeImage.qml48ComboButton 1.1
49Button
50 property bool expanded
51 property real collapsedHeight
52 property real expandedHeight
53 readonly property real comboListHeight
54 default property list<Item> comboList
55 property color dropdownColor
56CrossFadeImage 0.1 1.0
49Item57Item
50 property url source58 property url source
51 property int fillMode59 property int fillMode
@@ -53,27 +61,28 @@
53 readonly property bool running61 readonly property bool running
54 property size sourceSize62 property size sourceSize
55 readonly property int status63 readonly property int status
56modules/Ubuntu/Components/Header.qml64Header 0.1 1.0
57StyledItem65StyledItem
58 property bool animate66 property bool animate
59 function show()67 function show()
60 function hide()68 function hide()
61 property string title69 property string title
62 property Item contents70 property Item contents
71 property var tabsModel
72 property var pageStack
63 property Flickable flickable73 property Flickable flickable
64modules/Ubuntu/Components/Icon.qml74 property bool useDeprecatedToolbar
75Icon 0.1 1.0
65Item76Item
66 property string name77 property string name
67 property color color78 property color color
68 property color keyColor79 property color keyColor
69modules/Ubuntu/Components/Label.qml80Label 0.1 1.0
70Text81Text
71 property string fontSize82 property string fontSize
72modules/Ubuntu/Components/ListItems/Base.qml83Base 0.1 1.0
73Empty84Empty
74 property variant icon85 property variant icon
75 property url iconSource
76 property string iconName
77 property url fallbackIconSource86 property url fallbackIconSource
78 property string fallbackIconName87 property string fallbackIconName
79 property bool progression88 property bool progression
@@ -84,12 +93,12 @@
84 property real __rightIconMargin93 property real __rightIconMargin
85 property bool __iconIsItem94 property bool __iconIsItem
86 property internal children95 property internal children
87modules/Ubuntu/Components/ListItems/Caption.qml96Caption 0.1 1.0
88Item97Item
89 property string text98 property string text
90modules/Ubuntu/Components/ListItems/Divider.qml99Divider 0.1 1.0
91Image100Image
92modules/Ubuntu/Components/ListItems/Empty.qml101Empty 0.1 1.0
93AbstractButton102AbstractButton
94 property bool selected103 property bool selected
95 property bool highlightWhenPressed104 property bool highlightWhenPressed
@@ -106,24 +115,24 @@
106 property ThinDivider divider115 property ThinDivider divider
107 property real __contentsMargins116 property real __contentsMargins
108 function cancelItemRemoval()117 function cancelItemRemoval()
109modules/Ubuntu/Components/ListItems/Expandable.qml118Expandable 0.1 1.0
110Empty119Empty
111 property bool expanded120 property bool expanded
112 property real collapsedHeight121 property real collapsedHeight
113 property real expandedHeight122 property real expandedHeight
114 property bool collapseOnClick123 property bool collapseOnClick
115 default property QtObject children124 default property QtObject children
116modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml125ExpandablesColumn 0.1 1.0
117Flickable126Flickable
118 readonly property Item expandedItem127 readonly property Item expandedItem
119 function expandItem(item)128 function expandItem(item)
120 function collapse()129 function collapse()
121 default property QtObject children130 default property QtObject children
122modules/Ubuntu/Components/ListItems/Header.qml131Header 0.1 1.0
123Item132Item
124 property string text133 property string text
125 property internal __foregroundColor134 property internal __foregroundColor
126modules/Ubuntu/Components/ListItems/ItemSelector.qml135ItemSelector 0.1 1.0
127ListItem.Empty136ListItem.Empty
128 property var model137 property var model
129 property bool expanded138 property bool expanded
@@ -135,21 +144,19 @@
135 readonly property real itemHeight144 readonly property real itemHeight
136 signal delegateClicked(int index)145 signal delegateClicked(int index)
137 signal expansionCompleted()146 signal expansionCompleted()
138modules/Ubuntu/Components/ListItems/MultiValue.qml147MultiValue 0.1 1.0
139Base148Base
140 property variant values149 property variant values
141modules/Ubuntu/Components/ListItems/SingleControl.qml150SingleControl 0.1 1.0
142Empty151Empty
143 property Item control152 property Item control
144 function __updateControl()153 function __updateControl()
145modules/Ubuntu/Components/ListItems/SingleValue.qml154SingleValue 0.1 1.0
146Base155Base
147 property string value156 property string value
148modules/Ubuntu/Components/ListItems/Standard.qml157Standard 0.1 1.0
149Empty158Empty
150 property variant icon159 property variant icon
151 property url iconSource
152 property string iconName
153 property url fallbackIconSource160 property url fallbackIconSource
154 property string fallbackIconName161 property string fallbackIconName
155 property bool progression162 property bool progression
@@ -162,17 +169,14 @@
162 property bool __controlAreaPressed169 property bool __controlAreaPressed
163 property bool __iconIsItem170 property bool __iconIsItem
164 property internal __foregroundColor171 property internal __foregroundColor
165modules/Ubuntu/Components/ListItems/Subtitled.qml172Subtitled 0.1 1.0
166Base173Base
167 property string text
168 property string subText174 property string subText
169modules/Ubuntu/Components/ListItems/ThinDivider.qml175ThinDivider 0.1 1.0
170Image176Image
171modules/Ubuntu/Components/ListItems/ValueSelector.qml177ValueSelector 0.1 1.0
172Empty178Empty
173 property variant icon179 property variant icon
174 property url iconSource
175 property string iconName
176 property url fallbackIconSource180 property url fallbackIconSource
177 property string fallbackIconName181 property string fallbackIconName
178 property real __iconWidth182 property real __iconWidth
@@ -183,7 +187,7 @@
183 property variant values187 property variant values
184 property int selectedIndex188 property int selectedIndex
185 property bool expanded189 property bool expanded
186modules/Ubuntu/Components/MainView.qml190MainView 0.1 1.0
187PageTreeNode191PageTreeNode
188 property string applicationName192 property string applicationName
189 property bool anchorToKeyboard193 property bool anchorToKeyboard
@@ -195,10 +199,10 @@
195 default property internal contentsItem199 default property internal contentsItem
196 property list<Action> actions200 property list<Action> actions
197 property UnityActions.ActionManager actionManager201 property UnityActions.ActionManager actionManager
198modules/Ubuntu/Components/Object.qml202Object 0.1 1.0
199QtObject203QtObject
200 default property internal children204 default property internal children
201modules/Ubuntu/Components/OptionSelector.qml205OptionSelector 0.1 1.0
202ListItem.Empty206ListItem.Empty
203 property var model207 property var model
204 property bool expanded208 property bool expanded
@@ -210,31 +214,28 @@
210 readonly property real itemHeight214 readonly property real itemHeight
211 signal delegateClicked(int index)215 signal delegateClicked(int index)
212 signal expansionCompleted()216 signal expansionCompleted()
213modules/Ubuntu/Components/OptionSelectorDelegate.qml217OptionSelectorDelegate 0.1 1.0
214ListItem.Standard218ListItem.Empty
215 property string text
216 property string subText219 property string subText
217 property url icon220 property url icon
218 property url iconSource
219 property string iconName
220 property bool constrainImage221 property bool constrainImage
221 property bool colourImage222 property bool colourImage
222 property color assetColour223 property color assetColour
223 readonly property ListView listView224 readonly property ListView listView
224 readonly property string fragColourShader225 readonly property string fragColourShader
225modules/Ubuntu/Components/OrientationHelper.qml226OrientationHelper 0.1 1.0
226Item227Item
227 property bool automaticOrientation228 property bool automaticOrientation
228 property bool transitionEnabled229 property bool transitionEnabled
229 property alias rotating230 property alias rotating
230 property int __orientationAngle231 property int __orientationAngle
231 property int orientationAngle232 property int orientationAngle
232modules/Ubuntu/Components/Page.qml233Page 0.1 1.0
233PageTreeNode234PageTreeNode
234 property string title235 property string title
235 property Flickable flickable236 property Flickable flickable
236 property list<Action> actions237 property list<Action> actions
237modules/Ubuntu/Components/PageStack.qml238PageStack 0.1 1.0
238PageTreeNode239PageTreeNode
239 property bool __showHeader240 property bool __showHeader
240 property int depth241 property int depth
@@ -242,7 +243,7 @@
242 function push(page, properties)243 function push(page, properties)
243 function pop()244 function pop()
244 function clear()245 function clear()
245modules/Ubuntu/Components/Panel.qml246Panel 0.1 1.0
246Item247Item
247 default property list<Object> contents248 default property list<Object> contents
248 property int align249 property int align
@@ -259,7 +260,7 @@
259 property bool __closeOnContentsClicks260 property bool __closeOnContentsClicks
260 property bool __openOnHover261 property bool __openOnHover
261 property bool pressed262 property bool pressed
262modules/Ubuntu/Components/Pickers/DatePicker.qml263DatePicker 0.1 1.0
263StyledItem264StyledItem
264 property string mode265 property string mode
265 property date date266 property date date
@@ -274,7 +275,7 @@
274 readonly property int seconds275 readonly property int seconds
275 property var locale276 property var locale
276 readonly property bool moving277 readonly property bool moving
277modules/Ubuntu/Components/Pickers/Dialer.qml278Dialer 0.1 1.0
278StyledItem279StyledItem
279 property real minimumValue280 property real minimumValue
280 property real maximumValue281 property real maximumValue
@@ -284,7 +285,7 @@
284 property list<var> centerContent285 property list<var> centerContent
285 readonly property list<DialerHands> hands286 readonly property list<DialerHands> hands
286 signal handUpdated(var hand)287 signal handUpdated(var hand)
287modules/Ubuntu/Components/Pickers/DialerHand.qml288DialerHand 0.1 1.0
288StyledItem289StyledItem
289 property real value290 property real value
290 property DialerHandGroup hand291 property DialerHandGroup hand
@@ -292,7 +293,7 @@
292 default property list<QtObject> overlay293 default property list<QtObject> overlay
293 readonly property int index294 readonly property int index
294 property internal __grabber295 property internal __grabber
295modules/Ubuntu/Components/Pickers/Picker.qml296Picker 0.1 1.0
296StyledItem297StyledItem
297 property bool circular298 property bool circular
298 property var model299 property var model
@@ -302,27 +303,27 @@
302 readonly property bool moving303 readonly property bool moving
303 function positionViewAtIndex(index)304 function positionViewAtIndex(index)
304 property int __clickedIndex305 property int __clickedIndex
305modules/Ubuntu/Components/Pickers/PickerDelegate.qml306PickerDelegate 0.1 1.0
306AbstractButton307AbstractButton
307 readonly property Picker picker308 readonly property Picker picker
308modules/Ubuntu/Components/Pickers/PickerPanel.qml309modules/Ubuntu/Components/Pickers/PickerPanel.qml
309Object310Object
310 function openDatePicker(caller, property, mode)311 function openDatePicker(caller, property, mode)
311modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml312ActionSelectionPopover 0.1 1.0
312Popover313Popover
313 property Item target314 property Item target
314 property var actions315 property var actions
315 property Component delegate316 property Component delegate
316modules/Ubuntu/Components/Popups/ComposerSheet.qml317ComposerSheet 0.1 1.0
317SheetBase318SheetBase
318 signal cancelClicked319 signal cancelClicked
319 signal confirmClicked320 signal confirmClicked
320modules/Ubuntu/Components/Popups/DefaultSheet.qml321DefaultSheet 0.1 1.0
321SheetBase322SheetBase
322 property bool doneButton323 property bool doneButton
323 signal closeClicked324 signal closeClicked
324 signal doneClicked325 signal doneClicked
325modules/Ubuntu/Components/Popups/Dialog.qml326Dialog 0.1 1.0
326PopupBase327PopupBase
327 default property list<Object> contents328 default property list<Object> contents
328 property string title329 property string title
@@ -332,7 +333,7 @@
332 property real edgeMargins333 property real edgeMargins
333 property real callerMargin334 property real callerMargin
334 property bool modal335 property bool modal
335modules/Ubuntu/Components/Popups/Popover.qml336Popover 0.1 1.0
336PopupBase337PopupBase
337 default property list<Object> container338 default property list<Object> container
338 property real contentWidth339 property real contentWidth
@@ -346,7 +347,7 @@
346 function show()347 function show()
347 function hide()348 function hide()
348 function __makeInvisible()349 function __makeInvisible()
349modules/Ubuntu/Components/Popups/PopupBase.qml350PopupBase 0.1 1.0
350OrientationHelper351OrientationHelper
351 property Item dismissArea352 property Item dismissArea
352 property bool grabDismissAreaEvents353 property bool grabDismissAreaEvents
@@ -358,7 +359,7 @@
358 property bool __closeOnDismissAreaPress359 property bool __closeOnDismissAreaPress
359 property internal __dimBackground360 property internal __dimBackground
360 property internal __eventGrabber361 property internal __eventGrabber
361modules/Ubuntu/Components/Popups/SheetBase.qml362SheetBase 0.1 1.0
362PopupBase363PopupBase
363 default property list<Object> container364 default property list<Object> container
364 property real contentsWidth365 property real contentsWidth
@@ -367,19 +368,19 @@
367 property bool modal368 property bool modal
368 property internal __leftButton369 property internal __leftButton
369 property internal __rightButton370 property internal __rightButton
370modules/Ubuntu/Components/ProgressBar.qml371ProgressBar 0.1 1.0
371AnimatedItem372AnimatedItem
372 property bool indeterminate373 property bool indeterminate
373 property real minimumValue374 property real minimumValue
374 property real maximumValue375 property real maximumValue
375 property real value376 property real value
376modules/Ubuntu/Components/Scrollbar.qml377Scrollbar 0.1 1.0
377StyledItem378StyledItem
378 property Flickable flickableItem379 property Flickable flickableItem
379 property int align380 property int align
380 property bool __interactive381 property bool __interactive
381 property internal __private382 property internal __private
382modules/Ubuntu/Components/Slider.qml383Slider 0.1 1.0
383StyledItem384StyledItem
384 property real minimumValue385 property real minimumValue
385 property real maximumValue386 property real maximumValue
@@ -389,20 +390,20 @@
389 signal touched(bool onThumb)390 signal touched(bool onThumb)
390 function formatValue(v)391 function formatValue(v)
391 property internal __internals392 property internal __internals
392modules/Ubuntu/Components/StyledItem.qml393StyledItem 0.1 1.0
393FocusScope394FocusScope
394 property Component style395 property Component style
395 readonly property Item __styleInstance396 readonly property Item __styleInstance
396modules/Ubuntu/Components/Switch.qml397Switch 0.1 1.0
397CheckBox398CheckBox
398modules/Ubuntu/Components/Tab.qml399Tab 0.1 1.0
399PageTreeNode400PageTreeNode
400 property string title401 property string title
401 property url iconSource402 property url iconSource
402 property Item page403 property Item page
403 readonly property int index404 readonly property int index
404 property internal __protected405 property internal __protected
405modules/Ubuntu/Components/TabBar.qml406TabBar 0.1 1.0
406StyledItem407StyledItem
407 property Item tabsItem408 property Item tabsItem
408 property var model409 property var model
@@ -411,7 +412,7 @@
411 property int selectedIndex412 property int selectedIndex
412 property bool alwaysSelectionMode413 property bool alwaysSelectionMode
413 property bool animate414 property bool animate
414modules/Ubuntu/Components/Tabs.qml415Tabs 0.1 1.0
415PageTreeNode416PageTreeNode
416 property int selectedTabIndex417 property int selectedTabIndex
417 readonly property Tab selectedTab418 readonly property Tab selectedTab
@@ -420,7 +421,8 @@
420 default property list<Item> tabChildren421 default property list<Item> tabChildren
421 readonly property int count422 readonly property int count
422 signal modelChanged()423 signal modelChanged()
423modules/Ubuntu/Components/TextArea.qml424 property var __model
425TextArea 0.1 1.0
424StyledItem426StyledItem
425 property bool highlighted427 property bool highlighted
426 property string placeholderText428 property string placeholderText
@@ -481,8 +483,7 @@
481 function remove(start, end)483 function remove(start, end)
482 function undo()484 function undo()
483 function forceActiveFocus()485 function forceActiveFocus()
484 property internal __internal486TextField 0.1 1.0
485modules/Ubuntu/Components/TextField.qml
486ActionItem487ActionItem
487 property bool highlighted488 property bool highlighted
488 property string placeholderText489 property string placeholderText
@@ -547,12 +548,11 @@
547 function undo()548 function undo()
548 function remove(start, end)549 function remove(start, end)
549 function getText(start, end)550 function getText(start, end)
550 property internal __internal551Palette 0.1
551modules/Ubuntu/Components/Themes/Palette.qml
552QtObject552QtObject
553 property PaletteValues normal553 property PaletteValues normal
554 property PaletteValues selected554 property PaletteValues selected
555modules/Ubuntu/Components/Themes/PaletteValues.qml555PaletteValues 0.1
556QtObject556QtObject
557 property color background557 property color background
558 property color backgroundText558 property color backgroundText
@@ -564,40 +564,42 @@
564 property color overlayText564 property color overlayText
565 property color field565 property color field
566 property color fieldText566 property color fieldText
567modules/Ubuntu/Components/ToolbarButton.qml567ToolbarButton 0.1 1.0
568ActionItem568ActionItem
569modules/Ubuntu/Components/ToolbarItems.qml569ToolbarItems 0.1 1.0
570Item570Item
571 default property list<Object> contents571 default property list<Object> contents
572 property Item back572 property Item back
573 property Item pageStack573 property Item pageStack
574 property bool opened574 property bool opened
575 property bool locked575 property bool locked
576modules/Ubuntu/Components/UbuntuListView.qml576UbuntuListView 0.1 1.0
577ListView577ListView
578 property int expandedIndex578 property int expandedIndex
579modules/Ubuntu/Components/UbuntuNumberAnimation.qml579UbuntuNumberAnimation 0.1 1.0
580NumberAnimation580NumberAnimation
581modules/Ubuntu/Components/UbuntuShape.qml581UbuntuShape 0.1 1.0
582Item582Item
583 property color color583 property color color
584 property color gradientColor584 property color gradientColor
585 property string radius585 property string radius
586 property Item image586 property Item image
587 property url borderSource587 property url borderSource
588modules/Ubuntu/PerformanceMetrics/PerformanceOverlay.qml588PerformanceOverlay 0.1 1.0
589Item589Item
590 property bool active590 property bool active
591modules/Ubuntu/Test/UbuntuTestCase.qml591UbuntuTestCase 0.1 1.0
592TestCase592TestCase
593 function findChild(obj,objectName)593 function findChild(obj,objectName)
594 function findInvisibleChild(obj,objectName)594 function findInvisibleChild(obj,objectName)
595 function mouseMoveSlowly(item,x,y,dx,dy,steps,stepdelay)595 function mouseMoveSlowly(item,x,y,dx,dy,steps,stepdelay)
596 function flick(item, x, y, dx, dy, pressTimeout, steps, button, modifiers, delay)
597 function mouseLongPress(item, x, y, button, modifiers, delay)
596 function tryCompareFunction(func, expectedResult, timeout)598 function tryCompareFunction(func, expectedResult, timeout)
597plugins.qmltypes599plugins.qmltypes
598 name: "InverseMouseAreaType"600 name: "InverseMouseAreaType"
599 prototype: "QQuickMouseArea"601 prototype: "QQuickMouseArea"
600 exports: ["InverseMouseArea 0.1"]602 exports: ["InverseMouseArea 0.1", "InverseMouseArea 1.0"]
601 Property { name: "sensingArea"; type: "QQuickItem"; isPointer: true }603 Property { name: "sensingArea"; type: "QQuickItem"; isPointer: true }
602 Property { name: "topmostItem"; type: "bool" }604 Property { name: "topmostItem"; type: "bool" }
603 Method {605 Method {
@@ -605,7 +607,7 @@
605 Parameter { name: "point"; type: "QPointF" }607 Parameter { name: "point"; type: "QPointF" }
606 name: "ShapeItem"608 name: "ShapeItem"
607 prototype: "QQuickItem"609 prototype: "QQuickItem"
608 exports: ["Shape 0.1"]610 exports: ["Shape 0.1", "Shape 1.0"]
609 name: "HAlignment"611 name: "HAlignment"
610 name: "VAlignment"612 name: "VAlignment"
611 Property { name: "color"; type: "QColor" }613 Property { name: "color"; type: "QColor" }
@@ -620,7 +622,7 @@
620 Method { name: "gridUnitChanged" }622 Method { name: "gridUnitChanged" }
621 name: "UCAlarm"623 name: "UCAlarm"
622 prototype: "QObject"624 prototype: "QObject"
623 exports: ["Alarm 0.1"]625 exports: ["Alarm 0.1", "Alarm 1.0"]
624 name: "Status"626 name: "Status"
625 name: "Operation"627 name: "Operation"
626 name: "Error"628 name: "Error"
@@ -643,14 +645,14 @@
643 Method { name: "reset" }645 Method { name: "reset" }
644 name: "UCAlarmModel"646 name: "UCAlarmModel"
645 prototype: "QAbstractListModel"647 prototype: "QAbstractListModel"
646 exports: ["AlarmModel 0.1"]648 exports: ["AlarmModel 0.1", "AlarmModel 1.0"]
647 Property { name: "count"; type: "int"; isReadonly: true }649 Property { name: "count"; type: "int"; isReadonly: true }
648 Method {650 Method {
649 name: "get"651 name: "get"
650 Parameter { name: "index"; type: "int" }652 Parameter { name: "index"; type: "int" }
651 name: "UCArgument"653 name: "UCArgument"
652 prototype: "QObject"654 prototype: "QObject"
653 exports: ["Argument 0.1"]655 exports: ["Argument 0.1", "Argument 1.0"]
654 Property { name: "name"; type: "string" }656 Property { name: "name"; type: "string" }
655 Property { name: "help"; type: "string" }657 Property { name: "help"; type: "string" }
656 Property { name: "required"; type: "bool" }658 Property { name: "required"; type: "bool" }
@@ -660,7 +662,7 @@
660 Parameter { name: "i"; type: "int" }662 Parameter { name: "i"; type: "int" }
661 name: "UCArguments"663 name: "UCArguments"
662 prototype: "QObject"664 prototype: "QObject"
663 exports: ["Arguments 0.1"]665 exports: ["Arguments 0.1", "Arguments 1.0"]
664 Property { name: "defaultArgument"; type: "UCArgument"; isPointer: true }666 Property { name: "defaultArgument"; type: "UCArgument"; isPointer: true }
665 Property { name: "arguments"; type: "UCArgument"; isList: true; isReadonly: true }667 Property { name: "arguments"; type: "UCArgument"; isList: true; isReadonly: true }
666 Property { name: "values"; type: "QQmlPropertyMap"; isReadonly: true; isPointer: true }668 Property { name: "values"; type: "QQmlPropertyMap"; isReadonly: true; isPointer: true }
@@ -673,10 +675,10 @@
673 Method { name: "quitWithError" }675 Method { name: "quitWithError" }
674 name: "UCInverseMouse"676 name: "UCInverseMouse"
675 prototype: "UCMouse"677 prototype: "UCMouse"
676 exports: ["InverseMouse 0.1"]678 exports: ["InverseMouse 0.1", "InverseMouse 1.0"]
677 name: "UCMouse"679 name: "UCMouse"
678 prototype: "QObject"680 prototype: "QObject"
679 exports: ["Mouse 0.1"]681 exports: ["Mouse 0.1", "Mouse 1.0"]
680 name: "Priority"682 name: "Priority"
681 Property { name: "enabled"; type: "bool" }683 Property { name: "enabled"; type: "bool" }
682 Property { name: "acceptedButtons"; type: "Qt::MouseButtons"; isReadonly: true }684 Property { name: "acceptedButtons"; type: "Qt::MouseButtons"; isReadonly: true }
@@ -687,30 +689,38 @@
687 Signal {689 Signal {
688 name: "pressed"690 name: "pressed"
689 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }691 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
692 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
690 Signal {693 Signal {
691 name: "released"694 name: "released"
692 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }695 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
696 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
693 Signal {697 Signal {
694 name: "clicked"698 name: "clicked"
695 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }699 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
700 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
696 Signal {701 Signal {
697 name: "pressAndHold"702 name: "pressAndHold"
698 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }703 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
704 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
699 Signal {705 Signal {
700 name: "doubleClicked"706 name: "doubleClicked"
701 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }707 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
708 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
702 Signal {709 Signal {
703 name: "positionChanged"710 name: "positionChanged"
704 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }711 Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
712 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
705 Signal {713 Signal {
706 name: "entered"714 name: "entered"
707 Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }715 Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
716 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
708 Signal {717 Signal {
709 name: "exited"718 name: "exited"
710 Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }719 Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
720 Parameter { name: "host"; type: "QQuickItem"; isPointer: true }
711 name: "UCQQuickImageExtension"721 name: "UCQQuickImageExtension"
712 prototype: "QQuickImageBase"722 prototype: "QQuickImageBase"
713 exports: ["QQuickImageBase 0.1"]723 exports: ["QQuickImageBase 0.1", "QQuickImageBase 1.0"]
714 Property { name: "source"; type: "QUrl" }724 Property { name: "source"; type: "QUrl" }
715 Signal {725 Signal {
716 name: "sourceChanged"726 name: "sourceChanged"
@@ -720,14 +730,14 @@
720 Parameter { type: "QUrl" }730 Parameter { type: "QUrl" }
721 name: "UCStateSaver"731 name: "UCStateSaver"
722 prototype: "QObject"732 prototype: "QObject"
723 exports: ["StateSaver 0.1"]733 exports: ["StateSaver 0.1", "StateSaver 1.0"]
724 name: "UCStateSaverAttached"734 name: "UCStateSaverAttached"
725 prototype: "QObject"735 prototype: "QObject"
726 Property { name: "enabled"; type: "bool" }736 Property { name: "enabled"; type: "bool" }
727 Property { name: "properties"; type: "string" }737 Property { name: "properties"; type: "string" }
728 name: "UCUbuntuAnimation"738 name: "UCUbuntuAnimation"
729 prototype: "QObject"739 prototype: "QObject"
730 exports: ["UbuntuAnimation 0.1"]740 exports: ["UbuntuAnimation 0.1", "UbuntuAnimation 1.0"]
731 Property { name: "SnapDuration"; type: "int"; isReadonly: true }741 Property { name: "SnapDuration"; type: "int"; isReadonly: true }
732 Property { name: "FastDuration"; type: "int"; isReadonly: true }742 Property { name: "FastDuration"; type: "int"; isReadonly: true }
733 Property { name: "BriskDuration"; type: "int"; isReadonly: true }743 Property { name: "BriskDuration"; type: "int"; isReadonly: true }
@@ -737,7 +747,7 @@
737 Property { name: "StandardEasingReverse"; type: "QEasingCurve"; isReadonly: true }747 Property { name: "StandardEasingReverse"; type: "QEasingCurve"; isReadonly: true }
738 name: "UCUnits"748 name: "UCUnits"
739 prototype: "QObject"749 prototype: "QObject"
740 exports: ["UCUnits 0.1"]750 exports: ["UCUnits 0.1", "UCUnits 1.0"]
741 Property { name: "gridUnit"; type: "float" }751 Property { name: "gridUnit"; type: "float" }
742 Method {752 Method {
743 name: "dp"753 name: "dp"
@@ -747,13 +757,13 @@
747 Parameter { name: "value"; type: "float" }757 Parameter { name: "value"; type: "float" }
748 name: "UCUriHandler"758 name: "UCUriHandler"
749 prototype: "QObject"759 prototype: "QObject"
750 exports: ["UriHandler 0.1"]760 exports: ["UriHandler 0.1", "UriHandler 1.0"]
751 Signal {761 Signal {
752 name: "opened"762 name: "opened"
753 Parameter { name: "uris"; type: "QStringList" }763 Parameter { name: "uris"; type: "QStringList" }
754 name: "UbuntuI18n"764 name: "UbuntuI18n"
755 prototype: "QObject"765 prototype: "QObject"
756 exports: ["i18n 0.1"]766 exports: ["i18n 0.1", "i18n 1.0"]
757 Property { name: "domain"; type: "string" }767 Property { name: "domain"; type: "string" }
758 Property { name: "language"; type: "string" }768 Property { name: "language"; type: "string" }
759 Method {769 Method {
@@ -780,17 +790,17 @@
780 Parameter { name: "n"; type: "int" }790 Parameter { name: "n"; type: "int" }
781 name: "ULConditionalLayout"791 name: "ULConditionalLayout"
782 prototype: "QObject"792 prototype: "QObject"
783 exports: ["ConditionalLayout 0.1"]793 exports: ["ConditionalLayout 0.1", "ConditionalLayout 1.0"]
784 Property { name: "name"; type: "string" }794 Property { name: "name"; type: "string" }
785 Property { name: "when"; type: "QQmlBinding"; isPointer: true }795 Property { name: "when"; type: "QQmlBinding"; isPointer: true }
786 Property { name: "layout"; type: "QQmlComponent"; isPointer: true }796 Property { name: "layout"; type: "QQmlComponent"; isPointer: true }
787 name: "ULItemLayout"797 name: "ULItemLayout"
788 prototype: "QQuickItem"798 prototype: "QQuickItem"
789 exports: ["ItemLayout 0.1"]799 exports: ["ItemLayout 0.1", "ItemLayout 1.0"]
790 Property { name: "item"; type: "string" }800 Property { name: "item"; type: "string" }
791 name: "ULLayouts"801 name: "ULLayouts"
792 prototype: "QQuickItem"802 prototype: "QQuickItem"
793 exports: ["Layouts 0.1"]803 exports: ["Layouts 0.1", "Layouts 1.0"]
794 Property { name: "currentLayout"; type: "string"; isReadonly: true }804 Property { name: "currentLayout"; type: "string"; isReadonly: true }
795 Property { name: "layouts"; type: "ULConditionalLayout"; isList: true; isReadonly: true }805 Property { name: "layouts"; type: "ULConditionalLayout"; isList: true; isReadonly: true }
796 name: "ULLayoutsAttached"806 name: "ULLayoutsAttached"
@@ -798,7 +808,7 @@
798 Property { name: "item"; type: "string" }808 Property { name: "item"; type: "string" }
799 name: "UPMCpuUsage"809 name: "UPMCpuUsage"
800 prototype: "QQuickItem"810 prototype: "QQuickItem"
801 exports: ["CpuUsage 0.1"]811 exports: ["CpuUsage 0.1", "CpuUsage 1.0"]
802 Property { name: "graphModel"; type: "UPMGraphModel"; isReadonly: true; isPointer: true }812 Property { name: "graphModel"; type: "UPMGraphModel"; isReadonly: true; isPointer: true }
803 Property { name: "period"; type: "int" }813 Property { name: "period"; type: "int" }
804 Property { name: "samplingInterval"; type: "int" }814 Property { name: "samplingInterval"; type: "int" }
@@ -810,7 +820,7 @@
810 Property { name: "currentValue"; type: "int"; isReadonly: true }820 Property { name: "currentValue"; type: "int"; isReadonly: true }
811 name: "UPMRenderingTimes"821 name: "UPMRenderingTimes"
812 prototype: "QQuickItem"822 prototype: "QQuickItem"
813 exports: ["RenderingTimes 0.1"]823 exports: ["RenderingTimes 0.1", "RenderingTimes 1.0"]
814 Property { name: "period"; type: "int" }824 Property { name: "period"; type: "int" }
815 Property { name: "samples"; type: "int" }825 Property { name: "samples"; type: "int" }
816 Property { name: "graphModel"; type: "UPMGraphModel"; isReadonly: true; isPointer: true }826 Property { name: "graphModel"; type: "UPMGraphModel"; isReadonly: true; isPointer: true }
@@ -820,5 +830,5 @@
820 Parameter { name: "renderTime"; type: "qlonglong" }830 Parameter { name: "renderTime"; type: "qlonglong" }
821 name: "UPMTextureFromImage"831 name: "UPMTextureFromImage"
822 prototype: "QQuickItem"832 prototype: "QQuickItem"
823 exports: ["TextureFromImage 0.1"]833 exports: ["TextureFromImage 0.1", "TextureFromImage 1.0"]
824 Property { name: "image"; type: "QImage" }834 Property { name: "image"; type: "QImage" }
825835
=== modified file 'debian/control'
--- debian/control 2014-03-17 09:02:58 +0000
+++ debian/control 2014-04-29 22:09:46 +0000
@@ -8,6 +8,7 @@
8 libglib2.0-dev,8 libglib2.0-dev,
9 python3,9 python3,
10 python,10 python,
11 python3-flake8,
11 libqt5qml-graphicaleffects | libqt5graphicaleffects5,12 libqt5qml-graphicaleffects | libqt5graphicaleffects5,
12 qt5-default,13 qt5-default,
13 qtbase5-dev,14 qtbase5-dev,
@@ -134,9 +135,12 @@
134 python-autopilot (>= 1.4),135 python-autopilot (>= 1.4),
135 python-fixtures,136 python-fixtures,
136 python-mock,137 python-mock,
138 python-testscenarios,
139 python-testtools,
137 python3-fixtures,140 python3-fixtures,
141 python3-testscenarios,
142 python3-testtools,
138 python3-autopilot (>= 1.4),143 python3-autopilot (>= 1.4),
139 ubuntu-ui-toolkit-examples (>= ${source:Version}),144 ubuntu-ui-toolkit-examples (>= ${source:Version}),
140Description: Test package for Ubuntu UI Toolkit145Description: Test package for Ubuntu UI Toolkit
141 Autopilot tests for the ubuntu-ui-toolkit package146 Autopilot tests for the ubuntu-ui-toolkit package
142
143147
=== modified file 'debian/rules'
--- debian/rules 2014-03-27 08:59:19 +0000
+++ debian/rules 2014-04-29 22:09:46 +0000
@@ -9,6 +9,7 @@
9 dh $@ --fail-missing9 dh $@ --fail-missing
1010
11override_dh_auto_test:11override_dh_auto_test:
12 flake8 tests/autopilot/ubuntuuitoolkit/
12ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))13ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
13 mkdir -p debian/tmp/home/run14 mkdir -p debian/tmp/home/run
14 chmod +x tests/xvfb.sh15 chmod +x tests/xvfb.sh
@@ -20,8 +21,7 @@
20 dh_auto_build -- docs21 dh_auto_build -- docs
2122
22override_dh_install:23override_dh_install:
23 mkdir -p debian/tmp/`qmake -query QT_INSTALL_DOCS`/qch 24 mkdir -p debian/tmp/`qmake -query QT_INSTALL_DOCS`/qch
24 mkdir -p debian/tmp/usr/share/ubuntu-ui-toolkit/doc25 mkdir -p debian/tmp/usr/share/ubuntu-ui-toolkit/doc
25 cp -r $(CURDIR)/documentation/*qch debian/tmp/`qmake -query QT_INSTALL_DOCS`/qch26 cp -r $(CURDIR)/documentation/*qch debian/tmp/`qmake -query QT_INSTALL_DOCS`/qch
26 dh_install --fail-missing27 dh_install --fail-missing
27
2828
=== modified file 'documentation/overview.qdoc'
--- documentation/overview.qdoc 2014-01-23 17:13:24 +0000
+++ documentation/overview.qdoc 2014-04-29 22:09:46 +0000
@@ -31,70 +31,75 @@
31 \part Basic QML Types31 \part Basic QML Types
32 Available through:32 Available through:
33 \code33 \code
34 import Ubuntu.Components 0.134 import Ubuntu.Components 1.1
35 \endcode35 \endcode
36 \annotatedlist ubuntu36 \annotatedlist ubuntu
3737
38 \part List Items38 \part List Items
39 Available through:39 Available through:
40 \code40 \code
41 import Ubuntu.Components.ListItems 0.141 import Ubuntu.Components.ListItems 1.0
42 \endcode42 \endcode
43 \annotatedlist ubuntu-listitems43 \annotatedlist ubuntu-listitems
4444
45 \part Pickers45 \part Pickers
46 Available through:46 Available through:
47 \code47 \code
48 import Ubuntu.Components.Pickers 0.148 import Ubuntu.Components.Pickers 1.0
49 \endcode49 \endcode
50 \annotatedlist ubuntu-pickers50 \annotatedlist ubuntu-pickers
5151
52 \part Popovers, Sheets and Dialogs52 \part Popovers, Sheets and Dialogs
53 Available through:53 Available through:
54 \code54 \code
55 import Ubuntu.Components.Popups 0.155 import Ubuntu.Components.Popups 1.0
56 \endcode56 \endcode
57 \annotatedlist ubuntu-popups57 \annotatedlist ubuntu-popups
5858
59 \part Layouting59 \part Layouting
60 Available through:60 Available through:
61 \code61 \code
62 import Ubuntu.Layouts 0.162 import Ubuntu.Layouts 1.0
63 \endcode63 \endcode
64 \annotatedlist ubuntu-layouts64 \annotatedlist ubuntu-layouts
6565
66 \part Theming Elements66 \part Theming Elements
67 Available through:67 Available through:
68 \code68 \code
69 import Ubuntu.Components 0.169 import Ubuntu.Components 1.1
70 \endcode70 \endcode
71 \annotatedlist theming71 \annotatedlist theming
7272
73 \part Style API
74 The Style API defines the interface components use to style the visuals.
75 Themes must make sure that these interfaces are all implemented.
76 \annotatedlist style-api
77
73 \part Resolution Independence Items78 \part Resolution Independence Items
74 Available through:79 Available through:
75 \code80 \code
76 import Ubuntu.Components 0.181 import Ubuntu.Components 1.1
77 \endcode82 \endcode
78 \annotatedlist resolution-independence83 \annotatedlist resolution-independence
7984
80 \part Parsing Command-Line Arguments85 \part Parsing Command-Line Arguments
81 Available through:86 Available through:
82 \code87 \code
83 import Ubuntu.Components 0.188 import Ubuntu.Components 1.1
84 \endcode89 \endcode
85 \annotatedlist ubuntu-commandline90 \annotatedlist ubuntu-commandline
8691
87 \part Services92 \part Services
88 Available through:93 Available through:
89 \code94 \code
90 import Ubuntu.Components 0.195 import Ubuntu.Components 1.1
91 \endcode96 \endcode
92 \annotatedlist ubuntu-services97 \annotatedlist ubuntu-services
9398
94 \part Performance Metrics99 \part Performance Metrics
95 Available through:100 Available through:
96 \code101 \code
97 import Ubuntu.PerformanceMetrics 0.1102 import Ubuntu.PerformanceMetrics 1.0
98 \endcode103 \endcode
99 \annotatedlist ubuntu-performance-metrics104 \annotatedlist ubuntu-performance-metrics
100 */105 */
101106
=== modified file 'documentation/resolution-independence.qdoc'
--- documentation/resolution-independence.qdoc 2013-09-25 15:29:26 +0000
+++ documentation/resolution-independence.qdoc 2014-04-29 22:09:46 +0000
@@ -64,7 +64,7 @@
6464
65 Example Usage:65 Example Usage:
66 \code66 \code
67 import Ubuntu.Components 0.167 import Ubuntu.Components 1.1
6868
69 Item {69 Item {
70 width: units.gu(2)70 width: units.gu(2)
@@ -79,7 +79,7 @@
7979
80 Example Usage:80 Example Usage:
81 \code81 \code
82 import Ubuntu.Components 0.182 import Ubuntu.Components 1.1
8383
84 Rectangle {84 Rectangle {
85 height: units.dp(1)85 height: units.dp(1)
@@ -143,7 +143,7 @@
143143
144 Example Usage:144 Example Usage:
145 \code145 \code
146 import Ubuntu.Components 0.1146 import Ubuntu.Components 1.1
147147
148 Label {148 Label {
149 fontSize: "small"149 fontSize: "small"
150150
=== modified file 'documentation/snippets/layouts/SimpleLayout.qml'
--- documentation/snippets/layouts/SimpleLayout.qml 2013-06-25 14:25:43 +0000
+++ documentation/snippets/layouts/SimpleLayout.qml 2014-04-29 22:09:46 +0000
@@ -15,8 +15,8 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
19import Ubuntu.Layouts 0.119import Ubuntu.Layouts 1.0
2020
21Item {21Item {
22 id: root22 id: root
2323
=== modified file 'documentation/snippets/layouts/layout1.qml'
--- documentation/snippets/layouts/layout1.qml 2013-06-25 14:19:12 +0000
+++ documentation/snippets/layouts/layout1.qml 2014-04-29 22:09:46 +0000
@@ -16,8 +16,8 @@
1616
17//![0]17//![0]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import Ubuntu.Layouts 0.120import Ubuntu.Layouts 1.0
2121
22Item {22Item {
23 id: root23 id: root
2424
=== modified file 'documentation/snippets/layouts/layout2.qml'
--- documentation/snippets/layouts/layout2.qml 2013-06-25 14:19:12 +0000
+++ documentation/snippets/layouts/layout2.qml 2014-04-29 22:09:46 +0000
@@ -16,8 +16,8 @@
1616
17//![0]17//![0]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import Ubuntu.Layouts 0.120import Ubuntu.Layouts 1.0
2121
22Item {22Item {
23 id: root23 id: root
2424
=== modified file 'documentation/snippets/layouts/layout3.qml'
--- documentation/snippets/layouts/layout3.qml 2013-06-25 14:19:12 +0000
+++ documentation/snippets/layouts/layout3.qml 2014-04-29 22:09:46 +0000
@@ -16,8 +16,8 @@
1616
17//![0]17//![0]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import Ubuntu.Layouts 0.120import Ubuntu.Layouts 1.0
2121
22Item {22Item {
23 id: root23 id: root
2424
=== modified file 'documentation/snippets/layouts/layout6.qml'
--- documentation/snippets/layouts/layout6.qml 2013-06-25 14:19:12 +0000
+++ documentation/snippets/layouts/layout6.qml 2014-04-29 22:09:46 +0000
@@ -16,8 +16,8 @@
1616
17//![0]17//![0]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import Ubuntu.Layouts 0.120import Ubuntu.Layouts 1.0
2121
22Item {22Item {
23 id: root23 id: root
2424
=== modified file 'documentation/snippets/layouts/layout7.qml'
--- documentation/snippets/layouts/layout7.qml 2013-06-25 14:19:12 +0000
+++ documentation/snippets/layouts/layout7.qml 2014-04-29 22:09:46 +0000
@@ -16,8 +16,8 @@
1616
17//![0]17//![0]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import Ubuntu.Layouts 0.120import Ubuntu.Layouts 1.0
2121
22Item {22Item {
23 id: root23 id: root
2424
=== modified file 'documentation/snippets/statesaver/ColorChanger.qml'
--- documentation/snippets/statesaver/ColorChanger.qml 2013-09-24 06:20:26 +0000
+++ documentation/snippets/statesaver/ColorChanger.qml 2014-04-29 22:09:46 +0000
@@ -16,7 +16,7 @@
1616
17//![color-saver]17//![color-saver]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
2020
21Rectangle {21Rectangle {
22 id: root22 id: root
2323
=== modified file 'documentation/snippets/statesaver/MultiplePropertySaver.qml'
--- documentation/snippets/statesaver/MultiplePropertySaver.qml 2013-09-24 06:20:26 +0000
+++ documentation/snippets/statesaver/MultiplePropertySaver.qml 2014-04-29 22:09:46 +0000
@@ -16,7 +16,7 @@
1616
17//![group-saver]17//![group-saver]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
2020
21Rectangle {21Rectangle {
22 id: root22 id: root
2323
=== modified file 'documentation/snippets/statesaver/PropertyGroupSaver.qml'
--- documentation/snippets/statesaver/PropertyGroupSaver.qml 2013-09-24 06:20:26 +0000
+++ documentation/snippets/statesaver/PropertyGroupSaver.qml 2014-04-29 22:09:46 +0000
@@ -16,7 +16,7 @@
1616
17//![property-group-saver]17//![property-group-saver]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
2020
21Rectangle {21Rectangle {
22 id: root22 id: root
2323
=== modified file 'documentation/snippets/statesaver/PropertyGroupSaver2.qml'
--- documentation/snippets/statesaver/PropertyGroupSaver2.qml 2013-09-24 06:20:26 +0000
+++ documentation/snippets/statesaver/PropertyGroupSaver2.qml 2014-04-29 22:09:46 +0000
@@ -16,7 +16,7 @@
1616
17//![property-group-saver]17//![property-group-saver]
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
2020
21Rectangle {21Rectangle {
22 id: root22 id: root
2323
=== modified file 'documentation/ubuntu-components-listitems.qdoc'
--- documentation/ubuntu-components-listitems.qdoc 2013-09-25 15:29:26 +0000
+++ documentation/ubuntu-components-listitems.qdoc 2014-04-29 22:09:46 +0000
@@ -15,6 +15,6 @@
15 */15 */
1616
17/*!17/*!
18 \qmlmodule Ubuntu.Components.ListItems 0.118 \qmlmodule Ubuntu.Components.ListItems 1.0
19 \title List Items19 \title List Items
20*/20*/
2121
=== modified file 'documentation/ubuntu-components-pickers.qdoc'
--- documentation/ubuntu-components-pickers.qdoc 2013-09-25 15:29:26 +0000
+++ documentation/ubuntu-components-pickers.qdoc 2014-04-29 22:09:46 +0000
@@ -15,6 +15,6 @@
15 */15 */
1616
17/*!17/*!
18 \qmlmodule Ubuntu.Components.Pickers 0.118 \qmlmodule Ubuntu.Components.Pickers 1.0
19 \title Pickers19 \title Pickers
20*/20*/
2121
=== modified file 'documentation/ubuntu-components-popups.qdoc'
--- documentation/ubuntu-components-popups.qdoc 2013-09-25 15:29:26 +0000
+++ documentation/ubuntu-components-popups.qdoc 2014-04-29 22:09:46 +0000
@@ -15,6 +15,6 @@
15 */15 */
1616
17/*!17/*!
18 \qmlmodule Ubuntu.Components.Popups 0.118 \qmlmodule Ubuntu.Components.Popups 1.0
19 \title Popovers, Sheets and Dialogs 19 \title Popovers, Sheets and Dialogs
20*/20*/
2121
=== modified file 'documentation/ubuntu-components.qdoc'
--- documentation/ubuntu-components.qdoc 2013-09-25 15:29:26 +0000
+++ documentation/ubuntu-components.qdoc 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17/*!17/*!
18 \qmlmodule Ubuntu.Components 0.118 \qmlmodule Ubuntu.Components 1.1
19 \title Basic QML Types19 \title Basic QML Types
20 \nextpage {Ubuntu User Interface Toolkit}20 \nextpage {Ubuntu User Interface Toolkit}
21*/21*/
2222
=== modified file 'documentation/ubuntu-layouts.qdoc'
--- documentation/ubuntu-layouts.qdoc 2013-09-25 15:29:26 +0000
+++ documentation/ubuntu-layouts.qdoc 2014-04-29 22:09:46 +0000
@@ -15,6 +15,11 @@
15 */15 */
1616
17/*!17/*!
18 \qmlmodule Ubuntu.Layouts 1.0
19 \title Layouts
20*/
21
22/*!
18 \page ubuntu-layouts.html23 \page ubuntu-layouts.html
19 \title Layouts - Introduction24 \title Layouts - Introduction
20 \nextpage Layouts - Terminology25 \nextpage Layouts - Terminology
@@ -177,7 +182,7 @@
177 \section2 Import182 \section2 Import
178 First of all, in order to use the layouting abilities, you need to import Ubuntu.Layouts.183 First of all, in order to use the layouting abilities, you need to import Ubuntu.Layouts.
179 \code184 \code
180 import Ubuntu.Layouts 0.1185 import Ubuntu.Layouts 1.0
181 \endcode186 \endcode
182187
183 This layout will have the red button anchored to the parent's left, top and bottom, having188 This layout will have the red button anchored to the parent's left, top and bottom, having
184189
=== modified file 'examples/calculator/calculator.qml'
--- examples/calculator/calculator.qml 2013-07-03 06:41:54 +0000
+++ examples/calculator/calculator.qml 2014-04-29 22:09:46 +0000
@@ -17,8 +17,8 @@
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.0
20import Ubuntu.Components 0.120import Ubuntu.Components 1.1
21import Ubuntu.Layouts 0.121import Ubuntu.Layouts 1.0
22import "components"22import "components"
23import "components/calculator.js" as Calculator23import "components/calculator.js" as Calculator
2424
2525
=== modified file 'examples/calculator/components/DefaultLayout.qml'
--- examples/calculator/components/DefaultLayout.qml 2013-07-02 14:42:23 +0000
+++ examples/calculator/components/DefaultLayout.qml 2014-04-29 22:09:46 +0000
@@ -17,8 +17,8 @@
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.0
20import Ubuntu.Components 0.120import Ubuntu.Components 1.1
21import Ubuntu.Layouts 0.121import Ubuntu.Layouts 1.0
2222
23Item {23Item {
24 id: buttonGrid24 id: buttonGrid
2525
=== modified file 'examples/calculator/components/Functions.qml'
--- examples/calculator/components/Functions.qml 2013-07-02 14:42:23 +0000
+++ examples/calculator/components/Functions.qml 2014-04-29 22:09:46 +0000
@@ -17,8 +17,8 @@
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.0
20import Ubuntu.Components 0.120import Ubuntu.Components 1.1
21import Ubuntu.Layouts 0.121import Ubuntu.Layouts 1.0
2222
23Grid {23Grid {
24 id: buttonGrid24 id: buttonGrid
2525
=== modified file 'examples/jokes/jokes.qml'
--- examples/jokes/jokes.qml 2013-07-04 21:36:23 +0000
+++ examples/jokes/jokes.qml 2014-04-29 22:09:46 +0000
@@ -16,7 +16,7 @@
16 */16 */
1717
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import QtMultimedia 5.020import QtMultimedia 5.0
2121
22/*!22/*!
2323
=== modified file 'examples/locale/locale.qml'
--- examples/locale/locale.qml 2013-07-04 21:36:23 +0000
+++ examples/locale/locale.qml 2014-04-29 22:09:46 +0000
@@ -16,8 +16,8 @@
16 */16 */
1717
18import QtQuick 2.018import QtQuick 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import Ubuntu.Components.ListItems 0.1 as ListItem20import Ubuntu.Components.ListItems 1.0 as ListItem
2121
22/*!22/*!
23 \brief An application to test locales on the device23 \brief An application to test locales on the device
2424
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Buttons.qml'
--- examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2014-03-04 12:16:38 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Buttons.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,8 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
19import Ubuntu.Components.ListItems 1.0
1920
20Template {21Template {
21 objectName: "buttonsTemplate"22 objectName: "buttonsTemplate"
@@ -80,4 +81,67 @@
80 }81 }
81 }82 }
82 }83 }
84
85 TemplateSection {
86 className: "ComboButton"
87
88 TemplateRow {
89 title: i18n.tr("Collapsed")
90
91 ComboButton {
92 text: "Press me"
93 objectName: "combobutton_collapsed"
94 comboList: UbuntuListView {
95 model: 10
96 delegate: Standard {
97 text: "item #" + modelData
98 }
99 }
100 }
101 }
102
103 TemplateRow {
104 title: i18n.tr("Icon")
105
106 ComboButton {
107 iconSource: "call.png"
108 comboList: UbuntuListView {
109 model: 10
110 delegate: Standard {
111 text: "item #" + modelData
112 }
113 }
114 }
115 }
116
117 TemplateRow {
118 title: i18n.tr("Icon+Text")
119
120 ComboButton {
121 text: "Answer"
122 iconSource: "call.png"
123 comboList: UbuntuListView {
124 model: 10
125 delegate: Standard {
126 text: "item #" + modelData
127 }
128 }
129 }
130 }
131 TemplateRow {
132 title: i18n.tr("Expanded")
133
134 ComboButton {
135 text: "Press me"
136 objectName: "combobutton_expanded"
137 expanded: true
138 comboList: UbuntuListView {
139 model: 10
140 delegate: Standard {
141 text: "item #" + modelData
142 }
143 }
144 }
145 }
146 }
83}147}
84148
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Label.qml'
--- examples/ubuntu-ui-toolkit-gallery/Label.qml 2013-11-28 11:11:55 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Label.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.0
1919
20Template {20Template {
21 objectName: "labelsTemplate"21 objectName: "labelsTemplate"
2222
=== modified file 'examples/unit-converter/unit-converter.qml'
--- examples/unit-converter/unit-converter.qml 2013-05-06 16:24:50 +0000
+++ examples/unit-converter/unit-converter.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
19import "conversion.js" as Converter19import "conversion.js" as Converter
2020
21/*!21/*!
2222
=== modified file 'manual-tests/button.qml'
--- manual-tests/button.qml 2012-11-14 07:40:05 +0000
+++ manual-tests/button.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20Button {20Button {
21 id: button21 id: button
2222
=== modified file 'modules/Ubuntu/Components/AbstractButton.qml'
--- modules/Ubuntu/Components/AbstractButton.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/AbstractButton.qml 2014-04-29 22:09:46 +0000
@@ -19,7 +19,7 @@
1919
20/*!20/*!
21 \qmlabstract AbstractButton21 \qmlabstract AbstractButton
22 \inqmlmodule Ubuntu.Components 0.122 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief The AbstractButton class defines the behavior of the button.24 \brief The AbstractButton class defines the behavior of the button.
2525
2626
=== modified file 'modules/Ubuntu/Components/Action.qml'
--- modules/Ubuntu/Components/Action.qml 2014-02-24 18:24:59 +0000
+++ modules/Ubuntu/Components/Action.qml 2014-04-29 22:09:46 +0000
@@ -19,7 +19,7 @@
1919
20/*!20/*!
21 \qmltype Action21 \qmltype Action
22 \inqmlmodule Ubuntu.Components 0.122 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief Describe an action that can be re-used in, for example a \l Button24 \brief Describe an action that can be re-used in, for example a \l Button
2525
2626
=== modified file 'modules/Ubuntu/Components/ActionItem.qml'
--- modules/Ubuntu/Components/ActionItem.qml 2014-02-24 18:24:59 +0000
+++ modules/Ubuntu/Components/ActionItem.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmlabstract ActionItem20 \qmlabstract ActionItem
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief A visual representation of an Action. The API of ActionItem is a23 \brief A visual representation of an Action. The API of ActionItem is a
24 copy of the API of \l Action, with additional properties to define24 copy of the API of \l Action, with additional properties to define
@@ -54,6 +54,7 @@
54 The image associated with the actionItem.54 The image associated with the actionItem.
55 Default value: action.iconSource.55 Default value: action.iconSource.
5656
57 This is the URL of any image file
57 If both iconSource and iconName are defined, iconName will be ignored.58 If both iconSource and iconName are defined, iconName will be ignored.
58 */59 */
59 property url iconSource: action ? action.iconSource : (iconName ? "image://theme/" + iconName : "")60 property url iconSource: action ? action.iconSource : (iconName ? "image://theme/" + iconName : "")
@@ -62,6 +63,14 @@
62 The icon associated with the actionItem in the ubuntu-mobile icon theme.63 The icon associated with the actionItem in the ubuntu-mobile icon theme.
63 Default value: action.iconName.64 Default value: action.iconName.
6465
66 \note The complete list of icons available in Ubuntu is not published yet.
67 For now please refer to the folders where the icon themes are installed:
68 \list
69 \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile
70 \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
71 \endlist
72 These 2 separate icon themes will be merged soon.
73
65 If both iconSource and iconName are defined, iconName will be ignored.74 If both iconSource and iconName are defined, iconName will be ignored.
66 */75 */
67 property string iconName: action ? action.iconName : ""76 property string iconName: action ? action.iconName : ""
6877
=== modified file 'modules/Ubuntu/Components/ActionList.qml'
--- modules/Ubuntu/Components/ActionList.qml 2013-08-28 10:41:42 +0000
+++ modules/Ubuntu/Components/ActionList.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype ActionList20 \qmltype ActionList
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief List of \l Action items23 \brief List of \l Action items
24*/24*/
2525
=== modified file 'modules/Ubuntu/Components/ActivityIndicator.qml'
--- modules/Ubuntu/Components/ActivityIndicator.qml 2013-06-27 15:20:12 +0000
+++ modules/Ubuntu/Components/ActivityIndicator.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype ActivityIndicator20 \qmltype ActivityIndicator
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief The ActivityIndicator component visually indicates that a task of23 \brief The ActivityIndicator component visually indicates that a task of
24 unknown duration is in progress, e.g. busy indication, connection in progress24 unknown duration is in progress, e.g. busy indication, connection in progress
2525
=== modified file 'modules/Ubuntu/Components/AnimatedItem.qml'
--- modules/Ubuntu/Components/AnimatedItem.qml 2013-06-26 19:25:09 +0000
+++ modules/Ubuntu/Components/AnimatedItem.qml 2014-04-29 22:09:46 +0000
@@ -16,7 +16,7 @@
1616
17/*!17/*!
18 \qmltype AnimatedItem18 \qmltype AnimatedItem
19 \inqmlmodule Ubuntu.Components 0.119 \inqmlmodule Ubuntu.Components 1.1
20 \ingroup ubuntu20 \ingroup ubuntu
21 \brief The AnimatedItem drives the animated components behavior inside a Flickable.21 \brief The AnimatedItem drives the animated components behavior inside a Flickable.
22 Reports whether the component whos parent is a Flickable is in the visible area or not,22 Reports whether the component whos parent is a Flickable is in the visible area or not,
2323
=== modified file 'modules/Ubuntu/Components/Button.qml'
--- modules/Ubuntu/Components/Button.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/Button.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype Button20 \qmltype Button
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief Standard Ubuntu button.23 \brief Standard Ubuntu button.
2424
@@ -83,6 +83,11 @@
83 property Gradient gradient: __styleInstance.defaultGradient83 property Gradient gradient: __styleInstance.defaultGradient
8484
85 /*!85 /*!
86 The font used for the button's text.
87 */
88 property font font: __styleInstance ? __styleInstance.defaultFont : Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium")})
89
90 /*!
86 The source URL of the icon to display inside the button.91 The source URL of the icon to display inside the button.
87 Leave this value blank for a text-only button.92 Leave this value blank for a text-only button.
88 If \l action is set, the default iconSource is that of the action.93 If \l action is set, the default iconSource is that of the action.
8994
=== modified file 'modules/Ubuntu/Components/CheckBox.qml'
--- modules/Ubuntu/Components/CheckBox.qml 2013-10-01 14:46:11 +0000
+++ modules/Ubuntu/Components/CheckBox.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype CheckBox20 \qmltype CheckBox
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief CheckBox is a component with two states, checked or unchecked. It can23 \brief CheckBox is a component with two states, checked or unchecked. It can
24 be used to set boolean options. The behavior is the same as \l Switch, the24 be used to set boolean options. The behavior is the same as \l Switch, the
2525
=== added file 'modules/Ubuntu/Components/ComboButton.qml'
--- modules/Ubuntu/Components/ComboButton.qml 1970-01-01 00:00:00 +0000
+++ modules/Ubuntu/Components/ComboButton.qml 2014-04-29 22:09:46 +0000
@@ -0,0 +1,366 @@
1/*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components.Popups 1.0
19import "mathUtils.js" as MathUtils
20
21/*!
22 \qmltype ComboButton
23 \inqmlmodule Ubuntu.Components 1.1
24 \ingroup ubuntu
25 \brief Ubuntu button providing a drop-down panel visualizing custom options.
26
27 The component is composed of three main blocks: \b {main button}, \b {dropdown}
28 and \b {combo list}.
29
30 The \a {main button} holds the main functionailty of the component, and it is
31 located at the left-top side of the expanded button. The \a clicked() signal
32 is triggered only when this button is pressed.
33
34 The \a {dropdown} is a button located on the right of the main button. Its
35 functionality is to drive the component's expanded state.
36
37 The \a {combo list} is a panel showing the content specified in \l comboList
38 property when expanded. The content is stretched horizontally to the component's
39 width, and its height is controlled by the \l expandedHeight property as follows:
40 \list
41 \li If the content height is smaller than the value of \l expandedHeight, the combo
42 list will be expanded only to the height of the content.
43 \qml
44 import QtQuick 2.0
45 import Ubuntu.Components 1.1
46 ComboButton {
47 text: "smaller content"
48 Rectangle {
49 height: units.gu(5) // smaller than the default expandedHeight
50 color: "blue"
51 }
52 }
53 \endqml
54 \li If the content height is greater than \l expandedHeight, the combo list will
55 expand till the height specified by the property and the content will be
56 scrolled; in case the combo list content is one single Flickable, ListView,
57 GridView or PathView, the content scrolling will be provided by the content
58 itself.
59 \qml
60 import QtQuick 2.0
61 import Ubuntu.Components 1.1
62 ComboButton {
63 text: "long scrolled content"
64 Column {
65 Repeater {
66 model: 5
67 spacing: units.gu(1)
68 Rectangle {
69 height: units.gu(5)
70 color: "blue"
71 }
72 }
73 }
74 }
75 \endqml
76 \li In case the content is a single Flickable, ListView, GridView or PathView,
77 the content will be filling the entire combo list area defined.
78 \qml
79 import QtQuick 2.0
80 import Ubuntu.Components 1.1
81 import Ubuntu.Components.ListItems 1.0
82 ComboButton {
83 text: "listview"
84 ListView {
85 model: 10
86 delegate: Standard {
87 text: "Item #" + modelData
88 }
89 }
90 }
91 \endqml
92 \li Vertical anchoring of combo list content to its parent is not possible
93 as the expansion calculation is done based on the combo list content height.
94 If the content wants to take the size of the entire combo list, it should
95 bind its height to the \l comboListHeight property.
96 \qml
97 import QtQuick 2.0
98 import Ubuntu.Components 1.1
99 ComboButton {
100 id: combo
101 text: "smaller content"
102 Rectangle {
103 height: combo.comboListHeight
104 color: "blue"
105 }
106 }
107 \endqml
108 \li In case the expansion needs to be the size of the combo list content, the \l
109 expandedHeight should be set to -1.
110 \qml
111 import QtQuick 2.0
112 import Ubuntu.Components 1.1
113 ComboButton {
114 text: "auto-sized content"
115 expandedHeight: -1
116 Column {
117 Repeater {
118 model: 5
119 spacing: units.gu(1)
120 Button {
121 text: "Button #" + modelData
122 }
123 }
124 }
125 }
126 \endqml
127 \endlist
128
129 The combo list can be expanded/collapsed either through the \l expanded property
130 or by clicking on the dropdown button. It is not collapsed when pressing the main
131 button or clicking on the combo list. In order to do an auto-collapsing button
132 you must reset the expanded property (set it to false) when the main button is
133 clicked or when a selection is taken from the combo list content. The following
134 example illustrates a possible implementation.
135
136 \qml
137 import QtQuick 2.0
138 import Ubuntu.Components 1.1
139
140 ComboButton {
141 id: combo
142 text: "Auto closing"
143 expanded: true
144 expandedHeight: units.gu(30)
145 onClicked: expanded = false
146 UbuntuListView {
147 width: parent.width
148 height: combo.comboListHeight
149 model: 20
150 delegate: Standard {
151 text: "Action #" + modelData
152 onClicked: {
153 combo.text = text;
154 combo.expanded = false;
155 }
156 }
157 }
158 }
159 \endqml
160
161 \section2 Styling
162 The style of the component is defined in \l ComboButtonStyle.
163 */
164Button {
165 id: combo
166
167 /*!
168 Specifies whether the combo list is expanded or not. The default falue is
169 false.
170 */
171 property bool expanded: false
172
173 /*!
174 The property holds the height of the component when collapsed. By default
175 the value is the implicit height of the component.
176 */
177 property real collapsedHeight: implicitHeight
178
179 /*!
180 The property holds the maximum height value the component should expand.
181 When setting the property, remember to take into account the \l collapsedHeight
182 value. The best practice is to use bind it with collapsedHeight.
183 \qml
184 ComboButton {
185 text: "altered expandedHeight"
186 expandedHeight: collapsedHeight + units.gu(25)
187 }
188 \endqml
189
190 A value of -1 will instruct the component to expand the combo list as
191 much as its content height is.
192
193 The default value is \l collapsedHeight + 19.5 GU, so at least 3 ListItems
194 can fit in the combo list.
195 \sa collapsedHeight
196 */
197 property real expandedHeight: collapsedHeight + units.gu(19.5)
198
199 /*!
200 The property holds the maximum combo list height allowed based on the
201 \l expandedHeight and \l collapsedHeight values. It is a convenience property
202 that can be used to size the combo list content.
203 \qml
204 import QtQuick 2.0
205 import Ubuntu.Components 1.1
206 import Ubuntu.Components.ListItems 0.1
207 ComboButton {
208 id: combo
209 text: "Full comboList size"
210 ListView {
211 anchors {
212 left: parent.left
213 right: parent.right
214 }
215 height: combo.comboListHeight
216 model: 20
217 delegate: Standard {
218 text: "Action #" + modelData
219 }
220 }
221 }
222 \endqml
223
224 \sa collapsedHeight, expandedHeight
225 */
226 readonly property real comboListHeight: (expandedHeight < 0) ?
227 comboListHolder.height :
228 (expandedHeight - collapsedHeight -
229 (combo.__styleInstance ? combo.__styleInstance.comboListMargin : 0))
230
231 /*!
232 \qmlproperty list<Item> comboList
233 \default
234 Property holding the list of items to be shown in the combo list. Being
235 a default property children items declared will land in the combo list.
236 \note The component is not responsible for layouting the content. It only
237 provides scrolling abilities for the case the content exceeds the defined
238 expanded height.
239 */
240 default property alias comboList: comboListHolder.data
241
242 /* ----------------- Color and font configurations ----------------- */
243 /*!
244 The property specifies the color of the dropdown button and the combo list
245 for both collapsed and expanded states. You can use \l expanded to define
246 different colors for expanded or collapsed states.
247 */
248 property color dropdownColor: __styleInstance ? __styleInstance.defaultDropdownColor : color
249
250
251 style: Theme.createStyleComponent("ComboButtonStyle.qml", combo)
252
253 Component.onCompleted: {
254 // update mouse area to report clicks only on the main button area
255 // area excluding dropDown button and combo list
256 // we must do separate bindings as __mouseArea is a read-only property
257 __mouseArea.anchors.fill = undefined;
258 __mouseArea.anchors.left = Qt.binding(function() {return combo.left;});
259 __mouseArea.anchors.top = Qt.binding(function() {return combo.top;});
260 __mouseArea.anchors.right = Qt.binding(function() {return combo.right;});
261 __mouseArea.anchors.rightMargin = Qt.binding(function() {return combo.__styleInstance.dropDownWidth + combo.__styleInstance.dropDownSeparatorWidth;});
262 __mouseArea.height = Qt.binding(function() {return collapsedHeight;});
263 // for autopilot, set the main button name
264 __mouseArea.objectName = "combobutton_mainbutton";
265
266 // bind a height calculation to avoid unwanted change
267 combo.height = Qt.binding(function() {return collapsedHeight + __styleInstance.comboListPanel.height});
268 }
269
270 // dropdown button
271 AbstractButton {
272 id: dropDown
273 objectName: "combobutton_dropdown"
274 anchors {
275 right: parent.right
276 top: parent.top
277 }
278 width: combo.__styleInstance ? combo.__styleInstance.dropDownWidth : 0
279 height: combo.collapsedHeight
280 // open dropdown when pressed, not when clicked
281 onClicked: {
282 // toggle expanded
283 combo.expanded = !combo.expanded;
284 }
285 }
286
287 // expansion list
288 Flickable {
289 id: comboHolder
290 parent: combo.__styleInstance ? combo.__styleInstance.comboListHolder : combo
291 anchors.fill: parent
292 interactive: combo.expanded && !contentIsFlickable() && (combo.expandedHeight > 0)
293 flickableDirection: Flickable.VerticalFlick
294 contentHeight: comboListHolder.height
295
296 // consider PathView as Flickable in this case as well!
297 function contentIsFlickable() {
298 return (comboListHolder.children.length === 1) &&
299 comboListHolder.children[0].hasOwnProperty("flicking");
300 }
301
302 Item {
303 id: comboListHolder
304 objectName: "combobutton_combolist"
305 anchors {
306 left: parent.left
307 right: parent.right
308 }
309
310 // stretch children width to holder's width
311 // must do binding to height manually to avoid binding loops caused
312 // by the vertical stretching when the component is a single flickable
313 property bool stretch: (combo.expandedHeight > 0 && comboHolder.contentIsFlickable())
314 onStretchChanged: stretchChildren()
315 onChildrenChanged: stretchChildren()
316 function stretchChildren() {
317 for (var i in comboListHolder.children) {
318 var child = comboListHolder.children[i];
319 if (comboListHolder.stretch) {
320 child.anchors.left = undefined;
321 child.anchors.right = undefined;
322 child.anchors.fill = comboListHolder;
323 comboListHolder.height = Qt.binding(function() {
324 return combo.comboListHeight;
325 });
326 } else {
327 child.anchors.left = comboListHolder.left;
328 child.anchors.right = comboListHolder.right;
329 comboListHolder.height = Qt.binding(function() {
330 return comboListHolder.childrenRect.height;
331 });
332 }
333 }
334 }
335 }
336 }
337 Scrollbar {
338 flickableItem: comboHolder
339 }
340
341 /*
342 Drive the expansion height of the combo list holder
343 This is a common functionaity in all combo buttons, therefore we can have it
344 in the main component.
345 */
346 Binding {
347 target: combo.__styleInstance.comboListPanel
348 property: "height"
349 value: {
350 if (!expanded) {
351 return 0;
352 }
353 if (comboListHolder.stretch) {
354 return combo.comboListHeight + combo.__styleInstance.comboListMargin;
355 }
356
357 var h = comboListHolder.height;
358 var max = combo.comboListHeight + combo.__styleInstance.comboListMargin;
359 if (combo.expandedHeight < 0) {
360 return max;
361 }
362
363 return MathUtils.clamp(h, 0, max);
364 }
365 }
366}
0367
=== modified file 'modules/Ubuntu/Components/CrossFadeImage.qml'
--- modules/Ubuntu/Components/CrossFadeImage.qml 2013-10-08 20:10:59 +0000
+++ modules/Ubuntu/Components/CrossFadeImage.qml 2014-04-29 22:09:46 +0000
@@ -19,7 +19,7 @@
19// we need to use named imports otherwise namespace collision is reported19// we need to use named imports otherwise namespace collision is reported
20// by the QML engine. As workaround, we use Ubuntu named import.20// by the QML engine. As workaround, we use Ubuntu named import.
21// Bug to watch: https://bugreports.qt-project.org/browse/QTBUG-2764521// Bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27645
22import Ubuntu.Components 0.1 as Ubuntu22import Ubuntu.Components 1.1 as Ubuntu
2323
24/*!24/*!
25 \qmltype CrossFadeImage25 \qmltype CrossFadeImage
@@ -28,7 +28,7 @@
2828
29 \qml29 \qml
30 import QtQuick 2.030 import QtQuick 2.0
31 import Ubuntu.Components 0.131 import Ubuntu.Components 1.1
3232
33 CrossFadeImage {33 CrossFadeImage {
34 width: units.gu(100)34 width: units.gu(100)
3535
=== modified file 'modules/Ubuntu/Components/Header.qml'
--- modules/Ubuntu/Components/Header.qml 2014-03-12 09:36:00 +0000
+++ modules/Ubuntu/Components/Header.qml 2014-04-29 22:09:46 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2013 Canonical Ltd.2 * Copyright 2013-2014 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -15,16 +15,12 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18// FIXME: When a module contains QML, C++ and JavaScript elements exported,18import Ubuntu.Components 1.0
19// we need to use named imports otherwise namespace collision is reported
20// by the QML engine. As workaround, we use Ubuntu named import.
21// Bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27645
22import Ubuntu.Components 0.1 as Ubuntu
2319
24/*!20/*!
25 \internal21 \internal
26 \qmltype Header22 \qmltype Header
27 \inqmlmodule Ubuntu.Components 0.123 \inqmlmodule Ubuntu.Components 1.1
28 \ingroup ubuntu24 \ingroup ubuntu
29*/25*/
30StyledItem {26StyledItem {
@@ -44,7 +40,7 @@
44 Behavior on y {40 Behavior on y {
45 enabled: animate && !(header.flickable && header.flickable.moving)41 enabled: animate && !(header.flickable && header.flickable.moving)
46 SmoothedAnimation {42 SmoothedAnimation {
47 duration: Ubuntu.UbuntuAnimation.BriskDuration43 duration: UbuntuAnimation.BriskDuration
48 }44 }
49 }45 }
5046
@@ -54,7 +50,7 @@
54 internal.movementEnded();50 internal.movementEnded();
55 }51 }
5652
57 visible: title || contents53 visible: title || contents || tabsModel
58 onVisibleChanged: {54 onVisibleChanged: {
59 internal.checkFlickableMargins();55 internal.checkFlickableMargins();
60 }56 }
@@ -77,13 +73,43 @@
77 The text to display in the header73 The text to display in the header
78 */74 */
79 property string title: ""75 property string title: ""
80 onTitleChanged: contentsChanged()76 onTitleChanged: {
77 header.show();
78 }
8179
82 /*!80 /*!
81 \deprecated
83 The contents of the header. If this is set, \l title will be ignored.82 The contents of the header. If this is set, \l title will be ignored.
83 This property is now DEPRECATED. Set tabsModel to show tabs navigation in header.
84 */84 */
85 property Item contents: null85 property Item contents: null
86 onContentsChanged: header.show()86 onContentsChanged: {
87 print("Header.contents property is now DEPRECATED. Set tabsModel to show tabs navigation.");
88 header.show();
89 }
90
91 /*!
92 A model of tabs to represent in the header.
93 This is automatically set by \l Tabs.
94 */
95 property var tabsModel: null
96
97 /*!
98 If it is possible to pop this PageStack, a back button will be
99 shown in the header.
100 */
101 property var pageStack: null
102
103 // FIXME: Currently autopilot can only get visual items, but once bug #1273956
104 // is fixed to support non-visual items, a QtObject may be used.
105 // --timp - 2014-03-20
106 Item {
107 // FIXME: This is a workaround to be able to get the properties of
108 // tabsModel in an autopilot test.
109 objectName: "tabsModelProperties"
110 property int count: tabsModel ? tabsModel.count : 0
111 property int selectedIndex: tabsModel ? tabsModel.selectedIndex : -1
112 }
87113
88 /*!114 /*!
89 The flickable that controls the movement of the header.115 The flickable that controls the movement of the header.
@@ -97,6 +123,11 @@
97 header.show();123 header.show();
98 }124 }
99125
126 /*!
127 Set by \l MainView
128 */
129 property bool useDeprecatedToolbar: true
130
100 QtObject {131 QtObject {
101 id: internal132 id: internal
102133
@@ -184,5 +215,6 @@
184 }215 }
185 }216 }
186217
187 style: Theme.createStyleComponent("HeaderStyle.qml", header)218 style: header.useDeprecatedToolbar ? Theme.createStyleComponent("HeaderStyle.qml", header) :
219 Theme.createStyleComponent("NewHeaderStyle.qml", header)
188}220}
189221
=== modified file 'modules/Ubuntu/Components/Icon.qml'
--- modules/Ubuntu/Components/Icon.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/Icon.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype Icon20 \qmltype Icon
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief The Icon component displays an icon from the icon theme.23 \brief The Icon component displays an icon from the icon theme.
2424
2525
=== added file 'modules/Ubuntu/Components/InputHandler.qml'
--- modules/Ubuntu/Components/InputHandler.qml 1970-01-01 00:00:00 +0000
+++ modules/Ubuntu/Components/InputHandler.qml 2014-04-29 22:09:46 +0000
@@ -0,0 +1,317 @@
1/*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components 1.1
19
20/*
21 This component is a unified text selection and scrolling handler for both
22 TextField and TextArea components.
23 */
24
25Item {
26 id: inputHandler
27 objectName: "input_handler"
28 // the root control
29 property Item main
30 // the input instance
31 property Item input
32 // the Flickable holdiong the input instance
33 property Flickable flickable
34 // selection cursor mode
35 property bool selectionCursor: input && input.selectedText !== ""
36 // True if mouse handlig is enabled, false if flicking mode is enabled
37 readonly property bool mouseHandlingEnabled: !flickable.interactive
38 // property holding the selection mode timeout
39 property int selectionModeTimeout: 200
40
41 // signal triggered when popup shoudl be opened
42 signal pressAndHold(int pos)
43
44 function activateInput() {
45 if (!input.activeFocus) {
46 input.forceActiveFocus();
47 } else {
48 showInputPanel();
49 }
50 }
51
52 function showInputPanel() {
53 if (!Qt.inputMethod.visible) {
54 Qt.inputMethod.show();
55 }
56 textChanged = false;
57 }
58 function hideInputPanel() {
59 Qt.inputMethod.hide();
60 // emit accepted signal if changed
61 if (textChanged && input.hasOwnProperty("accepted")) {
62 input.accepted();
63 }
64 }
65
66 // internal properties/functions
67 readonly property bool singleLine: input && input.hasOwnProperty("validator")
68 property var flickableList: new Array()
69 property bool textChanged: false
70 property int pressedPosition: -1
71 // move properties
72 property int moveStarts: -1
73 property int moveEnds: -1
74 // set scroller to the first Flickable that scrolls the input
75 // this can be the internal Flickable if the full autosize is disabled
76 // or one of the input's parent Flickable
77 readonly property bool scrollingDisabled: main && main.hasOwnProperty("autoSize") ?
78 (main.autoSize && (main.maximumLineCount <= 0)) : false
79 onScrollingDisabledChanged: if (state == "") flickable.interactive = !scrollingDisabled
80 readonly property Flickable grandScroller: firstFlickableParent(main)
81 readonly property Flickable scroller: (scrollingDisabled && grandScroller) ? grandScroller : flickable
82
83 // ensures the text cusrorRectangle is always in the internal Flickable's visible area
84 function ensureVisible()
85 {
86 var rect = input.cursorRectangle;
87 if (flickable.moving || flickable.flicking)
88 return;
89 if (flickable.contentX >= rect.x)
90 flickable.contentX = rect.x;
91 else if (flickable.contentX + flickable.width <= rect.x + rect.width)
92 flickable.contentX = rect.x + rect.width - flickable.width;
93 if (flickable.contentY >= rect.y)
94 flickable.contentY = rect.y;
95 else if (flickable.contentY + flickable.height <= rect.y + rect.height)
96 flickable.contentY = rect.y + rect.height - flickable.height;
97 }
98 // returns the mouse position
99 function mousePosition(mouse) {
100 return singleLine ? input.positionAt(mouse.x) : input.positionAt(mouse.x, mouse.y);
101 }
102 // checks whether the position is in the selected text
103 function positionInSelection(pos) {
104 return (input.selectionStart !== input.selectionEnd)
105 && (pos >= Math.min(input.selectionStart, input.selectionEnd))
106 && (pos <= Math.max(input.selectionStart, input.selectionEnd));
107 }
108
109 // check whether the mouse is inside a selected text area
110 function mouseInSelection(mouse) {
111 var pos = mousePosition(mouse);
112 return positionInSelection(pos);
113 }
114 // selects text
115 function selectText(mouse) {
116 moveEnds = mousePosition(mouse);
117 if (moveStarts < 0) {
118 moveStarts = moveEnds;
119 }
120 input.select(moveStarts, moveEnds);
121 }
122 // returns the first Flickable parent of a given item
123 function firstFlickableParent(item) {
124 var p = item ? item.parent : null;
125 while (p && !p.hasOwnProperty("flicking")) {
126 p = p.parent;
127 }
128 return p;
129 }
130 // focuses the input if not yet focused, and shows the context menu
131 function openContextMenu(mouse) {
132 var pos = mousePosition(mouse);
133 if (!main.focus || !mouseInSelection(mouse)) {
134 activateInput();
135 input.cursorPosition = pressedPosition = mousePosition(mouse);
136 }
137 // open context menu at the cursor position
138 inputHandler.pressAndHold(input.cursorPosition);
139 // if opened with left press (touch falls into this criteria as well), we need to set state to inactive
140 // so the mouse moves won't result in selected text loss/change
141 if (mouse.button === Qt.LeftButton) {
142 state = "inactive";
143 }
144 }
145
146 // disables interactive Flickable parents, stops at the first non-interactive flickable.
147 function toggleFlickablesInteractive(turnOn) {
148 var p;
149 if (!turnOn) {
150 // handle the scroller separately
151 p = firstFlickableParent(scroller)
152 while (p) {
153 if (p.interactive) {
154 flickableList.push(p);
155 p.interactive = false;
156 } else {
157 break;
158 }
159 p = firstFlickableParent(p);
160 }
161 } else {
162 while (flickableList.length > 0) {
163 p = flickableList.pop();
164 p.interactive = true;
165 }
166 }
167 }
168
169 Component.onCompleted: {
170 state = (main.focus) ? "" : "inactive";
171 }
172
173 // states
174 states: [
175 // override default state to turn on the saved Flickable interactive mode
176 State {
177 name: ""
178 StateChangeScript {
179 // restore interactive for all Flickable parents
180 script: toggleFlickablesInteractive(true);
181 }
182 },
183 State {
184 name: "inactive"
185 // we do not disable scroller here as in case the internal scrolling
186 // is disabled (scrollingDisabled = true) the outer scroller (grandScroller)
187 // would be blocked as well, which we don't want to
188 PropertyChanges {
189 target: flickable
190 interactive: false
191 }
192 },
193 State {
194 name: "scrolling"
195 StateChangeScript {
196 script: {
197 // stop scrolling all the parents
198 toggleFlickablesInteractive(false);
199 // stop selection timeout
200 selectionTimeout.running = false;
201 }
202 }
203 },
204 State {
205 name: "select"
206 // during select state all the flickables are blocked (interactive = false)
207 // we can use scroller here as we need to disable the outer scroller too!
208 PropertyChanges {
209 target: scroller
210 interactive: false
211 }
212 StateChangeScript {
213 script: {
214 // turn off interactive for all parent flickables
215 toggleFlickablesInteractive(false);
216 if (!positionInSelection(pressedPosition)) {
217 input.cursorPosition = pressedPosition;
218 }
219 }
220 }
221 }
222 ]
223
224 // brings the state back to default when the component looses focuse
225 Connections {
226 target: main
227 ignoreUnknownSignals: true
228 onFocusChanged: {
229 state = (main.focus) ? "" : "inactive";
230 }
231 }
232
233 // input specific signals
234 Connections {
235 target: input
236 onCursorRectangleChanged: if (!scrollingDisabled) ensureVisible()
237 onTextChanged: textChanged = true;
238 }
239
240 // inner or outer Flickable controlling
241 Connections {
242 target: scroller
243 // turn scrolling state on
244 onFlickStarted: if (!scrollingDisabled) state = "scrolling"
245 onMovementStarted: if (!scrollingDisabled) state = "scrolling"
246 // reset to default state
247 onMovementEnded: state = ""
248 }
249
250 // switches the state to selection
251 Timer {
252 id: selectionTimeout
253 interval: selectionModeTimeout
254 onTriggered: {
255 if (scroller && !scroller.moving) {
256 state = "select";
257 }
258 }
259 }
260
261 // Mouse handling
262 Mouse.forwardTo: [main]
263 Mouse.onPressed: {
264 if (input.activeFocus) {
265 // start selection timeout
266 selectionTimeout.restart();
267 }
268 // remember pressed position as we need it when entering into selection state
269 pressedPosition = mousePosition(mouse);
270 // consume event so it does not get forwarded to the input
271 mouse.accepted = true;
272 }
273 Mouse.onReleased: {
274 if (!main.focus && !main.activeFocusOnPress) {
275 return;
276 }
277
278 activateInput();
279 // stop text selection timer
280 selectionTimeout.running = false;
281 if (state === "") {
282 input.cursorPosition = mousePosition(mouse);
283 }
284 moveStarts = moveEnds = -1;
285 state = "";
286 // check if we get right-click from the frame or the area that has no text
287 if (mouse.button === Qt.RightButton) {
288 // open the popover
289 inputHandler.pressAndHold(input.cursorPosition);
290 }
291 }
292 Mouse.onPositionChanged: {
293 // leave if not focus, not the left button or not in select state
294 if (!input.activeFocus || (mouse.button !== Qt.LeftButton) || (state !== "select") || !main.selectByMouse) {
295 return;
296 }
297 // stop text selection timer
298 selectionTimeout.running = false;
299 selectText(mouse);
300 }
301 Mouse.onDoubleClicked: {
302 if (main.selectByMouse) {
303 input.selectWord();
304 // turn selection state temporarily so the selection is not cleared on release
305 state = "selection";
306 }
307 }
308 Mouse.onPressAndHold: openContextMenu(mouse)
309
310 // right button handling
311 MouseArea {
312 anchors.fill: parent
313 acceptedButtons: Qt.RightButton
314 // trigger pressAndHold
315 onReleased: openContextMenu(mouse)
316 }
317}
0318
=== modified file 'modules/Ubuntu/Components/Label.qml'
--- modules/Ubuntu/Components/Label.qml 2014-01-23 19:01:47 +0000
+++ modules/Ubuntu/Components/Label.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype Label20 \qmltype Label
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief Text with Ubuntu styling.23 \brief Text with Ubuntu styling.
2424
2525
=== modified file 'modules/Ubuntu/Components/ListItems/Base.qml'
--- modules/Ubuntu/Components/ListItems/Base.qml 2014-02-13 10:27:14 +0000
+++ modules/Ubuntu/Components/ListItems/Base.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype Base21 \qmltype Base
22 \inqmlmodule Ubuntu.Components.ListItems 0.122 \inqmlmodule Ubuntu.Components.ListItems 1.0
23 \ingroup ubuntu-listitems23 \ingroup ubuntu-listitems
24 \brief Parent class of various list item classes that can have24 \brief Parent class of various list item classes that can have
25 an icon and a progression symbol.25 an icon and a progression symbol.
@@ -44,32 +44,6 @@
44 property variant icon: iconSource != "" ? iconSource : undefined44 property variant icon: iconSource != "" ? iconSource : undefined
4545
46 /*!46 /*!
47 The image shown in the list item.
48 \qmlproperty url iconSource
49
50 This is a URL to any image file.
51 In order to use an icon from the Ubuntu theme, use the iconName property instead.
52 */
53 property url iconSource: iconName ? "image://theme/" + iconName : ""
54
55 /*!
56 The icon shown in the list item.
57
58 \qmlproperty string iconName
59
60 If both iconSource and iconName are defined, iconName will be ignored.
61
62 \note The complete list of icons available in Ubuntu is not published yet.
63 For now please refer to the folders where the icon themes are installed:
64 \list
65 \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile
66 \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
67 \endlist
68 These 2 separate icon themes will be merged soon.
69 */
70 property string iconName
71
72 /*!
73 \preliminary47 \preliminary
74 The location of the icon to show in the list item if iconSource failed to load (optional).48 The location of the icon to show in the list item if iconSource failed to load (optional).
75 \qmlproperty url fallbackIconSource49 \qmlproperty url fallbackIconSource
7650
=== modified file 'modules/Ubuntu/Components/ListItems/Caption.qml'
--- modules/Ubuntu/Components/ListItems/Caption.qml 2013-07-04 22:12:37 +0000
+++ modules/Ubuntu/Components/ListItems/Caption.qml 2014-04-29 22:09:46 +0000
@@ -15,17 +15,17 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype Caption21 \qmltype Caption
22 \inqmlmodule Ubuntu.Components.ListItems 0.122 \inqmlmodule Ubuntu.Components.ListItems 1.0
23 \ingroup ubuntu-listitems23 \ingroup ubuntu-listitems
24 \brief List item that shows a piece of text.24 \brief List item that shows a piece of text.
2525
26 Examples:26 Examples:
27 \qml27 \qml
28 import Ubuntu.Components.ListItems 0.1 as ListItem28 import Ubuntu.Components.ListItems 1.0 as ListItem
29 Column {29 Column {
30 ListItem.Standard {30 ListItem.Standard {
31 text: "Default list item."31 text: "Default list item."
3232
=== modified file 'modules/Ubuntu/Components/ListItems/Divider.qml'
--- modules/Ubuntu/Components/ListItems/Divider.qml 2012-10-19 01:09:07 +0000
+++ modules/Ubuntu/Components/ListItems/Divider.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype Divider20 \qmltype Divider
21 \inqmlmodule Ubuntu.Components.ListItems 0.121 \inqmlmodule Ubuntu.Components.ListItems 1.0
22 \ingroup ubuntu-listitems22 \ingroup ubuntu-listitems
23 \brief Divider to break up list items into groups.23 \brief Divider to break up list items into groups.
2424
2525
=== modified file 'modules/Ubuntu/Components/ListItems/Empty.qml'
--- modules/Ubuntu/Components/ListItems/Empty.qml 2014-02-04 14:39:53 +0000
+++ modules/Ubuntu/Components/ListItems/Empty.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype Empty21 \qmltype Empty
22 \inqmlmodule Ubuntu.Components.ListItems 0.122 \inqmlmodule Ubuntu.Components.ListItems 1.0
23 \ingroup ubuntu-listitems23 \ingroup ubuntu-listitems
24 \brief A list item with no contents.24 \brief A list item with no contents.
25 The Empty class can be used for generic list items containing other25 The Empty class can be used for generic list items containing other
@@ -34,8 +34,8 @@
3434
35 Examples:35 Examples:
36 \qml36 \qml
37 import Ubuntu.Components 0.137 import Ubuntu.Components 1.1
38 import Ubuntu.Components.ListItems 0.1 as ListItem38 import Ubuntu.Components.ListItems 1.0 as ListItem
3939
40 Item {40 Item {
41 Model {41 Model {
4242
=== modified file 'modules/Ubuntu/Components/ListItems/Expandable.qml'
--- modules/Ubuntu/Components/ListItems/Expandable.qml 2014-03-17 16:35:27 +0000
+++ modules/Ubuntu/Components/ListItems/Expandable.qml 2014-04-29 22:09:46 +0000
@@ -14,11 +14,11 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */15 */
16import QtQuick 2.016import QtQuick 2.0
17import Ubuntu.Components 0.117import Ubuntu.Components 1.1
1818
19/*!19/*!
20 \qmltype Expandable20 \qmltype Expandable
21 \inqmlmodule Ubuntu.Components.ListItems 0.121 \inqmlmodule Ubuntu.Components.ListItems 1.0
22 \ingroup ubuntu-listitems22 \ingroup ubuntu-listitems
23 \brief An expandable list item with no contents.23 \brief An expandable list item with no contents.
24 The Expandable class can be used for generic list items containing other24 The Expandable class can be used for generic list items containing other
@@ -35,8 +35,8 @@
3535
36 Examples:36 Examples:
37 \qml37 \qml
38 import Ubuntu.Components 0.138 import Ubuntu.Components 1.1
39 import Ubuntu.Components.ListItems 0.1 as ListItem39 import Ubuntu.Components.ListItems 1.0 as ListItem
4040
41 Item {41 Item {
42 ListModel {42 ListModel {
4343
=== modified file 'modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml'
--- modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml 2014-02-26 09:46:30 +0000
+++ modules/Ubuntu/Components/ListItems/ExpandablesColumn.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype ExpandablesColumn21 \qmltype ExpandablesColumn
22 \inqmlmodule Ubuntu.Components.ListItems 0.122 \inqmlmodule Ubuntu.Components.ListItems 1.0
23 \ingroup ubuntu-listitems23 \ingroup ubuntu-listitems
24 \brief A column to be used together with the \l Expandable item.24 \brief A column to be used together with the \l Expandable item.
25 This lays out its content just like a regular Column inside a Flickable but25 This lays out its content just like a regular Column inside a Flickable but
@@ -29,8 +29,8 @@
2929
30 Examples:30 Examples:
31 \qml31 \qml
32 import Ubuntu.Components 0.132 import Ubuntu.Components 1.1
33 import Ubuntu.Components.ListItems 0.1 as ListItem33 import Ubuntu.Components.ListItems 1.0 as ListItem
3434
35 ListItem.ExpandablesColumn {35 ListItem.ExpandablesColumn {
36 anchors { left: parent.left; right: parent.right }36 anchors { left: parent.left; right: parent.right }
3737
=== modified file 'modules/Ubuntu/Components/ListItems/Header.qml'
--- modules/Ubuntu/Components/ListItems/Header.qml 2013-02-06 11:40:31 +0000
+++ modules/Ubuntu/Components/ListItems/Header.qml 2014-04-29 22:09:46 +0000
@@ -18,13 +18,13 @@
1818
19/*!19/*!
20 \qmltype Header20 \qmltype Header
21 \inqmlmodule Ubuntu.Components.ListItems 0.121 \inqmlmodule Ubuntu.Components.ListItems 1.0
22 \ingroup ubuntu-listitems22 \ingroup ubuntu-listitems
23 \brief Header for grouping list items together23 \brief Header for grouping list items together
2424
25 Examples:25 Examples:
26 \qml26 \qml
27 import Ubuntu.Components.ListItems 0.1 as ListItem27 import Ubuntu.Components.ListItems 1.0 as ListItem
28 Column {28 Column {
29 ListItem.Header { text: "Title" }29 ListItem.Header { text: "Title" }
30 ListItem.Standard { text: "Item one" }30 ListItem.Standard { text: "Item one" }
3131
=== modified file 'modules/Ubuntu/Components/ListItems/IconVisual.qml'
--- modules/Ubuntu/Components/ListItems/IconVisual.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/ListItems/IconVisual.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20// internal helper class to create the visuals20// internal helper class to create the visuals
21// for the icon.21// for the icon.
2222
=== modified file 'modules/Ubuntu/Components/ListItems/ItemSelector.qml'
--- modules/Ubuntu/Components/ListItems/ItemSelector.qml 2014-02-18 14:23:57 +0000
+++ modules/Ubuntu/Components/ListItems/ItemSelector.qml 2014-04-29 22:09:46 +0000
@@ -16,11 +16,11 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import "." as ListItem18import "." as ListItem
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
2020
21/*!21/*!
22 \qmltype ItemSelector22 \qmltype ItemSelector
23 \inqmlmodule Ubuntu.Components.ListItems 0.123 \inqmlmodule Ubuntu.Components.ListItems 1.0
24 \ingroup ubuntu-listitems24 \ingroup ubuntu-listitems
25 \brief ListItem displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a25 \brief ListItem displaying either a single selected value or expanded multiple choice with an optional image and subtext when not expanded, when expanding it opens a
26 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.26 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.
@@ -29,7 +29,7 @@
2929
30 Examples:30 Examples:
31 \qml31 \qml
32 import Ubuntu.Components.ListItems 0.1 as ListItem32 import Ubuntu.Components.ListItems 1.0 as ListItem
33 Column {33 Column {
34 anchors.left: parent.left34 anchors.left: parent.left
35 anchors.right: parent.right35 anchors.right: parent.right
3636
=== modified file 'modules/Ubuntu/Components/ListItems/LabelVisual.qml'
--- modules/Ubuntu/Components/ListItems/LabelVisual.qml 2013-08-29 18:47:30 +0000
+++ modules/Ubuntu/Components/ListItems/LabelVisual.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20// internal helper class for text inside the list items.20// internal helper class for text inside the list items.
21Label {21Label {
2222
=== modified file 'modules/Ubuntu/Components/ListItems/MultiValue.qml'
--- modules/Ubuntu/Components/ListItems/MultiValue.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/ListItems/MultiValue.qml 2014-04-29 22:09:46 +0000
@@ -18,14 +18,14 @@
1818
19/*!19/*!
20 \qmltype MultiValue20 \qmltype MultiValue
21 \inqmlmodule Ubuntu.Components.ListItems 0.121 \inqmlmodule Ubuntu.Components.ListItems 1.0
22 \ingroup ubuntu-listitems22 \ingroup ubuntu-listitems
23 \brief List item displaying multiple values.23 \brief List item displaying multiple values.
24 \b{This component is under heavy development.}24 \b{This component is under heavy development.}
2525
26 Examples:26 Examples:
27 \qml27 \qml
28 import Ubuntu.Components.ListItems 0.1 as ListItem28 import Ubuntu.Components.ListItems 1.0 as ListItem
29 Column {29 Column {
30 ListItem.MultiValue {30 ListItem.MultiValue {
31 text: "Label"31 text: "Label"
3232
=== modified file 'modules/Ubuntu/Components/ListItems/ProgressionVisual.qml'
--- modules/Ubuntu/Components/ListItems/ProgressionVisual.qml 2013-12-09 12:23:15 +0000
+++ modules/Ubuntu/Components/ListItems/ProgressionVisual.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20// Internal helper class for the visuals of20// Internal helper class for the visuals of
21// the progression symbol.21// the progression symbol.
2222
=== modified file 'modules/Ubuntu/Components/ListItems/SingleControl.qml'
--- modules/Ubuntu/Components/ListItems/SingleControl.qml 2013-07-14 20:18:08 +0000
+++ modules/Ubuntu/Components/ListItems/SingleControl.qml 2014-04-29 22:09:46 +0000
@@ -15,19 +15,19 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
19import Ubuntu.Components.ListItems 0.119import Ubuntu.Components.ListItems 1.0
2020
21/*!21/*!
22 \qmltype SingleControl22 \qmltype SingleControl
23 \inqmlmodule Ubuntu.Components.ListItems 0.123 \inqmlmodule Ubuntu.Components.ListItems 1.0
24 \ingroup ubuntu-listitems24 \ingroup ubuntu-listitems
25 \brief A list item containing a single control25 \brief A list item containing a single control
2626
27 Examples:27 Examples:
28 \qml28 \qml
29 import Ubuntu.Components 0.129 import Ubuntu.Components 1.1
30 import Ubuntu.Components.ListItems 0.1 as ListItem30 import Ubuntu.Components.ListItems 1.0 as ListItem
31 Column {31 Column {
32 ListItem.SingleControl {32 ListItem.SingleControl {
33 control: Button {33 control: Button {
3434
=== modified file 'modules/Ubuntu/Components/ListItems/SingleValue.qml'
--- modules/Ubuntu/Components/ListItems/SingleValue.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/ListItems/SingleValue.qml 2014-04-29 22:09:46 +0000
@@ -18,13 +18,13 @@
1818
19/*!19/*!
20 \qmltype SingleValue20 \qmltype SingleValue
21 \inqmlmodule Ubuntu.Components.ListItems 0.121 \inqmlmodule Ubuntu.Components.ListItems 1.0
22 \ingroup ubuntu-listitems22 \ingroup ubuntu-listitems
23 \brief A list item displaying a single value23 \brief A list item displaying a single value
2424
25 Examples:25 Examples:
26 \qml26 \qml
27 import Ubuntu.Components.ListItems 0.1 as ListItem27 import Ubuntu.Components.ListItems 1.0 as ListItem
28 Column {28 Column {
29 ListItem.SingleValue {29 ListItem.SingleValue {
30 text: "Label"30 text: "Label"
3131
=== modified file 'modules/Ubuntu/Components/ListItems/Standard.qml'
--- modules/Ubuntu/Components/ListItems/Standard.qml 2013-11-07 19:45:58 +0000
+++ modules/Ubuntu/Components/ListItems/Standard.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype Standard21 \qmltype Standard
22 \inqmlmodule Ubuntu.Components.ListItems 0.122 \inqmlmodule Ubuntu.Components.ListItems 1.0
23 \ingroup ubuntu-listitems23 \ingroup ubuntu-listitems
24 \brief The standard list item class. It shows a basic list item24 \brief The standard list item class. It shows a basic list item
25 with a label (text), and optionally an icon, a progression arrow,25 with a label (text), and optionally an icon, a progression arrow,
@@ -30,8 +30,8 @@
3030
31 Examples:31 Examples:
32 \qml32 \qml
33 import Ubuntu.Components 0.133 import Ubuntu.Components 1.1
34 import Ubuntu.Components.ListItems 0.1 as ListItem34 import Ubuntu.Components.ListItems 1.0 as ListItem
35 Column {35 Column {
36 ListItem.Standard {36 ListItem.Standard {
37 text: "Selectable standard list item"37 text: "Selectable standard list item"
@@ -76,32 +76,6 @@
76 property variant icon: iconSource != "" ? iconSource : undefined76 property variant icon: iconSource != "" ? iconSource : undefined
7777
78 /*!78 /*!
79 The image shown in the list item.
80 \qmlproperty url iconSource
81
82 This is a URL to any image file.
83 In order to use an icon from the Ubuntu theme, use the iconName property instead.
84 */
85 property url iconSource: iconName ? "image://theme/" + iconName : ""
86
87 /*!
88 The icon shown in the list item.
89
90 \qmlproperty string iconName
91
92 If both iconSource and iconName are defined, iconName will be ignored.
93
94 \note The complete list of icons available in Ubuntu is not published yet.
95 For now please refer to the folders where the icon themes are installed:
96 \list
97 \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile
98 \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
99 \endlist
100 These 2 separate icon themes will be merged soon.
101 */
102 property string iconName
103
104 /*!
105 \preliminary79 \preliminary
106 The location of the icon to show in the list item if iconSource failed to load (optional).80 The location of the icon to show in the list item if iconSource failed to load (optional).
107 \qmlproperty url fallbackIconSource81 \qmlproperty url fallbackIconSource
10882
=== modified file 'modules/Ubuntu/Components/ListItems/Subtitled.qml'
--- modules/Ubuntu/Components/ListItems/Subtitled.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/ListItems/Subtitled.qml 2014-04-29 22:09:46 +0000
@@ -15,18 +15,18 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype MultiValue21 \qmltype MultiValue
22 \inqmlmodule Ubuntu.Components.ListItems 0.122 \inqmlmodule Ubuntu.Components.ListItems 1.0
23 \ingroup ubuntu-listitems23 \ingroup ubuntu-listitems
24 \brief List item displaying a second string under the main label.24 \brief List item displaying a second string under the main label.
25 \b{This component is under heavy development.}25 \b{This component is under heavy development.}
2626
27 Examples:27 Examples:
28 \qml28 \qml
29 import Ubuntu.Components.ListItems 0.1 as ListItem29 import Ubuntu.Components.ListItems 1.0 as ListItem
30 Column {30 Column {
31 ListItem.Subtitled {31 ListItem.Subtitled {
32 text: "Idle"32 text: "Idle"
@@ -71,13 +71,6 @@
7171
72 /*!72 /*!
73 \preliminary73 \preliminary
74 The text that is shown in the list item as a label.
75 \qmlproperty string text
76 */
77 property alias text: label.text
78
79 /*!
80 \preliminary
81 The list of strings that will be shown under the label text74 The list of strings that will be shown under the label text
82 \qmlproperty string subText75 \qmlproperty string subText
83 */76 */
@@ -94,6 +87,7 @@
9487
95 LabelVisual {88 LabelVisual {
96 id: label89 id: label
90 text: subtitledListItem.text
97 selected: subtitledListItem.selected91 selected: subtitledListItem.selected
98 anchors {92 anchors {
99 top: parent.top93 top: parent.top
10094
=== modified file 'modules/Ubuntu/Components/ListItems/ThinDivider.qml'
--- modules/Ubuntu/Components/ListItems/ThinDivider.qml 2013-11-19 08:51:02 +0000
+++ modules/Ubuntu/Components/ListItems/ThinDivider.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype ThinDivider20 \qmltype ThinDivider
21 \inqmlmodule Ubuntu.Components.ListItems 0.121 \inqmlmodule Ubuntu.Components.ListItems 1.0
22 \ingroup ubuntu-listitems22 \ingroup ubuntu-listitems
23 \brief Narrow line used as a divider between ListItems.23 \brief Narrow line used as a divider between ListItems.
2424
@@ -29,7 +29,7 @@
2929
30 Examples:30 Examples:
31 \qml31 \qml
32 import Ubuntu.Components.ListItems 0.1 as ListItem32 import Ubuntu.Components.ListItems 1.0 as ListItem
33 Column {33 Column {
34 width: 25034 width: 250
35 ListItem.ThinDivider {} //can be used as header for list35 ListItem.ThinDivider {} //can be used as header for list
3636
=== modified file 'modules/Ubuntu/Components/ListItems/ValueSelector.qml'
--- modules/Ubuntu/Components/ListItems/ValueSelector.qml 2013-11-06 22:52:15 +0000
+++ modules/Ubuntu/Components/ListItems/ValueSelector.qml 2014-04-29 22:09:46 +0000
@@ -15,13 +15,13 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 ****DEPRECATED! PLEASE USE ITEM SELECTOR OR FOR THE UBUNTU SHAPE VERSION THE OPTION SELECTOR.****21 ****DEPRECATED! PLEASE USE ITEM SELECTOR OR FOR THE UBUNTU SHAPE VERSION THE OPTION SELECTOR.****
2222
23 \qmltype ValueSelector23 \qmltype ValueSelector
24 \inqmlmodule Ubuntu.Components.ListItems 0.124 \inqmlmodule Ubuntu.Components.ListItems 1.0
25 \ingroup ubuntu-listitems25 \ingroup ubuntu-listitems
26 \brief List item displaying single selected value when not expanded,26 \brief List item displaying single selected value when not expanded,
27 where expanding it opens a listing of all the possible values for selection.27 where expanding it opens a listing of all the possible values for selection.
@@ -30,7 +30,7 @@
3030
31 Examples:31 Examples:
32 \qml32 \qml
33 import Ubuntu.Components.ListItems 0.1 as ListItem33 import Ubuntu.Components.ListItems 1.0 as ListItem
34 Column {34 Column {
35 width: 25035 width: 250
36 ListItem.ValueSelector {36 ListItem.ValueSelector {
@@ -80,32 +80,6 @@
80 property alias icon: selectorMain.icon80 property alias icon: selectorMain.icon
8181
82 /*!82 /*!
83 The image shown in the list item.
84 \qmlproperty url iconSource
85
86 This is a URL to any image file.
87 In order to use an icon from the Ubuntu theme, use the iconName property instead.
88 */
89 property url iconSource: iconName ? "image://theme/" + iconName : ""
90
91 /*!
92 The icon shown in the list item.
93
94 \qmlproperty string iconName
95
96 If both iconSource and iconName are defined, iconName will be ignored.
97
98 \note The complete list of icons available in Ubuntu is not published yet.
99 For now please refer to the folders where the icon themes are installed:
100 \list
101 \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile
102 \li Ubuntu Desktop: \l file:/usr/share/icons/ubuntu-mono-dark
103 \endlist
104 These 2 separate icon themes will be merged soon.
105 */
106 property string iconName
107
108 /*!
109 \preliminary83 \preliminary
110 The location of the icon to show in the list item if iconSource failed to load (optional).84 The location of the icon to show in the list item if iconSource failed to load (optional).
111 \qmlproperty url fallbackIconSource85 \qmlproperty url fallbackIconSource
11286
=== modified file 'modules/Ubuntu/Components/ListItems/qmldir'
--- modules/Ubuntu/Components/ListItems/qmldir 2014-02-13 11:33:09 +0000
+++ modules/Ubuntu/Components/ListItems/qmldir 2014-04-29 22:09:46 +0000
@@ -1,3 +1,4 @@
1module Ubuntu.Components.ListItems
1Empty 0.1 Empty.qml2Empty 0.1 Empty.qml
2Base 0.1 Base.qml3Base 0.1 Base.qml
3Caption 0.1 Caption.qml4Caption 0.1 Caption.qml
@@ -16,3 +17,20 @@
16ThinDivider 0.1 ThinDivider.qml17ThinDivider 0.1 ThinDivider.qml
17Expandable 0.1 Expandable.qml18Expandable 0.1 Expandable.qml
18ExpandablesColumn 0.1 ExpandablesColumn.qml19ExpandablesColumn 0.1 ExpandablesColumn.qml
20
21#version 1.0
22Empty 1.0 Empty.qml
23Base 1.0 Base.qml
24Caption 1.0 Caption.qml
25Divider 1.0 Divider.qml
26Header 1.0 Header.qml
27MultiValue 1.0 MultiValue.qml
28ItemSelector 1.0 ItemSelector.qml
29ValueSelector 1.0 ValueSelector.qml
30SingleValue 1.0 SingleValue.qml
31Standard 1.0 Standard.qml
32Subtitled 1.0 Subtitled.qml
33SingleControl 1.0 SingleControl.qml
34ThinDivider 1.0 ThinDivider.qml
35Expandable 1.0 Expandable.qml
36ExpandablesColumn 1.0 ExpandablesColumn.qml
1937
=== modified file 'modules/Ubuntu/Components/MainView.qml'
--- modules/Ubuntu/Components/MainView.qml 2014-04-04 11:03:45 +0000
+++ modules/Ubuntu/Components/MainView.qml 2014-04-29 22:09:46 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2012-2013 Canonical Ltd.2 * Copyright 2012-2014 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -16,12 +16,12 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Unity.Action 1.1 as UnityActions18import Ubuntu.Unity.Action 1.1 as UnityActions
19import Ubuntu.PerformanceMetrics 0.119import Ubuntu.PerformanceMetrics 1.0
20import QtQuick.Window 2.020import QtQuick.Window 2.0
2121
22/*!22/*!
23 \qmltype MainView23 \qmltype MainView
24 \inqmlmodule Ubuntu.Components 0.124 \inqmlmodule Ubuntu.Components 1.1
25 \ingroup ubuntu25 \ingroup ubuntu
26 \brief MainView is the root Item that should be used for all applications.26 \brief MainView is the root Item that should be used for all applications.
27 It automatically adds a header and toolbar for its contents and can27 It automatically adds a header and toolbar for its contents and can
@@ -30,7 +30,7 @@
30 The simplest way to use a MainView is to include a \l Page object inside the MainView:30 The simplest way to use a MainView is to include a \l Page object inside the MainView:
31 \qml31 \qml
32 import QtQuick 2.032 import QtQuick 2.0
33 import Ubuntu.Components 0.133 import Ubuntu.Components 1.1
3434
35 MainView {35 MainView {
36 width: units.gu(48)36 width: units.gu(48)
@@ -57,7 +57,7 @@
57 will automatically hide and show when the user scrolls up or down:57 will automatically hide and show when the user scrolls up or down:
58 \qml58 \qml
59 import QtQuick 2.059 import QtQuick 2.0
60 import Ubuntu.Components 0.160 import Ubuntu.Components 1.1
6161
62 MainView {62 MainView {
63 width: units.gu(48)63 width: units.gu(48)
@@ -89,7 +89,7 @@
89 A toolbar can be added to the application by setting the tools property of the \l Page:89 A toolbar can be added to the application by setting the tools property of the \l Page:
90 \qml90 \qml
91 import QtQuick 2.091 import QtQuick 2.0
92 import Ubuntu.Components 0.192 import Ubuntu.Components 1.1
9393
94 MainView {94 MainView {
95 width: units.gu(48)95 width: units.gu(48)
@@ -169,7 +169,7 @@
169 the content:169 the content:
170 \qml170 \qml
171 import QtQuick 2.0171 import QtQuick 2.0
172 import Ubuntu.Components 0.1172 import Ubuntu.Components 1.1
173173
174 MainView {174 MainView {
175 width: units.gu(40)175 width: units.gu(40)
@@ -349,12 +349,9 @@
349 Binding {349 Binding {
350 target: headerItem350 target: headerItem
351 property: "tabBar"351 property: "tabBar"
352 value: headerItem.contents352 value: headerItem.__styleInstance.__tabBar
353 when: headerItem.contents &&353 when: headerItem.__styleInstance &&
354 headerItem.contents.hasOwnProperty("selectionMode") &&354 headerItem.__styleInstance.hasOwnProperty("__tabBar")
355 headerItem.contents.hasOwnProperty("alwaysSelectionMode") &&
356 headerItem.contents.hasOwnProperty("selectedIndex") &&
357 headerItem.contents.hasOwnProperty("pressed")
358 }355 }
359356
360 Connections {357 Connections {
@@ -383,6 +380,8 @@
383 window.title = headerItem.title380 window.title = headerItem.title
384 }381 }
385 }382 }
383
384 useDeprecatedToolbar: mainView.useDeprecatedToolbar
386 }385 }
387386
388 Connections {387 Connections {
@@ -451,6 +450,12 @@
451450
452 /*!451 /*!
453 \internal452 \internal
453 Tabs needs to know whether to use a TabBar or the new header.
454 */
455 property alias useDeprecatedToolbar: mainView.useDeprecatedToolbar
456
457 /*!
458 \internal
454 The action manager that has the global context for the MainView's actions,459 The action manager that has the global context for the MainView's actions,
455 and to which a local context can be added for each Page that has actions.actions.460 and to which a local context can be added for each Page that has actions.actions.
456 */461 */
457462
=== modified file 'modules/Ubuntu/Components/Object.qml'
--- modules/Ubuntu/Components/Object.qml 2012-11-14 11:01:37 +0000
+++ modules/Ubuntu/Components/Object.qml 2014-04-29 22:09:46 +0000
@@ -19,7 +19,7 @@
19/*!19/*!
20 \qmltype Object20 \qmltype Object
21 \internal21 \internal
22 \inqmlmodule Ubuntu.Components 0.122 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief Internal type used for lightweight objects that can have children.24 \brief Internal type used for lightweight objects that can have children.
25*/25*/
2626
=== modified file 'modules/Ubuntu/Components/OptionSelector.qml'
--- modules/Ubuntu/Components/OptionSelector.qml 2013-12-13 15:50:35 +0000
+++ modules/Ubuntu/Components/OptionSelector.qml 2014-04-29 22:09:46 +0000
@@ -16,11 +16,11 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import "ListItems" as ListItem18import "ListItems" as ListItem
19import Ubuntu.Components 0.1 as Toolkit19import Ubuntu.Components 1.1 as Toolkit
2020
21/*!21/*!
22 \qmltype OptionSelector22 \qmltype OptionSelector
23 \inqmlmodule Ubuntu.Components 0.123 \inqmlmodule Ubuntu.Components 1.1
24 \ingroup ubuntu-components24 \ingroup ubuntu-components
25 \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 a25 \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
26 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.26 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.
@@ -29,7 +29,7 @@
2929
30 Examples:30 Examples:
31 \qml31 \qml
32 import Ubuntu.Components 0.132 import Ubuntu.Components 1.1
33 Column {33 Column {
34 spacing: units.gu(3)34 spacing: units.gu(3)
3535
3636
=== modified file 'modules/Ubuntu/Components/OptionSelectorDelegate.qml'
--- modules/Ubuntu/Components/OptionSelectorDelegate.qml 2014-03-04 12:16:38 +0000
+++ modules/Ubuntu/Components/OptionSelectorDelegate.qml 2014-04-29 22:09:46 +0000
@@ -16,7 +16,7 @@
1616
17/*!17/*!
18 \qmltype OptionSelectorDelegate18 \qmltype OptionSelectorDelegate
19 \inqmlmodule Ubuntu.Components 0.119 \inqmlmodule Ubuntu.Components 1.1
20 \ingroup ubuntu-components20 \ingroup ubuntu-components
21 \brief OptionSelector delegate which can display text, subtext and an image from a custom model.21 \brief OptionSelector delegate which can display text, subtext and an image from a custom model.
2222
@@ -24,7 +24,7 @@
2424
25 Examples:25 Examples:
26 \qml26 \qml
27 import Ubuntu.Components 0.127 import Ubuntu.Components 1.1
28 Column {28 Column {
29 width: 25029 width: 250
30 OptionSelector {30 OptionSelector {
@@ -45,21 +45,15 @@
4545
46import QtQuick 2.046import QtQuick 2.0
47import "ListItems" as ListItem47import "ListItems" as ListItem
48import Ubuntu.Components 0.1 as Toolkit48import Ubuntu.Components 1.1 as Toolkit
4949
50ListItem.Standard {50ListItem.Empty {
51 id: option51 id: option
5252
53 __height: units.gu(5)53 __height: units.gu(5)
5454
55 /*!55 /*!
56 \preliminary56 \preliminary
57 Main text.
58 */
59 property string text
60
61 /*!
62 \preliminary
63 Subtext which appears below the main text.57 Subtext which appears below the main text.
64 */58 */
65 property string subText59 property string subText
@@ -78,30 +72,6 @@
78 }72 }
7973
80 /*!74 /*!
81 The image shown for that option.
82 \qmlproperty url iconSource
83
84 This is a URL to any image file.
85 In order to use an icon from the Ubuntu theme, use the iconName property instead.
86 */
87 property url iconSource: iconName ? "image://theme/" + iconName : ""
88
89 /*!
90 The icon shown for that option.
91
92 \qmlproperty string iconName
93
94 If both iconSource and iconName are defined, iconName will be ignored.
95
96 \note The complete list of icons available in Ubuntu is not published yet.
97 For now please refer to the folders where the icon theme is installed:
98 \list
99 \li Ubuntu Touch: \l file:/usr/share/icons/ubuntu-mobile
100 \endlist
101 */
102 property string iconName
103
104 /*!
105 \preliminary75 \preliminary
106 Constrains the size of the image to nothing greater than that of the delegate. Changes fillMode to Image.PreserveAspectFit.76 Constrains the size of the image to nothing greater than that of the delegate. Changes fillMode to Image.PreserveAspectFit.
107 */77 */
@@ -337,7 +307,7 @@
337 objectName: "icon"307 objectName: "icon"
338308
339 height: constrainImage ? option.height : sourceSize.height309 height: constrainImage ? option.height : sourceSize.height
340 source: icon310 source: option.iconSource
341 fillMode: constrainImage ? Image.PreserveAspectFit : Image.Stretch311 fillMode: constrainImage ? Image.PreserveAspectFit : Image.Stretch
342312
343 ShaderEffect {313 ShaderEffect {
344314
=== modified file 'modules/Ubuntu/Components/OrientationHelper.qml'
--- modules/Ubuntu/Components/OrientationHelper.qml 2013-11-27 11:15:17 +0000
+++ modules/Ubuntu/Components/OrientationHelper.qml 2014-04-29 22:09:46 +0000
@@ -16,11 +16,11 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import QtQuick.Window 2.018import QtQuick.Window 2.0
19import Ubuntu.Components 0.1 as Ubuntu19import Ubuntu.Components 1.0
2020
21/*!21/*!
22 \qmltype OrientationHelper22 \qmltype OrientationHelper
23 \inqmlmodule Ubuntu.Components 0.123 \inqmlmodule Ubuntu.Components 1.1
24 \ingroup ubuntu24 \ingroup ubuntu
25 \brief The OrientationHelper automatically rotates its children following the25 \brief The OrientationHelper automatically rotates its children following the
26 orientation of the device.26 orientation of the device.
@@ -188,8 +188,8 @@
188 RotationAnimation {188 RotationAnimation {
189 target: orientationHelper189 target: orientationHelper
190 properties: "rotation"190 properties: "rotation"
191 duration: Ubuntu.UbuntuAnimation.FastDuration191 duration: UbuntuAnimation.FastDuration
192 easing: Ubuntu.UbuntuAnimation.StandardEasing192 easing: UbuntuAnimation.StandardEasing
193 direction: RotationAnimation.Shortest193 direction: RotationAnimation.Shortest
194 }194 }
195 }195 }
196196
=== modified file 'modules/Ubuntu/Components/Page.qml'
--- modules/Ubuntu/Components/Page.qml 2014-04-07 10:03:39 +0000
+++ modules/Ubuntu/Components/Page.qml 2014-04-29 22:09:46 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright 2012 Canonical Ltd.2 * Copyright 2012-2014 Canonical Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by5 * it under the terms of the GNU Lesser General Public License as published by
@@ -19,7 +19,7 @@
1919
20/*!20/*!
21 \qmltype Page21 \qmltype Page
22 \inqmlmodule Ubuntu.Components 0.122 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief A page is the basic Item that must be used inside the \l MainView,24 \brief A page is the basic Item that must be used inside the \l MainView,
25 \l PageStack and \l Tabs.25 \l PageStack and \l Tabs.
@@ -33,7 +33,7 @@
3333
34 \qml34 \qml
35 import QtQuick 2.035 import QtQuick 2.0
36 import Ubuntu.Components 0.136 import Ubuntu.Components 1.1
3737
38 MainView {38 MainView {
39 width: units.gu(48)39 width: units.gu(48)
@@ -94,7 +94,7 @@
94 and anchors to the top of the page or fills the page. For example:94 and anchors to the top of the page or fills the page. For example:
95 \qml95 \qml
96 import QtQuick 2.096 import QtQuick 2.0
97 import Ubuntu.Components 0.197 import Ubuntu.Components 1.1
9898
99 MainView {99 MainView {
100 width: units.gu(30)100 width: units.gu(30)
@@ -151,6 +151,13 @@
151 Object {151 Object {
152 id: internal152 id: internal
153153
154 Binding {
155 target: internal.header
156 property: "pageStack"
157 value: page.pageStack
158 when: page.active && internal.header != null && page.pageStack != null
159 }
160
154 UnityActions.ActionContext {161 UnityActions.ActionContext {
155 id: actionContext162 id: actionContext
156163
157164
=== modified file 'modules/Ubuntu/Components/PageStack.qml'
--- modules/Ubuntu/Components/PageStack.qml 2013-08-22 17:15:35 +0000
+++ modules/Ubuntu/Components/PageStack.qml 2014-04-29 22:09:46 +0000
@@ -19,7 +19,7 @@
1919
20/*!20/*!
21 \qmltype PageStack21 \qmltype PageStack
22 \inqmlmodule Ubuntu.Components 0.122 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief A stack of \l Page items that is used for inter-Page navigation.24 \brief A stack of \l Page items that is used for inter-Page navigation.
25 Pages on the stack can be popped, and new Pages can be pushed.25 Pages on the stack can be popped, and new Pages can be pushed.
@@ -39,8 +39,8 @@
39 Example:39 Example:
40 \qml40 \qml
41 import QtQuick 2.041 import QtQuick 2.0
42 import Ubuntu.Components 0.142 import Ubuntu.Components 1.1
43 import Ubuntu.Components.ListItems 0.1 as ListItem43 import Ubuntu.Components.ListItems 1.0 as ListItem
4444
45 MainView {45 MainView {
46 width: units.gu(48)46 width: units.gu(48)
4747
=== modified file 'modules/Ubuntu/Components/PageTreeNode.qml'
--- modules/Ubuntu/Components/PageTreeNode.qml 2013-07-18 16:42:06 +0000
+++ modules/Ubuntu/Components/PageTreeNode.qml 2014-04-29 22:09:46 +0000
@@ -19,7 +19,7 @@
19/*!19/*!
20 \internal20 \internal
21 \qmltype PageTreeNode21 \qmltype PageTreeNode
22 \inqmlmodule Ubuntu.Components 0.122 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief The common parent of \l Page, \l MainView, \l PageStack and \l Tabs.24 \brief The common parent of \l Page, \l MainView, \l PageStack and \l Tabs.
2525
2626
=== modified file 'modules/Ubuntu/Components/PageWrapper.qml'
--- modules/Ubuntu/Components/PageWrapper.qml 2013-03-11 16:20:14 +0000
+++ modules/Ubuntu/Components/PageWrapper.qml 2014-04-29 22:09:46 +0000
@@ -20,7 +20,7 @@
20/*!20/*!
21 \internal21 \internal
22 \qmltype PageWrapper22 \qmltype PageWrapper
23 \inqmlmodule Ubuntu.Components 0.123 \inqmlmodule Ubuntu.Components 1.1
24 \ingroup ubuntu24 \ingroup ubuntu
25 \brief Internal class used by \l PageStack25 \brief Internal class used by \l PageStack
2626
2727
=== modified file 'modules/Ubuntu/Components/Panel.qml'
--- modules/Ubuntu/Components/Panel.qml 2014-04-02 09:47:42 +0000
+++ modules/Ubuntu/Components/Panel.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.1 as Toolkit18import Ubuntu.Components 1.1 as Toolkit
1919
20/*!20/*!
21 \qmltype Panel21 \qmltype Panel
22 \inqmlmodule Ubuntu.Components 0.122 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu23 \ingroup ubuntu
24 \brief A panel that can be swiped in and out from an edge of the window by the user.24 \brief A panel that can be swiped in and out from an edge of the window by the user.
25 For most applications, it is highly recommended to use the \l MainView instead which includes25 For most applications, it is highly recommended to use the \l MainView instead which includes
@@ -38,7 +38,7 @@
38 A black panel that can be swiped in from the lower-right of the window can be created like this:38 A black panel that can be swiped in from the lower-right of the window can be created like this:
39 \qml39 \qml
40 import QtQuick 2.040 import QtQuick 2.0
41 import Ubuntu.Components 0.141 import Ubuntu.Components 1.1
4242
43 Item {43 Item {
44 width: units.gu(80)44 width: units.gu(80)
@@ -69,7 +69,7 @@
69 A panel that looks like the standard (bottom-aligned) toolbar, but with custom contents, can be created like this:69 A panel that looks like the standard (bottom-aligned) toolbar, but with custom contents, can be created like this:
70 \qml70 \qml
71 import QtQuick 2.071 import QtQuick 2.0
72 import Ubuntu.Components 0.172 import Ubuntu.Components 1.1
7373
74 Item {74 Item {
75 width: units.gu(80)75 width: units.gu(80)
@@ -106,7 +106,7 @@
106 signals are forwarded from the panel by calling the child's trigger() function. Example:106 signals are forwarded from the panel by calling the child's trigger() function. Example:
107 \qml107 \qml
108 import QtQuick 2.0108 import QtQuick 2.0
109 import Ubuntu.Components 0.1109 import Ubuntu.Components 1.1
110110
111 Rectangle {111 Rectangle {
112 color: Theme.palette.normal.background112 color: Theme.palette.normal.background
@@ -583,8 +583,9 @@
583 }583 }
584584
585 onEntered: {585 onEntered: {
586 // panel.__openOnHover586 if (panel.__openOnHover) {
587 panel.open();587 panel.open();
588 }
588 hideTimer.stop();589 hideTimer.stop();
589 }590 }
590591
591592
=== modified file 'modules/Ubuntu/Components/Pickers/DatePicker.qml'
--- modules/Ubuntu/Components/Pickers/DatePicker.qml 2014-03-06 10:46:17 +0000
+++ modules/Ubuntu/Components/Pickers/DatePicker.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype DatePicker21 \qmltype DatePicker
22 \inqmlmodule Ubuntu.Components.Pickers 0.122 \inqmlmodule Ubuntu.Components.Pickers 1.0
23 \ingroup ubuntu-pickers23 \ingroup ubuntu-pickers
24 \brief DatePicker component provides date and time value picking functionality.24 \brief DatePicker component provides date and time value picking functionality.
2525
@@ -36,8 +36,8 @@
3636
37 \qml37 \qml
38 import QtQuick 2.038 import QtQuick 2.0
39 import Ubuntu.Components 0.139 import Ubuntu.Components 1.1
40 import Ubuntu.Components.Pickers 0.140 import Ubuntu.Components.Pickers 1.0
4141
42 Column {42 Column {
43 Label {43 Label {
@@ -56,8 +56,8 @@
56 which shows only year and month date units would look as follows:56 which shows only year and month date units would look as follows:
57 \qml57 \qml
58 import QtQuick 2.058 import QtQuick 2.0
59 import Ubuntu.Components 0.159 import Ubuntu.Components 1.1
60 import Ubuntu.Components.Pickers 0.160 import Ubuntu.Components.Pickers 1.0
6161
62 Column {62 Column {
63 Label {63 Label {
@@ -75,8 +75,8 @@
75 The following example demonstrates how to use DatePicker for time picking.75 The following example demonstrates how to use DatePicker for time picking.
76 \qml76 \qml
77 import QtQuick 2.077 import QtQuick 2.0
78 import Ubuntu.Components 0.178 import Ubuntu.Components 1.1
79 import Ubuntu.Components.Pickers 0.179 import Ubuntu.Components.Pickers 1.0
8080
81 Column {81 Column {
82 Label {82 Label {
@@ -112,8 +112,8 @@
112 \endlist112 \endlist
113 \qml113 \qml
114 import QtQuick 2.0114 import QtQuick 2.0
115 import Ubuntu.Components 0.1115 import Ubuntu.Components 1.1
116 import Ubuntu.Components.Pickers 0.1116 import Ubuntu.Components.Pickers 1.0
117117
118 Column {118 Column {
119 Label {119 Label {
120120
=== modified file 'modules/Ubuntu/Components/Pickers/DayModel.qml'
--- modules/Ubuntu/Components/Pickers/DayModel.qml 2013-12-10 16:52:07 +0000
+++ modules/Ubuntu/Components/Pickers/DayModel.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20PickerModelBase {20PickerModelBase {
21 circular: true21 circular: true
2222
=== modified file 'modules/Ubuntu/Components/Pickers/Dialer.qml'
--- modules/Ubuntu/Components/Pickers/Dialer.qml 2013-09-24 10:42:52 +0000
+++ modules/Ubuntu/Components/Pickers/Dialer.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import "../" 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype Dialer21 \qmltype Dialer
22 \inqmlmodule Ubuntu.Components.Pickers 0.122 \inqmlmodule Ubuntu.Components.Pickers 1.0
23 \ingroup ubuntu-pickers23 \ingroup ubuntu-pickers
24 \brief Dialer is a phone dialer style picker component.24 \brief Dialer is a phone dialer style picker component.
2525
@@ -35,7 +35,7 @@
3535
36 \qml36 \qml
37 import QtQuick 2.037 import QtQuick 2.0
38 import Ubuntu.Components.Pickers 0.138 import Ubuntu.Components.Pickers 1.0
3939
40 Dialer {40 Dialer {
41 size: units.gu(20)41 size: units.gu(20)
4242
=== modified file 'modules/Ubuntu/Components/Pickers/DialerHand.qml'
--- modules/Ubuntu/Components/Pickers/DialerHand.qml 2013-09-24 11:02:17 +0000
+++ modules/Ubuntu/Components/Pickers/DialerHand.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import "../" 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype DialerHand21 \qmltype DialerHand
22 \inqmlmodule Ubuntu.Components.Pickers 0.122 \inqmlmodule Ubuntu.Components.Pickers 1.0
23 \ingroup ubuntu-pickers23 \ingroup ubuntu-pickers
24 \brief DialerHand represents a value selector on a Dialer.24 \brief DialerHand represents a value selector on a Dialer.
2525
2626
=== modified file 'modules/Ubuntu/Components/Pickers/DialerHandGroup.qml'
--- modules/Ubuntu/Components/Pickers/DialerHandGroup.qml 2013-09-12 09:19:28 +0000
+++ modules/Ubuntu/Components/Pickers/DialerHandGroup.qml 2014-04-29 22:09:46 +0000
@@ -14,7 +14,7 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */15 */
16import QtQuick 2.016import QtQuick 2.0
17import "../" 0.117import Ubuntu.Components 1.1
1818
19/*!19/*!
20 \internal20 \internal
2121
=== modified file 'modules/Ubuntu/Components/Pickers/HoursModel.qml'
--- modules/Ubuntu/Components/Pickers/HoursModel.qml 2013-12-16 13:01:41 +0000
+++ modules/Ubuntu/Components/Pickers/HoursModel.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20PickerModelBase {20PickerModelBase {
21 property int from21 property int from
2222
=== modified file 'modules/Ubuntu/Components/Pickers/MinutesModel.qml'
--- modules/Ubuntu/Components/Pickers/MinutesModel.qml 2013-12-13 11:22:51 +0000
+++ modules/Ubuntu/Components/Pickers/MinutesModel.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20PickerModelBase {20PickerModelBase {
21 property int from21 property int from
2222
=== modified file 'modules/Ubuntu/Components/Pickers/MonthModel.qml'
--- modules/Ubuntu/Components/Pickers/MonthModel.qml 2013-12-13 11:22:51 +0000
+++ modules/Ubuntu/Components/Pickers/MonthModel.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20PickerModelBase {20PickerModelBase {
21 circular: (count >= 11)21 circular: (count >= 11)
2222
=== modified file 'modules/Ubuntu/Components/Pickers/Picker.qml'
--- modules/Ubuntu/Components/Pickers/Picker.qml 2014-03-06 10:46:17 +0000
+++ modules/Ubuntu/Components/Pickers/Picker.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype Picker21 \qmltype Picker
22 \inqmlmodule Ubuntu.Components.Pickers 0.122 \inqmlmodule Ubuntu.Components.Pickers 1.0
23 \ingroup ubuntu-pickers23 \ingroup ubuntu-pickers
24 \brief Picker is a slot-machine style value selection component.24 \brief Picker is a slot-machine style value selection component.
2525
@@ -35,8 +35,8 @@
35 Example:35 Example:
36 \qml36 \qml
37 import QtQuick 2.037 import QtQuick 2.0
38 import Ubuntu.Components 0.138 import Ubuntu.Components 1.1
39 import Ubuntu.Components.Pickers 0.139 import Ubuntu.Components.Pickers 1.0
4040
41 Picker {41 Picker {
42 model: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"]42 model: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"]
4343
=== modified file 'modules/Ubuntu/Components/Pickers/PickerDelegate.qml'
--- modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2014-03-06 10:46:17 +0000
+++ modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import "../" 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype PickerDelegate21 \qmltype PickerDelegate
22 \inqmlmodule Ubuntu.Components.Pickers 0.122 \inqmlmodule Ubuntu.Components.Pickers 1.0
23 \ingroup ubuntu-pickers23 \ingroup ubuntu-pickers
24 \brief PickerDelegate component serves as base for Picker delegates.24 \brief PickerDelegate component serves as base for Picker delegates.
2525
2626
=== modified file 'modules/Ubuntu/Components/Pickers/PickerPanel.qml'
--- modules/Ubuntu/Components/Pickers/PickerPanel.qml 2014-02-19 10:36:14 +0000
+++ modules/Ubuntu/Components/Pickers/PickerPanel.qml 2014-04-29 22:09:46 +0000
@@ -16,13 +16,13 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import QtQuick.Window 2.018import QtQuick.Window 2.0
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
20import Ubuntu.Components.ListItems 0.120import Ubuntu.Components.ListItems 1.0
21import Ubuntu.Components.Popups 0.121import Ubuntu.Components.Popups 1.0
2222
23/*!23/*!
24 \qmltype PickerPanel24 \qmltype PickerPanel
25 \inqmlmodule Ubuntu.Components 0.125 \inqmlmodule Ubuntu.Components 1.1
26 \ingroup ubuntu-pickers26 \ingroup ubuntu-pickers
27 \brief Provides a panel for opening a DatePicker in place of the input panel or27 \brief Provides a panel for opening a DatePicker in place of the input panel or
28 as Popover, depending on the form factor.28 as Popover, depending on the form factor.
@@ -32,7 +32,7 @@
32 on date pickers.32 on date pickers.
33 \qml33 \qml
34 import QtQuick 2.034 import QtQuick 2.0
35 import Ubuntu.Components 0.135 import Ubuntu.Components 1.1
3636
37 MainWindow {37 MainWindow {
38 width: units.gu(40)38 width: units.gu(40)
3939
=== modified file 'modules/Ubuntu/Components/Pickers/PickerRow.qml'
--- modules/Ubuntu/Components/Pickers/PickerRow.qml 2014-03-06 10:46:17 +0000
+++ modules/Ubuntu/Components/Pickers/PickerRow.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20Row {20Row {
21 id: row21 id: row
2222
=== modified file 'modules/Ubuntu/Components/Pickers/SecondsModel.qml'
--- modules/Ubuntu/Components/Pickers/SecondsModel.qml 2013-12-13 11:22:51 +0000
+++ modules/Ubuntu/Components/Pickers/SecondsModel.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20PickerModelBase {20PickerModelBase {
21 property int from21 property int from
2222
=== modified file 'modules/Ubuntu/Components/Pickers/YearModel.qml'
--- modules/Ubuntu/Components/Pickers/YearModel.qml 2013-12-13 11:22:51 +0000
+++ modules/Ubuntu/Components/Pickers/YearModel.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20PickerModelBase {20PickerModelBase {
21 // local properties21 // local properties
2222
=== modified file 'modules/Ubuntu/Components/Pickers/qmldir'
--- modules/Ubuntu/Components/Pickers/qmldir 2013-12-10 16:37:04 +0000
+++ modules/Ubuntu/Components/Pickers/qmldir 2014-04-29 22:09:46 +0000
@@ -8,3 +8,10 @@
8internal MonthModel MonthModel.qml8internal MonthModel MonthModel.qml
9internal DayModel DayModel.qml9internal DayModel DayModel.qml
10internal PickerModelBase PickerModelBase.qml10internal PickerModelBase PickerModelBase.qml
11
12#version 1.0
13Picker 1.0 Picker.qml
14PickerDelegate 1.0 PickerDelegate.qml
15Dialer 1.0 Dialer.qml
16DialerHand 1.0 DialerHand.qml
17DatePicker 1.0 DatePicker.qml
1118
=== modified file 'modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml'
--- modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2013-08-07 12:50:35 +0000
+++ modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2014-04-29 22:09:46 +0000
@@ -15,13 +15,13 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import "../" 0.118import Ubuntu.Components 1.1
19import "../ListItems" 0.119import Ubuntu.Components.ListItems 1.0
2020
21/*!21/*!
22 \qmltype ActionSelectionPopover22 \qmltype ActionSelectionPopover
23 \inherits Popover23 \inherits Popover
24 \inqmlmodule Ubuntu.Components.Popups 0.124 \inqmlmodule Ubuntu.Components.Popups 1.0
25 \ingroup ubuntu-popups25 \ingroup ubuntu-popups
26 \brief A special popover presenting actions to the user. The popover is closed26 \brief A special popover presenting actions to the user. The popover is closed
27 automatically when the action is chosen.27 automatically when the action is chosen.
2828
=== modified file 'modules/Ubuntu/Components/Popups/ComposerSheet.qml'
--- modules/Ubuntu/Components/Popups/ComposerSheet.qml 2013-11-05 00:34:46 +0000
+++ modules/Ubuntu/Components/Popups/ComposerSheet.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
19/*!19/*!
20 \qmltype ComposerSheet20 \qmltype ComposerSheet
21 \inherits SheetBase21 \inherits SheetBase
22 \inqmlmodule Ubuntu.Components.Popups 0.122 \inqmlmodule Ubuntu.Components.Popups 1.0
23 \ingroup ubuntu-popups23 \ingroup ubuntu-popups
24 \brief Much like the \l DefaultSheet the Composer Sheet allows an application to insert a content24 \brief Much like the \l DefaultSheet the Composer Sheet allows an application to insert a content
25 view over the focused view without disrupting the navigation pattern. However the Composer Sheet25 view over the focused view without disrupting the navigation pattern. However the Composer Sheet
@@ -31,8 +31,8 @@
3131
32 Example:32 Example:
33 \qml33 \qml
34 import Ubuntu.Components 0.134 import Ubuntu.Components 1.1
35 import Ubuntu.Components.Popups 0.135 import Ubuntu.Components.Popups 1.0
3636
37 Item {37 Item {
38 Component {38 Component {
3939
=== modified file 'modules/Ubuntu/Components/Popups/DefaultSheet.qml'
--- modules/Ubuntu/Components/Popups/DefaultSheet.qml 2013-07-01 05:54:33 +0000
+++ modules/Ubuntu/Components/Popups/DefaultSheet.qml 2014-04-29 22:09:46 +0000
@@ -15,12 +15,12 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype DefaultSheet21 \qmltype DefaultSheet
22 \inherits SheetBase22 \inherits SheetBase
23 \inqmlmodule Ubuntu.Components.Popups 0.123 \inqmlmodule Ubuntu.Components.Popups 1.0
24 \ingroup ubuntu-popups24 \ingroup ubuntu-popups
25 \brief The Default Sheet allows an application to insert a content view over the focused view25 \brief The Default Sheet allows an application to insert a content view over the focused view
26 without disrupting the navigation pattern (tabs state or drill-down path are maintained. When26 without disrupting the navigation pattern (tabs state or drill-down path are maintained. When
@@ -32,8 +32,8 @@
3232
33 Example:33 Example:
34 \qml34 \qml
35 import Ubuntu.Components 0.135 import Ubuntu.Components 1.1
36 import Ubuntu.Components.Popups 0.136 import Ubuntu.Components.Popups 1.0
3737
38 Item {38 Item {
39 Component {39 Component {
4040
=== modified file 'modules/Ubuntu/Components/Popups/Dialog.qml'
--- modules/Ubuntu/Components/Popups/Dialog.qml 2013-07-15 10:28:04 +0000
+++ modules/Ubuntu/Components/Popups/Dialog.qml 2014-04-29 22:09:46 +0000
@@ -15,13 +15,13 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
19import "internalPopupUtils.js" as InternalPopupUtils19import "internalPopupUtils.js" as InternalPopupUtils
2020
21/*!21/*!
22 \qmltype Dialog22 \qmltype Dialog
23 \inherits PopupBase23 \inherits PopupBase
24 \inqmlmodule Ubuntu.Components.Popups 0.124 \inqmlmodule Ubuntu.Components.Popups 1.0
25 \ingroup ubuntu-popups25 \ingroup ubuntu-popups
26 \brief The Dialog caters for cases in which the application requires the user to determine26 \brief The Dialog caters for cases in which the application requires the user to determine
27 between optional actions. The Dialog will interrupt the user flow and lock the view27 between optional actions. The Dialog will interrupt the user flow and lock the view
@@ -33,8 +33,8 @@
33 Example:33 Example:
34 \qml34 \qml
35 import QtQuick 2.035 import QtQuick 2.0
36 import Ubuntu.Components 0.136 import Ubuntu.Components 1.1
37 import Ubuntu.Components.Popups 0.137 import Ubuntu.Components.Popups 1.0
3838
39 Item {39 Item {
40 width: units.gu(80)40 width: units.gu(80)
4141
=== modified file 'modules/Ubuntu/Components/Popups/Popover.qml'
--- modules/Ubuntu/Components/Popups/Popover.qml 2014-01-10 15:34:32 +0000
+++ modules/Ubuntu/Components/Popups/Popover.qml 2014-04-29 22:09:46 +0000
@@ -16,12 +16,12 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import "internalPopupUtils.js" as InternalPopupUtils18import "internalPopupUtils.js" as InternalPopupUtils
19import Ubuntu.Components 0.119import Ubuntu.Components 1.1
2020
21/*!21/*!
22 \qmltype Popover22 \qmltype Popover
23 \inherits PopupBase23 \inherits PopupBase
24 \inqmlmodule Ubuntu.Components.Popups 0.124 \inqmlmodule Ubuntu.Components.Popups 1.0
25 \ingroup ubuntu-popups25 \ingroup ubuntu-popups
26 \brief A popover allows an application to present additional content without changing the view.26 \brief A popover allows an application to present additional content without changing the view.
27 A popover has a fixed width and automatic height, depending on is contents.27 A popover has a fixed width and automatic height, depending on is contents.
@@ -32,9 +32,9 @@
32 Example:32 Example:
33 \qml33 \qml
34 import QtQuick 2.034 import QtQuick 2.0
35 import Ubuntu.Components 0.135 import Ubuntu.Components 1.1
36 import Ubuntu.Components.ListItems 0.1 as ListItem36 import Ubuntu.Components.ListItems 1.0 as ListItem
37 import Ubuntu.Components.Popups 0.137 import Ubuntu.Components.Popups 1.0
3838
39 Rectangle {39 Rectangle {
40 color: Theme.palette.normal.background40 color: Theme.palette.normal.background
@@ -204,6 +204,7 @@
204204
205 StyledItem {205 StyledItem {
206 id: foreground206 id: foreground
207 objectName: "popover_foreground"
207208
208 //styling properties209 //styling properties
209 property real minimumWidth: units.gu(40)210 property real minimumWidth: units.gu(40)
210211
=== modified file 'modules/Ubuntu/Components/Popups/PopupBase.qml'
--- modules/Ubuntu/Components/Popups/PopupBase.qml 2014-01-08 16:32:38 +0000
+++ modules/Ubuntu/Components/Popups/PopupBase.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype PopupBase21 \qmltype PopupBase
22 \inqmlmodule Ubuntu.Components.Popups 0.122 \inqmlmodule Ubuntu.Components.Popups 1.0
23 \ingroup ubuntu-popups23 \ingroup ubuntu-popups
24 \brief The base class for all dialogs, sheets and popovers. Do not use directly.24 \brief The base class for all dialogs, sheets and popovers. Do not use directly.
2525
@@ -142,6 +142,7 @@
142 InverseMouseArea {142 InverseMouseArea {
143 id: eventGrabber143 id: eventGrabber
144 enabled: true144 enabled: true
145 acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton
145 anchors.fill: __foreground146 anchors.fill: __foreground
146 sensingArea: dismissArea147 sensingArea: dismissArea
147 propagateComposedEvents: !grabDismissAreaEvents148 propagateComposedEvents: !grabDismissAreaEvents
148149
=== modified file 'modules/Ubuntu/Components/Popups/SheetBase.qml'
--- modules/Ubuntu/Components/Popups/SheetBase.qml 2013-06-27 15:20:12 +0000
+++ modules/Ubuntu/Components/Popups/SheetBase.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,11 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20/*!20/*!
21 \qmltype SheetBase21 \qmltype SheetBase
22 \inqmlmodule Ubuntu.Components.Popups 0.122 \inqmlmodule Ubuntu.Components.Popups 1.0
23 \ingroup ubuntu-popups23 \ingroup ubuntu-popups
24 \brief Parent class of different types of sheets. Not to be used directly.24 \brief Parent class of different types of sheets. Not to be used directly.
2525
2626
=== modified file 'modules/Ubuntu/Components/Popups/qmldir'
--- modules/Ubuntu/Components/Popups/qmldir 2013-07-13 14:35:21 +0000
+++ modules/Ubuntu/Components/Popups/qmldir 2014-04-29 22:09:46 +0000
@@ -9,3 +9,14 @@
9ActionSelectionPopover 0.1 ActionSelectionPopover.qml9ActionSelectionPopover 0.1 ActionSelectionPopover.qml
1010
11PopupUtils 0.1 popupUtils.js11PopupUtils 0.1 popupUtils.js
12
13#version 1.0
14Dialog 1.0 Dialog.qml
15PopupBase 1.0 PopupBase.qml
16Popover 1.0 Popover.qml
17SheetBase 1.0 SheetBase.qml
18DefaultSheet 1.0 DefaultSheet.qml
19ComposerSheet 1.0 ComposerSheet.qml
20ActionSelectionPopover 1.0 ActionSelectionPopover.qml
21
22PopupUtils 1.0 popupUtils.js
1223
=== modified file 'modules/Ubuntu/Components/ProgressBar.qml'
--- modules/Ubuntu/Components/ProgressBar.qml 2013-08-01 14:06:36 +0000
+++ modules/Ubuntu/Components/ProgressBar.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype ProgressBar20 \qmltype ProgressBar
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief The ProgressBar component visually indicates the progress of a process of23 \brief The ProgressBar component visually indicates the progress of a process of
24 determinate or indeterminate duration.24 determinate or indeterminate duration.
2525
=== modified file 'modules/Ubuntu/Components/Scrollbar.qml'
--- modules/Ubuntu/Components/Scrollbar.qml 2013-06-27 15:20:12 +0000
+++ modules/Ubuntu/Components/Scrollbar.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype ScrollBar20 \qmltype ScrollBar
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief The ScrollBar component provides scrolling functionality for23 \brief The ScrollBar component provides scrolling functionality for
24 scrollable views (i.e. Flickable, ListView).24 scrollable views (i.e. Flickable, ListView).
2525
=== modified file 'modules/Ubuntu/Components/Slider.qml'
--- modules/Ubuntu/Components/Slider.qml 2014-01-08 16:32:38 +0000
+++ modules/Ubuntu/Components/Slider.qml 2014-04-29 22:09:46 +0000
@@ -21,7 +21,7 @@
2121
22/*!22/*!
23 \qmltype Slider23 \qmltype Slider
24 \inqmlmodule Ubuntu.Components 0.124 \inqmlmodule Ubuntu.Components 1.1
25 \ingroup ubuntu25 \ingroup ubuntu
26 \brief Slider is a component to select a value from a continuous range of26 \brief Slider is a component to select a value from a continuous range of
27 values.27 values.
2828
=== modified file 'modules/Ubuntu/Components/StyledItem.qml'
--- modules/Ubuntu/Components/StyledItem.qml 2013-06-27 15:36:28 +0000
+++ modules/Ubuntu/Components/StyledItem.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmlabstract StyledItem20 \qmlabstract StyledItem
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup theming22 \ingroup theming
23 \brief The StyledItem class allows items to be styled by the theme.23 \brief The StyledItem class allows items to be styled by the theme.
2424
2525
=== modified file 'modules/Ubuntu/Components/Switch.qml'
--- modules/Ubuntu/Components/Switch.qml 2013-06-27 15:20:12 +0000
+++ modules/Ubuntu/Components/Switch.qml 2014-04-29 22:09:46 +0000
@@ -21,7 +21,7 @@
2121
22/*!22/*!
23 \qmltype Switch23 \qmltype Switch
24 \inqmlmodule Ubuntu.Components 0.124 \inqmlmodule Ubuntu.Components 1.1
25 \ingroup ubuntu25 \ingroup ubuntu
26 \brief Switch is a component with two states, checked or unchecked. It can26 \brief Switch is a component with two states, checked or unchecked. It can
27 be used to set boolean options. The behavior is the same as \l CheckBox, the27 be used to set boolean options. The behavior is the same as \l CheckBox, the
2828
=== modified file 'modules/Ubuntu/Components/Tab.qml'
--- modules/Ubuntu/Components/Tab.qml 2013-11-07 07:26:01 +0000
+++ modules/Ubuntu/Components/Tab.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype Tab20 \qmltype Tab
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief Component to represent a single tab in a \l Tabs environment.23 \brief Component to represent a single tab in a \l Tabs environment.
2424
2525
=== modified file 'modules/Ubuntu/Components/TabBar.qml'
--- modules/Ubuntu/Components/TabBar.qml 2014-04-08 12:38:35 +0000
+++ modules/Ubuntu/Components/TabBar.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype TabBar20 \qmltype TabBar
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief Tab bar that will be shown in the header when \l Tabs is active.23 \brief Tab bar that will be shown in the header when \l Tabs is active.
24 This component does not need to be instantiated by the developer, it is24 This component does not need to be instantiated by the developer, it is
@@ -63,8 +63,18 @@
6363
64 /*!64 /*!
65 The property holds the index of the selected Tab item.65 The property holds the index of the selected Tab item.
66 Note: Setting this property is DEPRECATED. Set the selectedIndex of the model instead.
66 */67 */
67 property int selectedIndex: (model && internal.modelChecked && model.count > 0) ? 0 : -168 property int selectedIndex: (model && internal.modelChecked) ? model.selectedIndex : -1
69
70 /*! \internal */
71 onSelectedIndexChanged: {
72 if (!model) return;
73 if (tabBar.selectedIndex !== model.selectedIndex) {
74 console.warn("Setting TabBar.selectedIndex is DEPRECATED. Set selectedIndex of the model instead");
75 tabBar.selectedIndex = Qt.binding(function() { return (model && internal.modelChecked) ? model.selectedIndex : -1 });
76 }
77 }
6878
69 /*!79 /*!
70 Do not deactivate the tab bar after a specified idle time or when the user selects a new tab.80 Do not deactivate the tab bar after a specified idle time or when the user selects a new tab.
@@ -93,20 +103,24 @@
93103
94 property bool modelChecked: true;104 property bool modelChecked: true;
95105
106 // returns true if the roles are good, false otherwise.
96 function checkRoles() {107 function checkRoles() {
97 if (tabBar.model.count <= 0)108 if (tabBar.model.count <= 0)
98 return;109 return false;
99110
100 modelChecked = true;111 modelChecked = true;
101 var f = tabBar.model.get(0);112 var f = tabBar.model.get(0);
102 if (f.tab === undefined && f.title === undefined) {113 if (f.tab === undefined && f.title === undefined) {
103 console.error("TabBar model must provide either tab or title role.");114 console.error("TabBar model must provide either tab or title role.");
104 tabBar.model = null;115 tabBar.model = null;
116 return false;
105 }117 }
106 if (f.tab !== undefined && f.tab.title === undefined) {118 if (f.tab !== undefined && f.tab.title === undefined) {
107 console.error("TabBar model's tab role must have title property.");119 console.error("TabBar model's tab role must have title property.");
108 tabBar.model = null;120 tabBar.model = null;
121 return false;
109 }122 }
123 return true;
110 }124 }
111 }125 }
112126
@@ -117,6 +131,12 @@
117 if (!model)131 if (!model)
118 return;132 return;
119133
134 if (!model.hasOwnProperty("selectedIndex")) {
135 console.error("TabBar model must have selectedIndex property defined.");
136 tabBar.model = null;
137 return;
138 }
139
120 if (!model.hasOwnProperty("count")) {140 if (!model.hasOwnProperty("count")) {
121 console.error("TabBar model must have count property defined.");141 console.error("TabBar model must have count property defined.");
122 tabBar.model = null;142 tabBar.model = null;
@@ -130,11 +150,11 @@
130 }150 }
131151
132 if (model.count > 0) {152 if (model.count > 0) {
133 internal.checkRoles();153 if (internal.checkRoles()) {
134 tabBar.selectedIndex = Math.max(Math.min(tabBar.selectedIndex, model.count - 1), 0);154 model.selectedIndex = Math.max(Math.min(tabBar.selectedIndex, model.count - 1), 0);
155 }
135 } else {156 } else {
136 internal.modelChecked = false;157 internal.modelChecked = false;
137 tabBar.selectedIndex = Qt.binding(function() { return (model && internal.modelChecked && model.count > 0) ? 0 : -1 })
138 }158 }
139 }159 }
140160
141161
=== modified file 'modules/Ubuntu/Components/Tabs.qml'
--- modules/Ubuntu/Components/Tabs.qml 2014-04-08 12:38:35 +0000
+++ modules/Ubuntu/Components/Tabs.qml 2014-04-29 22:09:46 +0000
@@ -18,7 +18,7 @@
1818
19/*!19/*!
20 \qmltype Tabs20 \qmltype Tabs
21 \inqmlmodule Ubuntu.Components 0.121 \inqmlmodule Ubuntu.Components 1.1
22 \ingroup ubuntu22 \ingroup ubuntu
23 \brief The Tabs class provides an environment where multible \l Tab23 \brief The Tabs class provides an environment where multible \l Tab
24 children can be added, and the user is presented with a tab24 children can be added, and the user is presented with a tab
@@ -33,8 +33,8 @@
33 Example:33 Example:
34 \qml34 \qml
35 import QtQuick 2.035 import QtQuick 2.0
36 import Ubuntu.Components 0.136 import Ubuntu.Components 1.1
37 import Ubuntu.Components.ListItems 0.1 as ListItem37 import Ubuntu.Components.ListItems 1.0 as ListItem
3838
39 MainView {39 MainView {
40 width: units.gu(48)40 width: units.gu(48)
@@ -104,7 +104,7 @@
104104
105 \qml105 \qml
106 import QtQuick 2.0106 import QtQuick 2.0
107 import Ubuntu.Components 0.1107 import Ubuntu.Components 1.1
108108
109 MainView {109 MainView {
110 id: mainView110 id: mainView
@@ -161,7 +161,7 @@
161 The first tab is 0, and -1 means that no tab is selected.161 The first tab is 0, and -1 means that no tab is selected.
162 The initial value is 0 if Tabs has contents, or -1 otherwise.162 The initial value is 0 if Tabs has contents, or -1 otherwise.
163 */163 */
164 property alias selectedTabIndex: bar.selectedIndex164 property alias selectedTabIndex: tabsModel.selectedIndex
165165
166 /*!166 /*!
167 \preliminary167 \preliminary
@@ -176,14 +176,14 @@
176 readonly property Item currentPage: selectedTab ? selectedTab.page : null176 readonly property Item currentPage: selectedTab ? selectedTab.page : null
177177
178 /*!178 /*!
179 \deprecated
179 The \l TabBar that will be shown in the header180 The \l TabBar that will be shown in the header
180 and provides scrollable tab buttons.181 and provides scrollable tab buttons.
182 This property is DEPRECATED. TabBar is now part of the header style.
181 */183 */
182 property TabBar tabBar: TabBar {184 property TabBar tabBar: internal.header && internal.header.__styleInstance &&
183 id: bar185 internal.header.__styleInstance.hasOwnProperty("__tabBar") ?
184 model: tabsModel186 internal.header.__styleInstance.__tabBar : null
185 visible: tabs.active
186 }
187187
188 /*!188 /*!
189 Children are placed in a separate item that has functionality to extract the Tab items.189 Children are placed in a separate item that has functionality to extract the Tab items.
@@ -207,11 +207,24 @@
207207
208 /*!208 /*!
209 \internal209 \internal
210 tst_tabs.qml needs access to the model to verify that Repeaters inside Tabs works.
211 */
212 property var __model: tabsModel
213
214 /*!
215 \internal
210 required by TabsStyle216 required by TabsStyle
211 */217 */
212 ListModel {218 ListModel {
213 id: tabsModel219 id: tabsModel
214220
221 property bool updateDisabled: false
222
223 /*!
224 The index of the selected tab.
225 */
226 property int selectedIndex: tabsModel.count > 0 ? 0 : -1
227
215 function listModel(tab) {228 function listModel(tab) {
216 return {"title": tab.title, "tab": tab};229 return {"title": tab.title, "tab": tab};
217 }230 }
@@ -292,13 +305,6 @@
292 id: internal305 id: internal
293 property Header header: tabs.__propagated ? tabs.__propagated.header : null306 property Header header: tabs.__propagated ? tabs.__propagated.header : null
294307
295 Binding {
296 target: tabBar
297 property: "animate"
298 when: internal.header && internal.header.hasOwnProperty("animate")
299 value: internal.header.animate
300 }
301
302 /*308 /*
303 List of connected Repeaters to avoid repeater "hammering" of itemAdded() signal.309 List of connected Repeaters to avoid repeater "hammering" of itemAdded() signal.
304 */310 */
@@ -439,8 +445,8 @@
439445
440 Binding {446 Binding {
441 target: internal.header447 target: internal.header
442 property: "contents"448 property: "tabsModel"
443 value: tabs.active ? tabs.tabBar: null449 value: tabsModel
444 when: internal.header && tabs.active450 when: internal.header && tabs.active
445 }451 }
446}452}
447453
=== modified file 'modules/Ubuntu/Components/TextArea.qml'
--- modules/Ubuntu/Components/TextArea.qml 2014-01-08 16:32:38 +0000
+++ modules/Ubuntu/Components/TextArea.qml 2014-04-29 22:09:46 +0000
@@ -15,11 +15,12 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 1.1 as Ubuntu
18import "mathUtils.js" as MathUtils19import "mathUtils.js" as MathUtils
1920
20/*!21/*!
21 \qmltype TextArea22 \qmltype TextArea
22 \inqmlmodule Ubuntu.Components 0.123 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu24 \ingroup ubuntu
24 \brief The TextArea item displays a block of editable, scrollable, formatted25 \brief The TextArea item displays a block of editable, scrollable, formatted
25 text.26 text.
@@ -60,19 +61,34 @@
60 mode and 4 lines on fixed-mode. The line size is calculated from the font size and the61 mode and 4 lines on fixed-mode. The line size is calculated from the font size and the
61 ovarlay and frame spacing specified in the style.62 ovarlay and frame spacing specified in the style.
6263
64 \section2 Scrolling and text selection
65 The input is activated when the tap or mouse is released after being pressed
66 over the component.
67
63 Scrolling the editing area can happen when the size is fixed or in auto-sizing mode when68 Scrolling the editing area can happen when the size is fixed or in auto-sizing mode when
64 the content size is bigger than the visible area. The scrolling is realized by swipe69 the content size is bigger than the visible area. The scrolling is realized by swipe
65 gestures, or by navigating the cursor.70 gestures, or by navigating the cursor.
6671
67 The item enters in selection mode when the user performs a long tap (or long mouse press)72 The content can be selected in the following ways:
68 or a double tap/press on the text area. The mode is visualized by two selection cursors73 \list
69 (pins) which can be used to select the desired text. The text can also be selected by74 \li - double tapping/left mouse clicking over the content, when the word that
70 moving the finger/mouse towards the desired area right after entering in selection mode.75 had been tapped over will be selected
71 The way the text is selected is driven by the mouseSelectionMode value, which is either76 \li - by pressing and dragging the selection cursor over the text input. Note
72 character or word. The editor leaves the selection mode by pressing/tapping again on it77 that there has to be a delay of approx. 200 ms between the press and drag
73 or by losing focus.78 gesture, time when the input switches from scroll mode to selection mode
7479 \endlist
75 \b{This component is under heavy development.}80
81 The input is focused (activated) upon tap/left mouse button release. The cursor
82 will be placed at the position the mouse/tap point at release time. If the click
83 is happening on a selected area, the selection will be cleared. Long press above
84 a selected area brings up the clipboard context menu. When the long press happens
85 over a non-selected area, the cursor will be moved to the position and the component
86 enters in selection mode. The selection mode can also be activated by tapping and
87 keeping the tap/mouse over for approx 300 ms. If there is a move during this time,
88 the component enters into scrolling mode. The mode is exited once the scrolling
89 finishes. During the scrolling mode the selected text is preserved.
90
91 \note During text selection all interactive parent Flickables are turned off.
76 */92 */
7793
78StyledItem {94StyledItem {
@@ -708,7 +724,7 @@
708 */724 */
709 function forceActiveFocus()725 function forceActiveFocus()
710 {726 {
711 internal.activateEditor();727 inputHandler.activateInput();
712 }728 }
713729
714 // logic730 // logic
@@ -721,6 +737,14 @@
721 // activation area on mouse click737 // activation area on mouse click
722 // the editor activates automatically when pressed in the editor control,738 // the editor activates automatically when pressed in the editor control,
723 // however that one can be slightly spaced to the main control area739 // however that one can be slightly spaced to the main control area
740 MouseArea {
741 anchors.fill: parent
742 enabled: internal.frameSpacing > 0
743 acceptedButtons: Qt.LeftButton | Qt.RightButton
744 // activate input when pressed on the frame
745 preventStealing: false
746 Ubuntu.Mouse.forwardTo: [inputHandler]
747 }
724748
725 //internals749 //internals
726750
@@ -744,8 +768,6 @@
744 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft768 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
745 LayoutMirroring.childrenInherit: true769 LayoutMirroring.childrenInherit: true
746770
747 /*!\internal */
748 property alias __internal: internal
749 QtObject {771 QtObject {
750 id: internal772 id: internal
751 // public property locals enabling aliasing773 // public property locals enabling aliasing
@@ -757,23 +779,8 @@
757 property real inputAreaWidth: control.width - 2 * frameSpacing779 property real inputAreaWidth: control.width - 2 * frameSpacing
758 property real inputAreaHeight: control.height - 2 * frameSpacing780 property real inputAreaHeight: control.height - 2 * frameSpacing
759 //selection properties781 //selection properties
760 property bool draggingMode: false
761 property bool selectionMode: false
762 property bool prevShowCursor782 property bool prevShowCursor
763783
764 signal popupTriggered(int pos)
765
766 onDraggingModeChanged: {
767 if (draggingMode) selectionMode = false;
768 }
769 onSelectionModeChanged: {
770 if (selectionMode)
771 draggingMode = false;
772 else {
773 toggleSelectionCursors(false);
774 }
775 }
776
777 function toggleSelectionCursors(show)784 function toggleSelectionCursors(show)
778 {785 {
779 if (!show) {786 if (!show) {
@@ -788,25 +795,6 @@
788 }795 }
789 }796 }
790797
791 function activateEditor()
792 {
793 if (!editor.activeFocus)
794 editor.forceActiveFocus();
795 else
796 showInputPanel();
797
798 }
799
800 function showInputPanel()
801 {
802 if (!Qt.inputMethod.visible)
803 Qt.inputMethod.show();
804 }
805 function hideInputPanel()
806 {
807 Qt.inputMethod.hide();
808 }
809
810 function linesHeight(lines)798 function linesHeight(lines)
811 {799 {
812 var lineHeight = editor.font.pixelSize * lines + lineSpacing * lines800 var lineHeight = editor.font.pixelSize * lines + lineSpacing * lines
@@ -822,24 +810,6 @@
822 control.height = linesHeight(MathUtils.clamp(control.lineCount, 1, max));810 control.height = linesHeight(MathUtils.clamp(control.lineCount, 1, max));
823 }811 }
824 }812 }
825
826 function enterSelectionMode(x, y)
827 {
828 if (undefined !== x && undefined !== y) {
829 control.cursorPosition = control.positionAt(x, y);
830 control.moveCursorSelection(control.cursorPosition + 1);
831 }
832 toggleSelectionCursors(true);
833 }
834
835 function positionCursor(x, y) {
836 var cursorPos = control.positionAt(x, y);
837 if (control.selectedText === "")
838 control.cursorPosition = cursorPos;
839 else if (control.selectionStart > cursorPos || control.selectionEnd < cursorPos) {
840 control.cursorPosition = cursorPos;
841 }
842 }
843 }813 }
844814
845 // grab Enter/Return keys which may be stolen from parent components of TextArea815 // grab Enter/Return keys which may be stolen from parent components of TextArea
@@ -869,7 +839,7 @@
869 popover: control.popover839 popover: control.popover
870 visible: editor.cursorVisible840 visible: editor.cursorVisible
871841
872 Component.onCompleted: internal.popupTriggered.connect(cursorItem.openPopover)842 Component.onCompleted: inputHandler.pressAndHold.connect(cursorItem.openPopover)
873 }843 }
874 }844 }
875 // selection cursor loader845 // selection cursor loader
@@ -922,6 +892,7 @@
922 }892 }
923 Flickable {893 Flickable {
924 id: flicker894 id: flicker
895 objectName: "textarea_scroller"
925 anchors {896 anchors {
926 fill: parent897 fill: parent
927 margins: internal.frameSpacing898 margins: internal.frameSpacing
@@ -929,38 +900,23 @@
929 clip: true900 clip: true
930 contentWidth: editor.paintedWidth901 contentWidth: editor.paintedWidth
931 contentHeight: editor.paintedHeight902 contentHeight: editor.paintedHeight
932 interactive: !autoSize || (autoSize && maximumLineCount > 0)
933 // do not allow rebounding903 // do not allow rebounding
934 boundsBehavior: Flickable.StopAtBounds904 boundsBehavior: Flickable.StopAtBounds
935 pressDelay: 500
936
937 function ensureVisible(r)
938 {
939 if (moving || flicking)
940 return;
941 if (contentX >= r.x)
942 contentX = r.x;
943 else if (contentX+width <= r.x+r.width)
944 contentX = r.x+r.width-width;
945 if (contentY >= r.y)
946 contentY = r.y;
947 else if (contentY+height <= r.y+r.height)
948 contentY = r.y+r.height-height;
949 }
950905
951 // editor906 // editor
952 // Images are not shown when text contains <img> tags907 // Images are not shown when text contains <img> tags
953 // bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27071908 // bug to watch: https://bugreports.qt-project.org/browse/QTBUG-27071
954 TextEdit {909 TextEdit {
910 objectName: "textarea_input"
955 readOnly: false911 readOnly: false
956 id: editor912 id: editor
957 focus: true913 focus: true
958 onCursorRectangleChanged: flicker.ensureVisible(cursorRectangle)
959 width: internal.inputAreaWidth914 width: internal.inputAreaWidth
960 height: Math.max(internal.inputAreaHeight, editor.contentHeight)915 height: Math.max(internal.inputAreaHeight, editor.contentHeight)
961 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere916 wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
962 mouseSelectionMode: TextEdit.SelectWords917 mouseSelectionMode: TextEdit.SelectWords
963 selectByMouse: false918 selectByMouse: false
919 activeFocusOnPress: false
964 cursorDelegate: cursor920 cursorDelegate: cursor
965 color: control.__styleInstance.color921 color: control.__styleInstance.color
966 selectedTextColor: Theme.palette.selected.foregroundText922 selectedTextColor: Theme.palette.selected.foregroundText
@@ -972,55 +928,15 @@
972 // autosize handling928 // autosize handling
973 onLineCountChanged: internal.frameSize()929 onLineCountChanged: internal.frameSize()
974930
975 // remove selection when typing starts or input method start entering text931 // input selection and navigation handling
976 onInputMethodComposingChanged: {932 Ubuntu.Mouse.forwardTo: [inputHandler]
977 if (inputMethodComposing)933 InputHandler {
978 internal.selectionMode = false;934 id: inputHandler
979 }
980 Keys.onPressed: {
981 if ((event.text !== ""))
982 internal.selectionMode = false;
983 }
984 Keys.onReleased: {
985 // selection positioners are updated after the keypress
986 if (selectionStart == selectionEnd)
987 internal.selectionMode = false;
988 }
989
990 // handling text selection
991 MouseArea {
992 id: handler
993 enabled: control.enabled && control.activeFocusOnPress
994 anchors.fill: parent935 anchors.fill: parent
995 propagateComposedEvents: true936 main: control
996937 input: editor
997 onPressed: {938 flickable: flicker
998 internal.activateEditor();939 selectionModeTimeout: control.__styleInstance.selectionModeTimeout
999 internal.draggingMode = true;
1000 }
1001 onPressAndHold: {
1002 // move mode gets false if there was a mouse move after the press;
1003 // this is needed as Flickable will send a pressAndHold in case of
1004 // press -> move-pressed ->stop-and-hold-pressed gesture is performed
1005 if (!internal.draggingMode)
1006 return;
1007 internal.draggingMode = false;
1008 // open popup
1009 internal.positionCursor(mouse.x, mouse.y);
1010 internal.popupTriggered(editor.cursorPosition);
1011 }
1012 onReleased: {
1013 internal.draggingMode = false;
1014 }
1015 onDoubleClicked: {
1016 internal.activateEditor();
1017 if (control.selectByMouse)
1018 control.selectWord();
1019 }
1020 onClicked: {
1021 internal.activateEditor();
1022 internal.positionCursor(mouse.x, mouse.y);
1023 }
1024 }940 }
1025 }941 }
1026 }942 }
1027943
=== modified file 'modules/Ubuntu/Components/TextCursor.qml'
--- modules/Ubuntu/Components/TextCursor.qml 2013-06-27 15:20:12 +0000
+++ modules/Ubuntu/Components/TextCursor.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import "Popups" 0.118import Ubuntu.Components.Popups 1.0
1919
20StyledItem {20StyledItem {
21 id: cursorItem21 id: cursorItem
2222
=== modified file 'modules/Ubuntu/Components/TextField.qml'
--- modules/Ubuntu/Components/TextField.qml 2014-03-17 17:58:47 +0000
+++ modules/Ubuntu/Components/TextField.qml 2014-04-29 22:09:46 +0000
@@ -16,10 +16,11 @@
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Unity.Action 1.1 as UnityActions18import Ubuntu.Unity.Action 1.1 as UnityActions
19import Ubuntu.Components 1.1 as Ubuntu
1920
20/*!21/*!
21 \qmltype TextField22 \qmltype TextField
22 \inqmlmodule Ubuntu.Components 0.123 \inqmlmodule Ubuntu.Components 1.1
23 \ingroup ubuntu24 \ingroup ubuntu
24 \brief The TextField element displays a single line of editable plain text.25 \brief The TextField element displays a single line of editable plain text.
25 Input constraints can be set through validator or inputMask. Setting echoMode26 Input constraints can be set through validator or inputMask. Setting echoMode
@@ -70,6 +71,34 @@
70 }71 }
71 }72 }
72 \endqml73 \endqml
74
75 \section2 Scrolling and text selection
76 The input is activated when the tap or mouse is released after being pressed
77 over the component.
78
79 The text can be scrolled horizontally by swiping over the content both when
80 the component is active or inactive.
81
82 The content can be selected in the following ways:
83 \list
84 \li - double tapping/left mouse clicking over the content, when the word that
85 had been tapped over will be selected
86 \li - by pressing and dragging the selection cursor over the text input. Note
87 that there has to be a delay of approx. 200 ms between the press and drag
88 gesture, time when the input switches from scroll mode to selection mode
89 \endlist
90
91 The input is focused (activated) upon tap/left mouse button release. The cursor
92 will be placed at the position the mouse/tap point at release time. If the click
93 is happening on a selected area, the selection will be cleared. Long press above
94 a selected area brings up the clipboard context menu. When the long press happens
95 over a non-selected area, the cursor will be moved to the position and the component
96 enters in selection mode. The selection mode can also be activated by tapping and
97 keeping the tap/mouse over for approx 300 ms. If there is a move during this time,
98 the component enters into scrolling mode. The mode is exited once the scrolling
99 finishes. During the scrolling mode the selected text is preserved.
100
101 \note During text selection all interactive parent Flickables are turned off.
73*/102*/
74103
75ActionItem {104ActionItem {
@@ -98,10 +127,11 @@
98 property bool hasClearButton: true127 property bool hasClearButton: true
99128
100 /*!129 /*!
101 \preliminary130 \deprecated
102 Component to be shown and used instead of the default On Screen Keyboard.131 Component to be shown and used instead of the default On Screen Keyboard.
103 */132 */
104 property Component customSoftwareInputPanel133 property Component customSoftwareInputPanel
134 onCustomSoftwareInputPanelChanged: console.error("customSoftwareInputPanel property deprecated.")
105135
106 /*!136 /*!
107 The property overrides the default popover of the TextField. When set, the TextField137 The property overrides the default popover of the TextField. When set, the TextField
@@ -146,10 +176,8 @@
146 /*!176 /*!
147 Whether the TextField should gain active focus on a mouse press. By default177 Whether the TextField should gain active focus on a mouse press. By default
148 this is set to true.178 this is set to true.
149
150 \qmlproperty bool activeFocusOnPress
151 */179 */
152 property alias activeFocusOnPress: editor.activeFocusOnPress180 property bool activeFocusOnPress: true
153181
154 /*!182 /*!
155 Whether the TextField should scroll when the text is longer than the width.183 Whether the TextField should scroll when the text is longer than the width.
@@ -446,11 +474,8 @@
446474
447 If false, the user cannot use the mouse to select text, only can use it to475 If false, the user cannot use the mouse to select text, only can use it to
448 focus the input.476 focus the input.
449
450 \qmlproperty bool selectByMouse
451 \preliminary
452 */477 */
453 property alias selectByMouse: virtualKbdHandler.enabled478 property bool selectByMouse: true
454479
455 /*!480 /*!
456 This read-only property provides the text currently selected in the text input.481 This read-only property provides the text currently selected in the text input.
@@ -504,7 +529,7 @@
504529
505 \qml530 \qml
506 import QtQuick 2.0531 import QtQuick 2.0
507 import Ubuntu.Components 0.1532 import Ubuntu.Components 1.1
508 TextField{533 TextField{
509 validator: IntValidator{bottom: 11; top: 31;}534 validator: IntValidator{bottom: 11; top: 31;}
510 focus: true535 focus: true
@@ -719,7 +744,7 @@
719 */744 */
720 function forceActiveFocus()745 function forceActiveFocus()
721 {746 {
722 internal.activateEditor();747 inputHandler.activateInput();
723 }748 }
724749
725 /*!750 /*!
@@ -815,27 +840,23 @@
815 // grab clicks from the area between the frame and the input840 // grab clicks from the area between the frame and the input
816 MouseArea {841 MouseArea {
817 anchors.fill: parent842 anchors.fill: parent
818 // us it only when there is space between the frame and input843 acceptedButtons: Qt.LeftButton | Qt.RightButton
844 // use it only when there is space between the frame and input
819 enabled: internal.spacing > 0845 enabled: internal.spacing > 0
820 onClicked: internal.activateEditor()846 preventStealing: false
847 // forward mouse events to input so we can handle those uniformly
848 Ubuntu.Mouse.forwardTo: [inputHandler]
821 }849 }
822850
823 Text { id: fontHolder }851 Text { id: fontHolder }
824852
825 //internals853 //internals
826 /*! \internal */
827 property alias __internal: internal
828 QtObject {854 QtObject {
829 id: internal855 id: internal
830 // array of borders in left, top, right, bottom order856 // array of borders in left, top, right, bottom order
831 property bool textChanged: false
832 property real spacing: control.__styleInstance.overlaySpacing857 property real spacing: control.__styleInstance.overlaySpacing
833 property real lineSpacing: units.dp(3)858 property real lineSpacing: units.dp(3)
834 property real lineSize: editor.font.pixelSize + lineSpacing859 property real lineSize: editor.font.pixelSize + lineSpacing
835 //selection properties
836 property bool selectionMode: false
837
838 signal popupTriggered()
839860
840 property int type: action ? action.parameterType : 0861 property int type: action ? action.parameterType : 0
841 onTypeChanged: {862 onTypeChanged: {
@@ -847,54 +868,6 @@
847 || type == UnityActions.Action.Real)868 || type == UnityActions.Action.Real)
848 inputMethodHints = Qt.ImhDigitsOnly869 inputMethodHints = Qt.ImhDigitsOnly
849 }870 }
850
851 function activateEditor()
852 {
853 if (!editor.activeFocus)
854 editor.forceActiveFocus();
855 else
856 showInputPanel();
857 }
858
859 function showInputPanel()
860 {
861 if (control.customSoftwareInputPanel != undefined) {
862 // TODO implement once we have the SIP ready
863 } else {
864 if (!Qt.inputMethod.visible)
865 Qt.inputMethod.show();
866 }
867 textChanged = false;
868 }
869 function hideInputPanel()
870 {
871 if (control.customSoftwareInputPanel != undefined) {
872 // TODO implement once we have the SIP ready
873 } else {
874 Qt.inputMethod.hide();
875 }
876 // emit accepted signal if changed
877 if (textChanged)
878 control.accepted();
879 }
880 // reset selection
881 function resetEditorSelection(mouseX)
882 {
883 editor.cursorPosition = editor.positionAt(mouseX);
884 }
885
886 // positions the cursor depending on whether there is a selection active or not
887 function positionCursor(x) {
888
889 var cursorPos = control.positionAt(x);
890 if (control.selectedText === "") {
891 control.cursorPosition = cursorPos;
892 }
893 // If target cursor position is outside selection then cancel selection and move cursor
894 else if (control.selectionStart > cursorPos || control.selectionEnd < cursorPos) {
895 control.cursorPosition = cursorPos;
896 }
897 }
898 }871 }
899872
900 //left pane873 //left pane
@@ -947,7 +920,7 @@
947 popover: control.popover920 popover: control.popover
948 visible: editor.cursorVisible921 visible: editor.cursorVisible
949922
950 Component.onCompleted: internal.popupTriggered.connect(openPopover)923 Component.onCompleted: inputHandler.pressAndHold.connect(openPopover)
951 }924 }
952 }925 }
953926
@@ -999,79 +972,55 @@
999972
1000973
1001 // text input974 // text input
1002 TextInput {975 Flickable {
1003 id: editor976 id: flicker
1004 // FocusScope will forward focus to this component977 objectName: "textfield_scroller"
1005 focus: true
1006 anchors {978 anchors {
1007 left: leftPane.right979 left: leftPane.right
1008 right: clearButton.left980 right: clearButton.left
981 top: parent.top
982 bottom: parent.bottom
1009 margins: internal.spacing983 margins: internal.spacing
1010 verticalCenter: parent.verticalCenter
1011 }984 }
1012 // get the control's style985 topMargin: internal.spacing
986 // do not allow rebounding
987 boundsBehavior: Flickable.StopAtBounds
988 // need to forward events as events occurred on topMargin area are not grabbed by the MouseArea.
989 Ubuntu.Mouse.forwardTo: [inputHandler]
990
1013 clip: true991 clip: true
1014 onTextChanged: internal.textChanged = true992 contentWidth: editor.contentWidth
1015 cursorDelegate: cursor993 contentHeight: editor.contentHeight
1016 color: control.__styleInstance.color994
1017 selectedTextColor: Theme.palette.selected.foregroundText995 TextInput {
1018 selectionColor: Theme.palette.selected.foreground996 id: editor
1019 font.pixelSize: FontUtils.sizeToPixels("medium")997 // FocusScope will forward focus to this component
1020 passwordCharacter: "\u2022"998 focus: true
1021 // forward keys to the root element so it can be captured outside of it999 anchors.verticalCenter: parent.verticalCenter
1022 Keys.forwardTo: [control]1000 // get the control's style
10231001 clip: true
1024 // handle virtual keyboard and cursor positioning, as the MouseArea overrides1002 cursorDelegate: cursor
1025 // those functionalities of the TextInput1003 color: control.__styleInstance.color
1026 MouseArea {1004 selectedTextColor: Theme.palette.selected.foregroundText
1027 id: virtualKbdHandler1005 selectionColor: Theme.palette.selected.foreground
1028 anchors.fill: parent1006 font.pixelSize: FontUtils.sizeToPixels("medium")
1029 hoverEnabled: true1007 passwordCharacter: "\u2022"
1030 preventStealing: true1008 // forward keys to the root element so it can be captured outside of it
10311009 Keys.forwardTo: [control]
1032 onClicked: {1010
1033 // activate control1011 // overrides
1034 if (!control.activeFocus) {1012 selectByMouse: false
1035 internal.activateEditor();1013 activeFocusOnPress: false
1036 // set cursor position if no selection was previously set1014
1037 internal.positionCursor(mouse.x)1015 // input selection and navigation handling
1038 } else if (!internal.selectionMode){1016 Ubuntu.Mouse.forwardTo: [inputHandler]
1039 // reset selection and move cursor unde mouse click1017 InputHandler {
1040 internal.resetEditorSelection(mouse.x);1018 id: inputHandler
1041 } else if (internal.selectionMode) {1019 anchors.fill: parent
1042 // reset selection mode (onReleased is triggered prior to onClicked1020 main: control
1043 // and resetting selection mode there would cause to enter in the\1021 input: editor
1044 // previous if-clause1022 flickable: flicker
1045 internal.selectionMode = false;1023 selectionModeTimeout: control.__styleInstance.selectionModeTimeout
1046 }
1047 }
1048
1049 onPressAndHold: {
1050 internal.activateEditor();
1051 internal.positionCursor(mouse.x);
1052 internal.popupTriggered();
1053 }
1054
1055 onDoubleClicked: {
1056 // select word under doubletap
1057 if (!control.activeFocus)
1058 return;
1059 editor.selectWord();
1060 internal.selectionMode = false;
1061 }
1062 onPressed: {
1063 // don't do anything while the control is inactive
1064 if (!control.activeFocus || (pressedButtons != Qt.LeftButton))
1065 return;
1066 internal.activateEditor();
1067 if (control.selectedText === "") {
1068 internal.resetEditorSelection(mouse.x);
1069 internal.selectionMode = true;
1070 }
1071 }
1072 onReleased: {
1073 if (!containsMouse)
1074 internal.selectionMode = false;
1075 }1024 }
1076 }1025 }
1077 }1026 }
10781027
=== modified file 'modules/Ubuntu/Components/TextInputPopover.qml'
--- modules/Ubuntu/Components/TextInputPopover.qml 2014-03-17 18:17:23 +0000
+++ modules/Ubuntu/Components/TextInputPopover.qml 2014-04-29 22:09:46 +0000
@@ -15,8 +15,8 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.1 as Toolkit18import Ubuntu.Components 1.1 as Toolkit
19import "Popups" 0.119import Ubuntu.Components.Popups 1.0
2020
21ActionSelectionPopover {21ActionSelectionPopover {
22 objectName: "text_input_popover"22 objectName: "text_input_popover"
2323
=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml'
--- modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml 2013-06-27 15:20:12 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/ActivityIndicatorStyle.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20Image {20Image {
21 id: container21 id: container
2222
=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml'
--- modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2013-08-21 15:35:56 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20Item {20Item {
21 id: bubbleShape21 id: bubbleShape
2222
=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml'
--- modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml 2013-07-01 22:26:49 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/ButtonForeground.qml 2014-04-29 22:09:46 +0000
@@ -17,7 +17,7 @@
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.0
20import Ubuntu.Components 0.120import Ubuntu.Components 1.1
2121
22Item {22Item {
23 id: buttonForeground23 id: buttonForeground
@@ -30,6 +30,7 @@
30 property real spacing30 property real spacing
31 property bool hasIcon: iconSource != ""31 property bool hasIcon: iconSource != ""
32 property bool hasText: text != ""32 property bool hasText: text != ""
33 property alias font: label.font
3334
34 opacity: enabled ? 1.0 : 0.535 opacity: enabled ? 1.0 : 0.5
35 implicitHeight: Math.max(icon.height, label.height)36 implicitHeight: Math.max(icon.height, label.height)
3637
=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml'
--- modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml 2014-02-04 22:07:10 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/ButtonStyle.qml 2014-04-29 22:09:46 +0000
@@ -17,7 +17,7 @@
17 */17 */
1818
19import QtQuick 2.019import QtQuick 2.0
20import Ubuntu.Components 0.120import Ubuntu.Components 1.1
2121
22Item {22Item {
23 id: buttonStyle23 id: buttonStyle
@@ -26,7 +26,16 @@
26 property real minimumWidth: units.gu(10)26 property real minimumWidth: units.gu(10)
27 property real horizontalPadding: units.gu(1)27 property real horizontalPadding: units.gu(1)
28 property color defaultColor: UbuntuColors.orange28 property color defaultColor: UbuntuColors.orange
29 property font defaultFont: Qt.font({family: "Ubuntu", pixelSize: FontUtils.sizeToPixels("medium")})
29 property Gradient defaultGradient30 property Gradient defaultGradient
31 property real buttonFaceOffset: 0
32 /*!
33 The property overrides the button's default background with an item. This
34 item can be used by derived styles to reuse the ButtonStyle and override
35 the default coloured background with an image or any other drawing.
36 The default value is null.
37 */
38 property Item backgroundSource: null
3039
31 width: button.width40 width: button.width
32 height: button.height41 height: button.height
@@ -36,12 +45,22 @@
36 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft45 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
37 LayoutMirroring.childrenInherit: true46 LayoutMirroring.childrenInherit: true
3847
48 /*! \internal */
49 // Color properties in a JS ternary operator don't work as expected in
50 // QML because it overwrites alpha values with 1. A workaround is to use
51 // Qt.rgba(). For more information, see
52 // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1197802 and
53 // https://bugreports.qt-project.org/browse/QTBUG-32238.
54 function __colorHack(color) { return Qt.rgba(color.r, color.g, color.b, color.a); }
55
56
39 /* The proxy is necessary because Gradient.stops and GradientStop.color are57 /* The proxy is necessary because Gradient.stops and GradientStop.color are
40 non-NOTIFYable properties. They cannot be written to so it is fine but58 non-NOTIFYable properties. They cannot be written to so it is fine but
41 the proxy avoids the warnings.59 the proxy avoids the warnings.
42 */60 */
61 property QtObject gradientProxy: gradientProxyObject
43 QtObject {62 QtObject {
44 id: gradientProxy63 id: gradientProxyObject
45 property color topColor64 property color topColor
46 property color bottomColor65 property color bottomColor
4766
@@ -67,16 +86,11 @@
67 id: background86 id: background
68 anchors.fill: parent87 anchors.fill: parent
69 borderSource: "radius_idle.sci"88 borderSource: "radius_idle.sci"
70 visible: color.a != 0.089 visible: (color.a != 0.0) || backgroundSource
90 image: backgroundSource
7191
72 // Color properties in a JS ternary operator don't work as expected in92 color: backgroundSource ? "#00000000" : (isGradient ? __colorHack(gradientProxy.topColor) : __colorHack(button.color))
73 // QML because it overwrites alpha values with 1. A workaround is to use93 gradientColor: backgroundSource ? "#00000000" : (isGradient ? __colorHack(gradientProxy.bottomColor) : __colorHack(button.color))
74 // Qt.rgba(). For more information, see
75 // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1197802 and
76 // https://bugreports.qt-project.org/browse/QTBUG-32238.
77 function colorHack(color) { return Qt.rgba(color.r, color.g, color.b, color.a); }
78 color: isGradient ? colorHack(gradientProxy.topColor) : colorHack(button.color)
79 gradientColor: isGradient ? colorHack(gradientProxy.bottomColor) : colorHack(button.color)
80 }94 }
8195
82 UbuntuShape {96 UbuntuShape {
@@ -98,7 +112,10 @@
98 ButtonForeground {112 ButtonForeground {
99 id: foreground113 id: foreground
100 width: parent.width - 2*horizontalPadding114 width: parent.width - 2*horizontalPadding
101 anchors.centerIn: parent115 anchors {
116 centerIn: parent
117 horizontalCenterOffset: buttonFaceOffset
118 }
102 text: button.text119 text: button.text
103 /* Pick either a clear or dark text color depending on the luminance of the120 /* Pick either a clear or dark text color depending on the luminance of the
104 background color to maintain good contrast (works in most cases)121 background color to maintain good contrast (works in most cases)
@@ -107,6 +124,7 @@
107 iconSource: button.iconSource124 iconSource: button.iconSource
108 iconPosition: button.iconPosition125 iconPosition: button.iconPosition
109 iconSize: units.gu(3)126 iconSize: units.gu(3)
127 font: button.font
110 spacing: horizontalPadding128 spacing: horizontalPadding
111 transformOrigin: Item.Top129 transformOrigin: Item.Top
112 scale: button.pressed ? 0.98 : 1.0130 scale: button.pressed ? 0.98 : 1.0
113131
=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml'
--- modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2014-02-05 19:59:43 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2014-04-29 22:09:46 +0000
@@ -15,7 +15,7 @@
15 */15 */
1616
17import QtQuick 2.017import QtQuick 2.0
18import Ubuntu.Components 0.118import Ubuntu.Components 1.1
1919
20Item {20Item {
21 id: checkBoxStyle21 id: checkBoxStyle
2222
=== added file 'modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml'
--- modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml 1970-01-01 00:00:00 +0000
+++ modules/Ubuntu/Components/Themes/Ambiance/ComboButtonStyle.qml 2014-04-29 22:09:46 +0000
@@ -0,0 +1,243 @@
1/*
2 * Copyright 2014 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components 1.1
19
20/*!
21 \qmltype ComboButton
22 \ingroup style-api
23 \brief ComboButton style API.
24
25 The component defines the style of the ComboButton component.
26 */
27Item {
28 id: comboStyle
29
30 /*!
31 Width of the drop down button.
32 */
33 property real dropDownWidth: units.gu(5)
34
35 /*!
36 Width of the dropdown button separator.
37 */
38 property real dropDownSeparatorWidth: units.dp(2)
39
40 /*!
41 Distance between the combo list and the main button.
42 */
43 property real comboListMargin: units.gu(0.8)
44
45 /*!
46 The item which will holds the combo list data. Implementations can point both
47 this \l comboListPanel to the same component, however separate items should be
48 used if a gap between the panel and the content is required.
49 See Ambiance theme.
50 */
51 property Item comboListHolder: comboListContent
52
53 /*!
54 The item pointing to the panel holding the combo list and additional design
55 artifacts. It is used by the component to drive the expansion size.
56 */
57 property Item comboListPanel: panelItem
58
59 /*!
60 \qmlproperty color defaultColor
61 Default color for the main button.
62 */
63 property alias defaultColor: mainButton.defaultColor
64
65 /*!
66 \qmlproperty Gradient defaultGradient
67 Default gradient for the main button.
68 */
69 property alias defaultGradient: mainButton.defaultGradient
70
71 /*!
72 Default color for the dropdown button when released.
73 */
74 property color defaultDropdownColor: __combo.expanded ? Qt.rgba(0, 0, 0, 0.05) : defaultColor
75 /*!
76 Default button face font.
77 */
78 property alias defaultFont: mainButton.defaultFont
79
80
81 width: __combo.width
82 height: __combo.collapsedHeight
83
84 /*! \internal */
85 property ComboButton __combo: styledItem
86
87 implicitWidth: mainButton.implicitWidth
88 implicitHeight: mainButton.implicitHeight
89
90 LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
91 LayoutMirroring.childrenInherit: true
92
93 ButtonStyle {
94 id: mainButton
95 anchors {
96 left: parent.left
97 top: parent.top
98 right: parent.right
99 }
100 height: __combo.collapsedHeight
101 // overrides
102 backgroundSource: comboFace
103 buttonFaceOffset: -dropDownWidth/2 - dropDownSeparatorWidth
104 horizontalPadding: units.gu(4) - dropDownSeparatorWidth
105 minimumWidth: units.gu(36)
106
107 // FIXME: use hardcoded color while we get the theme palette updated
108 defaultColor: "#b2b2b2"
109 defaultGradient: null
110
111 // button face
112 ShaderEffectSource {
113 id: comboFace
114 sourceItem: content
115 hideSource: true
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: