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