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