aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls')
-rw-r--r--src/imports/controls/AbstractButton.qml48
-rw-r--r--src/imports/controls/ApplicationWindow.qml12
-rw-r--r--src/imports/controls/BusyIndicator.qml12
-rw-r--r--src/imports/controls/Button.qml39
-rw-r--r--src/imports/controls/CheckBox.qml56
-rw-r--r--src/imports/controls/CheckDelegate.qml81
-rw-r--r--src/imports/controls/CheckIndicator.qml69
-rw-r--r--src/imports/controls/ComboBox.qml76
-rw-r--r--src/imports/controls/Container.qml47
-rw-r--r--src/imports/controls/Control.qml47
-rw-r--r--src/imports/controls/Dial.qml32
-rw-r--r--src/imports/controls/Drawer.qml39
-rw-r--r--src/imports/controls/Frame.qml17
-rw-r--r--src/imports/controls/GroupBox.qml18
-rw-r--r--src/imports/controls/ItemDelegate.qml40
-rw-r--r--src/imports/controls/Label.qml6
-rw-r--r--src/imports/controls/Menu.qml20
-rw-r--r--src/imports/controls/MenuItem.qml36
-rw-r--r--src/imports/controls/Page.qml10
-rw-r--r--src/imports/controls/PageIndicator.qml10
-rw-r--r--src/imports/controls/Pane.qml12
-rw-r--r--src/imports/controls/Popup.qml8
-rw-r--r--src/imports/controls/ProgressBar.qml25
-rw-r--r--src/imports/controls/RadioButton.qml53
-rw-r--r--src/imports/controls/RadioDelegate.qml81
-rw-r--r--src/imports/controls/RadioIndicator.qml60
-rw-r--r--src/imports/controls/RangeSlider.qml35
-rw-r--r--src/imports/controls/ScrollBar.qml20
-rw-r--r--src/imports/controls/ScrollIndicator.qml20
-rw-r--r--src/imports/controls/Slider.qml26
-rw-r--r--src/imports/controls/SpinBox.qml53
-rw-r--r--src/imports/controls/StackView.qml34
-rw-r--r--src/imports/controls/SwipeDelegate.qml85
-rw-r--r--src/imports/controls/SwipeView.qml12
-rw-r--r--src/imports/controls/Switch.qml59
-rw-r--r--src/imports/controls/SwitchDelegate.qml80
-rw-r--r--src/imports/controls/SwitchIndicator.qml70
-rw-r--r--src/imports/controls/TabBar.qml18
-rw-r--r--src/imports/controls/TabButton.qml27
-rw-r--r--src/imports/controls/TextArea.qml10
-rw-r--r--src/imports/controls/TextField.qml24
-rw-r--r--src/imports/controls/ToolBar.qml10
-rw-r--r--src/imports/controls/ToolButton.qml29
-rw-r--r--src/imports/controls/ToolTip.qml (renamed from src/imports/controls/universal/qquickuniversalimageprovider.cpp)57
-rw-r--r--src/imports/controls/Tumbler.qml16
-rw-r--r--src/imports/controls/controls.pri25
-rw-r--r--src/imports/controls/controls.pro27
-rw-r--r--src/imports/controls/designer/BusyIndicatorSpecifics.qml4
-rw-r--r--src/imports/controls/designer/ButtonSection.qml4
-rw-r--r--src/imports/controls/designer/ButtonSpecifics.qml4
-rw-r--r--src/imports/controls/designer/CheckBoxSpecifics.qml4
-rw-r--r--src/imports/controls/designer/CheckDelegateSpecifics.qml56
-rw-r--r--src/imports/controls/designer/ComboBoxSpecifics.qml4
-rw-r--r--src/imports/controls/designer/ControlSection.qml4
-rw-r--r--src/imports/controls/designer/ControlSpecifics.qml4
-rw-r--r--src/imports/controls/designer/DialSpecifics.qml4
-rw-r--r--src/imports/controls/designer/FrameSpecifics.qml4
-rw-r--r--src/imports/controls/designer/GroupBoxSpecifics.qml4
-rw-r--r--src/imports/controls/designer/ItemDelegateSpecifics.qml4
-rw-r--r--src/imports/controls/designer/LabelSpecifics.qml4
-rw-r--r--src/imports/controls/designer/PaddingSection.qml4
-rw-r--r--src/imports/controls/designer/PageIndicatorSpecifics.qml4
-rw-r--r--src/imports/controls/designer/PaneSpecifics.qml4
-rw-r--r--src/imports/controls/designer/ProgressBarSpecifics.qml4
-rw-r--r--src/imports/controls/designer/RadioButtonSpecifics.qml4
-rw-r--r--src/imports/controls/designer/RadioDelegateSpecifics.qml56
-rw-r--r--src/imports/controls/designer/SliderSpecifics.qml4
-rw-r--r--src/imports/controls/designer/SpinBoxSpecifics.qml4
-rw-r--r--src/imports/controls/designer/SwipeDelegateSpecifics.qml56
-rw-r--r--src/imports/controls/designer/SwitchDelegateSpecifics.qml56
-rw-r--r--src/imports/controls/designer/SwitchSpecifics.qml4
-rw-r--r--src/imports/controls/designer/TextAreaSpecifics.qml4
-rw-r--r--src/imports/controls/designer/TextFieldSpecifics.qml4
-rw-r--r--src/imports/controls/designer/ToolBarSpecifics.qml4
-rw-r--r--src/imports/controls/designer/ToolButtonSpecifics.qml4
-rw-r--r--src/imports/controls/designer/TumblerSpecifics.qml4
-rw-r--r--src/imports/controls/designer/designer.pri5
-rw-r--r--src/imports/controls/designer/images/page-icon.pngbin0 -> 250 bytes
-rw-r--r--src/imports/controls/designer/images/page-icon16.pngbin0 -> 231 bytes
-rw-r--r--src/imports/controls/designer/images/page-icon16@2x.pngbin0 -> 268 bytes
-rw-r--r--src/imports/controls/designer/images/page-icon@2x.pngbin0 -> 303 bytes
-rw-r--r--src/imports/controls/designer/images/rangeslider-icon.pngbin0 -> 365 bytes
-rw-r--r--src/imports/controls/designer/images/rangeslider-icon16.pngbin0 -> 279 bytes
-rw-r--r--src/imports/controls/designer/images/rangeslider-icon16@2x.pngbin0 -> 550 bytes
-rw-r--r--src/imports/controls/designer/images/rangeslider-icon@2x.pngbin0 -> 824 bytes
-rw-r--r--src/imports/controls/designer/qtlabscontrols.metainfo310
-rw-r--r--src/imports/controls/designer/qtquickcontrols2.metainfo402
-rw-r--r--src/imports/controls/doc/doc.pri7
-rw-r--r--src/imports/controls/doc/images/qtlabscalendar-calendarmodel.pngbin6057 -> 5724 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscalendar-dayofweekrow-layout.pngbin9176 -> 7455 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscalendar-dayofweekrow.pngbin2513 -> 2017 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscalendar-monthgrid-layout.pngbin10913 -> 8876 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscalendar-monthgrid.pngbin6503 -> 3827 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn-layout.pngbin8333 -> 4986 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn.pngbin1977 -> 1453 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-busyindicator-background.pngbin1594 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-busyindicator-contentItem.pngbin1583 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-busyindicator.gifbin3241 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button-background.pngbin1499 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button-disabled.pngbin1653 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button-focused.pngbin1515 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button-label.pngbin1550 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button-normal.pngbin1507 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button-pressed.pngbin1949 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button.gifbin2171 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-button.pngbin1518 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox-background.pngbin2607 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox-checked.pngbin2687 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox-disabled.pngbin2197 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox-focused.pngbin2069 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox-indicator.pngbin2539 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox-label.pngbin2582 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox-normal.pngbin1547 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-checkbox.pngbin2573 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-combobox-background.pngbin2731 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-combobox-contentItem.pngbin2752 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-combobox-delegate.pngbin4999 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-combobox-popup.pngbin4969 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-combobox.pngbin4984 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-default.pngbin19608 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-dial-background.pngbin6563 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-dial-handle.pngbin7325 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-frame-background.pngbin345 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-frame-frame.pngbin341 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-frame.pngbin5213 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-gallery-drawer.pngbin17156 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-gallery-menu.pngbin17209 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-gallery-welcome.pngbin23502 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-groupbox-background.pngbin2685 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-groupbox-checkable.pngbin8311 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-groupbox-frame.pngbin2653 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-groupbox-label.pngbin2673 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-groupbox.pngbin7718 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-itemdelegate-background.pngbin3499 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-itemdelegate-indicator.pngbin3456 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-itemdelegate-label.pngbin3441 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-itemdelegate.pngbin9440 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-label-background.pngbin1118 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-label.pngbin1093 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-material-button.pngbin1272 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-material.pngbin23669 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-menu-contentItem.pngbin4777 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-page-wireframe.pngbin1795 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-pageindicator.pngbin689 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-pane-background.pngbin341 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-pane.pngbin4939 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-progressbar-background.pngbin146 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-progressbar-disabled.pngbin133 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-progressbar-indicator.pngbin133 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-progressbar-normal.pngbin133 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton-background.pngbin3474 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton-checked.pngbin3411 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton-disabled.pngbin2897 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton-focused.pngbin2771 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton-indicator.pngbin3337 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton-label.pngbin3435 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton-normal.pngbin2234 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-radiobutton.pngbin3491 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-background.pngbin1201 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-disabled.pngbin1204 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle-focused.pngbin1204 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle.pngbin1206 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-normal.pngbin1204 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle-focused.pngbin1204 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle.pngbin1365 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider-track.pngbin1162 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider.gifbin18024 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-rangeslider.pngbin1204 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-scrollbar-background.pngbin260 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-scrollbar-handle.pngbin248 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-scrollbar.pngbin680 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-scrollindicator-background.pngbin147 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-scrollindicator-indicator.pngbin121 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-scrollindicator.pngbin387 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider-background.pngbin1104 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider-disabled.pngbin1117 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider-focused.pngbin1117 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider-handle.pngbin953 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider-normal.pngbin1117 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider-track.pngbin1018 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider.gifbin16972 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-slider.pngbin1117 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-spinbox-background.pngbin1104 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-spinbox-contentItem.pngbin1178 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-spinbox-down.pngbin1130 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-spinbox-textual.pngbin1825 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-spinbox-up.pngbin1144 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-spinbox.pngbin1149 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-switch-background.pngbin2648 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-switch-checked.pngbin3124 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-switch-disabled.pngbin3218 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-switch-focused.pngbin2905 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-switch-indicator.pngbin2522 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-switch-label.pngbin2605 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-switch-normal.pngbin2415 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-tabbar.pngbin4725 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-tabbutton.pngbin4728 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-textarea.pngbin2113 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-textfield-background.pngbin1976 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-textfield-disabled.pngbin193 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-textfield-focused.pngbin2072 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-textfield-normal.pngbin1553 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-togglebutton-background.pngbin2558 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-togglebutton-checked.pngbin1921 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-togglebutton-disabled.pngbin1921 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-togglebutton-focused.pngbin1788 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-togglebutton-indicator.pngbin2450 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-togglebutton-label.pngbin2530 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-togglebutton-normal.pngbin1444 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-toolbar-background.pngbin217 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-toolbar-frame.pngbin217 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-toolbar.pngbin4172 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-toolbutton-background.pngbin1722 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-toolbutton-label.pngbin1682 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-tumbler-background.pngbin1289 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-tumbler-contentItem.pngbin1289 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-tumbler-delegate.pngbin1300 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtlabscontrols-universal.pngbin18382 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.pngbin0 -> 5696 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-busyindicator-custom.pngbin0 -> 1502 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gifbin0 -> 17357 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-busyindicator.png (renamed from src/imports/controls/doc/images/qtlabscontrols-busyindicator.png)bin1713 -> 1713 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-custom.pngbin0 -> 1512 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-flat.gifbin0 -> 2388 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-focused.pngbin0 -> 1482 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-highlighted.gifbin0 -> 1856 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-normal.pngbin0 -> 1257 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button-pressed.pngbin0 -> 1196 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-button.gifbin0 -> 1863 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-checkbox-custom.pngbin0 -> 2268 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gifbin0 -> 8784 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-checkbox.gifbin0 -> 6403 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-custom.pngbin0 -> 2619 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-tristate.gifbin0 -> 10487 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gifbin0 -> 15290 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-combobox-custom.pngbin0 -> 1169 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-combobox-delegate.pngbin0 -> 1343 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-combobox-popup.pngbin0 -> 1343 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-combobox.gifbin0 -> 7873 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-control.pngbin0 -> 22234 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-control.svg392
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-customize-buttons.pngbin0 -> 3224 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-default.pngbin0 -> 16855 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-dial-custom.pngbin0 -> 6274 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-dial-handle.pngbin0 -> 5703 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-dial-no-wrap.gifbin0 -> 52372 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-dial-wrap.gifbin0 -> 70792 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-dial.png (renamed from src/imports/controls/doc/images/qtlabscontrols-dial.png)bin7204 -> 7204 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-drawer-expanded-wireframe.png (renamed from src/imports/controls/doc/images/qtlabscontrols-drawer-expanded-wireframe.png)bin3004 -> 3004 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-drawer-wireframe.png (renamed from src/imports/controls/doc/images/qtlabscontrols-drawer-wireframe.png)bin3956 -> 3956 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-drawer.gifbin0 -> 55780 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-frame-custom.pngbin0 -> 2261 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-frame.pngbin0 -> 3824 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-groupbox-checkable.pngbin0 -> 6388 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.pngbin0 -> 3885 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-groupbox-label.pngbin0 -> 2052 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-groupbox.pngbin0 -> 5682 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-itemdelegate-custom.pngbin0 -> 1812 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gifbin0 -> 16287 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.pngbin0 -> 7029 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-label-custom.pngbin0 -> 963 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-label.pngbin0 -> 946 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material-accent.pngbin0 -> 1633 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material-attributes.pngbin0 -> 8934 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material-background.pngbin0 -> 1883 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material-dark.png (renamed from src/imports/controls/doc/images/qtlabscontrols-material-dark.png)bin4981 -> 4981 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material-elevation.pngbin0 -> 3087 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material-foreground.pngbin0 -> 1726 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material-theme.pngbin0 -> 2002 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-material.pngbin0 -> 29049 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-menu-custom.pngbin0 -> 2960 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-menu.gif (renamed from src/imports/controls/doc/images/qtlabscontrols-menu.gif)bin4683 -> 4683 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-menu.png (renamed from src/imports/controls/doc/images/qtlabscontrols-menu.png)bin4821 -> 4821 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-page-wireframe.png (renamed from src/imports/controls/doc/images/qtlabscontrols-applicationwindow-wireframe.png)bin1795 -> 1795 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-pageindicator-custom.pngbin0 -> 396 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-pageindicator-delegate.pngbin0 -> 498 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-pageindicator.pngbin0 -> 416 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-pane-custom.pngbin0 -> 2244 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-pane.pngbin0 -> 3561 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-popup-custom.pngbin0 -> 630 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-popup-settings.pngbin0 -> 12440 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-popup-transformorigin.png (renamed from src/imports/controls/doc/images/qtlabscontrols-popup-transformorigin.png)bin8927 -> 8927 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-popup.pngbin0 -> 21693 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-popup.svg391
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-progressbar-custom.pngbin0 -> 226 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.gifbin0 -> 5882 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-progressbar.gifbin0 -> 2072 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-radiobutton-custom.pngbin0 -> 2868 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-radiobutton.gifbin0 -> 7993 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-radiodelegate-custom.pngbin0 -> 3135 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gifbin0 -> 16859 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-rangeslider-custom.pngbin0 -> 1077 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-rangeslider.gifbin0 -> 17402 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollbar-custom.pngbin0 -> 236 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.pngbin0 -> 5459 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollbar.gifbin0 -> 32067 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-custom.pngbin0 -> 123 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.pngbin0 -> 5280 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.gifbin0 -> 42352 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-custom.pngbin0 -> 954 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-handle.pngbin0 -> 967 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-nosnap.gifbin0 -> 18138 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-snapalways.gifbin0 -> 7201 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-snaponrelease.gifbin0 -> 18377 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider.gifbin0 -> 13697 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-spinbox-custom.pngbin0 -> 1175 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-spinbox-double.pngbin0 -> 933 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-spinbox-down.pngbin0 -> 984 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-spinbox-textual.pngbin0 -> 1505 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-spinbox-up.pngbin0 -> 995 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-spinbox.pngbin0 -> 989 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-stackview-custom.pngbin0 -> 200 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-stackview-pop.gifbin0 -> 23801 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-stackview-push.gifbin0 -> 42790 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-stackview-replace.gifbin0 -> 28882 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-stackview-unwind.gifbin0 -> 23744 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-stackview-wireframe.png (renamed from src/imports/controls/doc/images/qtlabscontrols-stackview-wireframe.png)bin646 -> 646 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-behind.gifbin0 -> 248344 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-custom.pngbin0 -> 2434 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-leading-trailing.gifbin0 -> 132134 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipedelegate.gifbin0 -> 123494 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipeview-indicator.png (renamed from src/imports/controls/doc/images/qtlabscontrols-swipeview-indicator.png)bin695 -> 695 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipeview-wireframe.png (renamed from src/imports/controls/doc/images/qtlabscontrols-swipeview-wireframe.png)bin1583 -> 1583 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipeview.gifbin0 -> 35983 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switch-checked.pngbin0 -> 2427 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switch-custom.pngbin0 -> 2251 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switch-disabled.pngbin0 -> 2633 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switch-focused.pngbin0 -> 2532 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switch-normal.pngbin0 -> 2249 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switch.gif (renamed from src/imports/controls/doc/images/qtlabscontrols-switch.gif)bin3466 -> 3466 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switch.png (renamed from src/imports/controls/doc/images/qtlabscontrols-switch.png)bin2669 -> 2669 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switchdelegate-custom.pngbin0 -> 3567 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-switchdelegate.gifbin0 -> 38688 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tabbar-custom.pngbin0 -> 3568 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.pngbin0 -> 2701 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tabbar-flickable.pngbin0 -> 3349 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tabbar-wireframe.png (renamed from src/imports/controls/doc/images/qtlabscontrols-tabbar-wireframe.png)bin609 -> 609 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tabbar.gif (renamed from src/imports/controls/doc/images/qtlabscontrols-tabbar.gif)bin8590 -> 8590 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tabbar.pngbin0 -> 3882 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tabbutton.pngbin0 -> 3597 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textarea-custom.pngbin0 -> 1974 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textarea-flickable.pngbin0 -> 1942 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textarea.pngbin0 -> 2238 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textfield-custom.pngbin0 -> 2387 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textfield-disabled.pngbin0 -> 1282 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textfield-focused.pngbin0 -> 1633 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textfield-normal.pngbin0 -> 1325 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-textfield.png (renamed from src/imports/controls/doc/images/qtlabscontrols-textfield.png)bin2088 -> 2088 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-toolbar-custom.pngbin0 -> 1531 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-toolbar.pngbin0 -> 1186 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-toolbutton-custom.pngbin0 -> 1419 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-toolbutton.png (renamed from src/imports/controls/doc/images/qtlabscontrols-toolbutton.png)bin1683 -> 1683 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tooltip-delay.pngbin0 -> 1278 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tooltip-hover.pngbin0 -> 1205 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tooltip-pressandhold.pngbin0 -> 1205 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tooltip-slider.pngbin0 -> 2057 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tooltip.pngbin0 -> 6315 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tumbler-custom.pngbin0 -> 2282 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tumbler-delegate.pngbin0 -> 1176 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tumbler-wrap.gif (renamed from src/imports/controls/doc/images/qtlabscontrols-tumbler-wrap.gif)bin54383 -> 54383 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-tumbler.png (renamed from src/imports/controls/doc/images/qtlabscontrols-tumbler.png)bin1123 -> 1123 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal-accent.pngbin0 -> 1079 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal-attributes.pngbin0 -> 6181 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal-background.pngbin0 -> 1326 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal-button.png (renamed from src/imports/controls/doc/images/qtlabscontrols-universal-button.png)bin674 -> 674 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal-dark.png (renamed from src/imports/controls/doc/images/qtlabscontrols-universal-dark.png)bin2894 -> 2894 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal-foreground.pngbin0 -> 1027 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal-theme.pngbin0 -> 1386 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-universal.pngbin0 -> 25572 bytes
-rw-r--r--src/imports/controls/doc/qtlabscontrols.qdocconf64
-rw-r--r--src/imports/controls/doc/qtquickcontrols2.qdocconf98
-rw-r--r--src/imports/controls/doc/snippets/basic-example.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-busyindicator-contentItem.qml37
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-button-background.qml39
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-button-label.qml39
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-button.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-checkbox-indicator.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-checkbox-label.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-checkbox.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-combobox-background.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-combobox-contentItem.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-dial-background.qml37
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-dial.qml32
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-indicator.qml40
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-label.qml40
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-label-background.qml37
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-progressbar-background.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-progressbar-disabled.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-progressbar-indicator.qml40
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-progressbar-normal.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-disabled.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-focused.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-indicator.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-label.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-normal.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-radiobutton.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-disabled.qml35
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle-focused.qml35
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle.qml39
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-normal.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle-focused.qml35
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle.qml39
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-rangeslider.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-scrollbar.qml52
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator-indicator.qml42
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-slider-disabled.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-slider-focused.qml34
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-slider-normal.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-slider-track.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-slider.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-spinbox-background.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-spinbox-contentItem.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-switch-background.qml37
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-switch-indicator.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-switch-label.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-switch.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-textarea.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-textfield-background.qml39
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-textfield.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-toolbar-background.qml39
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-toolbar-frame.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-background.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-label.qml38
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-toolbutton.qml35
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-tumbler-contentItem.qml39
-rw-r--r--src/imports/controls/doc/snippets/qtlabscontrols-tumbler.qml33
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-material-accent.qml43
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-material-background.qml42
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-material-elevation.qml51
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-material-foreground.qml41
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-material-theme.qml44
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml93
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml97
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-stackview-custom.qml53
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator.qml)55
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-swipeview-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-busyindicator-background.qml)13
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-custom.qml48
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-universal-accent.qml43
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-universal-background.qml44
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-universal-foreground.qml41
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-universal-theme.qml44
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml (renamed from src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml (renamed from src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml)0
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml (renamed from src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml)0
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml (renamed from src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml)0
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml (renamed from src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml)0
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml (renamed from src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml)0
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml (renamed from src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml)0
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-busyindicator-custom.qml88
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-custom.qml55
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-disabled.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-button-disabled.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-focused.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-button-focused.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-normal.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-button-normal.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-pressed.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-button-pressed.qml)4
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-checked.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-checkbox-checked.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-custom.qml66
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-disabled.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-checkbox-disabled.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-focused.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-checkbox-focused.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-normal.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-checkbox-normal.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkdelegate-custom.qml75
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml113
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-delegate.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-combobox-delegate.qml)3
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-popup.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-combobox-popup.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-scrollbar-background.qml)45
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-handle.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-dial-handle.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-checkbox-background.qml)18
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-frame.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-checkable.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-groupbox-checkable.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-background.qml)25
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-label.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-groupbox-label.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-groupbox.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-background.qml)38
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label-custom.qml36
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-label.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-menu-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-menu-contentItem.qml)44
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-menu.qml)40
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-delegate.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-frame-frame.qml)10
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-interactive.qml58
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-busyindicator.qml)9
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-pane-background.qml)17
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-pane.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-popup-custom.qml53
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-slider-background.qml)29
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-checked.qml)38
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiodelegate-custom.qml75
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-custom.qml76
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-active.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-groupbox-frame.qml)21
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-scrollbar-handle.qml)26
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-active.qml46
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator-background.qml)23
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-custom.qml64
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-handle.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-slider-handle.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-custom.qml96
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-double.qml56
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-down.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-spinbox-down.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-textual.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-spinbox-textual.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-up.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-spinbox-up.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-spinbox.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipedelegate-custom.qml74
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipeview-indicator.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-swipeview-indicator.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-checked.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-switch-checked.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-custom.qml65
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-disabled.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-switch-disabled.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-focused.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-switch-focused.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-normal.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-switch-normal.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switchdelegate-custom.qml74
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-frame-background.qml)27
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml52
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-flickable.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-track.qml)31
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-tabbar.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbutton.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-tabbutton.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-groupbox-background.qml)21
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-flickable.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-pageindicator.qml)21
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-custom.qml43
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-disabled.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-textfield-disabled.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-focused.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-textfield-focused.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-normal.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-textfield-normal.qml)2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-toolbar.qml)32
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml62
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbutton-custom.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-background.qml)32
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-hover.qml41
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-pressandhold.qml39
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-slider.qml53
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-combobox.qml)26
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-custom.qml79
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-delegate.qml (renamed from src/imports/controls/doc/snippets/qtlabscontrols-tumbler-delegate.qml)2
-rw-r--r--src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc4
-rw-r--r--src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc6
-rw-r--r--src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc13
-rw-r--r--src/imports/controls/doc/src/includes/qquickcontrol-focusreason.qdocinc15
-rw-r--r--src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc63
-rw-r--r--src/imports/controls/doc/src/includes/qquickpopup-padding.qdocinc10
-rw-r--r--src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc5
-rw-r--r--src/imports/controls/doc/src/includes/qquickswitch.qdocinc28
-rw-r--r--src/imports/controls/doc/src/includes/qquickuniversalstyle.qdocinc53
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-buttons.qdoc79
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-customize.qdoc593
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-differences.qdoc283
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-examples.qdoc68
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-index.qdoc64
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-material.qdoc200
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-styles.qdoc119
-rw-r--r--src/imports/controls/doc/src/qtlabscontrols-universal.qdoc179
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc162
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc94
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-containers.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-containers.qdoc)40
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-cppclasses.qdoc50
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc750
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-default.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-default.qdoc)14
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc80
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc97
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc378
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc66
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-examples.qdoc (renamed from src/imports/controls/doc/snippets/qtlabscontrols-tumbler-background.qml)18
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc141
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-gettingstarted.qdoc)6
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-guidelines.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-menus.qdoc)23
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-highdpi.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-highdpi.qdoc)8
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-index.qdoc99
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-indicators.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-indicators.qdoc)35
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-input.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-input.qdoc)55
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-material.qdoc367
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols-navigation.qdoc)41
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-navigation.qdoc70
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-popups.qdoc99
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc (renamed from src/imports/controls/doc/src/qtlabscontrols.qdoc)36
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc146
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc278
-rw-r--r--src/imports/controls/doc/src/templates/qtquicktemplates2-index.qdoc (renamed from src/imports/controls/doc/src/templates/qtlabstemplates-index.qdoc)10
-rw-r--r--src/imports/controls/doc/src/templates/qtquicktemplates2.qdoc (renamed from src/imports/controls/doc/src/templates/qtlabstemplates.qdoc)24
-rw-r--r--src/imports/controls/images/check@2x.pngbin766 -> 997 bytes
-rw-r--r--src/imports/controls/images/check@3x.pngbin1090 -> 1433 bytes
-rw-r--r--src/imports/controls/images/check@4x.pngbin1344 -> 1931 bytes
-rw-r--r--src/imports/controls/images/dial-indicator.pngbin185 -> 214 bytes
-rw-r--r--src/imports/controls/images/dial-indicator@2x.pngbin243 -> 306 bytes
-rw-r--r--src/imports/controls/images/dial-indicator@3x.pngbin284 -> 384 bytes
-rw-r--r--src/imports/controls/images/dial-indicator@4x.pngbin307 -> 463 bytes
-rw-r--r--src/imports/controls/images/double-arrow.pngbin0 -> 1275 bytes
-rw-r--r--src/imports/controls/images/double-arrow@2x.pngbin0 -> 1690 bytes
-rw-r--r--src/imports/controls/images/double-arrow@3x.pngbin0 -> 2059 bytes
-rw-r--r--src/imports/controls/images/double-arrow@4x.pngbin0 -> 2523 bytes
-rw-r--r--src/imports/controls/images/drop-indicator@4x.pngbin376 -> 507 bytes
-rw-r--r--src/imports/controls/material/ApplicationWindow.qml15
-rw-r--r--src/imports/controls/material/BoxShadow.qml69
-rw-r--r--src/imports/controls/material/BusyIndicator.qml12
-rw-r--r--src/imports/controls/material/Button.qml69
-rw-r--r--src/imports/controls/material/CheckBox.qml119
-rw-r--r--src/imports/controls/material/CheckDelegate.qml82
-rw-r--r--src/imports/controls/material/CheckIndicator.qml126
-rw-r--r--src/imports/controls/material/ComboBox.qml86
-rw-r--r--src/imports/controls/material/Dial.qml14
-rw-r--r--src/imports/controls/material/Drawer.qml36
-rw-r--r--src/imports/controls/material/ElevationEffect.qml279
-rw-r--r--src/imports/controls/material/Frame.qml29
-rw-r--r--src/imports/controls/material/GroupBox.qml30
-rw-r--r--src/imports/controls/material/ItemDelegate.qml109
-rw-r--r--src/imports/controls/material/Label.qml10
-rw-r--r--src/imports/controls/material/Menu.qml37
-rw-r--r--src/imports/controls/material/MenuItem.qml108
-rw-r--r--src/imports/controls/material/Page.qml12
-rw-r--r--src/imports/controls/material/PageIndicator.qml14
-rw-r--r--src/imports/controls/material/Pane.qml21
-rw-r--r--src/imports/controls/material/Popup.qml25
-rw-r--r--src/imports/controls/material/ProgressBar.qml25
-rw-r--r--src/imports/controls/material/RadioButton.qml63
-rw-r--r--src/imports/controls/material/RadioDelegate.qml81
-rw-r--r--src/imports/controls/material/RadioIndicator.qml69
-rw-r--r--src/imports/controls/material/RangeSlider.qml35
-rw-r--r--src/imports/controls/material/Ripple.qml6
-rw-r--r--src/imports/controls/material/ScrollBar.qml25
-rw-r--r--src/imports/controls/material/ScrollIndicator.qml22
-rw-r--r--src/imports/controls/material/Slider.qml37
-rw-r--r--src/imports/controls/material/SliderHandle.qml6
-rw-r--r--src/imports/controls/material/SpinBox.qml77
-rw-r--r--src/imports/controls/material/StackView.qml32
-rw-r--r--src/imports/controls/material/SwipeDelegate.qml100
-rw-r--r--src/imports/controls/material/SwipeView.qml8
-rw-r--r--src/imports/controls/material/Switch.qml79
-rw-r--r--src/imports/controls/material/SwitchDelegate.qml82
-rw-r--r--src/imports/controls/material/SwitchIndicator.qml90
-rw-r--r--src/imports/controls/material/TabBar.qml30
-rw-r--r--src/imports/controls/material/TabButton.qml27
-rw-r--r--src/imports/controls/material/TextArea.qml19
-rw-r--r--src/imports/controls/material/TextField.qml24
-rw-r--r--src/imports/controls/material/ToolBar.qml25
-rw-r--r--src/imports/controls/material/ToolButton.qml29
-rw-r--r--src/imports/controls/material/ToolTip.qml84
-rw-r--r--src/imports/controls/material/Tumbler.qml16
-rw-r--r--src/imports/controls/material/images/drop-indicator.pngbin342 -> 192 bytes
-rw-r--r--src/imports/controls/material/images/drop-indicator.svg5
-rw-r--r--src/imports/controls/material/images/drop-indicator@2x.pngbin273 -> 221 bytes
-rw-r--r--src/imports/controls/material/images/drop-indicator@3x.pngbin406 -> 256 bytes
-rw-r--r--src/imports/controls/material/images/drop-indicator@4x.pngbin520 -> 289 bytes
-rw-r--r--src/imports/controls/material/material.pri10
-rw-r--r--src/imports/controls/material/material.pro12
-rw-r--r--src/imports/controls/material/plugins.qmltypes92
-rw-r--r--src/imports/controls/material/qmldir8
-rw-r--r--src/imports/controls/material/qquickmaterialprogressring.cpp57
-rw-r--r--src/imports/controls/material/qquickmaterialprogressring_p.h14
-rw-r--r--src/imports/controls/material/qquickmaterialprogressstrip.cpp29
-rw-r--r--src/imports/controls/material/qquickmaterialprogressstrip_p.h14
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp772
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h125
-rw-r--r--src/imports/controls/material/qquickmaterialtheme.cpp43
-rw-r--r--src/imports/controls/material/qquickmaterialtheme_p.h22
-rw-r--r--src/imports/controls/material/qtlabsmaterialstyleplugin.cpp107
-rw-r--r--src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp112
-rw-r--r--src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc (renamed from src/imports/controls/material/qtlabsmaterialstyleplugin.qrc)2
-rw-r--r--src/imports/controls/plugins.qmltypes1534
-rw-r--r--src/imports/controls/qmldir8
-rw-r--r--src/imports/controls/qquickbusyindicatorring.cpp18
-rw-r--r--src/imports/controls/qquickbusyindicatorring_p.h20
-rw-r--r--src/imports/controls/qquickdialring.cpp126
-rw-r--r--src/imports/controls/qquickdialring_p.h (renamed from src/imports/controls/universal/qquickuniversalimageprovider_p.h)37
-rw-r--r--src/imports/controls/qquickprogressstrip.cpp25
-rw-r--r--src/imports/controls/qquickprogressstrip_p.h14
-rw-r--r--src/imports/controls/qtlabscontrolsplugin.cpp130
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.cpp150
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.qrc (renamed from src/imports/controls/qtlabscontrolsplugin.qrc)6
-rw-r--r--src/imports/controls/universal/ApplicationWindow.qml21
-rw-r--r--src/imports/controls/universal/BusyIndicator.qml12
-rw-r--r--src/imports/controls/universal/Button.qml38
-rw-r--r--src/imports/controls/universal/CheckBox.qml65
-rw-r--r--src/imports/controls/universal/CheckDelegate.qml90
-rw-r--r--src/imports/controls/universal/CheckIndicator.qml75
-rw-r--r--src/imports/controls/universal/ComboBox.qml64
-rw-r--r--src/imports/controls/universal/Dial.qml14
-rw-r--r--src/imports/controls/universal/Drawer.qml73
-rw-r--r--src/imports/controls/universal/Frame.qml17
-rw-r--r--src/imports/controls/universal/GroupBox.qml22
-rw-r--r--src/imports/controls/universal/ItemDelegate.qml54
-rw-r--r--src/imports/controls/universal/Label.qml11
-rw-r--r--src/imports/controls/universal/Menu.qml22
-rw-r--r--src/imports/controls/universal/MenuItem.qml49
-rw-r--r--src/imports/controls/universal/Page.qml14
-rw-r--r--src/imports/controls/universal/PageIndicator.qml12
-rw-r--r--src/imports/controls/universal/Pane.qml14
-rw-r--r--src/imports/controls/universal/Popup.qml8
-rw-r--r--src/imports/controls/universal/ProgressBar.qml46
-rw-r--r--src/imports/controls/universal/RadioButton.qml71
-rw-r--r--src/imports/controls/universal/RadioDelegate.qml92
-rw-r--r--src/imports/controls/universal/RadioIndicator.qml77
-rw-r--r--src/imports/controls/universal/RangeSlider.qml36
-rw-r--r--src/imports/controls/universal/ScrollBar.qml28
-rw-r--r--src/imports/controls/universal/ScrollIndicator.qml24
-rw-r--r--src/imports/controls/universal/Slider.qml20
-rw-r--r--src/imports/controls/universal/SpinBox.qml44
-rw-r--r--src/imports/controls/universal/StackView.qml28
-rw-r--r--src/imports/controls/universal/SwipeDelegate.qml105
-rw-r--r--src/imports/controls/universal/Switch.qml62
-rw-r--r--src/imports/controls/universal/SwitchDelegate.qml90
-rw-r--r--src/imports/controls/universal/SwitchIndicator.qml72
-rw-r--r--src/imports/controls/universal/TabBar.qml17
-rw-r--r--src/imports/controls/universal/TabButton.qml27
-rw-r--r--src/imports/controls/universal/TextArea.qml25
-rw-r--r--src/imports/controls/universal/TextField.qml31
-rw-r--r--src/imports/controls/universal/ToolBar.qml12
-rw-r--r--src/imports/controls/universal/ToolButton.qml31
-rw-r--r--src/imports/controls/universal/ToolTip.qml72
-rw-r--r--src/imports/controls/universal/Tumbler.qml18
-rw-r--r--src/imports/controls/universal/plugins.qmltypes61
-rw-r--r--src/imports/controls/universal/qmldir8
-rw-r--r--src/imports/controls/universal/qquickuniversalfocusrectangle.cpp12
-rw-r--r--src/imports/controls/universal/qquickuniversalfocusrectangle_p.h8
-rw-r--r--src/imports/controls/universal/qquickuniversalprogressring.cpp45
-rw-r--r--src/imports/controls/universal/qquickuniversalprogressring_p.h14
-rw-r--r--src/imports/controls/universal/qquickuniversalprogressstrip.cpp88
-rw-r--r--src/imports/controls/universal/qquickuniversalprogressstrip_p.h27
-rw-r--r--src/imports/controls/universal/qquickuniversalstyle.cpp419
-rw-r--r--src/imports/controls/universal/qquickuniversalstyle_p.h58
-rw-r--r--src/imports/controls/universal/qquickuniversaltheme.cpp20
-rw-r--r--src/imports/controls/universal/qquickuniversaltheme_p.h19
-rw-r--r--src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp (renamed from src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp)80
-rw-r--r--src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc (renamed from src/imports/controls/universal/qtlabsuniversalstyleplugin.qrc)2
-rw-r--r--src/imports/controls/universal/universal.pri11
-rw-r--r--src/imports/controls/universal/universal.pro12
717 files changed, 14112 insertions, 7930 deletions
diff --git a/src/imports/controls/AbstractButton.qml b/src/imports/controls/AbstractButton.qml
new file mode 100644
index 00000000..487b452b
--- /dev/null
+++ b/src/imports/controls/AbstractButton.qml
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+
+T.AbstractButton {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ (contentItem ? contentItem.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem ? contentItem.y + contentItem.baselineOffset : 0
+}
diff --git a/src/imports/controls/ApplicationWindow.qml b/src/imports/controls/ApplicationWindow.qml
index 5c43c956..98de8946 100644
--- a/src/imports/controls/ApplicationWindow.qml
+++ b/src/imports/controls/ApplicationWindow.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -36,14 +36,18 @@
import QtQuick 2.6
import QtQuick.Window 2.2
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.ApplicationWindow {
id: window
color: "#ffffff"
- overlay.background: Rectangle {
+ overlay.modal: Rectangle {
color: "#7f28282a"
}
+
+ overlay.modeless: Rectangle {
+ color: "#1f28282a"
+ }
}
diff --git a/src/imports/controls/BusyIndicator.qml b/src/imports/controls/BusyIndicator.qml
index 1c55e75d..9be1f046 100644
--- a/src/imports/controls/BusyIndicator.qml
+++ b/src/imports/controls/BusyIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,9 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.controls.impl 1.0
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
+import QtQuick.Templates 2.0 as T
T.BusyIndicator {
id: control
@@ -47,7 +47,6 @@ T.BusyIndicator {
padding: 6
- //! [contentItem]
contentItem: BusyRing {
id: ring
implicitWidth: 48
@@ -61,5 +60,4 @@ T.BusyIndicator {
running: control.visible && control.running
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml
index 290f4ce4..1a974eed 100644
--- a/src/imports/controls/Button.qml
+++ b/src/imports/controls/Button.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,44 +35,39 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Button {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
- leftPadding: 8
- rightPadding: 8
+ leftPadding: padding + 2
+ rightPadding: padding + 2
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
+ contentItem: Text {
text: control.text
font: control.font
- opacity: enabled || highlighted ? 1 : 0.3
- color: control.highlighted ? "#ffffff" : (control.pressed ? "#26282a" : "#353637")
+ opacity: enabled || control.highlighted || control.checked ? 1 : 0.3
+ color: control.checked || control.highlighted ? "#ffffff" : (control.visualFocus ? "#0066ff" : (control.down ? "#26282a" : "#353637"))
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
- //! [label]
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
- opacity: enabled ? 1 : 0.3
- color: control.pressed ? (control.highlighted ? "#585a5c" : "#e4e4e4") : (control.highlighted ? "#353637" : "#f6f6f6")
- border.color: control.pressed ? "#26282a" : "#353637"
+ visible: !control.flat || control.down || control.checked || control.highlighted
+ color: control.checked || control.highlighted ?
+ (control.visualFocus ? (control.down ? "#599bff" : "#0066ff") : (control.down ? "#585a5c" : "#353637")) :
+ (control.visualFocus ? (control.down ? "#cce0ff" : "#f0f6ff") : (control.down ? "#d0d0d0" : "#e0e0e0"))
+ border.color: "#0066ff"
+ border.width: control.visualFocus ? 2 : 0
}
- //! [background]
}
diff --git a/src/imports/controls/CheckBox.qml b/src/imports/controls/CheckBox.qml
index 4b7af3b1..632097b1 100644
--- a/src/imports/controls/CheckBox.qml
+++ b/src/imports/controls/CheckBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,66 +35,40 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
T.CheckBox {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
spacing: 6
- opacity: enabled ? 1 : 0.2
- //! [indicator]
- indicator: Rectangle {
- implicitWidth: 28
- implicitHeight: 28
+ indicator: CheckIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
-
- color: control.enabled ? (control.pressed ? "#e4e4e4" : "#f6f6f6") : "#353637"
- border.color: control.enabled ? (control.pressed ? "#26282a" : "#353637") : "transparent"
-
- Image {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/images/check.png"
- visible: control.checkState === Qt.Checked
- }
-
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 16
- height: 3
- color: "#353637"
- visible: control.checkState === Qt.PartiallyChecked
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
- color: control.pressed ? "#26282a" : "#353637"
+ color: control.down ? "#26282a" : "#353637"
elide: Text.ElideRight
visible: control.text
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
+ opacity: enabled ? 1 : 0.3
}
- //! [label]
}
diff --git a/src/imports/controls/CheckDelegate.qml b/src/imports/controls/CheckDelegate.qml
new file mode 100644
index 00000000..96cb48e0
--- /dev/null
+++ b/src/imports/controls/CheckDelegate.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
+
+T.CheckDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 12
+ spacing: 12
+
+ contentItem: Text {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? "#26282a" : "#bdbebf"
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ indicator: CheckIndicator {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ control: control
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? "#bdbebf" : "#eeeeee"
+ }
+}
diff --git a/src/imports/controls/CheckIndicator.qml b/src/imports/controls/CheckIndicator.qml
new file mode 100644
index 00000000..5aad92ef
--- /dev/null
+++ b/src/imports/controls/CheckIndicator.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Rectangle {
+ id: indicator
+
+ property Item control
+
+ implicitWidth: 28
+ implicitHeight: 28
+
+ color: control.enabled ? (control.down ? (control.visualFocus ? "#cce0ff" : "#f6f6f6") : "#ffffff") : "#353637"
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.enabled ? (control.visualFocus ? "#0066ff" : (control.down ? "#808080" : "#909090")) : "transparent"
+ opacity: enabled ? 1 : 0.3
+
+ Image {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ source: "image://default/check/" + (control.visualFocus ? "#0066ff" : "#353637")
+ sourceSize.width: width
+ sourceSize.height: height
+ visible: control.checkState === Qt.Checked
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 16
+ height: 3
+ color: control.visualFocus ? "#0066ff" : "#353637"
+ visible: control.checkState === Qt.PartiallyChecked
+ }
+}
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 2745a0d8..31f2e5d9 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -36,7 +36,8 @@
import QtQuick 2.6
import QtQuick.Window 2.2
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
T.ComboBox {
id: control
@@ -44,79 +45,77 @@ T.ComboBox {
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
baselineOffset: contentItem.y + contentItem.baselineOffset
spacing: 8
padding: 6
- leftPadding: 8
- rightPadding: 8
+ leftPadding: padding + 6
+ rightPadding: padding + 6
- //! [delegate]
delegate: ItemDelegate {
- width: control.width
+ width: control.popup.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
- checkable: true
- autoExclusive: true
- checked: control.currentIndex === index
- highlighted: control.highlightedIndex === index
- pressed: highlighted && control.pressed
+ font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
+ highlighted: control.highlightedIndex == index
+ }
+
+ indicator: Image {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ source: "image://default/double-arrow/" + (control.visualFocus ? "#0066ff" : "#353637")
+ sourceSize.width: width
+ sourceSize.height: height
+ opacity: enabled ? 1 : 0.3
}
- //! [delegate]
- //! [contentItem]
contentItem: Text {
+ leftPadding: control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0
+
text: control.displayText
font: control.font
- color: "#ffffff"
+ color: control.visualFocus ? "#0066ff" : "#353637"
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
- rightPadding: 18 + control.spacing
+ opacity: enabled ? 1 : 0.3
}
- //! [contentItem]
- //! [background]
- background: Item {
+ background: Rectangle {
implicitWidth: 120
implicitHeight: 40
- Rectangle {
- width: parent.width
- height: parent.height
- opacity: control.enabled ? 1.0 : 0.2
- color: control.pressed || popup.visible ? "#585A5C" : "#353637"
- }
-
- Image {
- x: parent.width - width - control.rightPadding
- y: (parent.height - height) / 2
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/images/drop-indicator.png"
- }
+ color: control.visualFocus ? (control.pressed ? "#cce0ff" : "#f0f6ff") :
+ (control.pressed || popup.visible ? "#d0d0d0" : "#e0e0e0")
+ border.color: "#0066ff"
+ border.width: control.visualFocus ? 2 : 0
}
- //! [background]
- //! [popup]
popup: T.Popup {
- y: control.height - 1
- implicitWidth: control.width
- implicitHeight: listview.contentHeight
+ y: control.height - (control.visualFocus ? 0 : 1)
+ width: control.width
+ implicitHeight: contentItem.implicitHeight
topMargin: 6
bottomMargin: 6
contentItem: ListView {
id: listview
clip: true
+ implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
+ highlightRangeMode: ListView.ApplyRange
+ highlightMoveDuration: 0
Rectangle {
z: 10
parent: listview
width: listview.width
height: listview.height
- border.color: "#353637"
color: "transparent"
+ border.color: "#bdbebf"
}
T.ScrollIndicator.vertical: ScrollIndicator { }
@@ -124,5 +123,4 @@ T.ComboBox {
background: Rectangle { }
}
- //! [popup]
}
diff --git a/src/imports/controls/Container.qml b/src/imports/controls/Container.qml
new file mode 100644
index 00000000..9e9215f8
--- /dev/null
+++ b/src/imports/controls/Container.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+
+T.Container {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ (contentItem ? contentItem.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding)
+}
diff --git a/src/imports/controls/Control.qml b/src/imports/controls/Control.qml
new file mode 100644
index 00000000..a4bb95fe
--- /dev/null
+++ b/src/imports/controls/Control.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+
+T.Control {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ (contentItem ? contentItem.implicitWidth : 0) + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ (contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding)
+}
diff --git a/src/imports/controls/Dial.qml b/src/imports/controls/Dial.qml
index b6752d55..cd4d6ba2 100644
--- a/src/imports/controls/Dial.qml
+++ b/src/imports/controls/Dial.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
+import QtQuick.Templates 2.0 as T
T.Dial {
id: control
@@ -43,29 +45,28 @@ T.Dial {
implicitWidth: 184
implicitHeight: 184
- //! [background]
- background: Rectangle {
- x: control.width / 2 - width / 2
- y: control.height / 2 - height / 2
- width: Math.max(64, Math.min(control.width, control.height))
- height: Math.max(64, Math.min(control.width, control.height))
- radius: width / 2
- border.color: "#353637"
+ background: DialRing {
+ width: control.availableWidth
+ height: control.availableHeight
+ color: control.visualFocus ? "#0066ff" : "#353637"
+ progress: control.position
+ opacity: control.enabled ? 1 : 0.3
}
- //! [background]
- //! [handle]
handle: Image {
id: handleItem
x: background.x + background.width / 2 - handle.width / 2
y: background.y + background.height / 2 - handle.height / 2
width: 14
height: 10
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/images/dial-indicator.png"
+ source: "image://default/dial-indicator/" + (control.visualFocus ? "#0066ff" : "#353637")
+ sourceSize.width: width
+ sourceSize.height: height
antialiasing: true
+ opacity: control.enabled ? 1 : 0.3
transform: [
Translate {
- y: -background.height * 0.4 + handle.height / 2
+ y: -Math.min(background.width, background.height) * 0.4 + handle.height / 2
},
Rotation {
angle: control.angle
@@ -74,5 +75,4 @@ T.Dial {
}
]
}
- //! [handle]
}
diff --git a/src/imports/controls/Drawer.qml b/src/imports/controls/Drawer.qml
index 60abeb0c..6e9ab71f 100644
--- a/src/imports/controls/Drawer.qml
+++ b/src/imports/controls/Drawer.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,18 +35,37 @@
****************************************************************************/
import QtQuick 2.6
-import QtQuick.Window 2.2
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Drawer {
id: control
- parent: T.ApplicationWindow.overlay || Window.contentItem
- width: parent ? parent.width : 0 // TODO: Window.width
- height: parent ? parent.height : 0 // TODO: Window.height
+ parent: T.ApplicationWindow.overlay
- // TODO: make this a proper transition
- animation: SmoothedAnimation {
- velocity: 5
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: control.edge === Qt.BottomEdge
+ leftPadding: control.edge === Qt.RightEdge
+ rightPadding: control.edge === Qt.LeftEdge
+ bottomPadding: control.edge === Qt.TopEdge
+
+ enter: Transition { SmoothedAnimation { velocity: 5 } }
+ exit: Transition { SmoothedAnimation { velocity: 5 } }
+
+ contentItem: Item { }
+
+ background: Rectangle {
+ Rectangle {
+ readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
+ width: horizontal ? 1 : parent.width
+ height: horizontal ? parent.height : 1
+ color: "#353637"
+ x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0
+ y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
+ }
}
}
diff --git a/src/imports/controls/Frame.qml b/src/imports/controls/Frame.qml
index 3c9326e1..b7968cb4 100644
--- a/src/imports/controls/Frame.qml
+++ b/src/imports/controls/Frame.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Frame {
id: control
@@ -46,19 +46,12 @@ T.Frame {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- padding: 6
+ padding: 12
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
-
- //! [frame]
- frame: Rectangle {
- width: parent.width
- height: parent.height
+ background: Rectangle {
color: "transparent"
border.color: "#bdbebf"
}
- //! [frame]
}
diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml
index bc1801c2..31f4963f 100644
--- a/src/imports/controls/GroupBox.qml
+++ b/src/imports/controls/GroupBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.GroupBox {
id: control
@@ -49,14 +49,11 @@ T.GroupBox {
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
spacing: 6
- padding: 6
- topPadding: 6 + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
+ padding: 12
+ topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [label]
label: Text {
x: control.leftPadding
width: control.availableWidth
@@ -68,10 +65,8 @@ T.GroupBox {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [frame]
- frame: Rectangle {
+ background: Rectangle {
y: control.topPadding - control.padding
width: parent.width
height: parent.height - control.topPadding + control.padding
@@ -79,5 +74,4 @@ T.GroupBox {
color: "transparent"
border.color: "#bdbebf"
}
- //! [frame]
}
diff --git a/src/imports/controls/ItemDelegate.qml b/src/imports/controls/ItemDelegate.qml
index b5dfb4b6..519ef3bf 100644
--- a/src/imports/controls/ItemDelegate.qml
+++ b/src/imports/controls/ItemDelegate.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,29 +35,24 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.ItemDelegate {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 12
spacing: 12
- //! [label]
- label: Text {
- x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding
- y: control.topPadding
- width: control.availableWidth - (control.checkable ? indicator.width + control.spacing : 0)
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
text: control.text
font: control.font
@@ -67,24 +62,11 @@ T.ItemDelegate {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [indicator]
- indicator: Image {
- x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
- y: control.topPadding + (control.availableHeight - height) / 2
-
- visible: control.checked
- source: control.checkable ? "qrc:/qt-project.org/imports/Qt/labs/controls/images/check.png" : ""
- }
- //! [indicator]
-
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
- visible: control.pressed || control.highlighted
- color: control.pressed ? "#bdbebf" : "#eeeeee"
+ visible: control.down || control.highlighted || control.visualFocus
+ color: control.visualFocus ? (control.pressed ? "#cce0ff" : "#e5efff") : (control.down ? "#bdbebf" : "#eeeeee")
}
- //! [background]
}
diff --git a/src/imports/controls/Label.qml b/src/imports/controls/Label.qml
index 1047bfaa..d0f01613 100644
--- a/src/imports/controls/Label.qml
+++ b/src/imports/controls/Label.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Label {
id: control
diff --git a/src/imports/controls/Menu.qml b/src/imports/controls/Menu.qml
index 6692ef08..d9a97cee 100644
--- a/src/imports/controls/Menu.qml
+++ b/src/imports/controls/Menu.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,18 +35,19 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
T.Menu {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
- implicitHeight: Math.min(background ? background.implicitHeight : 0,
- contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
+
+ margins: 0
- //! [contentItem]
contentItem: ListView {
implicitHeight: contentHeight
model: control.contentModel
@@ -58,14 +59,11 @@ T.Menu {
ScrollIndicator.vertical: ScrollIndicator {}
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 200
- implicitHeight: 200
+ implicitHeight: 40
color: "#ffffff"
border.color: "#353637"
}
- //! [background]
}
diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml
index ae5a8e38..69f00900 100644
--- a/src/imports/controls/MenuItem.qml
+++ b/src/imports/controls/MenuItem.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,26 +35,23 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.MenuItem {
id: control
- implicitWidth: background ? background.implicitWidth
- : (label ? label.implicitWidth : 0) + (indicator ? indicator.implicitWidth : 0)
- + (label && indicator ? spacing : 0) + leftPadding + rightPadding
- implicitHeight: background ? background.implicitHeight
- : (label ? label.implicitHeight : 0) + (indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
- y: control.topPadding
- width: control.availableWidth - (control.checkable ? indicator.width + control.spacing : 0)
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -64,19 +61,15 @@ T.MenuItem {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [indicator]
indicator: Image {
x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding
y: control.topPadding + (control.availableHeight - height) / 2
visible: control.checked
- source: control.checkable ? "qrc:/qt-project.org/imports/Qt/labs/controls/images/check.png" : ""
+ source: control.checkable ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" : ""
}
- //! [indicator]
- //! [background]
background: Item {
implicitWidth: 200
implicitHeight: 40
@@ -86,8 +79,7 @@ T.MenuItem {
y: 1
width: parent.width - 2
height: parent.height - 2
- color: control.activeFocus || control.pressed ? "#eeeeee" : "transparent"
+ color: control.visualFocus || control.down ? "#eeeeee" : "transparent"
}
}
- //! [background]
}
diff --git a/src/imports/controls/Page.qml b/src/imports/controls/Page.qml
index 37eb57d0..4ed7efb1 100644
--- a/src/imports/controls/Page.qml
+++ b/src/imports/controls/Page.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,18 +35,14 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Page {
id: control
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
color: "#ffffff"
}
- //! [background]
}
diff --git a/src/imports/controls/PageIndicator.qml b/src/imports/controls/PageIndicator.qml
index e569a0de..933bc839 100644
--- a/src/imports/controls/PageIndicator.qml
+++ b/src/imports/controls/PageIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.PageIndicator {
id: control
@@ -48,7 +48,6 @@ T.PageIndicator {
padding: 6
spacing: 6
- //! [delegate]
delegate: Rectangle {
implicitWidth: 8
implicitHeight: 8
@@ -59,9 +58,7 @@ T.PageIndicator {
opacity: index === currentIndex ? 0.95 : pressed ? 0.7 : 0.45
Behavior on opacity { OpacityAnimator { duration: 100 } }
}
- //! [delegate]
- //! [contentItem]
contentItem: Row {
spacing: control.spacing
@@ -70,5 +67,4 @@ T.PageIndicator {
delegate: control.delegate
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/Pane.qml b/src/imports/controls/Pane.qml
index 7b95cd8a..feb8eb58 100644
--- a/src/imports/controls/Pane.qml
+++ b/src/imports/controls/Pane.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Pane {
id: control
@@ -46,15 +46,11 @@ T.Pane {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- padding: 6
+ padding: 12
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
color: "#ffffff"
}
- //! [background]
}
diff --git a/src/imports/controls/Popup.qml b/src/imports/controls/Popup.qml
index 309c317b..72428f23 100644
--- a/src/imports/controls/Popup.qml
+++ b/src/imports/controls/Popup.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Popup {
id: control
@@ -48,7 +48,7 @@ T.Popup {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- padding: 6
+ padding: 12
contentItem: Item { }
diff --git a/src/imports/controls/ProgressBar.qml b/src/imports/controls/ProgressBar.qml
index 795fd231..45e990ee 100644
--- a/src/imports/controls/ProgressBar.qml
+++ b/src/imports/controls/ProgressBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,24 +35,22 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.impl 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
T.ProgressBar {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- indicator ? indicator.implicitWidth : 0) + leftPadding + rightPadding
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding
+ contentItem.implicitHeight + topPadding + bottomPadding)
- //! [indicator]
- indicator: ProgressStrip {
+ contentItem: ProgressStrip {
id: strip
- x: control.leftPadding
- y: control.topPadding + (control.availableHeight - height) / 2
- width: control.availableWidth
- height: 6
+ implicitHeight: 6
+ implicitWidth: 116
scale: control.mirrored ? -1 : 1
progress: control.position
indeterminate: control.indeterminate
@@ -62,9 +60,7 @@ T.ProgressBar {
running: control.visible && control.indeterminate
}
}
- //! [indicator]
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 6
@@ -75,5 +71,4 @@ T.ProgressBar {
color: "#e4e4e4"
}
- //! [background]
}
diff --git a/src/imports/controls/RadioButton.qml b/src/imports/controls/RadioButton.qml
index 8e1e0bce..1100273a 100644
--- a/src/imports/controls/RadioButton.qml
+++ b/src/imports/controls/RadioButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,63 +35,40 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
+import QtQuick.Templates 2.0 as T
T.RadioButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
spacing: 6
- opacity: enabled ? 1 : 0.2
- //! [indicator]
- indicator: Rectangle {
- implicitWidth: 28
- implicitHeight: 28
+ indicator: RadioIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
-
- radius: width / 2
- border.width: 1
- border.color: (control.pressed ? "#26282a" : "#353637")
- color: control.pressed ? "#e4e4e4" : "#f6f6f6"
-
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 20
- height: 20
- radius: width / 2
- color: control.pressed ? "#26282a" : "#353637"
- visible: control.checked
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
- color: control.pressed ? "#26282a" : "#353637"
+ color: control.down ? "#26282a" : "#353637"
elide: Text.ElideRight
visible: control.text
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
+ opacity: enabled ? 1 : 0.3
}
- //! [label]
}
diff --git a/src/imports/controls/RadioDelegate.qml b/src/imports/controls/RadioDelegate.qml
new file mode 100644
index 00000000..620417a8
--- /dev/null
+++ b/src/imports/controls/RadioDelegate.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
+import QtQuick.Templates 2.0 as T
+
+T.RadioDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 12
+ spacing: 12
+
+ contentItem: Text {
+ leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? "#26282a" : "#bdbebf"
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ indicator: RadioIndicator {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+
+ control: control
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? "#bdbebf" : "#eeeeee"
+ }
+}
diff --git a/src/imports/controls/RadioIndicator.qml b/src/imports/controls/RadioIndicator.qml
new file mode 100644
index 00000000..05ff6673
--- /dev/null
+++ b/src/imports/controls/RadioIndicator.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Rectangle {
+ implicitWidth: 28
+ implicitHeight: 28
+
+ radius: width / 2
+ color: control.down ? (control.visualFocus ? "#cce0ff" : "#f6f6f6") : (control.visualFocus ? "#f0f6ff" : "#ffffff")
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.visualFocus ? "#0066ff" : (control.down ? "#808080" : "#909090")
+ opacity: enabled ? 1 : 0.3
+
+ property Item control
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 20
+ height: 20
+ radius: width / 2
+ color: control.down ? "#26282a" : "#353637"
+ visible: control.checked
+ }
+}
diff --git a/src/imports/controls/RangeSlider.qml b/src/imports/controls/RangeSlider.qml
index 9a74d4c8..181550a4 100644
--- a/src/imports/controls/RangeSlider.qml
+++ b/src/imports/controls/RangeSlider.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,23 +35,20 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.RangeSlider {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- Math.max(track ? track.implicitWidth : 0,
- first.handle ? first.handle.implicitWidth : 0,
- second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
+ Math.max(first.handle ? first.handle.implicitWidth : 0,
+ second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(track ? track.implicitHeight : 0,
- first.handle ? first.handle.implicitHeight : 0,
- second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
+ Math.max(first.handle ? first.handle.implicitHeight : 0,
+ second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
padding: 6
- //! [firstHandle]
first.handle: Rectangle {
x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
@@ -59,14 +56,12 @@ T.RangeSlider {
implicitHeight: 28
radius: width / 2
border.width: activeFocus ? 2 : 1
- border.color: "#353637"
- color: first.pressed ? "#bdbebf" : "#ffffff"
+ border.color: control.enabled ? (activeFocus ? "#0066ff" : (control.first.pressed ? "#808080" : "#909090")) : "#d6d6d6"
+ color: control.enabled ? (first.pressed ? (activeFocus ? "#cce0ff" : "#f6f6f6") : (activeFocus ? "#f0f6ff" : "#ffffff")) : "#fdfdfd"
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [firstHandle]
- //! [secondHandle]
second.handle: Rectangle {
x: control.leftPadding + (horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
@@ -74,15 +69,13 @@ T.RangeSlider {
implicitHeight: 28
radius: width / 2
border.width: activeFocus ? 2 : 1
- border.color: "#353637"
- color: second.pressed ? "#bdbebf" : "#ffffff"
+ border.color: control.enabled ? (activeFocus ? "#0066ff" : (control.first.pressed ? "#808080" : "#909090")) : "#d6d6d6"
+ color: control.enabled ? (second.pressed ? (activeFocus ? "#cce0ff" : "#f6f6f6") : (activeFocus ? "#f0f6ff" : "#ffffff")) : "#fdfdfd"
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [secondHandle]
- //! [track]
- track: Rectangle {
+ background: Rectangle {
x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
implicitWidth: horizontal ? 200 : 6
@@ -90,11 +83,9 @@ T.RangeSlider {
width: horizontal ? control.availableWidth : implicitWidth
height: horizontal ? implicitHeight : control.availableHeight
radius: 3
- border.color: "#353637"
- color: "#ffffff"
+ color: "#e0e0e0"
scale: horizontal && control.mirrored ? -1 : 1
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [track]
}
diff --git a/src/imports/controls/ScrollBar.qml b/src/imports/controls/ScrollBar.qml
index b9ebd634..c77463aa 100644
--- a/src/imports/controls/ScrollBar.qml
+++ b/src/imports/controls/ScrollBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,20 +35,19 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.ScrollBar {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- handle.implicitWidth + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- handle.implicitHeight + topPadding + bottomPadding)
+ contentItem.implicitHeight + topPadding + bottomPadding)
padding: 2
- //! [handle]
- handle: Rectangle {
+ contentItem: Rectangle {
id: handle
implicitWidth: 6
@@ -59,12 +58,6 @@ T.ScrollBar {
visible: control.size < 1.0
opacity: 0.0
- readonly property bool horizontal: control.orientation === Qt.Horizontal
- x: control.leftPadding + (horizontal ? control.position * control.availableWidth : 0)
- y: control.topPadding + (horizontal ? 0 : control.position * control.availableHeight)
- width: horizontal ? control.size * control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.size * control.availableHeight
-
states: State {
name: "active"
when: control.active
@@ -79,5 +72,4 @@ T.ScrollBar {
}
}
}
- //! [handle]
}
diff --git a/src/imports/controls/ScrollIndicator.qml b/src/imports/controls/ScrollIndicator.qml
index e2fc23b1..c129e5b8 100644
--- a/src/imports/controls/ScrollIndicator.qml
+++ b/src/imports/controls/ScrollIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,20 +35,19 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.ScrollIndicator {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- indicator.implicitWidth + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- indicator.implicitHeight + topPadding + bottomPadding)
+ contentItem.implicitHeight + topPadding + bottomPadding)
padding: 2
- //! [indicator]
- indicator: Rectangle {
+ contentItem: Rectangle {
id: indicator
implicitWidth: 2
@@ -58,12 +57,6 @@ T.ScrollIndicator {
visible: control.size < 1.0
opacity: 0.0
- readonly property bool horizontal: control.orientation === Qt.Horizontal
- x: control.leftPadding + (horizontal ? control.position * control.width : 0)
- y: control.topPadding + (horizontal ? 0 : control.position * control.height)
- width: horizontal ? control.size * control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.size * control.availableHeight
-
states: State {
name: "active"
when: control.active
@@ -80,5 +73,4 @@ T.ScrollIndicator {
}
]
}
- //! [indicator]
}
diff --git a/src/imports/controls/Slider.qml b/src/imports/controls/Slider.qml
index 95cfc54e..5e4dc699 100644
--- a/src/imports/controls/Slider.qml
+++ b/src/imports/controls/Slider.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,36 +35,32 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.Slider {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- Math.max(track ? track.implicitWidth : 0,
- handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
+ (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(track ? track.implicitHeight : 0,
- handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
+ (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
padding: 6
- //! [handle]
handle: Rectangle {
x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
implicitWidth: 28
implicitHeight: 28
radius: width / 2
- border.color: "#353637"
- color: control.pressed ? "#bdbebf" : "#f6f6f6"
+ color: control.enabled ? (control.pressed ? (control.visualFocus ? "#cce0ff" : "#f6f6f6") : (control.visualFocus ? "#f0f6ff" : "#ffffff")) : "#fdfdfd"
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.enabled ? (control.visualFocus ? "#0066ff" : (control.pressed ? "#808080" : "#909090")) : "#d6d6d6"
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [handle]
- //! [track]
- track: Rectangle {
+ background: Rectangle {
x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
implicitWidth: horizontal ? 200 : 6
@@ -72,11 +68,9 @@ T.Slider {
width: horizontal ? control.availableWidth : implicitWidth
height: horizontal ? implicitHeight : control.availableHeight
radius: 3
- border.color: "#353637"
- color: "#ffffff"
+ color: "#e0e0e0"
scale: horizontal && control.mirrored ? -1 : 1
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [track]
}
diff --git a/src/imports/controls/SpinBox.qml b/src/imports/controls/SpinBox.qml
index 77f89206..dee368e2 100644
--- a/src/imports/controls/SpinBox.qml
+++ b/src/imports/controls/SpinBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.SpinBox {
id: control
@@ -51,83 +51,84 @@ T.SpinBox {
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
- leftPadding: 6 + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
- rightPadding: 6 + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
- opacity: control.enabled ? 1 : 0.3
+ leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
+ rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
- //! [validator]
validator: IntValidator {
locale: control.locale.name
bottom: Math.min(control.from, control.to)
top: Math.max(control.from, control.to)
}
- //! [validator]
- //! [contentItem]
contentItem: TextInput {
+ z: 2
text: control.textFromValue(control.value, control.locale)
+ opacity: control.enabled ? 1 : 0.3
font: control.font
color: "#353637"
- selectionColor: "#fddd5c"
- selectedTextColor: color
+ selectionColor: "#0066ff"
+ selectedTextColor: "#ffffff"
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
+ readOnly: !control.editable
validator: control.validator
inputMethodHints: Qt.ImhFormattedNumbersOnly
+
+ Rectangle {
+ x: -6 - (down.indicator ? 1 : 0)
+ y: -6
+ width: control.width - (up.indicator ? up.indicator.width - 1 : 0) - (down.indicator ? down.indicator.width - 1 : 0)
+ height: control.height
+ visible: control.activeFocus
+ color: "transparent"
+ border.color: "#0066ff"
+ border.width: 2
+ }
}
- //! [contentItem]
- //! [up.indicator]
up.indicator: Rectangle {
x: control.mirrored ? 0 : parent.width - width
height: parent.height
implicitWidth: 40
implicitHeight: 40
- color: up.pressed ? "#e4e4e4" : "#f6f6f6"
- border.color: control.enabled ? "#353637" : "#bdbebf"
+ color: up.pressed ? "#d0d0d0" : "#e0e0e0"
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: parent.width / 3
height: 2
- color: control.enabled ? "#353637" : "#bdbebf"
+ color: enabled ? "#353637" : "#bdbebf"
}
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: 2
height: parent.width / 3
- color: control.enabled ? "#353637" : "#bdbebf"
+ color: enabled ? "#353637" : "#bdbebf"
}
}
- //! [up.indicator]
- //! [down.indicator]
down.indicator: Rectangle {
x: control.mirrored ? parent.width - width : 0
height: parent.height
implicitWidth: 40
implicitHeight: 40
- color: down.pressed ? "#e4e4e4" : "#f6f6f6"
- border.color: control.enabled ? "#353637" : "#bdbebf"
+ color: down.pressed ? "#d0d0d0" : "#e0e0e0"
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: parent.width / 3
height: 2
- color: control.enabled ? "#353637" : "#bdbebf"
+ color: enabled ? "#353637" : "#bdbebf"
}
}
- //! [down.indicator]
- //! [background]
background: Rectangle {
implicitWidth: 140
- border.color: "#bdbebf"
+ border.color: "#e0e0e0"
}
- //! [background]
}
diff --git a/src/imports/controls/StackView.qml b/src/imports/controls/StackView.qml
index f0869307..f70ecf97 100644
--- a/src/imports/controls/StackView.qml
+++ b/src/imports/controls/StackView.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,45 +35,33 @@
****************************************************************************/
import QtQuick 2.4
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
T.StackView {
- id: root
+ id: control
- //! [popEnter]
popEnter: Transition {
- XAnimator { from: (root.mirrored ? -1 : 1) * -root.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ XAnimator { from: (control.mirrored ? -1 : 1) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
- //! [popEnter]
- //! [popExit]
popExit: Transition {
- XAnimator { from: 0; to: (root.mirrored ? -1 : 1) * root.width; duration: 400; easing.type: Easing.OutCubic }
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * control.width; duration: 400; easing.type: Easing.OutCubic }
}
- //! [popExit]
- //! [pushEnter]
pushEnter: Transition {
- XAnimator { from: (root.mirrored ? -1 : 1) * root.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
- //! [pushEnter]
- //! [pushExit]
pushExit: Transition {
- XAnimator { from: 0; to: (root.mirrored ? -1 : 1) * -root.width; duration: 400; easing.type: Easing.OutCubic }
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
}
- //! [pushExit]
- //! [replaceEnter]
replaceEnter: Transition {
- XAnimator { from: (root.mirrored ? -1 : 1) * root.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
- //! [replaceEnter]
- //! [replaceExit]
replaceExit: Transition {
- XAnimator { from: 0; to: (root.mirrored ? -1 : 1) * -root.width; duration: 400; easing.type: Easing.OutCubic }
+ XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
}
- //! [replaceExit]
}
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
new file mode 100644
index 00000000..6c84dae0
--- /dev/null
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+
+T.SwipeDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 12
+ spacing: 12
+
+ contentItem: Text {
+ leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? "#26282a" : "#bdbebf"
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ Behavior on x {
+ enabled: !control.down
+ NumberAnimation {
+ easing.type: Easing.InOutCubic
+ duration: 400
+ }
+ }
+ }
+
+ background: Rectangle {
+ color: control.visualFocus ? (control.down ? "#cce0ff" : "#e5efff") : (control.down ? "#bdbebf" : "#ffffff")
+
+ Behavior on x {
+ enabled: !control.down
+ NumberAnimation {
+ easing.type: Easing.InOutCubic
+ duration: 400
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/SwipeView.qml b/src/imports/controls/SwipeView.qml
index 52248961..c4e5a570 100644
--- a/src/imports/controls/SwipeView.qml
+++ b/src/imports/controls/SwipeView.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
T.SwipeView {
id: control
@@ -46,9 +46,6 @@ T.SwipeView {
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem.implicitHeight + topPadding + bottomPadding)
- Accessible.role: Accessible.PageTabList
-
- //! [contentItem]
contentItem: ListView {
model: control.contentModel
currentIndex: control.currentIndex
@@ -63,5 +60,4 @@ T.SwipeView {
preferredHighlightEnd: 0
highlightMoveDuration: 250
}
- //! [contentItem]
}
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index 51348e77..b4717d05 100644
--- a/src/imports/controls/Switch.qml
+++ b/src/imports/controls/Switch.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,64 +35,32 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
T.Switch {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
spacing: 6
- //! [indicator]
- indicator: Item {
+ indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- implicitWidth: 56
- implicitHeight: 28
-
- Rectangle {
- y: parent.height / 2 - height / 2
- width: 56
- height: 16
- radius: 8
- border.width: 1
- color: control.checked ? "#353637" : "transparent"
- border.color: control.checked ? "transparent" : "#353637"
- }
-
- Rectangle {
- x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
- y: (parent.height - height) / 2
- width: 28
- height: 28
- radius: 16
- color: control.pressed ? "#e4e4e4" : "#f6f6f6"
- border.width: 1
- border.color: control.pressed ? "#26282a" : "#353637"
-
- Behavior on x {
- enabled: !control.pressed
- SmoothedAnimation { velocity: 200 }
- }
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -102,5 +70,4 @@ T.Switch {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
}
diff --git a/src/imports/controls/SwitchDelegate.qml b/src/imports/controls/SwitchDelegate.qml
new file mode 100644
index 00000000..f5383628
--- /dev/null
+++ b/src/imports/controls/SwitchDelegate.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Controls.impl 2.0
+
+T.SwitchDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 12
+ spacing: 12
+
+ indicator: SwitchIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.indicator && control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? "#26282a" : "#bdbebf"
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? "#bdbebf" : "#eeeeee"
+ }
+}
diff --git a/src/imports/controls/SwitchIndicator.qml b/src/imports/controls/SwitchIndicator.qml
new file mode 100644
index 00000000..261d9999
--- /dev/null
+++ b/src/imports/controls/SwitchIndicator.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+
+Item {
+ implicitWidth: 56
+ implicitHeight: 28
+
+ property Item control
+
+ Rectangle {
+ y: parent.height / 2 - height / 2
+ width: 56
+ height: 16
+ radius: 8
+ color: control.checked ? (control.visualFocus ? "#0066ff" : "#353637") : "#e0e0e0"
+ border.width: control.visualFocus ? 2 : 0
+ border.color: "#0066ff"
+ }
+
+ Rectangle {
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 28
+ height: 28
+ radius: 16
+ color: control.enabled ? (control.down ? (control.visualFocus ? "#cce0ff" : "#f6f6f6") : (control.visualFocus ? "#f0f6ff" : "#ffffff")) : "#fdfdfd"
+ border.width: control.visualFocus ? 2 : 1
+ border.color: control.enabled ? (control.visualFocus ? "#0066ff" : (control.down ? "#808080" : "#909090")) : "#d6d6d6"
+
+ Behavior on x {
+ enabled: !control.down
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+}
diff --git a/src/imports/controls/TabBar.qml b/src/imports/controls/TabBar.qml
index f43975f2..22b5329e 100644
--- a/src/imports/controls/TabBar.qml
+++ b/src/imports/controls/TabBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,8 +34,8 @@
**
****************************************************************************/
-import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick 2.7
+import QtQuick.Templates 2.0 as T
T.TabBar {
id: control
@@ -47,7 +47,6 @@ T.TabBar {
spacing: 1
- //! [contentItem]
contentItem: ListView {
implicitWidth: contentWidth
implicitHeight: 40
@@ -58,11 +57,14 @@ T.TabBar {
spacing: control.spacing
orientation: ListView.Horizontal
boundsBehavior: Flickable.StopAtBounds
+ flickableDirection: Flickable.AutoFlickIfNeeded
snapMode: ListView.SnapToItem
+
+ highlightMoveDuration: 0
+ highlightRangeMode: ListView.ApplyRange
+ preferredHighlightBegin: 40
+ preferredHighlightEnd: width - 40
}
- //! [contentItem]
- //! [background]
background: Rectangle { }
- //! [background]
}
diff --git a/src/imports/controls/TabButton.qml b/src/imports/controls/TabButton.qml
index 178a0a7f..2c5b2708 100644
--- a/src/imports/controls/TabButton.qml
+++ b/src/imports/controls/TabButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,40 +35,31 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.TabButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.contentWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.contentHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ contentItem: Text {
text: control.text
font: control.font
elide: Text.ElideRight
opacity: enabled ? 1 : 0.3
- color: !control.checked ? "#ffffff" : control.pressed ? "#26282a" : "#353637"
+ color: !control.checked ? "#ffffff" : control.down ? "#26282a" : "#353637"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [background]
background: Rectangle {
implicitHeight: 40
- color: control.pressed ? (control.checked ? "#e4e4e4" : "#585a5c") : (control.checked ? "transparent" : "#353637")
+ color: control.down ? (control.checked ? "#e4e4e4" : "#585a5c") : (control.checked ? "transparent" : "#353637")
}
- //! [background]
}
diff --git a/src/imports/controls/TextArea.qml b/src/imports/controls/TextArea.qml
index 8326fc89..f1ec6dfa 100644
--- a/src/imports/controls/TextArea.qml
+++ b/src/imports/controls/TextArea.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.TextArea {
id: control
@@ -48,7 +48,7 @@ T.TextArea {
placeholder.implicitHeight + topPadding + bottomPadding)
padding: 6
- leftPadding: 10
+ leftPadding: padding + 4
opacity: enabled ? 1 : 0.2
color: "#353637"
@@ -67,7 +67,7 @@ T.TextArea {
color: "#c2c2c2"
horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment
- visible: !control.length && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
}
}
diff --git a/src/imports/controls/TextField.qml b/src/imports/controls/TextField.qml
index d9f31b2f..fc07e7bb 100644
--- a/src/imports/controls/TextField.qml
+++ b/src/imports/controls/TextField.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,18 +35,20 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.TextField {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- placeholder.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0)
+ || contentWidth + leftPadding + rightPadding
+ implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
placeholder.implicitHeight + topPadding + bottomPadding)
padding: 6
- leftPadding: 10
+ leftPadding: padding + 4
opacity: enabled ? 1 : 0.2
color: "#353637"
@@ -66,17 +68,15 @@ T.TextField {
color: "#bdbebf"
horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment
- visible: !control.displayText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
elide: Text.ElideRight
}
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
-// border.width: control.activeFocus ? 2 : 1
- color: control.enabled ? "transparent" : "#353637"
- border.color: control.enabled ? "#bdbebf" : "transparent"
+ border.width: control.activeFocus ? 2 : 1
+ color: control.enabled ? "#ffffff" : "#353637"
+ border.color: control.activeFocus ? "#0066ff" : (control.enabled ? "#bdbebf" : "transparent")
}
- //! [background]
}
diff --git a/src/imports/controls/ToolBar.qml b/src/imports/controls/ToolBar.qml
index 7e0f80a3..02b6c6f3 100644
--- a/src/imports/controls/ToolBar.qml
+++ b/src/imports/controls/ToolBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.ToolBar {
id: control
@@ -46,14 +46,10 @@ T.ToolBar {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitHeight: 40
color: "#eeeeee"
}
- //! [background]
}
diff --git a/src/imports/controls/ToolButton.qml b/src/imports/controls/ToolButton.qml
index 314ce966..1fda5ba3 100644
--- a/src/imports/controls/ToolButton.qml
+++ b/src/imports/controls/ToolButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,43 +35,34 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.ToolButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ contentItem: Text {
text: control.text
font: control.font
- color: control.enabled ? "#26282a" : "#c2c2c2"
+ color: control.enabled ? (control.visualFocus ? "#0066ff" : "#26282a") : "#c2c2c2"
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [background]
background: Rectangle {
implicitWidth: 40
implicitHeight: 40
color: Qt.darker("#33333333", control.enabled && (control.checked || control.highlighted) ? 1.5 : 1.0)
- opacity: control.pressed ? 1.0 : control.enabled && (control.checked || control.highlighted) ? 0.5 : 0
- visible: control.pressed || (control.enabled && (control.checked || control.highlighted))
+ opacity: control.down ? 1.0 : control.enabled && (control.checked || control.highlighted) ? 0.5 : 0
+ visible: control.down || (control.enabled && (control.checked || control.highlighted))
}
- //! [background]
}
diff --git a/src/imports/controls/universal/qquickuniversalimageprovider.cpp b/src/imports/controls/ToolTip.qml
index 7cb7b926..322757c7 100644
--- a/src/imports/controls/universal/qquickuniversalimageprovider.cpp
+++ b/src/imports/controls/ToolTip.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,46 +34,33 @@
**
****************************************************************************/
-#include "qquickuniversalimageprovider_p.h"
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
-#include <QtCore/qdebug.h>
-#include <QtGui/qpainter.h>
-#include <QtGui/qguiapplication.h>
-#include <QtGui/qscreen.h>
-#include <QtGui/qicon.h>
+T.ToolTip {
+ id: control
-QT_BEGIN_NAMESPACE
+ x: parent ? (parent.width - implicitWidth) / 2 : 0
+ y: -implicitHeight - 3
-QQuickUniversalImageProvider::QQuickUniversalImageProvider() : QQuickImageProvider(Image)
-{
-}
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
-QImage QQuickUniversalImageProvider::requestImage(const QString &id, QSize *size, const QSize &requestedSize)
-{
- Q_UNUSED(requestedSize);
+ margins: 6
+ padding: 6
- int sep = id.indexOf(QLatin1Char('/'));
- QString name = id.left(sep);
- QString color = id.mid(sep + 1);
- qreal dpr = qApp->primaryScreen()->devicePixelRatio();
- QString file = qt_findAtNxFile(QStringLiteral(":/qt-project.org/imports/Qt/labs/controls/universal/images/") + name + QStringLiteral(".png"), dpr);
+ closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
- QImage image(file);
- if (image.isNull()) {
- qWarning() << "QQuickUniversalImageProvider: unknown id:" << id;
- return QImage();
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ // TODO: wrapMode: Label.Wrap
}
- if (size)
- *size = image.size();
-
- if (!color.isEmpty()) {
- QPainter painter(&image);
- painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
- painter.fillRect(image.rect(), QColor(color));
+ background: Rectangle {
+ border.color: "#353637"
}
-
- return image;
}
-
-QT_END_NAMESPACE
diff --git a/src/imports/controls/Tumbler.qml b/src/imports/controls/Tumbler.qml
index 8ff310de..571d8089 100644
--- a/src/imports/controls/Tumbler.qml
+++ b/src/imports/controls/Tumbler.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,27 +35,24 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
T.Tumbler {
id: control
implicitWidth: 60
implicitHeight: 200
- //! [delegate]
delegate: Text {
id: label
text: modelData
- color: "#666666"
+ color: control.visualFocus ? "#0066ff" : "#26282a"
font: control.font
- opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.displacement)) * 0.6
+ opacity: (1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)) * (control.enabled ? 1 : 0.6)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [delegate]
- //! [contentItem]
contentItem: PathView {
id: pathView
model: control.model
@@ -77,5 +74,4 @@ T.Tumbler {
property real delegateHeight: control.availableHeight / control.visibleItemCount
}
- //! [contentItem]
}
diff --git a/src/imports/controls/controls.pri b/src/imports/controls/controls.pri
index c3391929..dcbcf8e1 100644
--- a/src/imports/controls/controls.pri
+++ b/src/imports/controls/controls.pri
@@ -1,9 +1,24 @@
-QML_FILES = \
+HEADERS += \
+ $$PWD/qquickbusyindicatorring_p.h \
+ $$PWD/qquickprogressstrip_p.h \
+ $$PWD/qquickdialring_p.h
+
+SOURCES += \
+ $$PWD/qquickbusyindicatorring.cpp \
+ $$PWD/qquickprogressstrip.cpp \
+ $$PWD/qquickdialring.cpp
+
+QML_CONTROLS = \
+ AbstractButton.qml \
ApplicationWindow.qml \
BusyIndicator.qml \
Button.qml \
CheckBox.qml \
+ CheckDelegate.qml \
+ CheckIndicator.qml \
ComboBox.qml \
+ Container.qml \
+ Control.qml \
Dial.qml \
Drawer.qml \
Frame.qml \
@@ -18,13 +33,18 @@ QML_FILES = \
Popup.qml \
ProgressBar.qml \
RadioButton.qml \
+ RadioDelegate.qml \
+ RadioIndicator.qml \
RangeSlider.qml \
ScrollBar.qml \
ScrollIndicator.qml \
Slider.qml \
SpinBox.qml \
StackView.qml \
+ SwipeDelegate.qml \
Switch.qml \
+ SwitchIndicator.qml \
+ SwitchDelegate.qml \
SwipeView.qml \
TabBar.qml \
TabButton.qml \
@@ -32,4 +52,7 @@ QML_FILES = \
TextField.qml \
ToolBar.qml \
ToolButton.qml \
+ ToolTip.qml \
Tumbler.qml
+
+!qtquickcompiler: QML_FILES += $$QML_CONTROLS
diff --git a/src/imports/controls/controls.pro b/src/imports/controls/controls.pro
index a9861617..15c07cf0 100644
--- a/src/imports/controls/controls.pro
+++ b/src/imports/controls/controls.pro
@@ -1,31 +1,30 @@
-TARGET = qtlabscontrolsplugin
-TARGETPATH = Qt/labs/controls
-IMPORT_VERSION = 1.0
+TARGET = qtquickcontrols2plugin
+TARGETPATH = QtQuick/Controls.2
+IMPORT_VERSION = 2.0
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private labstemplates-private labscontrols-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
-QMAKE_DOCS = $$PWD/doc/qtlabscontrols.qdocconf
-
OTHER_FILES += \
qmldir
-HEADERS += \
- $$PWD/qquickbusyindicatorring_p.h \
- $$PWD/qquickprogressstrip_p.h
-
SOURCES += \
- $$PWD/qtlabscontrolsplugin.cpp \
- $$PWD/qquickbusyindicatorring.cpp \
- $$PWD/qquickprogressstrip.cpp
+ $$PWD/qtquickcontrols2plugin.cpp
RESOURCES += \
- $$PWD/qtlabscontrolsplugin.qrc
+ $$PWD/qtquickcontrols2plugin.qrc
include(controls.pri)
!static: include(designer/designer.pri)
+include(doc/doc.pri)
+
+qtquickcompiler {
+ qmlfiles.prefix = /qt-project.org/imports/QtQuick/Controls.2
+ qmlfiles.files += $$QML_CONTROLS
+ RESOURCES += qmlfiles
+}
CONFIG += no_cxx_module
load(qml_plugin)
diff --git a/src/imports/controls/designer/BusyIndicatorSpecifics.qml b/src/imports/controls/designer/BusyIndicatorSpecifics.qml
index 679377f4..c8a84759 100644
--- a/src/imports/controls/designer/BusyIndicatorSpecifics.qml
+++ b/src/imports/controls/designer/BusyIndicatorSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ButtonSection.qml b/src/imports/controls/designer/ButtonSection.qml
index 2353bad2..b14988c8 100644
--- a/src/imports/controls/designer/ButtonSection.qml
+++ b/src/imports/controls/designer/ButtonSection.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ButtonSpecifics.qml b/src/imports/controls/designer/ButtonSpecifics.qml
index 92ccefa3..5a1531a7 100644
--- a/src/imports/controls/designer/ButtonSpecifics.qml
+++ b/src/imports/controls/designer/ButtonSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/CheckBoxSpecifics.qml b/src/imports/controls/designer/CheckBoxSpecifics.qml
index e89ba1de..4daa9b30 100644
--- a/src/imports/controls/designer/CheckBoxSpecifics.qml
+++ b/src/imports/controls/designer/CheckBoxSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/CheckDelegateSpecifics.qml b/src/imports/controls/designer/CheckDelegateSpecifics.qml
new file mode 100644
index 00000000..275f83eb
--- /dev/null
+++ b/src/imports/controls/designer/CheckDelegateSpecifics.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ width: parent.width
+
+ ButtonSection {
+ caption: qsTr("Check Delegate")
+ width: parent.width
+ }
+
+ ControlSection {
+ width: parent.width
+ }
+
+ PaddingSection {
+ width: parent.width
+ }
+}
diff --git a/src/imports/controls/designer/ComboBoxSpecifics.qml b/src/imports/controls/designer/ComboBoxSpecifics.qml
index 60d76e77..507ca8ae 100644
--- a/src/imports/controls/designer/ComboBoxSpecifics.qml
+++ b/src/imports/controls/designer/ComboBoxSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ControlSection.qml b/src/imports/controls/designer/ControlSection.qml
index 0d7a07d2..f9f1014b 100644
--- a/src/imports/controls/designer/ControlSection.qml
+++ b/src/imports/controls/designer/ControlSection.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ControlSpecifics.qml b/src/imports/controls/designer/ControlSpecifics.qml
index 80e01cf2..42d24e33 100644
--- a/src/imports/controls/designer/ControlSpecifics.qml
+++ b/src/imports/controls/designer/ControlSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/DialSpecifics.qml b/src/imports/controls/designer/DialSpecifics.qml
index 98ceb6d3..a2faa170 100644
--- a/src/imports/controls/designer/DialSpecifics.qml
+++ b/src/imports/controls/designer/DialSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/FrameSpecifics.qml b/src/imports/controls/designer/FrameSpecifics.qml
index 80e01cf2..42d24e33 100644
--- a/src/imports/controls/designer/FrameSpecifics.qml
+++ b/src/imports/controls/designer/FrameSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/GroupBoxSpecifics.qml b/src/imports/controls/designer/GroupBoxSpecifics.qml
index 6e70adfa..4df2cad0 100644
--- a/src/imports/controls/designer/GroupBoxSpecifics.qml
+++ b/src/imports/controls/designer/GroupBoxSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ItemDelegateSpecifics.qml b/src/imports/controls/designer/ItemDelegateSpecifics.qml
index 29ee0a72..070af3ad 100644
--- a/src/imports/controls/designer/ItemDelegateSpecifics.qml
+++ b/src/imports/controls/designer/ItemDelegateSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/LabelSpecifics.qml b/src/imports/controls/designer/LabelSpecifics.qml
index adee2fac..43f52d90 100644
--- a/src/imports/controls/designer/LabelSpecifics.qml
+++ b/src/imports/controls/designer/LabelSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/PaddingSection.qml b/src/imports/controls/designer/PaddingSection.qml
index b2c9feb9..aca19459 100644
--- a/src/imports/controls/designer/PaddingSection.qml
+++ b/src/imports/controls/designer/PaddingSection.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/PageIndicatorSpecifics.qml b/src/imports/controls/designer/PageIndicatorSpecifics.qml
index 9ea06cd2..dd9b3d4a 100644
--- a/src/imports/controls/designer/PageIndicatorSpecifics.qml
+++ b/src/imports/controls/designer/PageIndicatorSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/PaneSpecifics.qml b/src/imports/controls/designer/PaneSpecifics.qml
index 80e01cf2..42d24e33 100644
--- a/src/imports/controls/designer/PaneSpecifics.qml
+++ b/src/imports/controls/designer/PaneSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ProgressBarSpecifics.qml b/src/imports/controls/designer/ProgressBarSpecifics.qml
index a5ad9809..ec065efc 100644
--- a/src/imports/controls/designer/ProgressBarSpecifics.qml
+++ b/src/imports/controls/designer/ProgressBarSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/RadioButtonSpecifics.qml b/src/imports/controls/designer/RadioButtonSpecifics.qml
index f10c1170..86a8cad5 100644
--- a/src/imports/controls/designer/RadioButtonSpecifics.qml
+++ b/src/imports/controls/designer/RadioButtonSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/RadioDelegateSpecifics.qml b/src/imports/controls/designer/RadioDelegateSpecifics.qml
new file mode 100644
index 00000000..248b4efd
--- /dev/null
+++ b/src/imports/controls/designer/RadioDelegateSpecifics.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ width: parent.width
+
+ ButtonSection {
+ caption: qsTr("Radio Delegate")
+ width: parent.width
+ }
+
+ ControlSection {
+ width: parent.width
+ }
+
+ PaddingSection {
+ width: parent.width
+ }
+}
diff --git a/src/imports/controls/designer/SliderSpecifics.qml b/src/imports/controls/designer/SliderSpecifics.qml
index f323539e..6c9a25f8 100644
--- a/src/imports/controls/designer/SliderSpecifics.qml
+++ b/src/imports/controls/designer/SliderSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/SpinBoxSpecifics.qml b/src/imports/controls/designer/SpinBoxSpecifics.qml
index d16f2464..3b9865ed 100644
--- a/src/imports/controls/designer/SpinBoxSpecifics.qml
+++ b/src/imports/controls/designer/SpinBoxSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/SwipeDelegateSpecifics.qml b/src/imports/controls/designer/SwipeDelegateSpecifics.qml
new file mode 100644
index 00000000..070af3ad
--- /dev/null
+++ b/src/imports/controls/designer/SwipeDelegateSpecifics.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ width: parent.width
+
+ ButtonSection {
+ caption: qsTr("Item Delegate")
+ width: parent.width
+ }
+
+ ControlSection {
+ width: parent.width
+ }
+
+ PaddingSection {
+ width: parent.width
+ }
+}
diff --git a/src/imports/controls/designer/SwitchDelegateSpecifics.qml b/src/imports/controls/designer/SwitchDelegateSpecifics.qml
new file mode 100644
index 00000000..a537d81e
--- /dev/null
+++ b/src/imports/controls/designer/SwitchDelegateSpecifics.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ width: parent.width
+
+ ButtonSection {
+ caption: qsTr("Switch Delegate")
+ width: parent.width
+ }
+
+ ControlSection {
+ width: parent.width
+ }
+
+ PaddingSection {
+ width: parent.width
+ }
+}
diff --git a/src/imports/controls/designer/SwitchSpecifics.qml b/src/imports/controls/designer/SwitchSpecifics.qml
index e1626eb0..23aab0ae 100644
--- a/src/imports/controls/designer/SwitchSpecifics.qml
+++ b/src/imports/controls/designer/SwitchSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/TextAreaSpecifics.qml b/src/imports/controls/designer/TextAreaSpecifics.qml
index adee2fac..43f52d90 100644
--- a/src/imports/controls/designer/TextAreaSpecifics.qml
+++ b/src/imports/controls/designer/TextAreaSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/TextFieldSpecifics.qml b/src/imports/controls/designer/TextFieldSpecifics.qml
index ab3e2b5e..cea65fd0 100644
--- a/src/imports/controls/designer/TextFieldSpecifics.qml
+++ b/src/imports/controls/designer/TextFieldSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ToolBarSpecifics.qml b/src/imports/controls/designer/ToolBarSpecifics.qml
index 80e01cf2..42d24e33 100644
--- a/src/imports/controls/designer/ToolBarSpecifics.qml
+++ b/src/imports/controls/designer/ToolBarSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/ToolButtonSpecifics.qml b/src/imports/controls/designer/ToolButtonSpecifics.qml
index df0d831d..4b16560f 100644
--- a/src/imports/controls/designer/ToolButtonSpecifics.qml
+++ b/src/imports/controls/designer/ToolButtonSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/TumblerSpecifics.qml b/src/imports/controls/designer/TumblerSpecifics.qml
index 6dcaf27e..6c28d1c7 100644
--- a/src/imports/controls/designer/TumblerSpecifics.qml
+++ b/src/imports/controls/designer/TumblerSpecifics.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
diff --git a/src/imports/controls/designer/designer.pri b/src/imports/controls/designer/designer.pri
index 1589723c..d8ce8d8a 100644
--- a/src/imports/controls/designer/designer.pri
+++ b/src/imports/controls/designer/designer.pri
@@ -1,11 +1,12 @@
QML_FILES += \
- $$PWD/qtlabscontrols.metainfo
+ $$PWD/qtquickcontrols2.metainfo
QML_FILES += \
$$PWD/BusyIndicatorSpecifics.qml \
$$PWD/ButtonSection.qml \
$$PWD/ButtonSpecifics.qml \
$$PWD/CheckBoxSpecifics.qml \
+ $$PWD/CheckDelegateSpecifics.qml \
$$PWD/ComboBoxSpecifics.qml \
$$PWD/ControlSection.qml \
$$PWD/ControlSpecifics.qml \
@@ -19,8 +20,10 @@ QML_FILES += \
$$PWD/PaneSpecifics.qml \
$$PWD/ProgressBarSpecifics.qml \
$$PWD/RadioButtonSpecifics.qml \
+ $$PWD/RadioDelegateSpecifics.qml \
$$PWD/SliderSpecifics.qml \
$$PWD/SpinBoxSpecifics.qml \
+ $$PWD/SwipeDelegateSpecifics.qml \
$$PWD/SwitchSpecifics.qml \
$$PWD/TextAreaSpecifics.qml \
$$PWD/TextFieldSpecifics.qml \
diff --git a/src/imports/controls/designer/images/page-icon.png b/src/imports/controls/designer/images/page-icon.png
new file mode 100644
index 00000000..ecd08c6e
--- /dev/null
+++ b/src/imports/controls/designer/images/page-icon.png
Binary files differ
diff --git a/src/imports/controls/designer/images/page-icon16.png b/src/imports/controls/designer/images/page-icon16.png
new file mode 100644
index 00000000..2d761364
--- /dev/null
+++ b/src/imports/controls/designer/images/page-icon16.png
Binary files differ
diff --git a/src/imports/controls/designer/images/page-icon16@2x.png b/src/imports/controls/designer/images/page-icon16@2x.png
new file mode 100644
index 00000000..3857af28
--- /dev/null
+++ b/src/imports/controls/designer/images/page-icon16@2x.png
Binary files differ
diff --git a/src/imports/controls/designer/images/page-icon@2x.png b/src/imports/controls/designer/images/page-icon@2x.png
new file mode 100644
index 00000000..8780dfbe
--- /dev/null
+++ b/src/imports/controls/designer/images/page-icon@2x.png
Binary files differ
diff --git a/src/imports/controls/designer/images/rangeslider-icon.png b/src/imports/controls/designer/images/rangeslider-icon.png
new file mode 100644
index 00000000..b97c6942
--- /dev/null
+++ b/src/imports/controls/designer/images/rangeslider-icon.png
Binary files differ
diff --git a/src/imports/controls/designer/images/rangeslider-icon16.png b/src/imports/controls/designer/images/rangeslider-icon16.png
new file mode 100644
index 00000000..33236566
--- /dev/null
+++ b/src/imports/controls/designer/images/rangeslider-icon16.png
Binary files differ
diff --git a/src/imports/controls/designer/images/rangeslider-icon16@2x.png b/src/imports/controls/designer/images/rangeslider-icon16@2x.png
new file mode 100644
index 00000000..c613a029
--- /dev/null
+++ b/src/imports/controls/designer/images/rangeslider-icon16@2x.png
Binary files differ
diff --git a/src/imports/controls/designer/images/rangeslider-icon@2x.png b/src/imports/controls/designer/images/rangeslider-icon@2x.png
new file mode 100644
index 00000000..60c12a4a
--- /dev/null
+++ b/src/imports/controls/designer/images/rangeslider-icon@2x.png
Binary files differ
diff --git a/src/imports/controls/designer/qtlabscontrols.metainfo b/src/imports/controls/designer/qtlabscontrols.metainfo
deleted file mode 100644
index 29455ba0..00000000
--- a/src/imports/controls/designer/qtlabscontrols.metainfo
+++ /dev/null
@@ -1,310 +0,0 @@
-MetaInfo {
- Type {
- name: "Qt.labs.controls.BusyIndicator"
- icon: "images/busyindicator-icon16.png"
-
- ItemLibraryEntry {
- name: "Busy Indicator"
- category: "Qt Labs - Controls"
- libraryIcon: "images/busyindicator-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
- }
- }
-
- Type {
- name: "Qt.labs.controls.Button"
- icon: "images/button-icon16.png"
-
- ItemLibraryEntry {
- name: "Button"
- category: "Qt Labs - Controls"
- libraryIcon: "images/button-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.CheckBox"
- icon: "images/checkbox-icon16.png"
-
- ItemLibraryEntry {
- name: "Check Box"
- category: "Qt Labs - Controls"
- libraryIcon: "images/checkbox-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Check Box\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.ComboBox"
- icon: "images/combobox-icon16.png"
-
- ItemLibraryEntry {
- name: "Combo Box"
- category: "Qt Labs - Controls"
- libraryIcon: "images/combobox-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
- }
- }
-
- Type {
- name: "Qt.labs.controls.Dial"
- icon: "images/dial-icon16.png"
-
- ItemLibraryEntry {
- name: "Dial"
- category: "Qt Labs - Controls"
- libraryIcon: "images/dial-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
- }
- }
-
- Type {
- name: "Qt.labs.controls.Frame"
- icon: "images/frame-icon16.png"
-
- ItemLibraryEntry {
- name: "Frame"
- category: "Qt Labs - Controls"
- libraryIcon: "images/frame-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "width"; type: "int"; value: 200 }
- Property { name: "height"; type: "int"; value: 200 }
- }
- }
-
- Type {
- name: "Qt.labs.controls.GroupBox"
- icon: "images/groupbox-icon16.png"
-
- ItemLibraryEntry {
- name: "Group Box"
- category: "Qt Labs - Controls"
- libraryIcon: "images/groupbox-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "width"; type: "int"; value: 200 }
- Property { name: "height"; type: "int"; value: 200 }
- Property { name: "title"; type: "binding"; value: "qsTr(\"Group Box\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.ItemDelegate"
- icon: "images/itemdelegate-icon16.png"
-
- ItemLibraryEntry {
- name: "Item Delegate"
- category: "Qt Labs - Controls"
- libraryIcon: "images/itemdelegate-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Item Delegate\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.Label"
- icon: "images/label-icon16.png"
-
- ItemLibraryEntry {
- name: "Label"
- category: "Qt Labs - Controls"
- libraryIcon: "images/label-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Label\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.PageIndicator"
- icon: "images/pageindicator-icon16.png"
-
- ItemLibraryEntry {
- name: "Page Indicator"
- category: "Qt Labs - Controls"
- libraryIcon: "images/pageindicator-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "count"; type: "int"; value: 3 }
- }
- }
-
- Type {
- name: "Qt.labs.controls.Pane"
- icon: "images/pane-icon16.png"
-
- ItemLibraryEntry {
- name: "Pane"
- category: "Qt Labs - Controls"
- libraryIcon: "images/pane-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "width"; type: "int"; value: 200 }
- Property { name: "height"; type: "int"; value: 200 }
- }
- }
-
- Type {
- name: "Qt.labs.controls.ProgressBar"
- icon: "images/progressbar-icon16.png"
-
- ItemLibraryEntry {
- name: "Progress Bar"
- category: "Qt Labs - Controls"
- libraryIcon: "images/progressbar-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "value"; type: "real"; value: 0.5 }
- }
- }
-
- Type {
- name: "Qt.labs.controls.RadioButton"
- icon: "images/radiobutton-icon16.png"
-
- ItemLibraryEntry {
- name: "Radio Button"
- category: "Qt Labs - Controls"
- libraryIcon: "images/radiobutton-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Button\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.Slider"
- icon: "images/slider-icon16.png"
-
- ItemLibraryEntry {
- name: "Slider"
- category: "Qt Labs - Controls"
- libraryIcon: "images/slider-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "value"; type: "real"; value: 0.5 }
- }
- }
-
- Type {
- name: "Qt.labs.controls.SpinBox"
- icon: "images/spinbox-icon16.png"
-
- ItemLibraryEntry {
- name: "Spin Box"
- category: "Qt Labs - Controls"
- libraryIcon: "images/spinbox-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
- }
- }
-
- Type {
- name: "Qt.labs.controls.Switch"
- icon: "images/switch-icon16.png"
-
- ItemLibraryEntry {
- name: "Switch"
- category: "Qt Labs - Controls"
- libraryIcon: "images/switch-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Switch\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.TextArea"
- icon: "images/textarea-icon16.png"
-
- ItemLibraryEntry {
- name: "Text Area"
- category: "Qt Labs - Controls"
- libraryIcon: "images/textarea-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Text Area\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.TextField"
- icon: "images/textfield-icon16.png"
-
- ItemLibraryEntry {
- name: "Text Field"
- category: "Qt Labs - Controls"
- libraryIcon: "images/textfield-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Text Field\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.ToolButton"
- icon: "images/toolbutton-icon16.png"
-
- ItemLibraryEntry {
- name: "Tool Button"
- category: "Qt Labs - Controls"
- libraryIcon: "images/toolbutton-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "text"; type: "binding"; value: "qsTr(\"Tool Button\")" }
- }
- }
-
- Type {
- name: "Qt.labs.controls.ToolBar"
- icon: "images/toolbar-icon16.png"
-
- ItemLibraryEntry {
- name: "Tool Bar"
- category: "Qt Labs - Controls"
- libraryIcon: "images/toolbar-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
-
- Property { name: "width"; type: "int"; value: 360 }
- }
- }
-
- Type {
- name: "Qt.labs.controls.Tumbler"
- icon: "images/tumbler-icon16.png"
-
- ItemLibraryEntry {
- name: "Tumbler"
- category: "Qt Labs - Controls"
- libraryIcon: "images/tumbler-icon.png"
- version: "1.0"
- requiredImport: "Qt.labs.controls"
- }
- }
-}
diff --git a/src/imports/controls/designer/qtquickcontrols2.metainfo b/src/imports/controls/designer/qtquickcontrols2.metainfo
new file mode 100644
index 00000000..81a6d914
--- /dev/null
+++ b/src/imports/controls/designer/qtquickcontrols2.metainfo
@@ -0,0 +1,402 @@
+MetaInfo {
+ Type {
+ name: "QtQuick.Controls.BusyIndicator"
+ icon: "images/busyindicator-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Busy Indicator"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/busyindicator-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Button"
+ icon: "images/button-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Button"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/button-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.CheckBox"
+ icon: "images/checkbox-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Check Box"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/checkbox-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Check Box\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.CheckDelegate"
+ icon: "images/checkbox-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Check Delegate"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/checkbox-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Check Delegate\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.ComboBox"
+ icon: "images/combobox-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Combo Box"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/combobox-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Dial"
+ icon: "images/dial-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Dial"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/dial-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Frame"
+ icon: "images/frame-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Frame"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/frame-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "width"; type: "int"; value: 200 }
+ Property { name: "height"; type: "int"; value: 200 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.GroupBox"
+ icon: "images/groupbox-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Group Box"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/groupbox-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "width"; type: "int"; value: 200 }
+ Property { name: "height"; type: "int"; value: 200 }
+ Property { name: "title"; type: "binding"; value: "qsTr(\"Group Box\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.ItemDelegate"
+ icon: "images/itemdelegate-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Item Delegate"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/itemdelegate-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Item Delegate\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Label"
+ icon: "images/label-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Label"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/label-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Label\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Page"
+ icon: "images/page-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Page"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/page-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "width"; type: "int"; value: 200 }
+ Property { name: "height"; type: "int"; value: 200 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.PageIndicator"
+ icon: "images/pageindicator-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Page Indicator"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/pageindicator-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "count"; type: "int"; value: 3 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Pane"
+ icon: "images/pane-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Pane"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/pane-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "width"; type: "int"; value: 200 }
+ Property { name: "height"; type: "int"; value: 200 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.ProgressBar"
+ icon: "images/progressbar-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Progress Bar"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/progressbar-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "value"; type: "real"; value: 0.5 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.RadioButton"
+ icon: "images/radiobutton-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Radio Button"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/radiobutton-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Button\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.RadioDelegate"
+ icon: "images/radiobutton-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Radio Delegate"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/radiobutton-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Delegate\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.RangeSlider"
+ icon: "images/rangeslider-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Range Slider"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/rangeslider-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "first.value"; type: "real"; value: 0.25 }
+ Property { name: "second.value"; type: "real"; value: 0.75 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Slider"
+ icon: "images/slider-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Slider"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/slider-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "value"; type: "real"; value: 0.5 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.SpinBox"
+ icon: "images/spinbox-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Spin Box"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/spinbox-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.SwipeDelegate"
+ icon: "images/itemdelegate-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Swipe Delegate"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/itemdelegate-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Swipe Delegate\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Switch"
+ icon: "images/switch-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Switch"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/switch-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Switch\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.SwitchDelegate"
+ icon: "images/switch-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Switch Delegate"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/switch-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Switch Delegate\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.TextArea"
+ icon: "images/textarea-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Text Area"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/textarea-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Text Area\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.TextField"
+ icon: "images/textfield-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Text Field"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/textfield-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Text Field\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.ToolButton"
+ icon: "images/toolbutton-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Tool Button"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/toolbutton-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "text"; type: "binding"; value: "qsTr(\"Tool Button\")" }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.ToolBar"
+ icon: "images/toolbar-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Tool Bar"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/toolbar-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+
+ Property { name: "width"; type: "int"; value: 360 }
+ }
+ }
+
+ Type {
+ name: "QtQuick.Controls.Tumbler"
+ icon: "images/tumbler-icon16.png"
+
+ ItemLibraryEntry {
+ name: "Tumbler"
+ category: "Qt Quick - Controls 2"
+ libraryIcon: "images/tumbler-icon.png"
+ version: "2.0"
+ requiredImport: "QtQuick.Controls"
+ }
+ }
+}
diff --git a/src/imports/controls/doc/doc.pri b/src/imports/controls/doc/doc.pri
new file mode 100644
index 00000000..8eaccbed
--- /dev/null
+++ b/src/imports/controls/doc/doc.pri
@@ -0,0 +1,7 @@
+QMAKE_DOCS = $$PWD/qtquickcontrols2.qdocconf
+
+OTHER_FILES += \
+ $$files($$PWD/snippets/*.qml) \
+ $$files($$PWD/src/*.qdoc) \
+ $$files($$PWD/src/calendar/*.qdoc) \
+ $$files($$PWD/src/templates/*.qdoc)
diff --git a/src/imports/controls/doc/images/qtlabscalendar-calendarmodel.png b/src/imports/controls/doc/images/qtlabscalendar-calendarmodel.png
index 2bdff335..7a140d27 100644
--- a/src/imports/controls/doc/images/qtlabscalendar-calendarmodel.png
+++ b/src/imports/controls/doc/images/qtlabscalendar-calendarmodel.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow-layout.png b/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow-layout.png
index e0d7ca33..130e3757 100644
--- a/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow-layout.png
+++ b/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow-layout.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow.png b/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow.png
index 7b955c88..6c8424ab 100644
--- a/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow.png
+++ b/src/imports/controls/doc/images/qtlabscalendar-dayofweekrow.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscalendar-monthgrid-layout.png b/src/imports/controls/doc/images/qtlabscalendar-monthgrid-layout.png
index ae5db0c1..dd903650 100644
--- a/src/imports/controls/doc/images/qtlabscalendar-monthgrid-layout.png
+++ b/src/imports/controls/doc/images/qtlabscalendar-monthgrid-layout.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscalendar-monthgrid.png b/src/imports/controls/doc/images/qtlabscalendar-monthgrid.png
index 13495d05..0c3b3c41 100644
--- a/src/imports/controls/doc/images/qtlabscalendar-monthgrid.png
+++ b/src/imports/controls/doc/images/qtlabscalendar-monthgrid.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn-layout.png b/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn-layout.png
index 09deb30e..b015a3e6 100644
--- a/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn-layout.png
+++ b/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn-layout.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn.png b/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn.png
index db0b94f3..65e25b29 100644
--- a/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn.png
+++ b/src/imports/controls/doc/images/qtlabscalendar-weeknumbercolumn.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-busyindicator-background.png b/src/imports/controls/doc/images/qtlabscontrols-busyindicator-background.png
deleted file mode 100644
index 03cf98d0..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-busyindicator-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-busyindicator-contentItem.png b/src/imports/controls/doc/images/qtlabscontrols-busyindicator-contentItem.png
deleted file mode 100644
index fb14cb86..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-busyindicator-contentItem.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-busyindicator.gif b/src/imports/controls/doc/images/qtlabscontrols-busyindicator.gif
deleted file mode 100644
index 31ab2d1c..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-busyindicator.gif
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button-background.png b/src/imports/controls/doc/images/qtlabscontrols-button-background.png
deleted file mode 100644
index c2703157..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-button-disabled.png
deleted file mode 100644
index 33638d1e..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button-focused.png b/src/imports/controls/doc/images/qtlabscontrols-button-focused.png
deleted file mode 100644
index 24d2cd06..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button-label.png b/src/imports/controls/doc/images/qtlabscontrols-button-label.png
deleted file mode 100644
index 73d8f2fb..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button-normal.png b/src/imports/controls/doc/images/qtlabscontrols-button-normal.png
deleted file mode 100644
index 9a5ea80e..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button-pressed.png b/src/imports/controls/doc/images/qtlabscontrols-button-pressed.png
deleted file mode 100644
index c88d57b0..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button-pressed.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button.gif b/src/imports/controls/doc/images/qtlabscontrols-button.gif
deleted file mode 100644
index 89dcba31..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button.gif
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-button.png b/src/imports/controls/doc/images/qtlabscontrols-button.png
deleted file mode 100644
index d8a39e55..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-button.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox-background.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox-background.png
deleted file mode 100644
index 4d24fa2f..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox-checked.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox-checked.png
deleted file mode 100644
index 8620b0c2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox-checked.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox-disabled.png
deleted file mode 100644
index 63669b29..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox-focused.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox-focused.png
deleted file mode 100644
index ea49c721..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox-indicator.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox-indicator.png
deleted file mode 100644
index fe6cd7a2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox-indicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox-label.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox-label.png
deleted file mode 100644
index d5a1ef2e..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox-normal.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox-normal.png
deleted file mode 100644
index b185fc99..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-checkbox.png b/src/imports/controls/doc/images/qtlabscontrols-checkbox.png
deleted file mode 100644
index a824949c..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-checkbox.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-combobox-background.png b/src/imports/controls/doc/images/qtlabscontrols-combobox-background.png
deleted file mode 100644
index 1930034b..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-combobox-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-combobox-contentItem.png b/src/imports/controls/doc/images/qtlabscontrols-combobox-contentItem.png
deleted file mode 100644
index 08c7bfc8..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-combobox-contentItem.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-combobox-delegate.png b/src/imports/controls/doc/images/qtlabscontrols-combobox-delegate.png
deleted file mode 100644
index d76776cf..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-combobox-delegate.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-combobox-popup.png b/src/imports/controls/doc/images/qtlabscontrols-combobox-popup.png
deleted file mode 100644
index 5cb32247..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-combobox-popup.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-combobox.png b/src/imports/controls/doc/images/qtlabscontrols-combobox.png
deleted file mode 100644
index e687fb0e..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-combobox.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-default.png b/src/imports/controls/doc/images/qtlabscontrols-default.png
deleted file mode 100644
index 144ceacb..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-default.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-dial-background.png b/src/imports/controls/doc/images/qtlabscontrols-dial-background.png
deleted file mode 100644
index ca6c9283..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-dial-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-dial-handle.png b/src/imports/controls/doc/images/qtlabscontrols-dial-handle.png
deleted file mode 100644
index b9a8e0d8..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-dial-handle.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-frame-background.png b/src/imports/controls/doc/images/qtlabscontrols-frame-background.png
deleted file mode 100644
index 75ad77bd..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-frame-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-frame-frame.png b/src/imports/controls/doc/images/qtlabscontrols-frame-frame.png
deleted file mode 100644
index a379d915..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-frame-frame.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-frame.png b/src/imports/controls/doc/images/qtlabscontrols-frame.png
deleted file mode 100644
index dc14acaf..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-frame.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-gallery-drawer.png b/src/imports/controls/doc/images/qtlabscontrols-gallery-drawer.png
deleted file mode 100644
index 57ec1026..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-gallery-drawer.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-gallery-menu.png b/src/imports/controls/doc/images/qtlabscontrols-gallery-menu.png
deleted file mode 100644
index 5b34264e..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-gallery-menu.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-gallery-welcome.png b/src/imports/controls/doc/images/qtlabscontrols-gallery-welcome.png
deleted file mode 100644
index 5c2bb682..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-gallery-welcome.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-groupbox-background.png b/src/imports/controls/doc/images/qtlabscontrols-groupbox-background.png
deleted file mode 100644
index baec44d5..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-groupbox-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-groupbox-checkable.png b/src/imports/controls/doc/images/qtlabscontrols-groupbox-checkable.png
deleted file mode 100644
index 9b3f32b1..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-groupbox-checkable.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-groupbox-frame.png b/src/imports/controls/doc/images/qtlabscontrols-groupbox-frame.png
deleted file mode 100644
index 2ed75011..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-groupbox-frame.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-groupbox-label.png b/src/imports/controls/doc/images/qtlabscontrols-groupbox-label.png
deleted file mode 100644
index ea4dfb32..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-groupbox-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-groupbox.png b/src/imports/controls/doc/images/qtlabscontrols-groupbox.png
deleted file mode 100644
index c0fc92c7..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-groupbox.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-background.png b/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-background.png
deleted file mode 100644
index 8a97d8ee..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-indicator.png b/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-indicator.png
deleted file mode 100644
index 029abb00..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-indicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-label.png b/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-label.png
deleted file mode 100644
index 89f094c6..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate.png b/src/imports/controls/doc/images/qtlabscontrols-itemdelegate.png
deleted file mode 100644
index 456a0d55..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-itemdelegate.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-label-background.png b/src/imports/controls/doc/images/qtlabscontrols-label-background.png
deleted file mode 100644
index 34a638d6..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-label-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-label.png b/src/imports/controls/doc/images/qtlabscontrols-label.png
deleted file mode 100644
index 961ce3e3..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-material-button.png b/src/imports/controls/doc/images/qtlabscontrols-material-button.png
deleted file mode 100644
index 5181d8b1..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-material-button.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-material.png b/src/imports/controls/doc/images/qtlabscontrols-material.png
deleted file mode 100644
index d7ce0e88..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-material.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-menu-contentItem.png b/src/imports/controls/doc/images/qtlabscontrols-menu-contentItem.png
deleted file mode 100644
index 4dcf1fac..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-menu-contentItem.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-page-wireframe.png b/src/imports/controls/doc/images/qtlabscontrols-page-wireframe.png
deleted file mode 100644
index f612c243..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-page-wireframe.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-pageindicator.png b/src/imports/controls/doc/images/qtlabscontrols-pageindicator.png
deleted file mode 100644
index 3f47fb9f..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-pageindicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-pane-background.png b/src/imports/controls/doc/images/qtlabscontrols-pane-background.png
deleted file mode 100644
index a379d915..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-pane-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-pane.png b/src/imports/controls/doc/images/qtlabscontrols-pane.png
deleted file mode 100644
index fe534424..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-pane.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-progressbar-background.png b/src/imports/controls/doc/images/qtlabscontrols-progressbar-background.png
deleted file mode 100644
index 59e81b2b..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-progressbar-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-progressbar-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-progressbar-disabled.png
deleted file mode 100644
index 9ce19e92..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-progressbar-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-progressbar-indicator.png b/src/imports/controls/doc/images/qtlabscontrols-progressbar-indicator.png
deleted file mode 100644
index 9ce19e92..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-progressbar-indicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-progressbar-normal.png b/src/imports/controls/doc/images/qtlabscontrols-progressbar-normal.png
deleted file mode 100644
index 9ce19e92..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-progressbar-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-background.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton-background.png
deleted file mode 100644
index 30295394..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-checked.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton-checked.png
deleted file mode 100644
index 8f5af513..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-checked.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton-disabled.png
deleted file mode 100644
index 626cd616..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-focused.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton-focused.png
deleted file mode 100644
index 797e50a9..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-indicator.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton-indicator.png
deleted file mode 100644
index 0d78a0d5..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-indicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-label.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton-label.png
deleted file mode 100644
index 457555b7..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-normal.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton-normal.png
deleted file mode 100644
index f8d0828b..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-radiobutton.png b/src/imports/controls/doc/images/qtlabscontrols-radiobutton.png
deleted file mode 100644
index 6c217968..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-radiobutton.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-background.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-background.png
deleted file mode 100644
index c045fdbb..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-disabled.png
deleted file mode 100644
index abb033c2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle-focused.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle-focused.png
deleted file mode 100644
index abb033c2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle.png
deleted file mode 100644
index fb246db3..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-first-handle.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-normal.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-normal.png
deleted file mode 100644
index abb033c2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle-focused.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle-focused.png
deleted file mode 100644
index abb033c2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle.png
deleted file mode 100644
index a33a6de2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-second-handle.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-track.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider-track.png
deleted file mode 100644
index 63da8673..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider-track.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider.gif b/src/imports/controls/doc/images/qtlabscontrols-rangeslider.gif
deleted file mode 100644
index 394e8085..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider.gif
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-rangeslider.png b/src/imports/controls/doc/images/qtlabscontrols-rangeslider.png
deleted file mode 100644
index abb033c2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-rangeslider.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-scrollbar-background.png b/src/imports/controls/doc/images/qtlabscontrols-scrollbar-background.png
deleted file mode 100644
index 0b1aa171..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-scrollbar-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-scrollbar-handle.png b/src/imports/controls/doc/images/qtlabscontrols-scrollbar-handle.png
deleted file mode 100644
index 5d916e66..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-scrollbar-handle.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-scrollbar.png b/src/imports/controls/doc/images/qtlabscontrols-scrollbar.png
deleted file mode 100644
index b1abafb5..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-scrollbar.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-scrollindicator-background.png b/src/imports/controls/doc/images/qtlabscontrols-scrollindicator-background.png
deleted file mode 100644
index e9fa04c7..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-scrollindicator-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-scrollindicator-indicator.png b/src/imports/controls/doc/images/qtlabscontrols-scrollindicator-indicator.png
deleted file mode 100644
index 99266362..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-scrollindicator-indicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-scrollindicator.png b/src/imports/controls/doc/images/qtlabscontrols-scrollindicator.png
deleted file mode 100644
index ea0923cc..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-scrollindicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider-background.png b/src/imports/controls/doc/images/qtlabscontrols-slider-background.png
deleted file mode 100644
index 23a754c3..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-slider-disabled.png
deleted file mode 100644
index 2e27a604..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider-focused.png b/src/imports/controls/doc/images/qtlabscontrols-slider-focused.png
deleted file mode 100644
index 2e27a604..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider-handle.png b/src/imports/controls/doc/images/qtlabscontrols-slider-handle.png
deleted file mode 100644
index 7729ef07..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider-handle.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider-normal.png b/src/imports/controls/doc/images/qtlabscontrols-slider-normal.png
deleted file mode 100644
index 2e27a604..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider-track.png b/src/imports/controls/doc/images/qtlabscontrols-slider-track.png
deleted file mode 100644
index 09869bf1..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider-track.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider.gif b/src/imports/controls/doc/images/qtlabscontrols-slider.gif
deleted file mode 100644
index 7cb84b56..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider.gif
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-slider.png b/src/imports/controls/doc/images/qtlabscontrols-slider.png
deleted file mode 100644
index 2e27a604..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-slider.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-spinbox-background.png b/src/imports/controls/doc/images/qtlabscontrols-spinbox-background.png
deleted file mode 100644
index 74fbab6e..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-spinbox-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-spinbox-contentItem.png b/src/imports/controls/doc/images/qtlabscontrols-spinbox-contentItem.png
deleted file mode 100644
index 81d549c0..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-spinbox-contentItem.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-spinbox-down.png b/src/imports/controls/doc/images/qtlabscontrols-spinbox-down.png
deleted file mode 100644
index e7c43101..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-spinbox-down.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-spinbox-textual.png b/src/imports/controls/doc/images/qtlabscontrols-spinbox-textual.png
deleted file mode 100644
index 4361c492..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-spinbox-textual.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-spinbox-up.png b/src/imports/controls/doc/images/qtlabscontrols-spinbox-up.png
deleted file mode 100644
index b9992471..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-spinbox-up.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-spinbox.png b/src/imports/controls/doc/images/qtlabscontrols-spinbox.png
deleted file mode 100644
index 909fbda6..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-spinbox.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch-background.png b/src/imports/controls/doc/images/qtlabscontrols-switch-background.png
deleted file mode 100644
index c3cf20f3..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-switch-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch-checked.png b/src/imports/controls/doc/images/qtlabscontrols-switch-checked.png
deleted file mode 100644
index 7c678417..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-switch-checked.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-switch-disabled.png
deleted file mode 100644
index 15ff76e6..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-switch-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch-focused.png b/src/imports/controls/doc/images/qtlabscontrols-switch-focused.png
deleted file mode 100644
index 9e973d0e..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-switch-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch-indicator.png b/src/imports/controls/doc/images/qtlabscontrols-switch-indicator.png
deleted file mode 100644
index 02b88dde..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-switch-indicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch-label.png b/src/imports/controls/doc/images/qtlabscontrols-switch-label.png
deleted file mode 100644
index 50f608ab..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-switch-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch-normal.png b/src/imports/controls/doc/images/qtlabscontrols-switch-normal.png
deleted file mode 100644
index aac440a0..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-switch-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tabbar.png b/src/imports/controls/doc/images/qtlabscontrols-tabbar.png
deleted file mode 100644
index 44a91d63..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-tabbar.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tabbutton.png b/src/imports/controls/doc/images/qtlabscontrols-tabbutton.png
deleted file mode 100644
index 76d1e35c..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-tabbutton.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-textarea.png b/src/imports/controls/doc/images/qtlabscontrols-textarea.png
deleted file mode 100644
index f468bfd4..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-textarea.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-textfield-background.png b/src/imports/controls/doc/images/qtlabscontrols-textfield-background.png
deleted file mode 100644
index e345124d..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-textfield-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-textfield-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-textfield-disabled.png
deleted file mode 100644
index 55034be2..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-textfield-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-textfield-focused.png b/src/imports/controls/doc/images/qtlabscontrols-textfield-focused.png
deleted file mode 100644
index bf5ee32a..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-textfield-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-textfield-normal.png b/src/imports/controls/doc/images/qtlabscontrols-textfield-normal.png
deleted file mode 100644
index 02bb465a..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-textfield-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-background.png b/src/imports/controls/doc/images/qtlabscontrols-togglebutton-background.png
deleted file mode 100644
index 8f390b49..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-checked.png b/src/imports/controls/doc/images/qtlabscontrols-togglebutton-checked.png
deleted file mode 100644
index fa883751..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-checked.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-disabled.png b/src/imports/controls/doc/images/qtlabscontrols-togglebutton-disabled.png
deleted file mode 100644
index 794692b0..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-focused.png b/src/imports/controls/doc/images/qtlabscontrols-togglebutton-focused.png
deleted file mode 100644
index f52e4686..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-indicator.png b/src/imports/controls/doc/images/qtlabscontrols-togglebutton-indicator.png
deleted file mode 100644
index 97e06e2c..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-indicator.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-label.png b/src/imports/controls/doc/images/qtlabscontrols-togglebutton-label.png
deleted file mode 100644
index 3eb3ba35..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-normal.png b/src/imports/controls/doc/images/qtlabscontrols-togglebutton-normal.png
deleted file mode 100644
index b066c565..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-togglebutton-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-toolbar-background.png b/src/imports/controls/doc/images/qtlabscontrols-toolbar-background.png
deleted file mode 100644
index 12b4c348..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-toolbar-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-toolbar-frame.png b/src/imports/controls/doc/images/qtlabscontrols-toolbar-frame.png
deleted file mode 100644
index 12b4c348..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-toolbar-frame.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-toolbar.png b/src/imports/controls/doc/images/qtlabscontrols-toolbar.png
deleted file mode 100644
index 3e64b4e4..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-toolbar.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-toolbutton-background.png b/src/imports/controls/doc/images/qtlabscontrols-toolbutton-background.png
deleted file mode 100644
index 8dd64031..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-toolbutton-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-toolbutton-label.png b/src/imports/controls/doc/images/qtlabscontrols-toolbutton-label.png
deleted file mode 100644
index f4797098..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-toolbutton-label.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tumbler-background.png b/src/imports/controls/doc/images/qtlabscontrols-tumbler-background.png
deleted file mode 100644
index 24c200de..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-tumbler-background.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tumbler-contentItem.png b/src/imports/controls/doc/images/qtlabscontrols-tumbler-contentItem.png
deleted file mode 100644
index 24c200de..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-tumbler-contentItem.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tumbler-delegate.png b/src/imports/controls/doc/images/qtlabscontrols-tumbler-delegate.png
deleted file mode 100644
index d274d444..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-tumbler-delegate.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-universal.png b/src/imports/controls/doc/images/qtlabscontrols-universal.png
deleted file mode 100644
index 89a0f069..00000000
--- a/src/imports/controls/doc/images/qtlabscontrols-universal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.png
new file mode 100644
index 00000000..d9c8b261
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-applicationwindow-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-busyindicator-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator-custom.png
new file mode 100644
index 00000000..89a38660
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif
new file mode 100644
index 00000000..653d200f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-busyindicator.png b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.png
index e631df32..e631df32 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-busyindicator.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-button-custom.png
new file mode 100644
index 00000000..e418da04
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-flat.gif b/src/imports/controls/doc/images/qtquickcontrols2-button-flat.gif
new file mode 100644
index 00000000..e2bd8b6f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-flat.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-button-focused.png
new file mode 100644
index 00000000..a487bd27
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-focused.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-highlighted.gif b/src/imports/controls/doc/images/qtquickcontrols2-button-highlighted.gif
new file mode 100644
index 00000000..7de076d3
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-highlighted.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-button-normal.png
new file mode 100644
index 00000000..7e7e281b
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-normal.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-pressed.png b/src/imports/controls/doc/images/qtquickcontrols2-button-pressed.png
new file mode 100644
index 00000000..2dff7764
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button-pressed.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button.gif b/src/imports/controls/doc/images/qtquickcontrols2-button.gif
new file mode 100644
index 00000000..7f2de718
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-button.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-custom.png
new file mode 100644
index 00000000..922e458a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif
new file mode 100644
index 00000000..56a15867
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif
new file mode 100644
index 00000000..d70c0ee4
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-custom.png
new file mode 100644
index 00000000..f565e0e7
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-tristate.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-tristate.gif
new file mode 100644
index 00000000..8d058d6c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate-tristate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gif
new file mode 100644
index 00000000..da3fab98
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-checkdelegate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-combobox-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-combobox-custom.png
new file mode 100644
index 00000000..0b2e34bf
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-combobox-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-combobox-delegate.png b/src/imports/controls/doc/images/qtquickcontrols2-combobox-delegate.png
new file mode 100644
index 00000000..7e716b3d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-combobox-delegate.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-combobox-popup.png b/src/imports/controls/doc/images/qtquickcontrols2-combobox-popup.png
new file mode 100644
index 00000000..7e716b3d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-combobox-popup.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-combobox.gif b/src/imports/controls/doc/images/qtquickcontrols2-combobox.gif
new file mode 100644
index 00000000..966a2d4a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-combobox.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-control.png b/src/imports/controls/doc/images/qtquickcontrols2-control.png
new file mode 100644
index 00000000..26babc9f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-control.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-control.svg b/src/imports/controls/doc/images/qtquickcontrols2-control.svg
new file mode 100644
index 00000000..b0ffae7c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-control.svg
@@ -0,0 +1,392 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="679.31317"
+ height="357.84125"
+ viewBox="0 0 679.31314 357.84124"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="qtquickcontrols2-control.svg"
+ inkscape:export-filename="/home/mitch/Dropbox/qtquickcontrols2-control.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Mstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Mstart"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4191"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="matrix(0.4,0,0,0.4,4,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4212"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-2"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4318-4"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-9"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4327-1"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-3"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318-9"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-0"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327-5"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-9"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318-2"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-1"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327-2"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2.8"
+ inkscape:cx="370.99138"
+ inkscape:cy="234.56612"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="3742"
+ inkscape:window-height="2124"
+ inkscape:window-x="98"
+ inkscape:window-y="36"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ units="px" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(91.482322,-255.11685)">
+ <rect
+ style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4136"
+ width="564.41473"
+ height="248.82799"
+ x="-30.289024"
+ y="321.69858" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138"
+ style="font-style:normal;font-weight:normal;font-size:15.41801071px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(1.1690183,0,0,1.1690183,19.800223,-141.31953)"><flowRegion
+ id="flowRegion4140"><rect
+ id="rect4142"
+ width="129.78784"
+ height="31.668232"
+ x="-34.519978"
+ y="400.22751"
+ style="font-size:15.41801071px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4144"
+ style="font-size:20.55734825px;fill:#000000">Background</flowPara><flowPara
+ id="flowPara4146" /></flowRoot> <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:27.60000038;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.58381503"
+ id="rect4148"
+ width="464.22452"
+ height="165.94499"
+ x="18.895706"
+ y="364.74274" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,144.03104,146.23557)"><flowRegion
+ id="flowRegion4140-6"><rect
+ id="rect4142-6"
+ width="334.36047"
+ height="80.812172"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:40px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6">Content item</flowPara></flowRoot> <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.04880464;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL);marker-end:url(#TriangleOutL)"
+ d="m 27.018805,516.90108 0,-133.62042"
+ id="path4179"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.93839902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-2);marker-end:url(#TriangleOutL-9)"
+ d="m 26.776662,538.68728 451.028788,0"
+ id="path4179-7"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2"
+ style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,10.003309,144.31674)"><flowRegion
+ id="flowRegion4140-6-6"><rect
+ id="rect4142-6-1"
+ width="117.17769"
+ height="101.01524"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:20px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara9732"
+ style="font-size:17.5px;fill:#000000">Available height</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,10.811464,253.07573)"><flowRegion
+ id="flowRegion4140-6-6-4"><rect
+ id="rect4142-6-1-4"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048">Available width</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-1"
+ style="font-style:normal;font-weight:normal;font-size:25px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,210.99354,300.96896)"><flowRegion
+ id="flowRegion4140-6-9"><rect
+ id="rect4142-6-0"
+ width="270.72089"
+ height="68.690361"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:25px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-2"
+ style="font-size:17.5px">Width</flowPara></flowRoot> <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.90119678;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-3);marker-end:url(#TriangleOutL-0)"
+ d="m -26.522148,583.27143 557.292688,0"
+ id="path4179-8"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.9011969;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-9);marker-end:url(#TriangleOutL-1)"
+ d="m -43.461661,566.30584 0,-239.7552"
+ id="path4179-9"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-1-7"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,-112.00353,150.83655)"><flowRegion
+ id="flowRegion4140-6-9-7"><rect
+ id="rect4142-6-0-5"
+ width="270.72089"
+ height="68.690361"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-2-9"
+ style="font-size:17.5px;fill:#000000">Height</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-3"
+ style="font-style:normal;font-weight:normal;font-size:60px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,156.72375,-24.786365)"><flowRegion
+ id="flowRegion4140-6-67"><rect
+ id="rect4142-6-5"
+ width="334.36047"
+ height="80.812172"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:60px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-3">Control</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,186.57489,257.45801)"><flowRegion
+ id="flowRegion4140-6-6-4-6"><rect
+ id="rect4142-6-1-4-2"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048-9">Bottom padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-1"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,193.9747,48.798368)"><flowRegion
+ id="flowRegion4140-6-6-4-6-2"><rect
+ id="rect4142-6-1-4-2-7"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048-9-0">Top padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-9"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,457.80767,148.11921)"><flowRegion
+ id="flowRegion4140-6-6-4-6-3"><rect
+ id="rect4142-6-1-4-2-6"
+ width="81.109558"
+ height="93.762154"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000"
+ id="flowPara4386">Right padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-9-2"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,-54.735211,151.06168)"><flowRegion
+ id="flowRegion4140-6-6-4-6-3-5"><rect
+ id="rect4142-6-1-4-2-6-4"
+ width="81.109558"
+ height="93.762154"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.02554321px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000"
+ id="flowPara4386-0">Left padding</flowPara></flowRoot> </g>
+</svg>
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-customize-buttons.png b/src/imports/controls/doc/images/qtquickcontrols2-customize-buttons.png
new file mode 100644
index 00000000..f4e2454e
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-customize-buttons.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-default.png b/src/imports/controls/doc/images/qtquickcontrols2-default.png
new file mode 100644
index 00000000..67e52b84
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-default.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-dial-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-dial-custom.png
new file mode 100644
index 00000000..dc5779c0
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-dial-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-dial-handle.png b/src/imports/controls/doc/images/qtquickcontrols2-dial-handle.png
new file mode 100644
index 00000000..49ba9d0c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-dial-handle.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-dial-no-wrap.gif b/src/imports/controls/doc/images/qtquickcontrols2-dial-no-wrap.gif
new file mode 100644
index 00000000..24f6790b
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-dial-no-wrap.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-dial-wrap.gif b/src/imports/controls/doc/images/qtquickcontrols2-dial-wrap.gif
new file mode 100644
index 00000000..cfb1fb5b
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-dial-wrap.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-dial.png b/src/imports/controls/doc/images/qtquickcontrols2-dial.png
index dfe37f87..dfe37f87 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-dial.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-dial.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-drawer-expanded-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-drawer-expanded-wireframe.png
index 8a8078bf..8a8078bf 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-drawer-expanded-wireframe.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-drawer-expanded-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-drawer-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-drawer-wireframe.png
index d1ef1801..d1ef1801 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-drawer-wireframe.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-drawer-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif b/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif
new file mode 100644
index 00000000..736f34f6
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-frame-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-frame-custom.png
new file mode 100644
index 00000000..c9d00187
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-frame-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-frame.png b/src/imports/controls/doc/images/qtquickcontrols2-frame.png
new file mode 100644
index 00000000..3bc1a76a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-frame.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-groupbox-checkable.png b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-checkable.png
new file mode 100644
index 00000000..fd36aec2
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-checkable.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.png
new file mode 100644
index 00000000..29f0a60d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-groupbox-label.png b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-label.png
new file mode 100644
index 00000000..4929be52
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-label.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-groupbox.png b/src/imports/controls/doc/images/qtquickcontrols2-groupbox.png
new file mode 100644
index 00000000..ef57cc64
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-groupbox.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate-custom.png
new file mode 100644
index 00000000..ff8ba047
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gif
new file mode 100644
index 00000000..dccb6efc
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.png b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.png
new file mode 100644
index 00000000..bbf49fad
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-itemdelegate.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-label-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-label-custom.png
new file mode 100644
index 00000000..5d950fe6
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-label-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-label.png b/src/imports/controls/doc/images/qtquickcontrols2-label.png
new file mode 100644
index 00000000..a51912f5
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-label.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-accent.png b/src/imports/controls/doc/images/qtquickcontrols2-material-accent.png
new file mode 100644
index 00000000..be0c8212
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material-accent.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-attributes.png b/src/imports/controls/doc/images/qtquickcontrols2-material-attributes.png
new file mode 100644
index 00000000..68999892
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material-attributes.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-background.png b/src/imports/controls/doc/images/qtquickcontrols2-material-background.png
new file mode 100644
index 00000000..132fb538
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material-background.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-material-dark.png b/src/imports/controls/doc/images/qtquickcontrols2-material-dark.png
index 8afb2cd6..8afb2cd6 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-material-dark.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material-dark.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-elevation.png b/src/imports/controls/doc/images/qtquickcontrols2-material-elevation.png
new file mode 100644
index 00000000..38c6dc00
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material-elevation.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-foreground.png b/src/imports/controls/doc/images/qtquickcontrols2-material-foreground.png
new file mode 100644
index 00000000..122f7f9b
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material-foreground.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material-theme.png b/src/imports/controls/doc/images/qtquickcontrols2-material-theme.png
new file mode 100644
index 00000000..7109f57f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material-theme.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-material.png b/src/imports/controls/doc/images/qtquickcontrols2-material.png
new file mode 100644
index 00000000..4caef89e
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-material.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-menu-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-menu-custom.png
new file mode 100644
index 00000000..7121fd0a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-menu-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-menu.gif b/src/imports/controls/doc/images/qtquickcontrols2-menu.gif
index 93a873a3..93a873a3 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-menu.gif
+++ b/src/imports/controls/doc/images/qtquickcontrols2-menu.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-menu.png b/src/imports/controls/doc/images/qtquickcontrols2-menu.png
index b6446d39..b6446d39 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-menu.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-menu.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-applicationwindow-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-page-wireframe.png
index f612c243..f612c243 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-applicationwindow-wireframe.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-page-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-pageindicator-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-pageindicator-custom.png
new file mode 100644
index 00000000..c1f98288
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-pageindicator-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-pageindicator-delegate.png b/src/imports/controls/doc/images/qtquickcontrols2-pageindicator-delegate.png
new file mode 100644
index 00000000..a1e9a8cd
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-pageindicator-delegate.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-pageindicator.png b/src/imports/controls/doc/images/qtquickcontrols2-pageindicator.png
new file mode 100644
index 00000000..872012d0
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-pageindicator.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-pane-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-pane-custom.png
new file mode 100644
index 00000000..4c24f426
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-pane-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-pane.png b/src/imports/controls/doc/images/qtquickcontrols2-pane.png
new file mode 100644
index 00000000..b34e9488
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-pane.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-popup-custom.png
new file mode 100644
index 00000000..aa07d53a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-popup-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup-settings.png b/src/imports/controls/doc/images/qtquickcontrols2-popup-settings.png
new file mode 100644
index 00000000..787de5d4
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-popup-settings.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-popup-transformorigin.png b/src/imports/controls/doc/images/qtquickcontrols2-popup-transformorigin.png
index 4af320fb..4af320fb 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-popup-transformorigin.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-popup-transformorigin.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup.png b/src/imports/controls/doc/images/qtquickcontrols2-popup.png
new file mode 100644
index 00000000..4514948d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-popup.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup.svg b/src/imports/controls/doc/images/qtquickcontrols2-popup.svg
new file mode 100644
index 00000000..1d78addf
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-popup.svg
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="679.31317"
+ height="357.84125"
+ viewBox="0 0 679.31314 357.84124"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="qtquickcontrols2-popup.svg"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Mstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Mstart"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4191"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="matrix(0.4,0,0,0.4,4,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4212"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-2"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4318-4"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-9"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4327-1"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-3"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318-9"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-0"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327-5"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-9"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318-2"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-1"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327-2"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="359.69451"
+ inkscape:cy="143.84745"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ units="px" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(91.482322,-255.11685)">
+ <rect
+ style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4136"
+ width="564.41473"
+ height="248.82799"
+ x="-30.289024"
+ y="321.69858" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138"
+ style="font-style:normal;font-weight:normal;font-size:15.41801071px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(1.1690183,0,0,1.1690183,19.800223,-141.31953)"><flowRegion
+ id="flowRegion4140"><rect
+ id="rect4142"
+ width="129.78784"
+ height="31.668232"
+ x="-34.519978"
+ y="400.22751"
+ style="font-size:15.41801071px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4144"
+ style="font-size:20.55734825px;fill:#000000">Background</flowPara><flowPara
+ id="flowPara4146" /></flowRoot> <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:27.60000038;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.58381503"
+ id="rect4148"
+ width="464.22452"
+ height="165.94499"
+ x="18.895706"
+ y="364.74274" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,144.03104,146.23557)"><flowRegion
+ id="flowRegion4140-6"><rect
+ id="rect4142-6"
+ width="334.36047"
+ height="80.812172"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:40px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6">Content item</flowPara></flowRoot> <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.04880464;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL);marker-end:url(#TriangleOutL)"
+ d="m 27.018805,516.90108 0,-133.62042"
+ id="path4179"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.93839902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-2);marker-end:url(#TriangleOutL-9)"
+ d="m 26.776662,538.68728 451.028788,0"
+ id="path4179-7"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2"
+ style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,10.003309,144.31674)"><flowRegion
+ id="flowRegion4140-6-6"><rect
+ id="rect4142-6-1"
+ width="117.17769"
+ height="101.01524"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:20px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara9732"
+ style="font-size:17.5px;fill:#000000">Available height</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,10.811464,253.07573)"><flowRegion
+ id="flowRegion4140-6-6-4"><rect
+ id="rect4142-6-1-4"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048">Available width</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-1"
+ style="font-style:normal;font-weight:normal;font-size:25px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,210.99354,300.96896)"><flowRegion
+ id="flowRegion4140-6-9"><rect
+ id="rect4142-6-0"
+ width="270.72089"
+ height="68.690361"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:25px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-2"
+ style="font-size:17.5px">Width</flowPara></flowRoot> <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.90119678;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-3);marker-end:url(#TriangleOutL-0)"
+ d="m -26.522148,583.27143 557.292688,0"
+ id="path4179-8"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.9011969;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-9);marker-end:url(#TriangleOutL-1)"
+ d="m -43.461661,566.30584 0,-239.7552"
+ id="path4179-9"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-1-7"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,-112.00353,150.83655)"><flowRegion
+ id="flowRegion4140-6-9-7"><rect
+ id="rect4142-6-0-5"
+ width="270.72089"
+ height="68.690361"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-2-9"
+ style="font-size:17.5px;fill:#000000">Height</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-3"
+ style="font-style:normal;font-weight:normal;font-size:60px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,166.31611,-24.786365)"><flowRegion
+ id="flowRegion4140-6-67"><rect
+ id="rect4142-6-5"
+ width="334.36047"
+ height="80.812172"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:60px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-3">Popup</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,186.57489,257.45801)"><flowRegion
+ id="flowRegion4140-6-6-4-6"><rect
+ id="rect4142-6-1-4-2"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048-9">Bottom padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-1"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,193.9747,48.798368)"><flowRegion
+ id="flowRegion4140-6-6-4-6-2"><rect
+ id="rect4142-6-1-4-2-7"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048-9-0">Top padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-9"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,457.80767,148.11921)"><flowRegion
+ id="flowRegion4140-6-6-4-6-3"><rect
+ id="rect4142-6-1-4-2-6"
+ width="81.109558"
+ height="93.762154"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000"
+ id="flowPara4386">Right padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-9-2"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,-54.735211,151.06168)"><flowRegion
+ id="flowRegion4140-6-6-4-6-3-5"><rect
+ id="rect4142-6-1-4-2-6-4"
+ width="81.109558"
+ height="93.762154"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.02554321px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000"
+ id="flowPara4386-0">Left padding</flowPara></flowRoot> </g>
+</svg>
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-custom.png
new file mode 100644
index 00000000..c018e5e7
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.gif b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.gif
new file mode 100644
index 00000000..d6756d16
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-progressbar-indeterminate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-progressbar.gif b/src/imports/controls/doc/images/qtquickcontrols2-progressbar.gif
new file mode 100644
index 00000000..49af5f45
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-progressbar.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-custom.png
new file mode 100644
index 00000000..15835a3c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.gif b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.gif
new file mode 100644
index 00000000..4cbf3ed9
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-radiobutton.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate-custom.png
new file mode 100644
index 00000000..46245323
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gif
new file mode 100644
index 00000000..b6afd6fe
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-radiodelegate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-rangeslider-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-rangeslider-custom.png
new file mode 100644
index 00000000..8508a73d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-rangeslider-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-rangeslider.gif b/src/imports/controls/doc/images/qtquickcontrols2-rangeslider.gif
new file mode 100644
index 00000000..d35b1502
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-rangeslider.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-custom.png
new file mode 100644
index 00000000..f986f674
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png
new file mode 100644
index 00000000..8817ad5c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollbar.gif b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar.gif
new file mode 100644
index 00000000..ed3ab607
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-custom.png
new file mode 100644
index 00000000..75963dc1
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png
new file mode 100644
index 00000000..758e0451
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.gif b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.gif
new file mode 100644
index 00000000..73007820
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-custom.png
new file mode 100644
index 00000000..fc4c89d5
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-handle.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-handle.png
new file mode 100644
index 00000000..093f4a96
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-handle.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-nosnap.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider-nosnap.gif
new file mode 100644
index 00000000..ab233c5b
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-nosnap.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-snapalways.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider-snapalways.gif
new file mode 100644
index 00000000..8eb4011f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-snapalways.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-snaponrelease.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider-snaponrelease.gif
new file mode 100644
index 00000000..f3b1d5c7
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-slider-snaponrelease.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif
new file mode 100644
index 00000000..2ee56334
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-spinbox-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-custom.png
new file mode 100644
index 00000000..5aeee0c4
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-spinbox-double.png b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-double.png
new file mode 100644
index 00000000..cdece17b
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-double.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-spinbox-down.png b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-down.png
new file mode 100644
index 00000000..1f88f98d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-down.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-spinbox-textual.png b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-textual.png
new file mode 100644
index 00000000..922e59b7
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-textual.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-spinbox-up.png b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-up.png
new file mode 100644
index 00000000..7d254971
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-spinbox-up.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-spinbox.png b/src/imports/controls/doc/images/qtquickcontrols2-spinbox.png
new file mode 100644
index 00000000..6aa341bb
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-spinbox.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-stackview-custom.png
new file mode 100644
index 00000000..8890f14d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-pop.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-pop.gif
new file mode 100644
index 00000000..1971c2e0
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-pop.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-push.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-push.gif
new file mode 100644
index 00000000..0218cc0f
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-push.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-replace.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-replace.gif
new file mode 100644
index 00000000..63a6b2b4
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-replace.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-stackview-unwind.gif b/src/imports/controls/doc/images/qtquickcontrols2-stackview-unwind.gif
new file mode 100644
index 00000000..28c051d8
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-unwind.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-stackview-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-stackview-wireframe.png
index 65704c25..65704c25 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-stackview-wireframe.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-stackview-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-behind.gif b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-behind.gif
new file mode 100644
index 00000000..97d6a592
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-behind.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-custom.png
new file mode 100644
index 00000000..10c60ac3
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-leading-trailing.gif b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-leading-trailing.gif
new file mode 100644
index 00000000..0641bd14
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate-leading-trailing.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate.gif
new file mode 100644
index 00000000..86c380b7
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipedelegate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-swipeview-indicator.png b/src/imports/controls/doc/images/qtquickcontrols2-swipeview-indicator.png
index 91786964..91786964 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-swipeview-indicator.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipeview-indicator.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-swipeview-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-swipeview-wireframe.png
index 7e387c2d..7e387c2d 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-swipeview-wireframe.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipeview-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif b/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif
new file mode 100644
index 00000000..4af26c10
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-switch-checked.png b/src/imports/controls/doc/images/qtquickcontrols2-switch-checked.png
new file mode 100644
index 00000000..f4b0320c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switch-checked.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-switch-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-switch-custom.png
new file mode 100644
index 00000000..737d3a09
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switch-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-switch-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-switch-disabled.png
new file mode 100644
index 00000000..060d2b2a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switch-disabled.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-switch-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-switch-focused.png
new file mode 100644
index 00000000..2384f76a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switch-focused.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-switch-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-switch-normal.png
new file mode 100644
index 00000000..5f84f62a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switch-normal.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch.gif b/src/imports/controls/doc/images/qtquickcontrols2-switch.gif
index 5f956304..5f956304 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-switch.gif
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switch.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-switch.png b/src/imports/controls/doc/images/qtquickcontrols2-switch.png
index b9d0812e..b9d0812e 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-switch.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switch.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-switchdelegate-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-switchdelegate-custom.png
new file mode 100644
index 00000000..3a77a480
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switchdelegate-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-switchdelegate.gif b/src/imports/controls/doc/images/qtquickcontrols2-switchdelegate.gif
new file mode 100644
index 00000000..950b1073
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-switchdelegate.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tabbar-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-custom.png
new file mode 100644
index 00000000..cadf3079
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.png b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.png
new file mode 100644
index 00000000..cdfee3d0
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-explicit.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tabbar-flickable.png b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-flickable.png
new file mode 100644
index 00000000..ede59233
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-flickable.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tabbar-wireframe.png b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-wireframe.png
index 443f6757..443f6757 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-tabbar-wireframe.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbar-wireframe.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tabbar.gif b/src/imports/controls/doc/images/qtquickcontrols2-tabbar.gif
index 31db1f9e..31db1f9e 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-tabbar.gif
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbar.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tabbar.png b/src/imports/controls/doc/images/qtquickcontrols2-tabbar.png
new file mode 100644
index 00000000..6993c8bd
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbar.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tabbutton.png b/src/imports/controls/doc/images/qtquickcontrols2-tabbutton.png
new file mode 100644
index 00000000..3cdce15e
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tabbutton.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-textarea-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-textarea-custom.png
new file mode 100644
index 00000000..59777574
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textarea-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-textarea-flickable.png b/src/imports/controls/doc/images/qtquickcontrols2-textarea-flickable.png
new file mode 100644
index 00000000..39578f71
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textarea-flickable.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-textarea.png b/src/imports/controls/doc/images/qtquickcontrols2-textarea.png
new file mode 100644
index 00000000..924f6681
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textarea.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-textfield-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-textfield-custom.png
new file mode 100644
index 00000000..a9f40c07
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textfield-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-textfield-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-textfield-disabled.png
new file mode 100644
index 00000000..a027c72a
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textfield-disabled.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-textfield-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-textfield-focused.png
new file mode 100644
index 00000000..a63d3c85
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textfield-focused.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-textfield-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-textfield-normal.png
new file mode 100644
index 00000000..25047227
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textfield-normal.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-textfield.png b/src/imports/controls/doc/images/qtquickcontrols2-textfield.png
index 9ea62acb..9ea62acb 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-textfield.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-textfield.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-toolbar-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-toolbar-custom.png
new file mode 100644
index 00000000..374cc836
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-toolbar-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png b/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png
new file mode 100644
index 00000000..1fe353cc
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-toolbutton-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-toolbutton-custom.png
new file mode 100644
index 00000000..4bd209aa
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-toolbutton-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-toolbutton.png b/src/imports/controls/doc/images/qtquickcontrols2-toolbutton.png
index b350cdba..b350cdba 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-toolbutton.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-toolbutton.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tooltip-delay.png b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-delay.png
new file mode 100644
index 00000000..eb9499fd
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-delay.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tooltip-hover.png b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-hover.png
new file mode 100644
index 00000000..64a79839
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-hover.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tooltip-pressandhold.png b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-pressandhold.png
new file mode 100644
index 00000000..64a79839
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-pressandhold.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tooltip-slider.png b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-slider.png
new file mode 100644
index 00000000..440f6eba
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tooltip-slider.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tooltip.png b/src/imports/controls/doc/images/qtquickcontrols2-tooltip.png
new file mode 100644
index 00000000..902d6ee5
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tooltip.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tumbler-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-tumbler-custom.png
new file mode 100644
index 00000000..0ebb9edf
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tumbler-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-tumbler-delegate.png b/src/imports/controls/doc/images/qtquickcontrols2-tumbler-delegate.png
new file mode 100644
index 00000000..5213bcd8
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tumbler-delegate.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tumbler-wrap.gif b/src/imports/controls/doc/images/qtquickcontrols2-tumbler-wrap.gif
index 4821a4e8..4821a4e8 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-tumbler-wrap.gif
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tumbler-wrap.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-tumbler.png b/src/imports/controls/doc/images/qtquickcontrols2-tumbler.png
index e22330a6..e22330a6 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-tumbler.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-tumbler.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-accent.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-accent.png
new file mode 100644
index 00000000..be1a4a89
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-accent.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-attributes.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-attributes.png
new file mode 100644
index 00000000..96e9abeb
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-attributes.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-background.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-background.png
new file mode 100644
index 00000000..c91ab14d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-background.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-universal-button.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-button.png
index 6c764ec9..6c764ec9 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-universal-button.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-button.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtlabscontrols-universal-dark.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-dark.png
index ec459457..ec459457 100644
--- a/src/imports/controls/doc/images/qtlabscontrols-universal-dark.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-dark.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-foreground.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-foreground.png
new file mode 100644
index 00000000..e06b573b
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-foreground.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal-theme.png b/src/imports/controls/doc/images/qtquickcontrols2-universal-theme.png
new file mode 100644
index 00000000..f299b853
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal-theme.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-universal.png b/src/imports/controls/doc/images/qtquickcontrols2-universal.png
new file mode 100644
index 00000000..b50d9cca
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-universal.png
Binary files differ
diff --git a/src/imports/controls/doc/qtlabscontrols.qdocconf b/src/imports/controls/doc/qtlabscontrols.qdocconf
deleted file mode 100644
index b2a539ae..00000000
--- a/src/imports/controls/doc/qtlabscontrols.qdocconf
+++ /dev/null
@@ -1,64 +0,0 @@
-include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-
-project = QtLabsControls
-description = Qt Labs Controls Reference Documentation
-version = $QT_VERSION
-
-qhp.projects = QtLabsControls
-
-qhp.QtLabsControls.file = qtlabscontrols.qhp
-qhp.QtLabsControls.namespace = org.qt-project.qtlabscontrols.$QT_VERSION_TAG
-qhp.QtLabsControls.virtualFolder = qtlabscontrols
-qhp.QtLabsControls.indexTitle = Qt Labs Controls
-qhp.QtLabsControls.indexRoot =
-
-qhp.QtLabsControls.filterAttributes = qtlabscontrols $QT_VERSION qtrefdoc
-qhp.QtLabsControls.customFilters.Qt.name = QtLabsControls $QT_VERSION
-qhp.QtLabsControls.customFilters.Qt.filterAttributes = qtlabscontrols $QT_VERSION
-
-qhp.QtLabsControls.subprojects = qtlabscontrolsqmltypes
-
-qhp.QtLabsControls.subprojects.qtlabscontrolsqmltypes.title = Controls QML Types
-qhp.QtLabsControls.subprojects.qtlabscontrolsqmltypes.indexTitle = Qt Labs Controls QML Types
-qhp.QtLabsControls.subprojects.qtlabscontrolsqmltypes.selectors = qmlclass
-qhp.QtLabsControls.subprojects.qtlabscontrolsqmltypes.sortPages = true
-
-depends = qtcore qtgui qtdoc qtqml qtquick qtquicklayouts qtquickdialogs qtquickcontrols
-
-# Specify the install path under QT_INSTALL_EXAMPLES
-# Note: paths passed to \example command must contain the parent directory, e.g.
-# \example controls/tabs
-exampledirs += ../../../../examples/quickcontrols2 \
- ../ \
- ../../../templates \
- ../../calendar \
- ../../../../tests/auto/controls/data \
- snippets
-
-examplesinstallpath = quickcontrols2
-
-headerdirs += ../../../templates \
- ../../calendar \
-
-sourcedirs += ../../../templates \
- ../../calendar
-
-imagedirs += images
-
-navigation.landingpage = "Qt Labs Controls"
-navigation.qmltypespage = "Qt Labs Controls QML Types"
-
-tagfile = qtlabscontrols.tags
-
-# \styleimport {Qt.labs.controls.universal 1.0}
-macro.styleimport.HTML = "<table class=\"alignedsummary\"><tbody><tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> import \1</td></tr></tbody></table>"
-
-# \styleproperty {Universal.accent} {enumeration} {html-target-id}
-# \target html-target-id
-# This property holds ...
-# (empty line)
-# \endstyleproperty
-macro.styleproperty.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\3\"><td class=\"tblQmlPropNode\"><p><span class=\"name\">\1</span> : <span class=\"type\">\2</span></p></td></tr></tbody></table></div>"
-macro.endstyleproperty = "\\br"
-
-macro.labs = "\\note \\e{Types in the Qt.labs module are not guaranteed to remain compatible in future versions.}"
diff --git a/src/imports/controls/doc/qtquickcontrols2.qdocconf b/src/imports/controls/doc/qtquickcontrols2.qdocconf
new file mode 100644
index 00000000..a9a48343
--- /dev/null
+++ b/src/imports/controls/doc/qtquickcontrols2.qdocconf
@@ -0,0 +1,98 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+project = QtQuickControls2
+description = Qt Quick Controls 2 Reference Documentation
+version = $QT_VERSION
+
+qhp.projects = QtQuickControls2
+
+qhp.QtQuickControls2.file = qtquickcontrols2.qhp
+qhp.QtQuickControls2.namespace = org.qt-project.qtquickcontrols2.$QT_VERSION_TAG
+qhp.QtQuickControls2.virtualFolder = qtquickcontrols2
+qhp.QtQuickControls2.indexTitle = Qt Quick Controls 2
+qhp.QtQuickControls2.indexRoot =
+
+qhp.QtQuickControls2.filterAttributes = qtquickcontrols2 $QT_VERSION qtrefdoc
+qhp.QtQuickControls2.customFilters.Qt.name = QtQuickControls2 $QT_VERSION
+qhp.QtQuickControls2.customFilters.Qt.filterAttributes = qtquickcontrols2 $QT_VERSION
+
+qhp.QtQuickControls2.subprojects = qmltypes classes examples
+qhp.QtQuickControls2.subprojects.qmltypes.title = QML Types
+qhp.QtQuickControls2.subprojects.qmltypes.indexTitle = Qt Quick Controls 2 QML Types
+qhp.QtQuickControls2.subprojects.qmltypes.selectors = qmlclass
+qhp.QtQuickControls2.subprojects.qmltypes.sortPages = true
+qhp.QtQuickControls2.subprojects.classes.title = C++ Classes
+qhp.QtQuickControls2.subprojects.classes.indexTitle = Qt Quick Controls 2 C++ Classes
+qhp.QtQuickControls2.subprojects.classes.selectors = class fake:headerfile
+qhp.QtQuickControls2.subprojects.classes.sortPages = true
+qhp.QtQuickControls2.subprojects.examples.title = Examples
+qhp.QtQuickControls2.subprojects.examples.indexTitle = Qt Quick Controls 2 Examples
+qhp.QtQuickControls2.subprojects.examples.selectors = fake:example
+
+depends = qtcore qtgui qtdoc qtqml qtquick qtquickdialogs qtquickcontrols qtquickextras qmake qtsql qtwidgets
+
+# Specify the install path under QT_INSTALL_EXAMPLES
+# Note: paths passed to \example command must contain the parent directory, e.g.
+# \example controls/tabs
+exampledirs += ../../../../examples/quickcontrols2 \
+ ../../../quicktemplates2 \
+ ../../calendar \
+ ../../../../tests/auto/controls/data \
+ snippets \
+ snippets/screenshots
+
+examplesinstallpath = quickcontrols2
+
+headerdirs += ../../../quicktemplates2 \
+ ../../calendar \
+ ../../../quickcontrols2
+
+sourcedirs += ../../../quicktemplates2 \
+ ../../calendar \
+ ../../../quickcontrols2 \
+ src
+
+imagedirs += images
+
+navigation.landingpage = "Qt Quick Controls 2"
+navigation.qmltypespage = "Qt Quick Controls 2 QML Types"
+navigation.cppclassespage = "Qt Quick Controls 2 C++ Classes"
+
+tagfile = qtquickcontrols2.tags
+
+# \styleimport {QtQuick.Controls.Universal 2.0}
+macro.styleimport.HTML = "<table class=\"alignedsummary\"><tbody><tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> import \1</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Since:</td><td class=\"memItemRight bottomAlign\"> \2</td></tr></tbody></table>"
+
+# \styleproperty {Universal.accent} {enumeration} {html-target-id}
+# \target html-target-id
+# This property holds ...
+# (empty line)
+# \endstyleproperty
+macro.styleproperty.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\3\"><td class=\"tblQmlPropNode\"><p><span class=\"name\">\1</span> : <span class=\"type\">\2</span></p></td></tr></tbody></table></div>"
+macro.endstyleproperty = "\\br"
+
+# \stylemethod {returntype} {methodname} {argtype} {argname} {html-target-id}
+# \target html-target-id
+# This property holds ...
+# (empty line)
+# \endstylemethod
+macro.stylemethod.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\5\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>)</p></td></tr></tbody></table></div>"
+macro.endstylemethod = "\\br"
+
+# \stylemethod2 {returntype} {methodname} {arg1type} {arg1name} {arg2type} {arg2name} {html-target-id}
+# \target html-target-id
+# This method returns ...
+# (empty line)
+# \endstylemethod2
+macro.stylemethod2.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\7\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>, <span class="type">\5</span> <i>\6</i>)</p></td></tr></tbody></table></div>"
+macro.endstylemethod2 = "\\br"
+
+# \stylecolor {#6A00FF} {(default)}
+macro.stylecolor.HTML = "<div style=\"padding:10px;color:#fff;background:\1;\">\1 \2</div>"
+
+macro.nbsp.HTML = "&nbsp;"
+macro.labs = "\\note \\e{Types in Qt.labs modules are not guaranteed to remain compatible in future versions.}"
+
+#Add output suffix to the html filenames
+outputsuffixes = QML
+outputsuffixes.QML = 2
diff --git a/src/imports/controls/doc/snippets/basic-example.qml b/src/imports/controls/doc/snippets/basic-example.qml
index 11fee906..62ab2466 100644
--- a/src/imports/controls/doc/snippets/basic-example.qml
+++ b/src/imports/controls/doc/snippets/basic-example.qml
@@ -27,7 +27,7 @@
//! [0]
import QtQuick 2.6
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
ApplicationWindow {
title: "My Application"
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-busyindicator-contentItem.qml b/src/imports/controls/doc/snippets/qtlabscontrols-busyindicator-contentItem.qml
deleted file mode 100644
index 8f212c37..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-busyindicator-contentItem.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-BusyIndicator {
- Rectangle {
- anchors.fill: contentItem
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-button-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-button-background.qml
deleted file mode 100644
index 7c0a6b50..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-button-background.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Button {
- width: 80
- text: "Button"
- Rectangle {
- anchors.fill: background
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-button-label.qml b/src/imports/controls/doc/snippets/qtlabscontrols-button-label.qml
deleted file mode 100644
index 4fbeab08..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-button-label.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Button {
- width: 80
- text: "Button"
- Rectangle {
- anchors.fill: label
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-button.qml b/src/imports/controls/doc/snippets/qtlabscontrols-button.qml
deleted file mode 100644
index 86d339b7..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-button.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Button {
- text: "Button"
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-indicator.qml b/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-indicator.qml
deleted file mode 100644
index ae9a0b0a..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-indicator.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-CheckBox {
- text: "CheckBox"
- Rectangle {
- anchors.fill: indicator
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-label.qml b/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-label.qml
deleted file mode 100644
index fcb3a49d..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-label.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-CheckBox {
- text: "CheckBox"
- Rectangle {
- anchors.fill: label
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox.qml b/src/imports/controls/doc/snippets/qtlabscontrols-checkbox.qml
deleted file mode 100644
index 2bf74b42..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-CheckBox {
- text: "CheckBox"
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-combobox-background.qml
deleted file mode 100644
index d6715f07..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-background.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ComboBox {
- model: ["ComboBox"]
- Rectangle {
- anchors.fill: background
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-contentItem.qml b/src/imports/controls/doc/snippets/qtlabscontrols-combobox-contentItem.qml
deleted file mode 100644
index 08523088..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-contentItem.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ComboBox {
- model: ["ComboBox"]
- Rectangle {
- anchors.fill: contentItem
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-dial-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-dial-background.qml
deleted file mode 100644
index 333db1ca..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-dial-background.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Dial {
- Rectangle {
- anchors.fill: background
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-dial.qml b/src/imports/controls/doc/snippets/qtlabscontrols-dial.qml
deleted file mode 100644
index b42e418d..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-dial.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Dial {
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-indicator.qml b/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-indicator.qml
deleted file mode 100644
index fb80957d..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-indicator.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ItemDelegate {
- text: "ItemDelegate"
- checked: true
- checkable: true
- Rectangle {
- anchors.fill: indicator
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-label.qml b/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-label.qml
deleted file mode 100644
index 696560a5..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-label.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ItemDelegate {
- text: "ItemDelegate"
- checked: true
- checkable: true
- Rectangle {
- anchors.fill: label
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-label-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-label-background.qml
deleted file mode 100644
index 55cbf4eb..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-label-background.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Label {
- text: "Label"
- background: Rectangle {
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-background.qml
deleted file mode 100644
index 55e71b81..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-background.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ProgressBar {
- value: 0.5
- Rectangle {
- anchors.fill: background
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-disabled.qml b/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-disabled.qml
deleted file mode 100644
index 0f74ea46..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-disabled.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ProgressBar {
- value: 0.5
- enabled: false
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-indicator.qml b/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-indicator.qml
deleted file mode 100644
index 28eb99bf..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-indicator.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ProgressBar {
- value: 0.5
- Rectangle {
- parent: indicator
- width: indicator.childrenRect.width
- height: indicator.height
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-normal.qml b/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-normal.qml
deleted file mode 100644
index e1c200b5..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-progressbar-normal.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ProgressBar {
- value: 0.5
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-disabled.qml b/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-disabled.qml
deleted file mode 100644
index 1a087593..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-disabled.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RadioButton {
- text: "Disabled"
- enabled: false
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-focused.qml b/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-focused.qml
deleted file mode 100644
index 2ad1cbfc..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-focused.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RadioButton {
- text: "Focused"
- focus: true
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-indicator.qml b/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-indicator.qml
deleted file mode 100644
index d36932dc..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-indicator.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RadioButton {
- text: "RadioButton"
- Rectangle {
- anchors.fill: indicator
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-label.qml b/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-label.qml
deleted file mode 100644
index eab52fbe..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-label.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RadioButton {
- text: "RadioButton"
- Rectangle {
- anchors.fill: label
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-normal.qml b/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-normal.qml
deleted file mode 100644
index 8c746468..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-normal.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RadioButton {
- text: "Normal"
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton.qml b/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton.qml
deleted file mode 100644
index 8f898d18..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RadioButton {
- text: "RadioButton"
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-disabled.qml b/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-disabled.qml
deleted file mode 100644
index af167461..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-disabled.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
- enabled: false
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle-focused.qml b/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle-focused.qml
deleted file mode 100644
index 04081cb8..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle-focused.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
- first.handle.focus: true
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle.qml b/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle.qml
deleted file mode 100644
index f27f904a..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-first-handle.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
- Rectangle {
- anchors.fill: first.handle
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-normal.qml b/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-normal.qml
deleted file mode 100644
index 343c24e9..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-normal.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle-focused.qml b/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle-focused.qml
deleted file mode 100644
index 15da7776..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle-focused.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
- second.handle.focus: true
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle.qml b/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle.qml
deleted file mode 100644
index dd54d2fb..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-second-handle.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
- Rectangle {
- anchors.fill: second.handle
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider.qml b/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider.qml
deleted file mode 100644
index 343c24e9..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-scrollbar.qml b/src/imports/controls/doc/snippets/qtlabscontrols-scrollbar.qml
deleted file mode 100644
index b677137d..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-scrollbar.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Frame {
- width: 100
- height: 100
-
- ScrollBar {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
- }
-
- ScrollBar {
- size: 0.6
- position: 0.3
- active: true
- orientation: Qt.Horizontal
- width: parent.width
- anchors.bottom: parent.bottom
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator-indicator.qml b/src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator-indicator.qml
deleted file mode 100644
index 68e0fb33..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator-indicator.qml
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ScrollIndicator {
- size: 0.5
- position: 0.5
- active: true
- height: 100
- Rectangle {
- parent: indicator
- anchors.fill: parent
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-slider-disabled.qml b/src/imports/controls/doc/snippets/qtlabscontrols-slider-disabled.qml
deleted file mode 100644
index 57429fb4..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-slider-disabled.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Slider {
- value: 0.5
- enabled: false
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-slider-focused.qml b/src/imports/controls/doc/snippets/qtlabscontrols-slider-focused.qml
deleted file mode 100644
index 69a24b1a..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-slider-focused.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Slider {
- value: 0.5
- focus: true
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-slider-normal.qml b/src/imports/controls/doc/snippets/qtlabscontrols-slider-normal.qml
deleted file mode 100644
index 331d076a..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-slider-normal.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Slider {
- value: 0.5
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-slider-track.qml b/src/imports/controls/doc/snippets/qtlabscontrols-slider-track.qml
deleted file mode 100644
index 7fb949b8..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-slider-track.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Slider {
- value: 0.5
- Rectangle {
- anchors.fill: track
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-slider.qml b/src/imports/controls/doc/snippets/qtlabscontrols-slider.qml
deleted file mode 100644
index 331d076a..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-slider.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Slider {
- value: 0.5
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-background.qml
deleted file mode 100644
index 21d1fe92..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-background.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-SpinBox {
- value: 50
- Rectangle {
- anchors.fill: parent
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-contentItem.qml b/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-contentItem.qml
deleted file mode 100644
index 5d1f66f6..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-contentItem.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-SpinBox {
- value: 50
- Rectangle {
- anchors.fill: contentItem
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-switch-background.qml
deleted file mode 100644
index 1829bb26..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch-background.qml
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Switch {
- text: "Switch"
- background: Rectangle {
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch-indicator.qml b/src/imports/controls/doc/snippets/qtlabscontrols-switch-indicator.qml
deleted file mode 100644
index 12d4f20d..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch-indicator.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Switch {
- text: "Switch"
- Rectangle {
- anchors.fill: indicator
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch-label.qml b/src/imports/controls/doc/snippets/qtlabscontrols-switch-label.qml
deleted file mode 100644
index c739bf57..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch-label.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Switch {
- text: "Switch"
- Rectangle {
- anchors.fill: label
- color: "transparent"
- border.color: "red"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch.qml b/src/imports/controls/doc/snippets/qtlabscontrols-switch.qml
deleted file mode 100644
index 9e30f8d5..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Switch {
- text: "Switch"
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-textarea.qml b/src/imports/controls/doc/snippets/qtlabscontrols-textarea.qml
deleted file mode 100644
index c99fdd13..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-textarea.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-TextArea {
- text: "Text\nArea..."
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-textfield-background.qml
deleted file mode 100644
index 87324b2d..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-background.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-TextField {
- width: 80
- text: "TextField"
- Rectangle {
- anchors.fill: background
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-textfield.qml b/src/imports/controls/doc/snippets/qtlabscontrols-textfield.qml
deleted file mode 100644
index 838bd111..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-textfield.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-TextField {
- text: "TextField"
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-toolbar-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-toolbar-background.qml
deleted file mode 100644
index 486e841f..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-toolbar-background.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ToolBar {
- width: 100
- Rectangle {
- parent: background
- anchors.fill: parent
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-toolbar-frame.qml b/src/imports/controls/doc/snippets/qtlabscontrols-toolbar-frame.qml
deleted file mode 100644
index b887d464..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-toolbar-frame.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ToolBar {
- width: 100
- frame: Rectangle {
- anchors.fill: parent
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-background.qml b/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-background.qml
deleted file mode 100644
index 62338070..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-background.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ToolButton {
- text: "ToolButton"
- Rectangle {
- anchors.fill: background
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-label.qml b/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-label.qml
deleted file mode 100644
index 5a8c3a50..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton-label.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ToolButton {
- text: "ToolButton"
- Rectangle {
- anchors.fill: label
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton.qml b/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton.qml
deleted file mode 100644
index 0db6bfe2..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-toolbutton.qml
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-ToolBar {
- ToolButton {
- text: "ToolButton"
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler-contentItem.qml b/src/imports/controls/doc/snippets/qtlabscontrols-tumbler-contentItem.qml
deleted file mode 100644
index 0e26661e..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler-contentItem.qml
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Tumbler {
- model: 5
-
- Rectangle {
- anchors.fill: parent.contentItem
- color: 'transparent'
- border.color: 'red'
- }
-}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler.qml b/src/imports/controls/doc/snippets/qtlabscontrols-tumbler.qml
deleted file mode 100644
index f96ed893..00000000
--- a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import Qt.labs.controls 1.0
-
-Tumbler {
- model: 5
-}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-accent.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-accent.qml
new file mode 100644
index 00000000..5238d876
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-accent.qml
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+
+Pane {
+ padding: 4
+
+//! [1]
+Button {
+ text: qsTr("Button")
+ highlighted: true
+ Material.accent: Material.Orange
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-background.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-background.qml
new file mode 100644
index 00000000..264d5d28
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-background.qml
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+
+Pane {
+ padding: 4
+
+//! [1]
+Button {
+ text: qsTr("Button")
+ highlighted: true
+ Material.background: Material.Teal
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-elevation.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-elevation.qml
new file mode 100644
index 00000000..3ce1a722
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-elevation.qml
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+
+Pane {
+ contentWidth: 120
+ contentHeight: 120
+ padding: 10
+ bottomPadding: 20
+
+//! [1]
+Pane {
+ width: 120
+ height: 120
+
+ Material.elevation: 6
+
+ Label {
+ text: qsTr("I'm a card!")
+ anchors.centerIn: parent
+ }
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-foreground.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-foreground.qml
new file mode 100644
index 00000000..1fe96121
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-foreground.qml
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+
+Pane {
+ padding: 4
+
+//! [1]
+Button {
+ text: qsTr("Button")
+ Material.foreground: Material.Pink
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-material-theme.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-material-theme.qml
new file mode 100644
index 00000000..6bd91d5d
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-material-theme.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Material 2.0
+
+Pane {
+ padding: 10
+
+//! [1]
+Pane {
+ Material.theme: Material.Dark
+
+ Button {
+ text: qsTr("Button")
+ }
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml
new file mode 100644
index 00000000..f80ebfe2
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtQuick.Controls 2.0
+
+Item {
+ width: 200
+ height: 200
+
+//! [1]
+Rectangle {
+ id: frame
+ clip: true
+ width: 160
+ height: 160
+ border.color: "black"
+ anchors.centerIn: parent
+
+ Text {
+ id: content
+ text: "ABC"
+ font.pixelSize: 160
+ x: -hbar.position * width
+ y: -vbar.position * height
+ }
+
+ ScrollBar {
+ id: vbar
+ hoverEnabled: true
+ active: hovered || pressed
+ orientation: Qt.Vertical
+ size: frame.height / content.height
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ }
+
+ ScrollBar {
+ id: hbar
+ hoverEnabled: true
+ active: hovered || pressed
+ orientation: Qt.Horizontal
+ size: frame.width / content.width
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ }
+}
+//! [1]
+
+Component.onCompleted: {
+ hbar.active = true
+ vbar.active = true
+}
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml
new file mode 100644
index 00000000..2734f33a
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtQuick.Controls 2.0
+
+Item {
+ width: 200
+ height: 200
+
+//! [1]
+Rectangle {
+ id: frame
+ clip: true
+ width: 160
+ height: 160
+ border.color: "black"
+ anchors.centerIn: parent
+
+ Text {
+ id: content
+ text: "ABC"
+ font.pixelSize: 169
+
+ MouseArea {
+ id: mouseArea
+ drag.target: content
+ drag.minimumX: frame.width - width
+ drag.minimumY: frame.height - height
+ drag.maximumX: 0
+ drag.maximumY: 0
+ anchors.fill: content
+ }
+ }
+
+ ScrollIndicator {
+ id: verticalIndicator
+ active: mouseArea.pressed
+ orientation: Qt.Vertical
+ size: frame.height / content.height
+ position: -content.y / content.height
+ anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
+ }
+
+ ScrollIndicator {
+ id: horizontalIndicator
+ active: mouseArea.pressed
+ orientation: Qt.Horizontal
+ size: frame.width / content.width
+ position: -content.x / content.width
+ anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
+ }
+}
+//! [1]
+
+Component.onCompleted: {
+ horizontalIndicator.active = true;
+ verticalIndicator.active = true;
+}
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-stackview-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-stackview-custom.qml
new file mode 100644
index 00000000..3e40ea2d
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-stackview-custom.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+StackView {
+ id: control
+
+ popEnter: Transition {
+ XAnimator {
+ from: (control.mirrored ? -1 : 1) * -control.width
+ to: 0
+ duration: 400
+ easing.type: Easing.OutCubic
+ }
+ }
+
+ popExit: Transition {
+ XAnimator {
+ from: 0
+ to: (control.mirrored ? -1 : 1) * control.width
+ duration: 400
+ easing.type: Easing.OutCubic
+ }
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml
index 8efa0eed..db077057 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,28 +25,41 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick 2.7
+import QtQuick.Controls 2.0
-Frame {
- width: 100
- height: 100
-
- ScrollIndicator {
- size: 0.3
- position: 0.2
- active: true
- orientation: Qt.Vertical
- height: parent.height
- anchors.right: parent.right
+//! [1]
+ListView {
+ width: 200
+ height: 300
+ clip: true
+ model: ListModel {
+ id: listModel
+ ListElement { title: "Electricity bill" }
+ ListElement { title: "Happy Birthday!" }
+ ListElement { title: "FW: Cat pictures" }
+ ListElement { title: "Hotel visit receipt" }
+ ListElement { title: "Customer service" }
}
-
- ScrollIndicator {
- size: 0.6
- position: 0.3
- active: true
- orientation: Qt.Horizontal
+ delegate: SwipeDelegate {
+ id: swipeDelegate
+ text: title
width: parent.width
- anchors.bottom: parent.bottom
+
+ onClicked: if (swipe.complete) listModel.remove(index)
+
+ swipe.right: Rectangle {
+ color: swipeDelegate.swipe.complete && swipeDelegate.pressed ? "#333" : "#444"
+ width: parent.width
+ height: parent.height
+
+ Label {
+ font.pixelSize: swipeDelegate.font.pixelSize
+ text: qsTr("Remove")
+ color: "white"
+ anchors.centerIn: parent
+ }
+ }
}
}
+//! [1]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-busyindicator-background.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipeview-custom.qml
index 5ccd8f20..04b12512 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-busyindicator-background.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-swipeview-custom.qml
@@ -25,12 +25,15 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+SwipeView {
+ id: control
-BusyIndicator {
background: Rectangle {
- color: 'transparent'
- border.color: 'red'
+ color: "#eeeeee"
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-custom.qml
new file mode 100644
index 00000000..94d9c12e
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-custom.qml
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Item {
+ToolTip {
+ id: control
+ text: qsTr("A descriptive tool tip of what the button does")
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ color: "#21be2b"
+ }
+
+ background: Rectangle {
+ border.color: "#21be2b"
+ }
+}
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-universal-accent.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-accent.qml
new file mode 100644
index 00000000..afcfa87f
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-accent.qml
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Universal 2.0
+
+Pane {
+ padding: 10
+
+//! [1]
+Button {
+ text: qsTr("Button")
+ highlighted: true
+ Universal.accent: Universal.Orange
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-universal-background.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-background.qml
new file mode 100644
index 00000000..32a1b43b
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-background.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Universal 2.0
+
+Pane {
+ padding: 10
+
+//! [1]
+Pane {
+ Universal.background: Universal.Steel
+
+ Button {
+ text: qsTr("Button")
+ }
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-universal-foreground.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-foreground.qml
new file mode 100644
index 00000000..6ca35d74
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-foreground.qml
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Universal 2.0
+
+Pane {
+ padding: 10
+
+//! [1]
+Button {
+ text: qsTr("Button")
+ Universal.foreground: Universal.Pink
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-universal-theme.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-theme.qml
new file mode 100644
index 00000000..85e4a406
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-universal-theme.qml
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+import QtQuick.Controls.Universal 2.0
+
+Pane {
+ padding: 10
+
+//! [1]
+Pane {
+ Universal.theme: Universal.Dark
+
+ Button {
+ text: qsTr("Button")
+ }
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml
index f0cf7203..dfbf4fbc 100644
--- a/src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml
@@ -27,7 +27,7 @@
import QtQuick 2.0
import Qt.labs.calendar 1.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
ListView {
diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml
index ce41d224..ce41d224 100644
--- a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml
diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml
index 5ea3714c..5ea3714c 100644
--- a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml
diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml
index 346e6099..346e6099 100644
--- a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml
diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml
index 16f872b8..16f872b8 100644
--- a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml
diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml
index d105553f..d105553f 100644
--- a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml
diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml
index e58e5c7b..e58e5c7b 100644
--- a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-busyindicator-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-busyindicator-custom.qml
new file mode 100644
index 00000000..82ed9cdc
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-busyindicator-custom.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+BusyIndicator {
+ id: control
+
+ contentItem: Item {
+ implicitWidth: 64
+ implicitHeight: 64
+
+ Item {
+ id: item
+ x: parent.width / 2 - 32
+ y: parent.height / 2 - 32
+ width: 64
+ height: 64
+ opacity: control.running ? 1 : 0
+
+ Behavior on opacity {
+ OpacityAnimator {
+ duration: 250
+ }
+ }
+
+ RotationAnimator {
+ target: item
+ running: control.visible && control.running
+ from: 0
+ to: 360
+ loops: Animation.Infinite
+ duration: 1250
+ }
+
+ Repeater {
+ id: repeater
+ model: 6
+
+ Rectangle {
+ x: item.width / 2 - width / 2
+ y: item.height / 2 - height / 2
+ implicitWidth: 10
+ implicitHeight: 10
+ radius: 5
+ color: "#21be2b"
+ transform: [
+ Translate {
+ y: -Math.min(item.width, item.height) * 0.5 + 5
+ },
+ Rotation {
+ angle: index / repeater.count * 360
+ origin.x: 5
+ origin.y: 5
+ }
+ ]
+ }
+ }
+ }
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-custom.qml
new file mode 100644
index 00000000..eac6b831
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-custom.qml
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Button {
+ id: control
+ text: qsTr("Button")
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ opacity: enabled ? 1 : 0.3
+ border.color: control.down ? "#17a81a" : "#21be2b"
+ border.width: 1
+ radius: 2
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-button-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-disabled.qml
index 13037b8d..f4555c90 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-button-disabled.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-disabled.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Button {
width: 80
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-button-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-focused.qml
index ee72caf6..a99346a6 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-button-focused.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-focused.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Button {
width: 80
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-button-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-normal.qml
index 692d9066..f206bcec 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-button-normal.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-normal.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Button {
width: 80
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-button-pressed.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-pressed.qml
index b5c918db..8a941561 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-button-pressed.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-pressed.qml
@@ -26,10 +26,10 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Button {
width: 80
text: "Pressed"
- pressed: true
+ down: true
}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-checked.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-checked.qml
index 3acb9321..075e6342 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-checked.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-checked.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
CheckBox {
text: "Checked"
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-custom.qml
new file mode 100644
index 00000000..0465ec80
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-custom.qml
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+CheckBox {
+ id: control
+ text: qsTr("CheckBox")
+ checked: true
+
+ indicator: Rectangle {
+ implicitWidth: 26
+ implicitHeight: 26
+ x: control.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 3
+ border.color: control.down ? "#17a81a" : "#21be2b"
+
+ Rectangle {
+ width: 14
+ height: 14
+ x: 6
+ y: 6
+ radius: 2
+ color: control.down ? "#17a81a" : "#21be2b"
+ visible: control.checked
+ }
+ }
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ leftPadding: control.indicator.width + control.spacing
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-disabled.qml
index 6069edad..4878cf31 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-disabled.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-disabled.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
CheckBox {
text: "Disabled"
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-focused.qml
index a90a42d6..93f1c214 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-focused.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-focused.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
CheckBox {
text: "Focused"
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-normal.qml
index bc86f927..a840116e 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-normal.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-normal.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
CheckBox {
text: "Normal"
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkdelegate-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkdelegate-custom.qml
new file mode 100644
index 00000000..483f9838
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkdelegate-custom.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+CheckDelegate {
+ id: control
+ text: qsTr("CheckDelegate")
+ checked: true
+
+ contentItem: Text {
+ rightPadding: control.indicator.width + control.spacing
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ indicator: Rectangle {
+ implicitWidth: 26
+ implicitHeight: 26
+ x: control.width - width - control.rightPadding
+ y: control.topPadding + control.availableHeight / 2 - height / 2
+ radius: 3
+ color: "transparent"
+ border.color: control.down ? "#17a81a" : "#21be2b"
+
+ Rectangle {
+ width: 14
+ height: 14
+ x: 6
+ y: 6
+ radius: 2
+ color: control.down ? "#17a81a" : "#21be2b"
+ visible: control.checked
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? "#bdbebf" : "#eeeeee"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml
new file mode 100644
index 00000000..bd261e52
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml
@@ -0,0 +1,113 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+ComboBox {
+ id: control
+ model: ["First", "Second", "Third"]
+
+ delegate: ItemDelegate {
+ width: control.width
+ contentItem: Text {
+ text: modelData
+ color: "#21be2b"
+ font: control.font
+ elide: Text.ElideRight
+ verticalAlignment: Text.AlignVCenter
+ }
+ highlighted: control.highlightedIndex == index
+ }
+
+ indicator: Canvas {
+ id: canvas
+ x: control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ width: 12
+ height: 8
+ contextType: "2d"
+
+ Connections {
+ target: control
+ onPressedChanged: canvas.requestPaint()
+ }
+
+ onPaint: {
+ context.reset();
+ context.moveTo(0, 0);
+ context.lineTo(width, 0);
+ context.lineTo(width / 2, height);
+ context.closePath();
+ context.fillStyle = control.pressed ? "#17a81a" : "#21be2b";
+ context.fill();
+ }
+ }
+
+ contentItem: Text {
+ leftPadding: 0
+ rightPadding: control.indicator.width + control.spacing
+
+ text: control.displayText
+ font: control.font
+ color: control.pressed ? "#17a81a" : "#21be2b"
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+
+ background: Rectangle {
+ implicitWidth: 120
+ implicitHeight: 40
+ border.color: control.pressed ? "#17a81a" : "#21be2b"
+ border.width: control.visualFocus ? 2 : 1
+ radius: 2
+ }
+
+ popup: Popup {
+ y: control.height - 1
+ width: control.width
+ implicitHeight: listview.contentHeight
+ padding: 1
+
+ contentItem: ListView {
+ id: listview
+ clip: true
+ model: control.popup.visible ? control.delegateModel : null
+ currentIndex: control.highlightedIndex
+
+ ScrollIndicator.vertical: ScrollIndicator { }
+ }
+
+ background: Rectangle {
+ border.color: "#21be2b"
+ radius: 2
+ }
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-delegate.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-delegate.qml
index 60f56940..d8b5d1fa 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-delegate.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-delegate.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Item {
id: root
@@ -40,7 +40,6 @@ Item {
delegate: ItemDelegate {
width: combo.width
text: modelData
- checkable: true
autoExclusive: true
checked: combo.currentIndex === index
Rectangle {
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-popup.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-popup.qml
index 0fea67d1..36569e15 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-combobox-popup.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-popup.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Item {
id: root
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-scrollbar-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-custom.qml
index 90d341b9..efe061d3 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-scrollbar-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,16 +25,43 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
-ScrollBar {
- size: 0.5
- position: 0.5
- active: true
- height: 100
+Dial {
+ id: control
background: Rectangle {
+ x: control.width / 2 - width / 2
+ y: control.height / 2 - height / 2
+ width: Math.max(64, Math.min(control.width, control.height))
+ height: width
color: "transparent"
- border.color: "red"
+ radius: width / 2
+ border.color: control.pressed ? "#17a81a" : "#21be2b"
+ opacity: control.enabled ? 1 : 0.3
+ }
+
+ handle: Rectangle {
+ id: handleItem
+ x: control.background.x + control.background.width / 2 - width / 2
+ y: control.background.y + control.background.height / 2 - height / 2
+ width: 16
+ height: 16
+ color: control.pressed ? "#17a81a" : "#21be2b"
+ radius: 8
+ antialiasing: true
+ opacity: control.enabled ? 1 : 0.3
+ transform: [
+ Translate {
+ y: -Math.min(control.background.width, control.background.height) * 0.4 + handleItem.height / 2
+ },
+ Rotation {
+ angle: control.angle
+ origin.x: handleItem.width / 2
+ origin.y: handleItem.height / 2
+ }
+ ]
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-dial-handle.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-handle.qml
index 73794cc0..19d943a6 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-dial-handle.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-handle.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Dial {
id: dial
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame-custom.qml
index 566202b5..d11c431e 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-checkbox-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,13 +25,19 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
-CheckBox {
- text: "CheckBox"
+Frame {
background: Rectangle {
color: "transparent"
- border.color: "red"
+ border.color: "#21be2b"
+ radius: 2
+ }
+
+ Label {
+ text: qsTr("Content goes here!")
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-frame.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame.qml
index 7fadc9e5..1ede733d 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-frame.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame.qml
@@ -27,7 +27,7 @@
import QtQuick 2.0
import QtQuick.Layouts 1.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
Frame {
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-checkable.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-checkable.qml
index 1c1232c7..a2999925 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-checkable.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-checkable.qml
@@ -27,7 +27,7 @@
import QtQuick 2.0
import QtQuick.Layouts 1.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
GroupBox {
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-custom.qml
index 2b8ab5a1..cb9ed049 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,14 +25,25 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+GroupBox {
+ id: control
+ title: qsTr("GroupBox")
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
background: Rectangle {
+ y: control.topPadding - control.padding
+ width: parent.width
+ height: parent.height - control.topPadding + control.padding
color: "transparent"
- border.color: "red"
+ border.color: "#21be2b"
+ radius: 2
+ }
+
+ Label {
+ text: qsTr("Content goes here!")
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-label.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-label.qml
index 53da863b..74d0ea52 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-label.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-label.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
GroupBox {
width: 100
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox.qml
index 81b234f4..f79f3aef 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox.qml
@@ -27,7 +27,7 @@
import QtQuick 2.0
import QtQuick.Layouts 1.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
GroupBox {
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate-custom.qml
index 10d5696e..002aae69 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,15 +25,37 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
ItemDelegate {
- text: "ItemDelegate"
- checked: true
- checkable: true
+ id: control
+ text: qsTr("ItemDelegate")
+
+ contentItem: Text {
+ rightPadding: control.spacing
+ text: control.text
+ font: control.font
+ color: control.enabled ? (control.down ? "#17a81a" : "#21be2b") : "#bdbebf"
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
background: Rectangle {
- color: 'transparent'
- border.color: 'red'
+ implicitWidth: 100
+ implicitHeight: 40
+ opacity: enabled ? 1 : 0.3
+ color: control.down ? "#dddedf" : "#eeeeee"
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ color: control.down ? "#17a81a" : "#21be2b"
+ anchors.bottom: parent.bottom
+ }
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate.qml
index d02f722a..143b3323 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-itemdelegate.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
ListView {
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label-custom.qml
new file mode 100644
index 00000000..98dbdc5e
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label-custom.qml
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Label {
+ text: qsTr("Label")
+ color: "#21be2b"
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-label.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label.qml
index cb26658d..4346c0eb 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-label.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
Label {
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-menu-contentItem.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-menu-custom.qml
index 0c270d34..a6971232 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-menu-contentItem.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-menu-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,8 +25,9 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
Item {
id: window
@@ -34,25 +35,26 @@ Item {
height: menu.contentItem.height
visible: true
- Menu {
- id: menu
- contentItem.parent: window
-
- MenuItem {
- text: "New..."
- }
- MenuItem {
- text: "Open..."
- }
- MenuItem {
- text: "Save"
- }
+// Indent it like this so that the indenting in the generated doc is normal.
+Menu {
+ id: menu
+ contentItem.parent: window
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 200
+ color: "#ffffff"
+ border.color: "#353637"
}
- Rectangle {
- parent: menu.contentItem
- anchors.fill: parent
- color: 'transparent'
- border.color: 'red'
+ MenuItem {
+ text: qsTr("New...")
+ }
+ MenuItem {
+ text: qsTr("Open...")
}
+ MenuItem {
+ text: qsTr("Save")
+ }
+}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-menu.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-custom.qml
index b0f32203..65112ef4 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-menu.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,27 +25,29 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
-Item {
- id: window
- width: menu.contentItem.width
- height: menu.contentItem.height
- visible: true
+PageIndicator {
+ id: control
+ count: 5
+ currentIndex: 2
- Menu {
- id: menu
- contentItem.parent: window
+ delegate: Rectangle {
+ implicitWidth: 8
+ implicitHeight: 8
- MenuItem {
- text: "New..."
- }
- MenuItem {
- text: "Open..."
- }
- MenuItem {
- text: "Save"
+ radius: width / 2
+ color: "#21be2b"
+
+ opacity: index === control.currentIndex ? 0.95 : pressed ? 0.7 : 0.45
+
+ Behavior on opacity {
+ OpacityAnimator {
+ duration: 100
+ }
}
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-frame-frame.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-delegate.qml
index e4c9e32b..4b3ccf23 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-frame-frame.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-delegate.qml
@@ -26,13 +26,13 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
-Frame {
- width: 100
- height: 100
+PageIndicator {
+ count: 5
+ currentIndex: 2
Rectangle {
- parent: frame
+ parent: contentItem.children[0]
anchors.fill: parent
color: 'transparent'
border.color: 'red'
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-interactive.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-interactive.qml
new file mode 100644
index 00000000..88cadc27
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-interactive.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick.Controls 2.0
+
+Pane {
+//! [1]
+SwipeView {
+ id: view
+ currentIndex: pageIndicator.currentIndex
+ anchors.fill: parent
+
+ Page {
+ title: qsTr("Home")
+ }
+ Page {
+ title: qsTr("Discover")
+ }
+ Page {
+ title: qsTr("Activity")
+ }
+}
+
+PageIndicator {
+ id: pageIndicator
+ interactive: true
+ count: view.count
+ currentIndex: view.currentIndex
+
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-busyindicator.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator.qml
index 703161a4..237bc6e7 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-busyindicator.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator.qml
@@ -24,9 +24,12 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
-BusyIndicator {
+//! [1]
+PageIndicator {
+ count: 5
+ currentIndex: 2
}
+//! [1]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-pane-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane-custom.qml
index d1d9f22f..80519939 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-pane-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,14 +25,17 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
Pane {
- width: 100
- height: 100
background: Rectangle {
- color: 'transparent'
- border.color: 'red'
+ color: "#eeeeee"
+ }
+
+ Label {
+ text: qsTr("Content goes here!")
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-pane.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane.qml
index 09bfa6a0..3d86499f 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-pane.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane.qml
@@ -27,7 +27,7 @@
import QtQuick 2.0
import QtQuick.Layouts 1.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
Pane {
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-popup-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-popup-custom.qml
new file mode 100644
index 00000000..6b427611
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-popup-custom.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+import QtQuick.Window 2.2
+
+Item {
+ id: root
+ width: 200
+ height: 200
+
+ Binding {
+ target: popup
+ property: "visible"
+ value: root.Window.active
+ }
+//! [1]
+Popup {
+ id: popup
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 200
+ border.color: "#444"
+ }
+ contentItem: Column {}
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-slider-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-custom.qml
index 03f3137f..88faed20 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-slider-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-custom.qml
@@ -25,13 +25,32 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
-Slider {
+ProgressBar {
+ id: control
value: 0.5
+ padding: 2
+
background: Rectangle {
- color: "transparent"
- border.color: "red"
+ implicitWidth: 200
+ implicitHeight: 6
+ color: "#e6e6e6"
+ radius: 3
+ }
+
+ contentItem: Item {
+ implicitWidth: 200
+ implicitHeight: 4
+
+ Rectangle {
+ width: control.visualPosition * parent.width
+ height: parent.height
+ radius: 2
+ color: "#17a81a"
+ }
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-checked.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-custom.qml
index 49f82a5c..dba262be 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-checked.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-custom.qml
@@ -25,10 +25,42 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
RadioButton {
- text: "Checked"
+ id: control
+ text: qsTr("RadioButton")
checked: true
+
+ indicator: Rectangle {
+ implicitWidth: 26
+ implicitHeight: 26
+ x: control.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 13
+ border.color: control.down ? "#17a81a" : "#21be2b"
+
+ Rectangle {
+ width: 14
+ height: 14
+ x: 6
+ y: 6
+ radius: 7
+ color: control.down ? "#17a81a" : "#21be2b"
+ visible: control.checked
+ }
+ }
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ leftPadding: control.indicator.width + control.spacing
+ }
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiodelegate-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiodelegate-custom.qml
new file mode 100644
index 00000000..6efb7803
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiodelegate-custom.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+RadioDelegate {
+ id: control
+ text: qsTr("RadioDelegate")
+ checked: true
+
+ contentItem: Text {
+ rightPadding: control.indicator.width + control.spacing
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ indicator: Rectangle {
+ implicitWidth: 26
+ implicitHeight: 26
+ x: control.width - width - control.rightPadding
+ y: parent.height / 2 - height / 2
+ radius: 13
+ color: "transparent"
+ border.color: control.down ? "#17a81a" : "#21be2b"
+
+ Rectangle {
+ width: 14
+ height: 14
+ x: 6
+ y: 6
+ radius: 7
+ color: control.down ? "#17a81a" : "#21be2b"
+ visible: control.checked
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? "#bdbebf" : "#eeeeee"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-custom.qml
new file mode 100644
index 00000000..7e488d14
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-custom.qml
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+RangeSlider {
+ id: control
+ first.value: 0.25
+ second.value: 0.75
+
+ background: Rectangle {
+ x: control.leftPadding
+ y: control.topPadding + control.availableHeight / 2 - height / 2
+ implicitWidth: 200
+ implicitHeight: 4
+ width: control.availableWidth
+ height: implicitHeight
+ radius: 2
+ color: "#bdbebf"
+
+ Rectangle {
+ x: control.first.visualPosition * parent.width
+ width: control.second.visualPosition * parent.width - x
+ height: parent.height
+ color: "#21be2b"
+ radius: 2
+ }
+ }
+
+ first.handle: Rectangle {
+ x: control.leftPadding + first.visualPosition * (control.availableWidth - width)
+ y: control.topPadding + control.availableHeight / 2 - height / 2
+ implicitWidth: 26
+ implicitHeight: 26
+ radius: 13
+ color: first.pressed ? "#f0f0f0" : "#f6f6f6"
+ border.color: "#bdbebf"
+ }
+
+ second.handle: Rectangle {
+ x: control.leftPadding + second.visualPosition * (control.availableWidth - width)
+ y: control.topPadding + control.availableHeight / 2 - height / 2
+ implicitWidth: 26
+ implicitHeight: 26
+ radius: 13
+ color: second.pressed ? "#f0f0f0" : "#f6f6f6"
+ border.color: "#bdbebf"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-frame.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-active.qml
index 49ecc00d..086541c8 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-frame.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-active.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -26,16 +26,21 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
-GroupBox {
+Item {
width: 100
height: 100
- title: "GroupBox"
- Rectangle {
- parent: frame
+
+ //! [1]
+ Flickable {
anchors.fill: parent
- color: 'transparent'
- border.color: 'red'
+
+ contentWidth: parent.width * 2
+ contentHeight: parent.height * 2
+
+ ScrollBar.horizontal: ScrollBar { id: hbar; active: vbar.active }
+ ScrollBar.vertical: ScrollBar { id: vbar; active: hbar.active }
}
+ //! [1]
}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-scrollbar-handle.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-custom.qml
index 45cde698..0bf13b3c 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-scrollbar-handle.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,18 +25,22 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
ScrollBar {
- size: 0.5
- position: 0.5
+ id: control
+ size: 0.3
+ position: 0.2
active: true
- height: 100
- Rectangle {
- parent: handle
- anchors.fill: parent
- color: "transparent"
- border.color: "red"
+ orientation: Qt.Vertical
+
+ contentItem: Rectangle {
+ implicitWidth: 6
+ implicitHeight: 100
+ radius: width / 2
+ color: control.pressed ? "#81e889" : "#c2f4c6"
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-active.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-active.qml
new file mode 100644
index 00000000..c118c7aa
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-active.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+
+Item {
+ width: 100
+ height: 100
+
+ //! [1]
+ Flickable {
+ anchors.fill: parent
+
+ contentWidth: parent.width * 2
+ contentHeight: parent.height * 2
+
+ ScrollIndicator.horizontal: ScrollIndicator { id: hbar; active: vbar.active }
+ ScrollIndicator.vertical: ScrollIndicator { id: vbar; active: hbar.active }
+ }
+ //! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-custom.qml
index b276e8ae..5720f4f7 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-scrollindicator-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,16 +25,21 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
ScrollIndicator {
- size: 0.5
- position: 0.5
+ id: control
+ size: 0.3
+ position: 0.2
active: true
- height: 100
- background: Rectangle {
- color: "transparent"
- border.color: "red"
+ orientation: Qt.Vertical
+
+ contentItem: Rectangle {
+ implicitWidth: 2
+ implicitHeight: 100
+ color: "#c2f4c6"
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-custom.qml
new file mode 100644
index 00000000..ebc11f46
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-custom.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Slider {
+ id: control
+ value: 0.5
+
+ background: Rectangle {
+ x: control.leftPadding
+ y: control.topPadding + control.availableHeight / 2 - height / 2
+ implicitWidth: 200
+ implicitHeight: 4
+ width: control.availableWidth
+ height: implicitHeight
+ radius: 2
+ color: "#bdbebf"
+
+ Rectangle {
+ width: control.visualPosition * parent.width
+ height: parent.height
+ color: "#21be2b"
+ radius: 2
+ }
+ }
+
+ handle: Rectangle {
+ x: control.leftPadding + control.visualPosition * (control.availableWidth - width)
+ y: control.topPadding + control.availableHeight / 2 - height / 2
+ implicitWidth: 26
+ implicitHeight: 26
+ radius: 13
+ color: control.pressed ? "#f0f0f0" : "#f6f6f6"
+ border.color: "#bdbebf"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-slider-handle.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-handle.qml
index 58bd139e..20b569f3 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-slider-handle.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-handle.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Slider {
value: 0.5
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-custom.qml
new file mode 100644
index 00000000..6433fd80
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-custom.qml
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+SpinBox {
+ id: control
+ value: 50
+ editable: true
+
+ contentItem: TextInput {
+ z: 2
+ text: control.textFromValue(control.value, control.locale)
+
+ font: control.font
+ color: "#21be2b"
+ selectionColor: "#21be2b"
+ selectedTextColor: "#ffffff"
+ horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
+
+ readOnly: !control.editable
+ validator: control.validator
+ inputMethodHints: Qt.ImhFormattedNumbersOnly
+ }
+
+ up.indicator: Rectangle {
+ x: control.mirrored ? 0 : parent.width - width
+ height: parent.height
+ implicitWidth: 40
+ implicitHeight: 40
+ color: up.pressed ? "#e4e4e4" : "#f6f6f6"
+ border.color: enabled ? "#21be2b" : "#bdbebf"
+
+ Text {
+ text: "+"
+ font.pixelSize: control.font.pixelSize * 2
+ color: "#21be2b"
+ anchors.fill: parent
+ fontSizeMode: Text.Fit
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+ }
+
+ down.indicator: Rectangle {
+ x: control.mirrored ? parent.width - width : 0
+ height: parent.height
+ implicitWidth: 40
+ implicitHeight: 40
+ color: down.pressed ? "#e4e4e4" : "#f6f6f6"
+ border.color: enabled ? "#21be2b" : "#bdbebf"
+
+ Text {
+ text: "-"
+ font.pixelSize: control.font.pixelSize * 2
+ color: "#21be2b"
+ anchors.fill: parent
+ fontSizeMode: Text.Fit
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 140
+ border.color: "#bdbebf"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-double.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-double.qml
new file mode 100644
index 00000000..15af31ae
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-double.qml
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+//! [1]
+SpinBox {
+ id: spinbox
+ from: 0
+ value: 110
+ to: 100 * 100
+ stepSize: 100
+ anchors.centerIn: parent
+
+ property int decimals: 2
+ property real realValue: value / 100
+
+ validator: DoubleValidator {
+ bottom: Math.min(spinbox.from, spinbox.to)
+ top: Math.max(spinbox.from, spinbox.to)
+ }
+
+ textFromValue: function(value, locale) {
+ return Number(value / 100).toLocaleString(locale, 'f', spinbox.decimals)
+ }
+
+ valueFromText: function(text, locale) {
+ return Number.fromLocaleString(locale, text) * 100
+ }
+}
+//! [1]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-down.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-down.qml
index 2294741c..419dae5c 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-down.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-down.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
SpinBox {
value: 50
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-textual.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-textual.qml
index b7d7b9b8..814b8b28 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-textual.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-textual.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
SpinBox {
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-up.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-up.qml
index dc6887c0..b4b0fab3 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox-up.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-up.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
SpinBox {
value: 50
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox.qml
index a8adfbd6..6616ed60 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-spinbox.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
SpinBox {
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipedelegate-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipedelegate-custom.qml
new file mode 100644
index 00000000..ae63efed
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipedelegate-custom.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+SwipeDelegate {
+ id: control
+ text: qsTr("SwipeDelegate")
+
+ Component {
+ id: component
+
+ Rectangle {
+ color: control.swipe.complete && control.down ? "#333" : "#444"
+ width: parent.width
+ height: parent.height
+ clip: true
+
+ Label {
+ text: qsTr("Press me!")
+ color: "#21be2b"
+ anchors.centerIn: parent
+ }
+ }
+ }
+
+ swipe.left: component
+ swipe.right: component
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ color: control.enabled ? (control.down ? "#17a81a" : "#21be2b") : "#bdbebf"
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ Behavior on x {
+ enabled: !control.down
+ NumberAnimation {
+ easing.type: Easing.InOutCubic
+ duration: 400
+ }
+ }
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-swipeview-indicator.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipeview-indicator.qml
index c3a38b92..2ba8df9c 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-swipeview-indicator.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipeview-indicator.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Item {
width: 200
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch-checked.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-checked.qml
index 4a2ff8f9..f9a18b1c 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch-checked.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-checked.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Switch {
text: "Checked"
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-custom.qml
new file mode 100644
index 00000000..698c1a05
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-custom.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Switch {
+ id: control
+ text: qsTr("Switch")
+
+ indicator: Rectangle {
+ implicitWidth: 48
+ implicitHeight: 26
+ x: control.leftPadding
+ y: parent.height / 2 - height / 2
+ radius: 13
+ color: control.checked ? "#17a81a" : "#ffffff"
+ border.color: control.checked ? "#17a81a" : "#cccccc"
+
+ Rectangle {
+ x: control.checked ? parent.width - width : 0
+ width: 26
+ height: 26
+ radius: 13
+ color: control.down ? "#cccccc" : "#ffffff"
+ border.color: control.checked ? (control.down ? "#17a81a" : "#21be2b") : "#999999"
+ }
+ }
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ leftPadding: control.indicator.width + control.spacing
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-disabled.qml
index c84afdb1..a40586b5 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch-disabled.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-disabled.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Switch {
text: "Disabled"
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-focused.qml
index e1b5bd3f..f98f2c90 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch-focused.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-focused.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Switch {
text: "Focused"
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-switch-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-normal.qml
index 9a766524..a55c2854 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-switch-normal.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-normal.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Switch {
text: "Normal"
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switchdelegate-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switchdelegate-custom.qml
new file mode 100644
index 00000000..8d0daa0a
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switchdelegate-custom.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+SwitchDelegate {
+ id: control
+ text: qsTr("SwitchDelegate")
+ checked: true
+
+ contentItem: Text {
+ rightPadding: control.indicator.width + control.spacing
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ indicator: Rectangle {
+ implicitWidth: 48
+ implicitHeight: 26
+ x: control.width - width - control.rightPadding
+ y: parent.height / 2 - height / 2
+ radius: 13
+ color: control.checked ? "#17a81a" : "transparent"
+ border.color: control.checked ? "#17a81a" : "#cccccc"
+
+ Rectangle {
+ x: control.checked ? parent.width - width : 0
+ width: 26
+ height: 26
+ radius: 13
+ color: control.down ? "#cccccc" : "#ffffff"
+ border.color: control.checked ? (control.down ? "#17a81a" : "#21be2b") : "#999999"
+ }
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ visible: control.down || control.highlighted
+ color: control.down ? "#bdbebf" : "#eeeeee"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-frame-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-custom.qml
index 08084e61..1873fba9 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-frame-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,14 +25,25 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+TabBar {
+ id: control
-Frame {
- width: 100
- height: 100
background: Rectangle {
- color: 'transparent'
- border.color: 'red'
+ color: "#eeeeee"
+ }
+
+ TabButton {
+ text: qsTr("Home")
+ }
+ TabButton {
+ text: qsTr("Discover")
+ }
+ TabButton {
+ text: qsTr("Activity")
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml
new file mode 100644
index 00000000..f3e24f10
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Item {
+ width: 360
+ height: childrenRect.height
+
+//! [1]
+TabBar {
+ width: parent.width
+ TabButton {
+ text: "First"
+ width: implicitWidth
+ }
+ TabButton {
+ text: "Second"
+ width: implicitWidth
+ }
+ TabButton {
+ text: "Third"
+ width: implicitWidth
+ }
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-track.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-flickable.qml
index 858cb727..2a4fac0e 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-rangeslider-track.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-flickable.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,15 +25,26 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick 2.6
+import QtQuick.Controls 2.0
-RangeSlider {
- first.value: 0.25
- second.value: 0.75
- Rectangle {
- anchors.fill: track
- color: "transparent"
- border.color: "red"
+Item {
+ width: 360
+ height: bar.height
+
+//! [1]
+TabBar {
+ id: bar
+ width: parent.width
+
+ Repeater {
+ model: ["First", "Second", "Third", "Fourth", "Fifth"]
+
+ TabButton {
+ text: modelData
+ width: Math.max(100, bar.width / 5)
+ }
}
}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-tabbar.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar.qml
index a0282d91..b445ee67 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-tabbar.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar.qml
@@ -27,7 +27,7 @@
import QtQuick 2.0
import QtQuick.Layouts 1.3
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Column {
width: 300
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-tabbutton.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbutton.qml
index 5412db66..67e5e1e0 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-tabbutton.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbutton.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
//! [1]
TabBar {
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-custom.qml
index 480aa8e6..f70c7135 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-groupbox-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,15 +25,18 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+TextArea {
+ id: control
+ placeholderText: qsTr("Enter description")
-GroupBox {
- width: 100
- height: 100
- title: "GroupBox"
background: Rectangle {
- color: 'transparent'
- border.color: 'red'
+ implicitWidth: 200
+ implicitHeight: 40
+ border.color: control.enabled ? "#21be2b" : "transparent"
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-pageindicator.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-flickable.qml
index f13e1213..e11750cb 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-pageindicator.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-flickable.qml
@@ -26,18 +26,25 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
-Frame {
+Item {
width: 100
height: 100
+ Binding { target: flickable.ScrollBar.vertical; property: "active"; value: true }
+
//! [1]
- PageIndicator {
- count: 5
- currentIndex: 2
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: parent.bottom
+ Flickable {
+ id: flickable
+ anchors.fill: parent
+
+ TextArea.flickable: TextArea {
+ text: "TextArea\n...\n...\n...\n...\n...\n...\n"
+ wrapMode: TextArea.Wrap
+ }
+
+ ScrollBar.vertical: ScrollBar { }
}
//! [1]
}
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-custom.qml
new file mode 100644
index 00000000..0deb0e5c
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-custom.qml
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+TextField {
+ id: control
+ placeholderText: qsTr("Enter description")
+
+ background: Rectangle {
+ implicitWidth: 200
+ implicitHeight: 40
+ color: control.enabled ? "transparent" : "#353637"
+ border.color: control.enabled ? "#21be2b" : "transparent"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-disabled.qml
index e4359d57..ac798f53 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-disabled.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-disabled.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
TextField {
width: 80
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-focused.qml
index 9bbcb8ad..a4e1b3b1 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-focused.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-focused.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
TextField {
width: 80
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-normal.qml
index de360a33..12c7ead9 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-textfield-normal.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-normal.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
TextField {
width: 80
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-toolbar.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar-custom.qml
index 7def9a83..3e98808c 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-toolbar.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,21 +25,35 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick 2.6
import QtQuick.Layouts 1.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
+//! [file]
ToolBar {
+ id: control
+
+ background: Rectangle {
+ implicitHeight: 40
+ color: "#eeeeee"
+
+ Rectangle {
+ width: parent.width
+ height: 1
+ anchors.bottom: parent.bottom
+ color: "transparent"
+ border.color: "#21be2b"
+ }
+ }
+
RowLayout {
anchors.fill: parent
ToolButton {
- text: qsTr("\u25C0 Qt")
- onClicked: stack.pop()
+ text: qsTr("Undo")
}
- Item { Layout.fillWidth: true }
- Switch {
- checked: true
- text: qsTr("Notifications")
+ ToolButton {
+ text: qsTr("Redo")
}
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml
new file mode 100644
index 00000000..246f3ae5
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.0
+import QtQuick.Controls 2.0
+
+Item {
+ width: children[0].implicitWidth * 2
+ height: children[0].implicitHeight
+ Binding {
+ target: children[0]
+ property: "width"
+ value: width
+ }
+//! [1]
+ToolBar {
+ RowLayout {
+ anchors.fill: parent
+ ToolButton {
+ text: qsTr("‹")
+ onClicked: stack.pop()
+ }
+ Label {
+ text: "Title"
+ elide: Label.ElideRight
+ horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
+ Layout.fillWidth: true
+ }
+ ToolButton {
+ text: qsTr("â‹®")
+ onClicked: menu.open()
+ }
+ }
+}
+//! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-background.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbutton-custom.qml
index d7c6d258..10491cb5 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-radiobutton-background.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbutton-custom.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -25,13 +25,31 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+ToolButton {
+ id: control
+ text: qsTr("ToolButton")
+ width: 120
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
-RadioButton {
- text: "RadioButton"
background: Rectangle {
- color: "transparent"
- border.color: "red"
+ implicitWidth: 40
+ implicitHeight: 40
+ color: Qt.darker("#33333333", control.enabled && (control.checked || control.highlighted) ? 1.5 : 1.0)
+ opacity: enabled ? 1 : 0.3
+ visible: control.down || (control.enabled && (control.checked || control.highlighted))
}
}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-hover.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-hover.qml
new file mode 100644
index 00000000..330ab83c
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-hover.qml
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+
+//! [1]
+Button {
+ text: qsTr("Button")
+ hoverEnabled: true
+
+ ToolTip.delay: 1000
+ ToolTip.timeout: 5000
+ ToolTip.visible: hovered
+ ToolTip.text: qsTr("This tool tip is shown after hovering the button for a second.")
+}
+//! [1]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-pressandhold.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-pressandhold.qml
new file mode 100644
index 00000000..eddb09e6
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-pressandhold.qml
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Controls 2.0
+
+//! [1]
+Button {
+ text: qsTr("Button")
+
+ ToolTip.visible: pressed
+ ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
+ ToolTip.text: qsTr("This tool tip is shown after pressing and holding the button down.")
+}
+//! [1]
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-slider.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-slider.qml
new file mode 100644
index 00000000..e6a386c1
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-slider.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Window 2.2
+import QtQuick.Controls 2.0
+
+Item {
+ id: root
+ width: slider.width
+ height: slider.height * 2.0
+
+ Binding { target: slider.anchors; property: "centerIn"; value: root }
+ Binding { target: slider.anchors; property: "verticalCenterOffset"; value: slider.height / 2 }
+ Binding { target: slider; property: "pressed"; value: root.Window.active }
+
+ //! [1]
+ Slider {
+ id: slider
+ value: 0.5
+
+ ToolTip {
+ parent: slider.handle
+ visible: slider.pressed
+ text: slider.position.toFixed(1)
+ }
+ }
+ //! [1]
+}
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-combobox.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml
index 4d7fe7fd..146fe477 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-combobox.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -26,18 +26,26 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Window 2.2
+import QtQuick.Controls 2.0
Item {
id: root
- width: combo.width
- height: combo.height + combo.popup.contentItem.height
+ width: 360
+ height: button.height * 2
+
+ property Button button: children[0]
+
+ Binding { target: button; property: "down"; value: root.Window.active }
+ Binding { target: button.anchors; property: "bottom"; value: root.bottom }
+ Binding { target: button.anchors; property: "horizontalCenter"; value: root.horizontalCenter }
+
//! [1]
- ComboBox {
- id: combo
- model: ["First", "Second", "Third"]
- popup.contentItem.parent: root
- popup.contentItem.y: combo.height
+ Button {
+ text: qsTr("Save")
+
+ ToolTip.visible: down
+ ToolTip.text: qsTr("Save the active project")
}
//! [1]
}
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-custom.qml
new file mode 100644
index 00000000..d2b4f960
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-custom.qml
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.0
+
+Tumbler {
+ id: control
+ model: 15
+ visibleItemCount: 5
+
+ background: Item {
+ Rectangle {
+ opacity: control.enabled ? 0.2 : 0.1
+ border.color: "#000000"
+ width: parent.width
+ height: 1
+ anchors.top: parent.top
+ }
+
+ Rectangle {
+ opacity: control.enabled ? 0.2 : 0.1
+ border.color: "#000000"
+ width: parent.width
+ height: 1
+ anchors.bottom: parent.bottom
+ }
+ }
+
+ delegate: Text {
+ text: qsTr("Item %1").arg(modelData + 1)
+ font: control.font
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ opacity: 1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)
+ }
+
+ Rectangle {
+ anchors.horizontalCenter: control.horizontalCenter
+ y: control.height * 0.4
+ width: 40
+ height: 1
+ color: "#21be2b"
+ }
+
+ Rectangle {
+ anchors.horizontalCenter: control.horizontalCenter
+ y: control.height * 0.6
+ width: 40
+ height: 1
+ color: "#21be2b"
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler-delegate.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-delegate.qml
index cf18fd93..4d389ab7 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler-delegate.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-delegate.qml
@@ -26,7 +26,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.controls 1.0
+import QtQuick.Controls 2.0
Tumbler {
id: tumbler
diff --git a/src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc b/src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc
index 02e92bf0..d99b3880 100644
--- a/src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc
+++ b/src/imports/controls/doc/src/calendar/qtlabscalendar-index.qdoc
@@ -39,11 +39,13 @@
\generatelist {qmltypesbymodule Qt.labs.calendar}
+ \labs
+
\section1 Related Information
\list
\li \l{Qt Quick}
\li \l{Qt Quick Layouts}
- \li \l{Qt Labs Controls}
+ \li \l{Qt Quick Controls 2}
\endlist
*/
diff --git a/src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc b/src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc
index f483ae91..a94e5ec6 100644
--- a/src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc
+++ b/src/imports/controls/doc/src/calendar/qtlabscalendar.qdoc
@@ -33,7 +33,7 @@
The \l{Qt Labs Calendar} module provides QML types for creating
calendars. These QML types work in conjunction with \l{Qt Quick} and
- \l{Qt Labs Controls}.
+ \l{Qt Quick Controls 2}.
The QML types can be imported into your application using the
following import statement in your .qml file:
@@ -46,10 +46,12 @@
\generatelist {qmltypesbymodule Qt.labs.calendar}
+ \labs
+
\section1 Related Information
\list
- \li \l {Qt Labs Controls QML Types}
+ \li \l {Qt Quick Controls 2 QML Types}
\endlist
\noautolist
diff --git a/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc b/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc
new file mode 100644
index 00000000..02d92de0
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickcontrol-background.qdocinc
@@ -0,0 +1,13 @@
+//! [notes]
+
+\note If the background item has no explicit size specified, it automatically
+ follows the control's size. In most cases, there is no need to specify
+ width or height for a background item.
+
+\note Most controls use the implicit size of the background item to calculate
+the implicit size of the control itself. If you replace the background item
+with a custom one, you should also consider providing a sensible implicit
+size for it (unless it is an item like \l Image which has its own implicit
+size).
+
+//! [notes]
diff --git a/src/imports/controls/doc/src/includes/qquickcontrol-focusreason.qdocinc b/src/imports/controls/doc/src/includes/qquickcontrol-focusreason.qdocinc
new file mode 100644
index 00000000..b69e9e60
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickcontrol-focusreason.qdocinc
@@ -0,0 +1,15 @@
+This property holds the reason of the last focus change.
+
+\note This property does not indicate whether the control has \l {Item::activeFocus}
+ {active focus}, but the reason why the control either gained or lost focus.
+
+\value Qt.MouseFocusReason A mouse action occurred.
+\value Qt.TabFocusReason The Tab key was pressed.
+\value Qt.BacktabFocusReason A Backtab occurred. The input for this may include the Shift or Control keys; e.g. Shift+Tab.
+\value Qt.ActiveWindowFocusReason The window system made this window either active or inactive.
+\value Qt.PopupFocusReason The application opened/closed a pop-up that grabbed/released the keyboard focus.
+\value Qt.ShortcutFocusReason The user typed a label's buddy shortcut
+\value Qt.MenuBarFocusReason The menu bar took focus.
+\value Qt.OtherFocusReason Another reason, usually application-specific.
+
+\sa Item::activeFocus
diff --git a/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc b/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc
new file mode 100644
index 00000000..c5d94279
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickmaterialstyle.qdocinc
@@ -0,0 +1,63 @@
+//! [conf]
+\table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c Theme
+ \li Specifies the default \l {material-theme-attached-prop}{Material theme}.
+ The value can be one of the available themes, for example \c "Dark".
+ \row
+ \li \c Accent
+ \li Specifies the default \l {material-accent-attached-prop}{Material accent color}.
+ The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use
+ one of the \l {pre-defined Material colors}, for example \c "Teal".
+ \row
+ \li \c Primary
+ \li Specifies the default \l {material-primary-attached-prop}{Material primary color}.
+ The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use
+ one of the \l {pre-defined Material colors}, for example \c "BlueGrey".
+ \row
+ \li \c Foreground
+ \li Specifies the default \l {material-foreground-attached-prop}{Material foreground color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors},
+ for example \c "Brown".
+ \row
+ \li \c Background
+ \li Specifies the default \l {material-background-attached-prop}{Material background color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors},
+ for example \c "Grey".
+\endtable
+//! [conf]
+
+//! [env]
+\table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c QT_QUICK_CONTROLS_MATERIAL_THEME
+ \li Specifies the default \l {material-theme-attached-prop}{Material theme}.
+ The value can be one of the available themes, for example \c "Dark".
+ \row
+ \li \c QT_QUICK_CONTROLS_MATERIAL_ACCENT
+ \li Specifies the default \l {material-accent-attached-prop}{Material accent color}.
+ The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use
+ one of the \l {pre-defined Material colors}, for example \c "Teal".
+ \row
+ \li \c QT_QUICK_CONTROLS_MATERIAL_PRIMARY
+ \li Specifies the default \l {material-primary-attached-prop}{Material primary color}.
+ The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use
+ one of the \l {pre-defined Material colors}, for example \c "BlueGrey".
+ \row
+ \li \c QT_QUICK_CONTROLS_MATERIAL_FOREGROUND
+ \li Specifies the default \l {material-foreground-attached-prop}{Material foreground color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors},
+ for example \c "Brown".
+ \row
+ \li \c QT_QUICK_CONTROLS_MATERIAL_BACKGROUND
+ \li Specifies the default \l {material-background-attached-prop}{Material background color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Material colors},
+ for example \c "Grey".
+\endtable
+//! [env]
diff --git a/src/imports/controls/doc/src/includes/qquickpopup-padding.qdocinc b/src/imports/controls/doc/src/includes/qquickpopup-padding.qdocinc
new file mode 100644
index 00000000..31f5d2db
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickpopup-padding.qdocinc
@@ -0,0 +1,10 @@
+//! [padding]
+
+The padding properties are used to control the geometry of the
+\l {contentItem}{content item}.
+
+Popup uses the same approach to padding as \l {Control::padding}{Control}.
+For a visual explanation of the padding system, see the \l {Control Layout}
+section of the documentation.
+
+//! [padding]
diff --git a/src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc b/src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc
new file mode 100644
index 00000000..05aeadb6
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickswipedelegate-interaction.qdocinc
@@ -0,0 +1,5 @@
+Both interactive and non-interactive items can be used here. Normal
+event handling rules apply; if an interactive control like \l Button
+is used, interaction signals of SwipeDelegate such as
+\l {AbstractButton::}{clicked()} will not get emitted if the button
+is clicked.
diff --git a/src/imports/controls/doc/src/includes/qquickswitch.qdocinc b/src/imports/controls/doc/src/includes/qquickswitch.qdocinc
new file mode 100644
index 00000000..985f85d9
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickswitch.qdocinc
@@ -0,0 +1,28 @@
+//! [position]
+
+This property holds the logical position of the thumb indicator.
+
+The position is expressed as a fraction of the indicator's size, in the range
+\c 0.0 - \c 1.0. The position can be used for example to determine whether
+the thumb has been dragged past the halfway point. For visualizing a thumb
+indicator, the right-to-left aware \l visualPosition should be used instead.
+
+\sa visualPosition
+
+//! [position]
+
+
+//! [visualPosition]
+
+This property holds the visual position of the thumb indicator.
+
+The position is expressed as a fraction of the indicator's size, in the range
+\c 0.0 - \c 1.0. When the control is \l {Control::mirrored}{mirrored}, the
+value is equal to \c {1.0 - position}. This makes the value suitable for
+visualizing the thumb indicator taking right-to-left support into account.
+In order to for example determine whether the thumb has been dragged past
+the halfway point, the logical \l position should be used instead.
+
+\sa position
+
+//! [visualPosition]
diff --git a/src/imports/controls/doc/src/includes/qquickuniversalstyle.qdocinc b/src/imports/controls/doc/src/includes/qquickuniversalstyle.qdocinc
new file mode 100644
index 00000000..a7ecbaef
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/qquickuniversalstyle.qdocinc
@@ -0,0 +1,53 @@
+//! [conf]
+\table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c Theme
+ \li Specifies the default \l {universal-theme-attached-prop}{Universal theme}.
+ The value can be one of the available themes, for example \c "Dark".
+ \row
+ \li \c Accent
+ \li Specifies the default \l {universal-accent-attached-prop}{Universal accent color}.
+ The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use
+ one of the \l {pre-defined Universal colors}, for example \c "Violet".
+ \row
+ \li \c Foreground
+ \li Specifies the default \l {universal-foreground-attached-prop}{Universal foreground color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors},
+ for example \c "Brown".
+ \row
+ \li \c Background
+ \li Specifies the default \l {universal-background-attached-prop}{Universal background color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors},
+ for example \c "Steel".
+\endtable
+//! [conf]
+
+//! [env]
+\table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c QT_QUICK_CONTROLS_UNIVERSAL_THEME
+ \li Specifies the default \l {universal-theme-attached-prop}{Universal theme}.
+ The value can be one of the available themes, for example \c "Dark".
+ \row
+ \li \c QT_QUICK_CONTROLS_UNIVERSAL_ACCENT
+ \li Specifies the default \l {universal-accent-attached-prop}{Universal accent color}.
+ The value can be any \l {colorbasictypedocs}{color}, but it is recommended to use
+ one of the \l {pre-defined Universal colors}, for example \c "Violet".
+ \row
+ \li \c QT_QUICK_CONTROLS_UNIVERSAL_FOREGROUND
+ \li Specifies the default \l {universal-foreground-attached-prop}{Universal foreground color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors},
+ for example \c "Brown".
+ \row
+ \li \c QT_QUICK_CONTROLS_UNIVERSAL_BACKGROUND
+ \li Specifies the default \l {universal-background-attached-prop}{Universal background color}.
+ The value can be any \l {colorbasictypedocs}{color}, or one of the \l {pre-defined Universal colors},
+ for example \c "Steel".
+\endtable
+//! [env]
diff --git a/src/imports/controls/doc/src/qtlabscontrols-buttons.qdoc b/src/imports/controls/doc/src/qtlabscontrols-buttons.qdoc
deleted file mode 100644
index 562b21c6..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-buttons.qdoc
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscontrols-buttons.html
- \title Button Controls
-
- Qt Labs Controls offers a selection of button-like controls.
-
- \annotatedlist qtlabscontrols-buttons
-
- Each type of button has its own specific target use case. The following
- sections offer guidelines for choosing the appropriate type of button,
- depending on the use case.
-
- \section1 Button Control
-
- \image qtlabscontrols-button.png
-
- \l Button presents a push-button control that can be pushed or clicked
- by the user. Buttons are normally used to perform an action, or to answer
- a question. Typical buttons are \e OK, \e Apply, \e Cancel, \e Close,
- \e Yes, \e No, and \e Help.
-
- \section1 CheckBox Control
-
- \image qtlabscontrols-checkbox.png
-
- \l CheckBox presents an option button that can be toggled on (checked)
- or off (unchecked). Check boxes are typically used to select one or more
- options from a set of options.
-
- \section1 RadioButton Control
-
- \image qtlabscontrols-radiobutton.png
-
- \l RadioButton presents an option button that can be toggled on (checked)
- or off (unchecked). Radio buttons are typically used to select one option
- from a set of options.
-
- \section1 Switch Control
-
- \image qtlabscontrols-switch.png
-
- \l Switch is an option button that can be dragged or toggled on (checked)
- or off (unchecked). Switches are typically used to select between two
- states.
-
- \section1 ToolButton Control
-
- \image qtlabscontrols-toolbutton.png
-
- \l ToolButton is functionally similar to \l Button, but provides a look
- that is more suitable within a \l ToolBar.
-*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-customize.qdoc b/src/imports/controls/doc/src/qtlabscontrols-customize.qdoc
deleted file mode 100644
index 4aff46a4..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-customize.qdoc
+++ /dev/null
@@ -1,593 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscontrols-customize.html
- \title Customizing Qt Labs Controls
- \brief A set of UI controls to create user interfaces in Qt Quick
-
- Qt Labs Controls consist of a hierarchy (tree) of items. In order to
- provide a custom look and feel, the default QML implementation of each
- item can be replaced with a custom one. The following snippets present
- the default implementations of various items. These can be used as a
- starting point to implement a custom look and feel.
-
- \section1 Customizing BusyIndicator
-
- BusyIndicator consists of two visual items: \l {Control::background}{background}
- and \l {Control::contentItem}{contentItem}.
-
- \section3 Background
-
- \image qtlabscontrols-busyindicator-background.png
-
- BusyIndicator has no background item by default.
-
- \section3 Content item
-
- \image qtlabscontrols-busyindicator-contentItem.png
-
- \snippet BusyIndicator.qml contentItem
-
-
- \section1 Customizing Button
-
- Button consists of two visual items: \l {Control::background}{background}
- and \l {AbstractButton::label}{label}.
-
- \section3 Background
-
- \image qtlabscontrols-button-background.png
-
- \snippet Button.qml background
-
- \section3 Label
-
- \image qtlabscontrols-button-label.png
-
- \snippet Button.qml label
-
-
- \section1 Customizing CheckBox
-
- CheckBox consists of three visual items: \l {Control::background}{background},
- \l {AbstractButton::label}{label} and \l {AbstractButton::indicator}{indicator}.
-
- \section3 Background
-
- \image qtlabscontrols-checkbox-background.png
-
- CheckBox has no background item by default.
-
- \section3 Label
-
- \image qtlabscontrols-checkbox-label.png
-
- \snippet CheckBox.qml label
-
- \section3 Indicator
-
- \image qtlabscontrols-checkbox-indicator.png
-
- \snippet CheckBox.qml indicator
-
-
- \section1 Customizing ComboBox
-
- ComboBox consists of \l {Control::background}{background},
- \l {Control::contentItem}{content item}, \l {ComboBox::popup}{popup},
- and \l {ComboBox::delegate}{delegate}.
-
- \section3 Background
-
- \image qtlabscontrols-combobox-background.png
-
- \snippet ComboBox.qml background
-
- \section3 Content item
-
- \image qtlabscontrols-combobox-contentItem.png
-
- \snippet ComboBox.qml contentItem
-
- \section3 Popup
-
- \image qtlabscontrols-combobox-popup.png
-
- \snippet ComboBox.qml popup
-
- \section3 Delegate
-
- \image qtlabscontrols-combobox-delegate.png
-
- \snippet ComboBox.qml delegate
-
-
- \section1 Customizing Dial
-
- Dial consists of two visual items: \l {Control::background}{background}
- and \l {Dial::handle}{handle}.
-
- \section3 Background
-
- \image qtlabscontrols-dial-background.png
-
- \snippet Dial.qml background
-
- \section3 Indicator
-
- \image qtlabscontrols-dial-handle.png
-
- \snippet Dial.qml handle
-
-
- \section1 Customizing Drawer
-
- Drawer can have a visual \l {Control::background}{background}
- item. The navigation is implemented by the \l {Control::contentItem}
- {content item}.
-
- \section3 Background
-
- \snippet Drawer.qml background
-
- \section3 Content item
-
- Drawer has no content item by default.
-
-
- \section1 Customizing Frame
-
- Frame consists of two visual items: \l {Control::background}{background}
- and \l {Frame::frame}{frame}.
-
- \section3 Background
-
- \image qtlabscontrols-frame-background.png
-
- Frame has no background item by default.
-
- \section3 Frame
-
- \image qtlabscontrols-frame-frame.png
-
- \snippet Frame.qml frame
-
-
- \section1 Customizing GroupBox
-
- GroupBox consists of three visual items: \l {Control::background}{background},
- \l {Frame::frame}{frame} and \l {GroupBox::label}{label}.
-
- \section3 Background
-
- \image qtlabscontrols-groupbox-background.png
-
- GroupBox has no background item by default.
-
- \section3 Frame
-
- \image qtlabscontrols-groupbox-frame.png
-
- \snippet GroupBox.qml frame
-
- \section3 Label
-
- \image qtlabscontrols-groupbox-label.png
-
- \snippet GroupBox.qml label
-
-
- \section1 Customizing ItemDelegate
-
- ItemDelegate consists of three visual items: \l {Control::background}{background},
- \l {AbstractButton::label}{label} and \l {AbstractButton::indicator}{indicator}.
- The indicator is only visible for \l {AbstractButton::checkable}{checkable} items.
-
- \section3 Background
-
- \image qtlabscontrols-itemdelegate-background.png
-
- \snippet ItemDelegate.qml background
-
- \section3 Label
-
- \image qtlabscontrols-itemdelegate-label.png
-
- \snippet ItemDelegate.qml label
-
- \section3 Indicator
-
- \image qtlabscontrols-itemdelegate-indicator.png
-
- \snippet ItemDelegate.qml indicator
-
-
- \section1 Customizing Label
-
- Label can have a visual \l {Label::background}{background} item.
-
- \section3 Background
-
- \image qtlabscontrols-label-background.png
-
- Label has no background item by default.
-
-
- \section1 Customizing Menu
-
- Menu consists of a \l {Popup::}{contentItem}.
-
- \section3 Content item
-
- \image qtlabscontrols-menu-contentItem.png
-
- \snippet Menu.qml contentItem
-
-
- \section1 Customizing MenuItem
-
- MenuItem can be customized in the same manner as
- \l {Customizing Button}{Button}.
-
-
- \section1 Customizing PageIndicator
-
- TODO
-
-
- \section1 Customizing Pane
-
- Pane consists of a \l {Control::background}{background}.
-
- \section3 Background
-
- \image qtlabscontrols-pane-background.png
-
- \snippet Pane.qml background
-
-
- \section1 Customizing ProgressBar
-
- ProgressBar consists of two visual items: \l {Control::background}{background}
- and \l {ProgressBar::indicator}{indicator}.
-
- \section3 Background
-
- \image qtlabscontrols-progressbar-background.png
-
- \snippet ProgressBar.qml background
-
- \section3 Indicator
-
- \image qtlabscontrols-progressbar-indicator.png
-
- \snippet ProgressBar.qml indicator
-
-
- \section1 Customizing RadioButton
-
- RadioButton consists of three visual items: \l {Control::background}{background},
- \l {AbstractButton::label}{label} and \l {AbstractButton::indicator}{indicator}.
-
- \section3 Background
-
- \image qtlabscontrols-radiobutton-background.png
-
- RadioButton has no background item by default.
-
- \section3 Label
-
- \image qtlabscontrols-radiobutton-label.png
-
- \snippet RadioButton.qml label
-
- \section3 Indicator
-
- \image qtlabscontrols-radiobutton-indicator.png
-
- \snippet RadioButton.qml indicator
-
-
- \section1 Customizing RangeSlider
-
- RangeSlider consists of four visual items:
- \l {Control::background}{background}, \l {RangeSlider::track}{track},
- \l {RangeSlider::first}{first.handle} and
- \l {RangeSlider::second.handle}{second.handle}.
-
- \section3 Background
-
- \image qtlabscontrols-rangeslider-background.png
-
- RangeSlider has no background item by default.
-
- \section3 Track
-
- \image qtlabscontrols-rangeslider-track.png
-
- \snippet RangeSlider.qml track
-
- \section3 First Handle
-
- \image qtlabscontrols-rangeslider-first-handle.png
-
- \snippet RangeSlider.qml firstHandle
-
- \section3 Second Handle
-
- \image qtlabscontrols-rangeslider-second-handle.png
-
- \snippet RangeSlider.qml secondHandle
-
-
- \section1 Customizing ScrollBar
-
- ScrollBar consists of two visual items: \l {Control::background}{background}
- and \l {ScrollBar::handle}{handle}.
-
- \section3 Background
-
- \image qtlabscontrols-scrollbar-background.png
-
- ScrollBar has no background item by default.
-
- \section3 Handle
-
- \image qtlabscontrols-scrollbar-handle.png
-
- \snippet ScrollBar.qml handle
-
-
- \section1 Customizing ScrollIndicator
-
- ScrollIndicator consists of two visual items: \l {Control::background}{background}
- and \l {ScrollIndicator::indicator}{indicator}.
-
- \section3 Background
-
- \image qtlabscontrols-scrollindicator-background.png
-
- ScrollIndicator has no background item by default.
-
- \section3 Indicator
-
- \image qtlabscontrols-scrollindicator-indicator.png
-
- \snippet ScrollIndicator.qml indicator
-
-
- \section1 Customizing Slider
-
- Slider consists of three visual items: \l {Control::background}{background},
- \l {Slider::track}{track} and \l {Slider::handle}{handle}.
-
- \section3 Background
-
- \image qtlabscontrols-slider-background.png
-
- Slider has no background item by default.
-
- \section3 Track
-
- \image qtlabscontrols-slider-track.png
-
- \snippet Slider.qml track
-
- \section3 Handle
-
- \image qtlabscontrols-slider-handle.png
-
- \snippet Slider.qml handle
-
-
- \section1 Customizing SpinBox
-
- SpinBox consists of four visual items: \l {Control::background}{background},
- \l {Control::contentItem}{contentItem}, \l {SpinBox::up.indicator}{up indicator},
- and \l {SpinBox::down.indicator}{down indicator}.
-
- \section3 Background
-
- \image qtlabscontrols-spinbox-background.png
-
- \snippet SpinBox.qml background
-
- \section3 Content item
-
- \image qtlabscontrols-spinbox-contentItem.png
-
- \snippet SpinBox.qml contentItem
-
- \section3 Down indicator
-
- \image qtlabscontrols-spinbox-down.png
-
- \snippet SpinBox.qml down.indicator
-
- \section3 Up indicator
-
- \image qtlabscontrols-spinbox-up.png
-
- \snippet SpinBox.qml up.indicator
-
-
- \section1 Customizing StackView
-
- StackView can have a visual \l {Control::background}{background}
- item, and it allows customizing the transitions that are used for
- push, pop, and replace operations.
-
- \section3 Push enter
-
- \snippet StackView.qml pushEnter
-
- \section3 Push exit
-
- \snippet StackView.qml pushExit
-
- \section3 Pop enter
-
- \snippet StackView.qml popEnter
-
- \section3 Pop exit
-
- \snippet StackView.qml popExit
-
- \section3 Replace enter
-
- \snippet StackView.qml replaceEnter
-
- \section3 Replace exit
-
- \snippet StackView.qml replaceExit
-
-
- \section1 Customizing SwipeView
-
- SwipeView can have a visual \l {Control::background}{background}
- item. The navigation is implemented by the \l {Control::contentItem}
- {content item}.
-
- \section3 Background
-
- SwipeView has no background item by default.
-
- \section3 Content item
-
- \snippet SwipeView.qml contentItem
-
- \section1 Customizing Switch
-
- Switch consists of three visual items: \l {Control::background}{background},
- \l {AbstractButton::label}{label} and \l {AbstractButton::indicator}{indicator}.
-
- \section3 Background
-
- \image qtlabscontrols-switch-background.png
-
- Switch has no background item by default.
-
- \section3 Label
-
- \image qtlabscontrols-switch-label.png
-
- \snippet Switch.qml label
-
- \section3 Indicator
-
- \image qtlabscontrols-switch-indicator.png
-
- \snippet Switch.qml indicator
-
-
- \section1 Customizing TabBar
-
- TODO
-
-
- \section1 Customizing TabButton
-
- TODO
-
-
- \section1 Customizing TextArea
-
- TODO
-
-
- \section1 Customizing TextField
-
- TextField offers a customizable \l {TextField::background}{background} item.
-
- \section3 Background
-
- \image qtlabscontrols-textfield-background.png
-
- \snippet TextField.qml background
-
-
- \section1 Customizing ToolBar
-
- ToolBar consists of two visual items: \l {Control::background}{background} and
- \l {Frame::frame}{frame}.
-
- \section3 Background
-
- \image qtlabscontrols-toolbar-background.png
-
- \snippet ToolBar.qml background
-
- \section3 Frame
-
- \image qtlabscontrols-toolbar-frame.png
-
- ToolBar has no frame item by default.
-
-
- \section1 Customizing ToolButton
-
- ToolButton consists of two visual items: \l {Control::background}{background}
- and \l {AbstractButton::label}{label}.
-
- \section3 Background
-
- \image qtlabscontrols-toolbutton-background.png
-
- \snippet ToolButton.qml background
-
- \section3 Label
-
- \image qtlabscontrols-toolbutton-label.png
-
- \snippet ToolButton.qml label
-
- \section1 Customizing Tumbler
-
- Tumbler consists of three visual items:
- \l {Control::background}{background},
- \l {Control::contentItem}{contentItem}, and
- \l {Tumbler::delegate}{delegate}.
-
- \section3 Background
-
- \image qtlabscontrols-tumbler-background.png
-
- Tumbler has no background item by default.
-
- \section3 Content Item
-
- \image qtlabscontrols-tumbler-contentItem.png
-
- \snippet Tumbler.qml contentItem
-
- \section3 Delegate
-
- \image qtlabscontrols-tumbler-delegate.png
-
- \snippet Tumbler.qml delegate
-*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-differences.qdoc b/src/imports/controls/doc/src/qtlabscontrols-differences.qdoc
deleted file mode 100644
index 7fcce7a3..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-differences.qdoc
+++ /dev/null
@@ -1,283 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscontrols-differences.html
- \title Differences between Qt Quick Controls
-
- Qt Quick Controls were originally developed to support desktop platforms,
- with mobile and embedded support coming shortly afterwards. They have a
- very broad scope, in that they provide a styling system flexible enough to
- allow the development of applications that have either a platform-dependent
- or platform-independent style.
-
- On embedded systems, where the hardware has limited resources, this approach
- can be inefficient. Qt Labs Controls were designed to solve this problem,
- using
- \l {https://blog.qt.io/blog/2015/03/31/qt-quick-controls-for-embedded/}{benchmarks}
- to guide the development.
-
- \section2 C++ and QML
-
- In many cases, the internal state of a control can be more efficiently
- processed in C++. For example, handling input events in C++ makes a
- difference for controls that would otherwise need to create internal
- MouseAreas and attached Keys objects.
-
- \section2 Styles
-
- Not only does handling events and logic in C++ increase performance, but it
- allows the visual QML layer to be a simple, declarative layer on top. This
- is reflected in the structure of the controls project: all visual
- implementations sit in the \e imports folder, so that users who want to
- create their own complete style can copy the folder and start tweaking.
- Read more about implementing a style plugin \l {TODO}{here}.
-
- In Qt Labs Controls, styles no longer provide components that are
- dynamically instantiated by controls, but controls themselves consist of
- item delegates that can be replaced. In effect, this means that delegates
- are Qt Quick items that are instantiated on the spot, as properties of the
- control, and are simply parented to the control.
-
- \section2 Modularity and Simplicity
-
- When it comes to more complex controls, it is sometimes better to split
- them up into separate building blocks. As an example, the complex
- ScrollView control:
-
- \qml
- ScrollView {
- horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
- Flickable {
- // ...
- }
- }
- \endqml
-
- Is replaced with simple ScrollBar/ScrollIndicator controls that can be
- attached to any Flickable:
-
- \qml
- Flickable {
- // ...
- ScrollBar.vertical: ScrollBar { }
- }
- \endqml
-
- The API of Qt Labs Controls aims to be clean and simple. Common
- operations are easy, and more advanced ones are liberally documented with
- snippets that can be copied into your code.
-
- \section2 Feature Comparison Table
-
- \table
- \header
- \li
- \li Qt Quick Controls
- \li Qt Labs Controls
- \row
- \li Stylable delegates
- \li Yes
- \li Yes
- \row
- \li Pre-built native styles
- \li Yes
- \li No
- \row
- \li Runtime style changes
- \li Yes
- \li Yes
- \row
- \li Can be used on Desktop
- \li Yes
- \li Yes \b *
- \row
- \li Can be used on Mobile
- \li Yes
- \li Yes
- \row
- \li Can be used on Embedded
- \li Yes
- \li Yes
- \row
- \li Internal event handling
- \li QML
- \li C++
- \endtable
-
- \b {* No hover support}
-
- \section2 Porting Qt Quick Controls Code
-
- The API of Qt Labs Controls is very similar to Qt Quick Controls, but it
- does come with some changes necessary to facilitate the improvements. The
- majority of changes are to do with styling; all of a control's delegates
- are now accessible in the control itself, instead of in a separate style
- object.
-
- For example, to style a button in Qt Quick Controls:
-
- \badcode
- Button {
- style: ButtonStyle {
- label: Label {
- // ...
- }
- }
- }
- \endcode
-
- To style a button in Qt Labs Controls:
-
- \qml
- Button {
- label: Label {
- // ...
- }
- }
- \endqml
-
- \section3 Preparing for Migration
-
- With this in mind, a good way to prepare for a migration to Qt Quick
- Labs is to place each control that you have a custom style for in its
- own QML file. For example, the Qt Quick Controls button above could be moved to a
- file named Button.qml, and used in the following manner:
-
- \badcode
- import "controls" as Controls
-
- Controls.Button {
- ...
- }
- \endcode
-
- This works with both modules, and will reduce the amount of work needed
- when the migration begins.
-
- \section3 Type Changes
-
- \table
- \header
- \li Qt Quick Controls
- \li Qt Labs Controls
- \row
- \li \l [QtQuickControls] {Action}
- \li No equivalent; see \l [QtQuick] {Shortcut} instead.
- \row
- \li \l [QtQuickControls] {ApplicationWindow}
- \li \l [QtLabsControls] {ApplicationWindow}
- \row
- \li \l [QtQuickControls] {BusyIndicator}
- \li \l [QtLabsControls] {BusyIndicator}
- \row
- \li \l [QtQuickControls] {Button}
- \li \l [QtLabsControls] {Button}
- \row
- \li \l [QtQuickControls] {Calendar}
- \li No equivalent; see \l [QML] {MonthGrid}, \l [QML] {DayOfWeekRow} and \l [QML] {WeekNumberColumn} instead.
- \row
- \li \l [QtQuickControls] {CheckBox}
- \li \l [QtLabsControls] {CheckBox}
- \row
- \li \l [QtQuickControls] {ComboBox}
- \li \l [QtLabsControls] {ComboBox}
- \row
- \li \l [QtQuickControls] {ExclusiveGroup}
- \li \l [QtLabsControls] {ButtonGroup}
- \row
- \li \l [QtQuickControls] {GroupBox}
-
- \li \l [QtLabsControls] {GroupBox}, or \l [QtLabsControls] {Frame}
- if a title is not required.
-
- \row
- \li \l [QtQuickControls] {Label}
- \li \l [QtLabsControls] {Label}
- \row
- \li \l [QtQuickControls] {Menu}
- \li \l [QtLabsControls] {Menu}
- \row
- \li \l [QtQuickControls] {ProgressBar}
- \li \l [QtLabsControls] {ProgressBar}
- \row
- \li \l [QtQuickControls] {RadioButton}
- \li \l [QtLabsControls] {RadioButton}
- \row
- \li \l [QtQuickControls] {ScrollView}
- \li \l [QtLabsControls] {ScrollBar},
- \l [QtLabsControls] {ScrollIndicator}
- \row
- \li \l [QtQuickControls] {Slider}
- \li \l [QtLabsControls] {Slider}
- \row
- \li \l [QtQuickControls] {SpinBox}
- \li \l [QtLabsControls] {SpinBox}
- \row
- \li \l [QtQuickControls] {Stack},
- \l [QtQuickControls] {StackView},
- \l [QtQuickControls] {StackViewDelegate}
- \li \l [QtLabsControls] {StackView}
- \row
- \li \l [QtQuickControls] {StatusBar}
- \li No equivalent
- \row
- \li \l [QtQuickControls] {Switch}
- \li \l [QtLabsControls] {Switch}
- \row
- \li \l [QtQuickControls] {Tab},
- \l [QtQuickControls] {TabView}
- \li \l [QtLabsControls] {TabBar} in combination with, for example,
- \l [QtLabsControls] {SwipeView}.
- \row
- \li \l [QtQuickControls] {TableView}
- \li No equivalent
- \row
- \li \l [QtQuickControls] {TextArea}
- \li \l [QtLabsControls] {TextArea}
- \row
- \li \l [QtQuickControls] {TextField}
- \li \l [QtLabsControls] {TextField}
- \row
- \li \l [QtQuickControls] {ToolBar}
- \li \l [QtLabsControls] {ToolBar}
- \row
- \li \l [QtQuickControls] {ToolButton}
- \li \l [QtLabsControls] {ToolButton}
- \row
- \li \l [QtQuickControls] {TreeView}
- \li No equivalent
- \endtable
-
- \section1 Related Information
-
- \list
- \li \l{Qt Quick}
- \li \l{Qt Quick Controls}
- \li \l{Qt Labs Controls QML Types}{Qt Labs Controls QML Types}
- \endlist
-*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-examples.qdoc b/src/imports/controls/doc/src/qtlabscontrols-examples.qdoc
deleted file mode 100644
index 04aabcfa..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-examples.qdoc
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \group qtlabscontrols-examples
- \ingroup all-examples
- \title Qt Labs Controls Examples
- \brief A collection of examples for \l {Qt Labs Controls}
-
- These examples demonstrate creating user interfaces using \l {Qt Labs Controls}.
-*/
-
-/*!
- \example gallery
- \title Qt Labs Controls - Gallery
- \ingroup qtlabscontrols-examples
- \brief A gallery of controls
-
- \raw HTML
- <div class="table"><table style="background:transparent; border:0px">
- <tr><td style="border:0px">
- \endraw
- \image qtlabscontrols-gallery-welcome.png
- \caption Welcome Screen
- \raw HTML
- </td><td style="border:0px">
- \endraw
- \image qtlabscontrols-gallery-drawer.png
- \caption Side Drawer
- \raw HTML
- </td><td style="border:0px">
- \endraw
- \image qtlabscontrols-gallery-menu.png
- \caption Options Menu
- \raw HTML
- </td></tr>
- </table></div>
- \endraw
-
- This example project demonstrates the various UI controls provided by
- \l {Qt Labs Controls}.
-
- \include examples-run.qdocinc
-*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-index.qdoc b/src/imports/controls/doc/src/qtlabscontrols-index.qdoc
deleted file mode 100644
index 2f554db7..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-index.qdoc
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscontrols-index.html
- \title Qt Labs Controls
-
- \brief Provides a set of UI controls for Qt Quick.
-
- Qt Labs Controls provides a set of controls that can be used
- to build complete interfaces in Qt Quick.
-
- \section1 QML Types
-
- \section2 Qt.labs.controls Module
- \generatelist {qmltypesbymodule Qt.labs.controls}
-
- \section2 Qt.labs.calendar Module
- \generatelist {qmltypesbymodule Qt.labs.calendar}
-
- \section1 Important Concepts in Qt Labs Controls
-
- \list
- \li \l{Getting Started with Qt Labs Controls}
- \li \l{Styling Qt Labs Controls}
- \li \l{High-DPI Support in Qt Labs Controls}
- \li \l{Differences between Qt Quick Controls}
- \endlist
-
- \section1 Related Information
-
- \list
- \li \l{Qt Quick}
- \li \l{Qt Quick Layouts}
- \li \l{Qt Labs Calendar}
- \li \l{Qt Labs Templates}
- \li \l{Qt Labs Controls QML Types}{Qt Labs Controls QML Types}
- \li \l{Qt Labs Controls Examples}
- \endlist
-*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-material.qdoc b/src/imports/controls/doc/src/qtlabscontrols-material.qdoc
deleted file mode 100644
index e2cadbda..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-material.qdoc
+++ /dev/null
@@ -1,200 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscontrols-material.html
- \title Material Style
-
- The Material Style is based on the Google Material Design Guidelines.
- \l {detailed-description}{More...}
-
- \styleimport {Qt.labs.controls.material 1.0}
-
- \section1 Attached Properties
-
- \list
- \li \l {accent-attached-prop}{\b accent} : color
- \li \l {primary-attached-prop}{\b primary} : color
- \li \l {theme-attached-prop}{\b theme} : enumeration
- \endlist
-
- \section1 Detailed Description
-
- The Material style is based on the \l {https://www.google.com/design/spec/material-design/introduction.html}
- {Google Material Design Guidelines}. It allows for a unified experience
- across platforms and device sizes.
-
- \image qtlabscontrols-material.png
- \caption The Material style in light and dark themes
-
- \note The Material style is not a native Android style. The Material
- style is a 100% cross-platform Qt Labs Controls style implementation that
- follows the Google Material Design Guidelines. The style runs on any
- platform, and looks more or less identical everywhere. Minor differences
- may occur due to differences in available system fonts and font rendering
- engines.
-
- \section2 Customization
-
- The Material style allows customizing three attributes, \l {theme-attached-prop}{theme},
- \l {primary-attached-prop}{primary} and \l {accent-attached-prop}{accent}. The following
- example illustrates how to create a red \e stop button with light text:
-
- \table
- \row
- \li
- \qml
- import QtQuick 2.0
- import Qt.labs.controls 1.0
- import Qt.labs.controls.material 1.0
-
- Button {
- text: "Stop"
- highlighted: true
-
- Material.accent: Material.Red
- Material.theme: Material.Dark
- }
- \endqml
- \li
- \image qtlabscontrols-material-button.png
- \endtable
-
- Both attributes can be specified for any window or item, and they automatically
- propagate to children in the same manner as \l {Control::font}{fonts}. In the
- following example, the window and all three radio buttons appear in the dark
- theme using a purple accent color:
-
- \table
- \row
- \li
- \qml
- import QtQuick 2.0
- import Qt.labs.controls 1.0
- import Qt.labs.controls.material 1.0
-
- ApplicationWindow {
- visible: true
-
- Material.theme: Material.Dark
- Material.accent: Material.Purple
-
- Column {
- anchors.centerIn: parent
-
- RadioButton { text: qsTr("Small") }
- RadioButton { text: qsTr("Medium"); checked: true }
- RadioButton { text: qsTr("Large") }
- }
- }
- \endqml
- \li
- \image qtlabscontrols-material-dark.png
- \endtable
-
- \note The Material style must be separately imported to gain access to
- these style-specific attributes. It should be noted that regardless of the
- references to the Material style, the same application code runs with any
- other style. The Material style-specific attributes only have an effect
- when the application is run with the Material style. Furthermore, in case
- of explicit Material style-specific references, the Material style must
- be deployed with the application.
-
- \section2 Pre-defined Colors
-
- Even though primary and accent can be any \l {colorbasictypedocs}{color}, it
- is recommended to use one of the pre-defined colors that have been designed
- to work well with the rest of the Material style palette:
-
- Available pre-defined colors:
- \value Material.Red Red (#F44336)
- \value Material.Pink Pink (#E91E63)
- \value Material.Purple Purple (#9C27B0)
- \value Material.DeepPurple Deep Purple (#673AB7)
- \value Material.Indigo Indigo (#3F51B5)
- \value Material.Blue Blue (#2196F3)
- \value Material.LightBlue Light Blue (#03A9F4)
- \value Material.Cyan Cyan (#00BCD4)
- \value Material.Teal Teal (#009688)
- \value Material.Green Green (#4CAF50)
- \value Material.LightGreen Light Green (#8BC34A)
- \value Material.Lime Lime (#CDDC39)
- \value Material.Yellow Yellow (#FFEB3B)
- \value Material.Amber Amber (#FFC107)
- \value Material.Orange Orange (#FF9800)
- \value Material.DeepOrange Deep Orange (#FF5722)
- \value Material.Brown Brown (#795548)
- \value Material.Grey Grey (#9E9E9E)
- \value Material.BlueGrey Blue Grey (#607D8B)
-
- \labs
-
- \section1 Attached Property Documentation
-
- \styleproperty {Material.accent} {color} {accent-attached-prop}
- \target accent-attached-prop
- This attached property holds the accent color of the theme. The property
- can be attached to any window or item. The value is propagated to children.
-
- The default value is \c Material.Teal.
-
- \note Even though the accent can be any \l {colorbasictypedocs}{color}, it is
- recommended to use one of the \l {pre-defined colors} that have been designed
- to work well with the rest of the Material style palette.
-
- \endstyleproperty
-
- \styleproperty {Material.primary} {color} {primary-attached-prop}
- \target primary-attached-prop
- This attached property holds the primary color of the theme. The property
- can be attached to any window or item. The value is propagated to children.
-
- The default value is \c Material.BlueGray.
-
- \note Even though the primary can be any \l {colorbasictypedocs}{color}, it is
- recommended to use one of the \l {pre-defined colors} that have been designed
- to work well with the rest of the Material style palette.
-
- \endstyleproperty
-
- \styleproperty {Material.theme} {enumeration} {theme-attached-prop}
- \target theme-attached-prop
- This attached property holds whether the theme is light or dark. The property
- can be attached to any window or item. The value is propagated to children.
-
- Available themes:
- \value Material.Light Light theme (default)
- \value Material.Dark Dark theme
-
- \endstyleproperty
-
- \section1 Related Information
-
- \list
- \li \l{Styling Qt Labs Controls}
- \endlist
-*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-styles.qdoc b/src/imports/controls/doc/src/qtlabscontrols-styles.qdoc
deleted file mode 100644
index 858a9105..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-styles.qdoc
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscontrols-styles.html
- \title Styling Qt Labs Controls
-
- Qt Labs Controls comes with a selection of styles. The \l {Default Style}
- {Default} style is a simple and light-weight all-round style that offers
- the maximum performance for Qt Labs Controls. The more advanced
- \l {Universal Style}{Universal} and \l {Material Style}{Material} styles
- offer an appealing design, but require more system resources.
-
- \section1 Usage
-
- In order to run an application with a specific style, either pass a command
- line argument, or set an environment variable. Alternatively, the preferred
- style and style-specific attributes can be specified in a configuration file.
-
- \section2 Command line argument
-
- Passing a \c -style command line argument is the convenient way to test different
- styles. It takes precedence over the other methods listed below. The following
- example runs a Qt Labs Controls application with the Material style:
-
- \code
- ./app -style material
- \endcode
-
- \section2 Environment variable
-
- Setting the \c QT_LABS_CONTROLS_STYLE environment variable can be used to set
- a system-wide style preference. It takes precedence over the configuration file
- mentioned below. The following example runs a Qt Labs Controls application with
- the Universal style:
-
- \code
- QT_LABS_CONTROLS_STYLE=universal ./app
- \endcode
-
- \section2 Configuration file
-
- Qt Labs Controls support a special configuration file, \c :/qtlabscontrols.conf,
- that is built into an application's resources.
-
- The configuration file can specify the preferred style (may be overridden by either
- of the methods described earlier) and certain style-specific attributes. The following
- example specifies that the preferred style is the Material style. Furthermore, when the
- application is run with the Material style, its theme is light and the accent color is
- brown. However, if the application is run with the Universal style instead, the theme
- is dark and the accent color is red.
-
- \code
- [Controls]
- Style=Material
-
- [Universal]
- Theme=Dark
- Accent=Red
-
- [Material]
- Theme=Light
- Accent=Brown
- \endcode
-
- In order to make it possible for Qt Labs Controls to find the configuration file,
- it must be built into application's resources using the \l {The Qt Resource System}.
- Here's an example \c .qrc file:
-
- \code
- <!DOCTYPE RCC><RCC version="1.0">
- <qresource prefix="/">
- <file>qtlabscontrols.conf</file>
- </qresource>
- </RCC>
- \endcode
-
- \note Qt Labs Controls uses a file selector to load the configuration file. It
- is possible to provide a different configuration file for different platforms and
- locales. See \l QFileSelector documentation for more details.
-
- Finally, the \c .qrc file must be listed in the application's \c .pro file so that
- the build system knows about it. For example:
-
- \code
- RESOURCES = application.qrc
- \endcode
-
- \section1 Related Information
- \list
- \li \l {Default Style}
- \li \l {Material Style}
- \li \l {Universal Style}
- \endlist
-*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-universal.qdoc b/src/imports/controls/doc/src/qtlabscontrols-universal.qdoc
deleted file mode 100644
index bf3dcfdc..00000000
--- a/src/imports/controls/doc/src/qtlabscontrols-universal.qdoc
+++ /dev/null
@@ -1,179 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtlabscontrols-universal.html
- \title Universal Style
-
- The Universal Style is based on the Microsoft Universal Design Guidelines.
- \l {detailed-description}{More...}
-
- \styleimport {Qt.labs.controls.universal 1.0}
-
- \section1 Attached Properties
-
- \list
- \li \l {accent-attached-prop}{\b accent} : color
- \li \l {theme-attached-prop}{\b theme} : enumeration
- \endlist
-
- \section1 Detailed Description
-
- The Universal style is a device-agnostic style based on the
- \l {https://dev.windows.com/design}{Microsoft Universal Design Guidelines}.
- The Universal style has been designed to look good on all devices, from
- phones and tablets to PCs.
-
- \image qtlabscontrols-universal.png
- \caption The Universal style in light and dark themes
-
- \note The Universal style is not a native Windows 10 style. The Universal
- style is a 100% cross-platform Qt Labs Controls style implementation that
- follows the Microsoft Universal Design Guidelines. The style runs on any
- platform, and looks more or less identical everywhere. Minor differences
- may occur due to differences in available system fonts and font rendering
- engines.
-
- \section2 Customization
-
- The Universal style allows customizing two attributes, \l {theme-attached-prop}{theme}
- and \l {accent-attached-prop}{accent}. The following example illustrates how to create
- a red \e stop button with light text:
-
- \table
- \row
- \li
- \qml
- import QtQuick 2.0
- import Qt.labs.controls 1.0
- import Qt.labs.controls.universal 1.0
-
- Button {
- text: "Stop"
- highlighted: true
-
- Universal.accent: Universal.Red
- Universal.theme: Universal.Dark
- }
- \endqml
- \li
- \image qtlabscontrols-universal-button.png
- \endtable
-
- Both attributes can be specified for any window or item, and they automatically
- propagate to children in the same manner as \l {Control::font}{fonts}. In the
- following example, the window and all three radio buttons appear in the dark
- theme using a violet accent color:
-
- \table
- \row
- \li
- \qml
- import QtQuick 2.0
- import Qt.labs.controls 1.0
- import Qt.labs.controls.universal 1.0
-
- ApplicationWindow {
- visible: true
-
- Universal.theme: Universal.Dark
- Universal.accent: Universal.Violet
-
- Column {
- anchors.centerIn: parent
-
- RadioButton { text: qsTr("Small") }
- RadioButton { text: qsTr("Medium"); checked: true }
- RadioButton { text: qsTr("Large") }
- }
- }
- \endqml
- \li
- \image qtlabscontrols-universal-dark.png
- \endtable
-
- \note The Universal style must be separately imported to gain access to
- these style-specific attributes. It should be noted that regardless of the
- references to the Universal style, the same application code runs with any
- other style. The Universal style-specific attributes only have an effect
- when the application is run with the Universal style. Furthermore, in case
- of explicit Universal style-specific references, the Universal style must
- be deployed with the application.
-
- \labs
-
- \section1 Attached Property Documentation
-
- \styleproperty {Universal.accent} {color} {accent-attached-prop}
- \target accent-attached-prop
- This attached property holds the accent color of the theme. The property
- can be attached to any window or item. The value is propagated to children.
-
- Even though the accent can be any \l {colorbasictypedocs}{color}, it is
- recommended to use one of the pre-defined accents that have been designed
- to work well with the rest of the Universal style palette:
-
- \value Universal.Lime Lime (#A4C400)
- \value Universal.Green Green (#60A917)
- \value Universal.Emerald Emerald (#008A00)
- \value Universal.Teal Teal (#00ABA9)
- \value Universal.Cyan Cyan (#1BA1E2)
- \value Universal.Cobalt Cobalt (#3E65FF, default)
- \value Universal.Indigo Indigo (#6A00FF)
- \value Universal.Violet Violet (#AA00FF)
- \value Universal.Pink Pink (#F472D0)
- \value Universal.Magenta Magenta (#D80073)
- \value Universal.Crimson Crimson (#A20025)
- \value Universal.Red Red (#E51400)
- \value Universal.Orange Orange (#FA6800)
- \value Universal.Amber Amber (#F0A30A)
- \value Universal.Yellow Yellow (#E3C800)
- \value Universal.Brown Brown (#825A2C)
- \value Universal.Olive Olive (#6D8764)
- \value Universal.Steel Steel (#647687)
- \value Universal.Mauve Mauve (#76608A)
- \value Universal.Taupe Taupe (#87794E)
-
- \endstyleproperty
-
- \styleproperty {Universal.theme} {enumeration} {theme-attached-prop}
- \target theme-attached-prop
- This attached property holds whether the theme is light or dark. The property
- can be attached to any window or item. The value is propagated to children.
-
- Available themes:
- \value Universal.Light Light theme (default)
- \value Universal.Dark Dark theme
-
- \endstyleproperty
-
- \section1 Related Information
-
- \list
- \li \l{Styling Qt Labs Controls}
- \endlist
-*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
new file mode 100644
index 00000000..5e2c9370
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-buttons.html
+ \title Button Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for button controls
+
+ Qt Quick Controls 2 offers a selection of button-like controls.
+
+ \annotatedlist qtquickcontrols2-buttons
+
+ Each type of button has its own specific use case. The following
+ sections offer guidelines for choosing the appropriate type of button,
+ depending on the use case.
+
+ \section1 Button Control
+
+
+ \l Button is a clickable control that starts an action, or opens or
+ closes a popup. A button usually has a text label but it can also
+ contain an icon.
+
+ Button is a very suitable control when a popup or dialog needs
+ to perform an action. The most common examples are Apply, Cancel,
+ Save, Close and Help.
+
+ \image qtquickcontrols2-button.gif
+
+ Recommendations:
+
+ \list
+ \li The button's text should be a verb describing the action, or a noun matching
+ the title of the popup that will be opened.
+ \li Don't use a button to set state. \l Switch is more suitable for that.
+ \li Use the default font unless you have UI guidelines specifying otherwise.
+ \li If the text is localized, consider the influence of a longer text on the layout.
+ \endlist
+
+ \b {See also} \l Button and \l AbstractButton
+
+ \section1 CheckBox Control
+
+ \image qtquickcontrols2-checkbox.gif
+
+ \l CheckBox is used to build multi-selection option lists. Any number of
+ options can be selected, including none, but the options should
+ not be mutually exclusive.
+
+ Use a single CheckBox for a yes/no choice, such as when you have
+ to accept the terms of service agreement in a form.
+
+ For a single yes/no choice, it is also possible to use a switch. If the choice
+ concerns an option, it is best to use a CheckBox. If it concerns action to
+ be taken, a switch is recommended.
+
+ When options can be grouped, you can use a partially checked CheckBox to
+ represent the whole group. Use the checkbox's indeterminate state when
+ a user selects some, but not all, sub-items in the group.
+
+ The three availables statuses are: checked, unchecked and disabled.
+ "Disabled" is useful when the user should not be able to check or uncheck
+ a checkbox.
+
+ The checkable options are often listed vertically.
+
+ Recommendations:
+ \list
+ \li The checkbox label should be a statement that the check mark makes true,
+ and that the absence of a check mark makes false.
+ \li The checkbox label should not contain a negative statement.
+ \li Use the default font, unless you have UI guidelines specifying otherwise.
+ \li If the text is localized, consider the influence of a longer text on the layout.
+ \endlist
+
+ \b {See also} \l CheckBox
+
+ \section1 RadioButton Control
+
+ \image qtquickcontrols2-radiobutton.gif
+
+ \l RadioButton is used to select only one option from a set of options.
+ Selecting one option automatically deselects the one selected before.
+
+ The set of options should not be too large, otherwise it starts taking too much
+ space on the screen. In that case it would be more practical to use a \l ComboBox.
+
+ If there are only two mutually exclusive options, combine them into a
+ single checkbox or a switch.
+
+ Recommendations:
+
+ \list
+ \li Limit the label text to one line.
+ \li Ensure that a sensible default option is checked.
+ \li List RadioButton options vertically.
+ \li If the text is localized, consider the influence of a longer text on the layout.
+ \li Use the default font, unless you have UI guidelines that specify otherwise.
+ \li Just like with CheckBox, do not make the list too large.
+ \li In order to avoid confusion, do not put two groups of radio buttons next to each
+ other.
+ \endlist
+
+ \b {See also} \l RadioButton
+
+ \section1 Switch Control
+
+ \image qtquickcontrols2-switch.png
+
+ \l Switch represents a physical switch that allows users to choose between an "on"
+ or "off" state.
+ Use a switch for binary operations that take effect immediately after it has been
+ switched on. For example, a switch to turn WIFI on or off.
+
+ Recommendations:
+
+ \list
+ \li Keep labels short and concise.
+ \li If the text is localized, consider the influence of a longer text on the layout.
+ \endlist
+
+ \b {See also} \l Switch
+
+ \section1 ToolButton Control
+
+ \image qtquickcontrols2-toolbutton.png
+
+ \l ToolButton is nearly identical to \l Button, but it has a graphical
+ appearance that makes it more suitable for insertion into a \l ToolBar.
+
+ \b {See also} \l ToolButton
+
+ \section1 Related Information
+ \list
+ \li \l {Qt Quick Controls 2 Guidelines}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
new file mode 100644
index 00000000..29bfc99c
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-configuration.qdoc
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-configuration.html
+ \title Qt Quick Controls 2 Configuration File
+
+ Qt Quick Controls 2 support a special configuration file, \c :/qtquickcontrols2.conf,
+ that is built into an application's resources.
+
+ The configuration file can specify the preferred style and certain style-specific
+ attributes. The following example specifies that the preferred style is the \l {Material style}.
+ Furthermore, when the application is run with the Material style, its theme is light and the
+ accent and primary colors are teal and blue grey, respectively. However, if the application
+ is run with the \l {Universal style} instead, the theme is dark and the accent color is red.
+
+ \code
+ [Controls]
+ Style=Material
+
+ [Universal]
+ Theme=Dark
+ Accent=Red
+
+ [Material]
+ Theme=Light
+ Accent=Teal
+ Primary=BlueGrey
+ \endcode
+
+ \l {Material style} specific values that can be specified in a \c Material
+ section of the configuration file:
+
+ \include qquickmaterialstyle.qdocinc conf
+
+ \l {Universal style} specific values that can be specified in a \c Universal
+ section of the configuration file:
+
+ \include qquickuniversalstyle.qdocinc conf
+
+ In order to make it possible for Qt Quick Controls 2 to find the configuration file,
+ it must be built into application's resources using the \l {The Qt Resource System}.
+ Here's an example \c .qrc file:
+
+ \code
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource prefix="/">
+ <file>qtquickcontrols2.conf</file>
+ </qresource>
+ </RCC>
+ \endcode
+
+ \note Qt Quick Controls 2 uses a file selector to load the configuration file. It
+ is possible to provide a different configuration file for different platforms and
+ locales. See \l QFileSelector documentation for more details.
+
+ Finally, the \c .qrc file must be listed in the application's \c .pro file so that
+ the build system knows about it. For example:
+
+ \code
+ RESOURCES = application.qrc
+ \endcode
+
+ \section1 Related Information
+
+ \list
+ \li \l{Styling Qt Quick Controls 2}
+ \li \l{Supported Environment Variables in Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-containers.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-containers.qdoc
index 803695c9..d19cff5a 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-containers.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-containers.qdoc
@@ -26,12 +26,14 @@
****************************************************************************/
/*!
- \page qtlabscontrols-containers.html
+ \page qtquickcontrols2-containers.html
\title Container Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for container controls
- Qt Labs Controls offers a selection of container-like controls.
+ Qt Quick Controls 2 offers a selection of container-like controls.
- \annotatedlist qtlabscontrols-containers
+ \annotatedlist qtquickcontrols2-containers
Each type of container can be used to group a set of controls together.
The following sections offer guidelines for choosing the appropriate type
@@ -39,58 +41,66 @@
\section1 ApplicationWindow Control
- \image qtlabscontrols-applicationwindow-wireframe.png
+ \image qtquickcontrols2-applicationwindow-wireframe.png
- \l ApplicationWindow contains optional header and footer items.
+ \l ApplicationWindow creates the root window of an application, and makes
+ it easy to add an optional header and footer to that window.
\section1 Frame Control
- \image qtlabscontrols-frame.png
+ \image qtquickcontrols2-frame.png
\l Frame is used to layout a logical group of controls together, within
a visual frame.
\section1 GroupBox Control
- \image qtlabscontrols-groupbox.png
+ \image qtquickcontrols2-groupbox.png
\l GroupBox is used to layout a logical group of controls together,
within a titled visual frame.
\section1 Page Control
- \image qtlabscontrols-page-wireframe.png
+ \image qtquickcontrols2-page-wireframe.png
\l Page provides page-specific header and footer items.
+ It is perfectly possible to use ApplicationWindow for setting the header
+ and the footer, but if you have a header and footer which varies per
+ screen, then it is better to use \l Page.
\section1 Pane Control
- \image qtlabscontrols-pane.png
+ \image qtquickcontrols2-pane.png
\l Pane provides a background color that matches with the application
- style and theme.
+ style and theme. Pane does not provide a layout of its own, but requires
+ you to position its contents, for instance by using a \l RowLayout or
+ a \l ColumnLayout.
\section1 StackView Control
- \image qtlabscontrols-stackview-wireframe.png
+ \image qtquickcontrols2-stackview-wireframe.png
- \l StackView organizes content pages into a stack.
+ \l StackView organizes content pages into a stack using a last-in-first-out
+ principle: the last item to be "pushed" onto the stack is the first one to
+ be removed, and the top-most item is always the one that is visible.
\section1 SwipeView Control
- \image qtlabscontrols-swipeview-wireframe.png
+ \image qtquickcontrols2-swipeview-wireframe.png
\l SwipeView organizes content pages into a swipable strip.
\section1 TabBar Control
- \image qtlabscontrols-tabbar-wireframe.png
+ \image qtquickcontrols2-tabbar-wireframe.png
\l TabBar organizes content pages into tabs.
\section1 ToolBar Control
- \image qtlabscontrols-toolbar.png
+ \image qtquickcontrols2-toolbar.png
\l ToolBar is a container of application-wide and context-sensitive
actions and controls.
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-cppclasses.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-cppclasses.qdoc
new file mode 100644
index 00000000..5c2b9486
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-cppclasses.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtQuickControls2
+ \title Qt Quick Controls 2 C++ Classes
+ \ingroup modules
+ \brief Provides classes for setting up the controls from C++.
+
+ The C++ types can be included into your application using the following
+ include statement:
+
+ \code
+ #include <QtQuickControls2>
+ \endcode
+
+ \note If you are using a few classes from this module, we recommend including
+ those specific classes only instead of the module.
+
+ To link against the corresponding C++ libraries, add the following to your
+ qmake project file:
+
+ \code
+ QT += quickcontrols2
+ \endcode
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
new file mode 100644
index 00000000..71ffe350
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
@@ -0,0 +1,750 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-customize.html
+ \title Customizing Qt Quick Controls 2
+ \brief A set of UI controls to create user interfaces in Qt Quick
+
+ Qt Quick Controls 2 consist of a hierarchy (tree) of items. In order to
+ provide a custom look and feel, the default QML implementation of each
+ item can be replaced with a custom one.
+
+ \section1 Customizing a Control
+
+ Sometimes you'll want to create a "one-off" look for a specific part of
+ your UI, and use a complete style everywhere else. Perhaps you're happy
+ with the style you're using, but there's a certain button that has some
+ special significance.
+
+ The first way to create this button is to simply define it in-place,
+ wherever it is needed. For example, perhaps you're not satisfied with the
+ default style's Button having square corners. To make them rounded, you
+ can override the \l {Control::}{background} item and set the radius
+ property of Rectangle:
+
+ \qml
+ import QtQuick 2.6
+ import QtQuick.Controls 2.0
+
+ ApplicationWindow {
+ width: 400
+ height: 400
+ visible: true
+
+ Button {
+ id: button
+ text: "A Special Button"
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ color: button.down ? "#d6d6d6" : "#f6f6f6"
+ border.color: "#26282a"
+ border.width: 1
+ radius: 4
+ }
+ }
+ }
+ \endqml
+
+ The second way to create the button is good if you plan to use your rounded
+ button in several places. It involves moving the code into its own QML file
+ within your project.
+
+ For this approach, we'll copy the background code from the default style's
+ \c Button.qml. This file can be found in the following path in your Qt
+ installation:
+
+ \c {$QTDIR/qml/QtQuick/Controls.2/Button.qml}
+
+ After doing that, we'll simply add the following line:
+
+ \code
+ radius: 4
+ \endcode
+
+ To avoid confusion with the controls in the
+ module itself, we'll call the file \c MyButton.qml. To use the control in
+ your application, refer to it by its filename:
+
+ \qml
+ import QtQuick.Controls 2.0
+
+ ApplicationWindow {
+ MyButton {
+ text: qsTr("A Special Button")
+ }
+ }
+ \endqml
+
+ The third way to create the button is a bit more structured, both in terms
+ of where the file sits in the file system and how it is used in QML. First,
+ copy an existing file as you did above, but this time, put it into a
+ subfolder in your project named (for example) \c controls. To use the
+ control, first import the folder into a namespace:
+
+ \qml
+ import QtQuick.Controls 2.0
+ import "controls" as MyControls
+
+ ApplicationWindow {
+ MyControls.Button {
+ text: qsTr("A Special Button")
+ }
+ }
+ \endqml
+
+ As you now have the \c MyControls namespace, you can name the controls after
+ their actual counterparts in the Qt Quick Controls 2 module. You can repeat
+ this process for any control that you wish to add.
+
+ \section1 Creating a Custom Style
+
+ There are several ways to go about creating your own styles. Below, we'll
+ explain the various approaches.
+
+ \section2 Definition of a Style
+
+ In Qt Quick Controls 2, a style is essentially an interchangeable set of
+ QML files within a single directory. There are two requirements for a style
+ to be \l {Using Styles in Qt Quick Controls 2}{usable}:
+
+ \list
+ \li At least one QML file whose name matches a control (for example,
+ \c Button.qml) must exist.
+
+ The Default style will be used for any controls that aren't implemented.
+ \li The files must be in a directory in the filesystem or in the
+ \l {The Qt Resource System}{resource system}.
+
+ For example, these are all valid paths to a style:
+
+ \list
+ \li \c {./myapp -style /home/absolute/path/to/my/style}
+ \li \c {./myapp -style :/mystyle}
+ \li \c {./myapp -style relative/path/to/my/style}
+ \li \c {./myapp -style MyStyle}
+ \endlist
+
+ The third and fourth paths will be looked up within the QML engine's import path
+ list. This is the same as what happens when you pass \c Material as the style,
+ for example.
+ \endlist
+
+ What this means is that you can implement as many controls as you like for
+ your custom style, and place them almost anywhere. It also allows users to
+ create their own styles for your application.
+
+ \section2 Style-specific C++ Extensions
+
+ Sometimes you may need to use C++ to extend your custom style. There are two
+ ways to expose such types to QML:
+
+ \list
+ \li If the style that uses the type is the only style used by an application,
+ it's enough to register it with the QML engine via qmlRegisterType():
+
+ \code
+ qmlRegisterType<ACoolCppItem>("MyApp", 1, 0, "ACoolItem");
+ \endcode
+
+ See \l {Using C++ Data From QML} for more information about this.
+ \li If the style that uses the type is one of many styles used by an
+ application, it may be better to only register it when necessary. This
+ is the point at which it would make sense to implement your own
+ \l {Creating C++ Plugins for QML}{QML plugin}.
+
+ Using a plugin as part of your style is not that much different from
+ using a set of QML files. The only difference is that the plugin and
+ its \c qmldir file must be present in the same directory as the QML
+ files.
+ \endlist
+
+ \section3 Attached properties
+
+ It is common for a style to have certain properties or attributes that
+ apply to all controls. \l {Attached Properties and Attached Signal
+ Handlers}{Attached properties} are a great way of extending an item in QML
+ without having to modify any existing C++ belonging to that item. For
+ example, both the \l {Material Style}{Material} and \l {Universal
+ Style}{Universal} styles have an attached theme property that controls
+ whether an item and its children will be rendered in a light or dark theme.
+
+ As an example, let's add an attached property that controls elevation. Our
+ style will illustrate the elevation with a drop shadow; the higher the
+ elevation, the larger the shadow.
+
+ The first step is to add a C++ type that stores the elevation. Since the
+ type will be used for every control supported by our style, and because we
+ may wish to add other attached properties later on, we'll call it
+ MyStyle. Here is \c MyStyle.h:
+
+ \code
+ #ifndef MYSTYLE_H
+ #define MYSTYLE_H
+
+ #include <QObject>
+ #include <QtQml>
+
+ class MyStyle : public QObject
+ {
+ Q_OBJECT
+ Q_PROPERTY(int elevation READ elevation WRITE setElevation NOTIFY elevationChanged)
+
+ public:
+ explicit MyStyle(QObject *parent = nullptr);
+
+ static MyStyle *qmlAttachedProperties(QObject *object);
+
+ int elevation() const;
+ void setElevation(int elevation);
+
+ signals:
+ void elevationChanged();
+
+ private:
+ int m_elevation;
+ };
+
+ QML_DECLARE_TYPEINFO(MyStyle, QML_HAS_ATTACHED_PROPERTIES)
+
+ #endif // MYSTYLE_H
+ \endcode
+
+ \c MyStyle.cpp:
+
+ \code
+ #include "mystyle.h"
+
+ MyStyle::MyStyle(QObject *parent) :
+ QObject(parent),
+ m_elevation(0)
+ {
+ }
+
+ MyStyle *MyStyle::qmlAttachedProperties(QObject *object)
+ {
+ return new MyStyle(object);
+ }
+
+ int MyStyle::elevation() const
+ {
+ return m_elevation;
+ }
+
+ void MyStyle::setElevation(int elevation)
+ {
+ if (elevation == m_elevation)
+ return;
+
+ m_elevation = elevation;
+ emit elevationChanged();
+ }
+ \endcode
+
+ The \c MyStyle type is special in the sense that it shouldn't be
+ instantiated, but rather used for its attached properties. For that reason,
+ we register it in the following manner:
+
+ \code
+ qmlRegisterUncreatableType<MyStyle>("MyStyle", 1, 0, "MyStyle", "MyStyle is an attached property");
+ \endcode
+
+ We then copy the existing default Button style, and add the code for a drop
+ shadow (which was taken from the Material Button style). We modify that
+ slightly to ensure that we:
+
+ \list
+ \li Don't bother using the drop shadow when the elevation is \c 0
+ \li Change the shadow's color depending on whether or not the button has
+ focus
+ \li Make the size of the shadow depend on the elevation
+ \endlist
+
+ \code
+ layer.enabled: control.enabled && control.MyStyle.elevation > 0
+ layer.effect: DropShadow {
+ verticalOffset: 1
+ color: control.visualFocus ? "#330066ff" : "#aaaaaa"
+ samples: control.MyStyle.elevation
+ spread: 0.5
+ }
+ \endcode
+
+ With that in place, we can try out our new elevation feature:
+
+ \qml
+ import QtQuick 2.6
+ import QtQuick.Controls 2.0
+
+ import MyStyle 1.0
+
+ ApplicationWindow {
+ id: window
+ width: 400
+ height: 400
+ visible: true
+
+ Row {
+ spacing: 20
+ anchors.centerIn: parent
+
+ Button {
+ text: "Button 1"
+ }
+ Button {
+ text: "Button 2"
+ MyStyle.elevation: 10
+ }
+ }
+ }
+ \endqml
+
+ The end result:
+
+ \image qtquickcontrols2-customize-buttons.png
+
+ \section1 Customization Reference
+
+ The following snippets present examples where the default style's controls
+ have been customized using the same approach as the
+ \l {Customizing a Control} section. The code can be used as a starting
+ point to implement a custom look and feel.
+
+ \section2 Customizing ApplicationWindow
+
+ ApplicationWindow consists of one visual item:
+ \l {ApplicationWindow::background}{background}. It is also possible
+ to customize the \l {ApplicationWindow::overlay}{modal} and
+ \l {ApplicationWindow::overlay}{modeless} items.
+
+ \code
+ import QtQuick 2.7
+ import QtQuick.Controls 2.0
+
+ ApplicationWindow {
+ visible: true
+
+ background: Rectangle {
+ gradient: Gradient {
+ GradientStop { position: 0; color: "#ffffff" }
+ GradientStop { position: 1; color: "#c1bbf9" }
+ }
+ }
+
+ overlay.modal: Rectangle {
+ color: "#8f28282a"
+ }
+
+ overlay.modeless: Rectangle {
+ color: "#2f28282a"
+ }
+ }
+ \endcode
+
+
+ \section2 Customizing BusyIndicator
+
+ BusyIndicator consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{contentItem}.
+
+ \image qtquickcontrols2-busyindicator-custom.png
+
+ \snippet qtquickcontrols2-busyindicator-custom.qml file
+
+
+ \section2 Customizing Button
+
+ Button consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-button-custom.png
+
+ \snippet qtquickcontrols2-button-custom.qml file
+
+
+ \section2 Customizing CheckBox
+
+ CheckBox consists of three visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{contentItem} and \l {AbstractButton::indicator}{indicator}.
+
+ \image qtquickcontrols2-checkbox-custom.png
+
+ \snippet qtquickcontrols2-checkbox-custom.qml file
+
+ \section2 Customizing CheckDelegate
+
+ CheckDelegate consists of three visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{contentItem} and \l {AbstractButton::indicator}{indicator}.
+
+ \image qtquickcontrols2-checkdelegate-custom.png
+
+ \snippet qtquickcontrols2-checkdelegate-custom.qml file
+
+
+ \section2 Customizing ComboBox
+
+ ComboBox consists of \l {Control::background}{background},
+ \l {Control::contentItem}{content item}, \l {ComboBox::popup}{popup},
+ and \l {ComboBox::delegate}{delegate}.
+
+ \image qtquickcontrols2-combobox-custom.png
+
+ \snippet qtquickcontrols2-combobox-custom.qml file
+
+
+ \section2 Customizing Dial
+
+ Dial consists of two visual items: \l {Control::background}{background}
+ and \l {Dial::handle}{handle}.
+
+ \image qtquickcontrols2-dial-custom.png
+
+ \snippet qtquickcontrols2-dial-custom.qml file
+
+
+ \section2 Customizing Drawer
+
+ Drawer can have a visual \l {Control::background}{background}
+ item.
+
+ \code
+ background: Rectangle {
+ Rectangle {
+ x: parent.width - 1
+ width: 1
+ height: parent.height
+ color: "#21be2b"
+ }
+ }
+ \endcode
+
+
+ \section2 Customizing Frame
+
+ Frame consists of one visual item: \l {Control::background}{background}.
+
+ \image qtquickcontrols2-frame-custom.png
+
+ \snippet qtquickcontrols2-frame-custom.qml file
+
+
+ \section2 Customizing GroupBox
+
+ GroupBox consists of two visual items: \l {Control::background}{background}
+ and \l {GroupBox::label}{label}.
+
+ \image qtquickcontrols2-groupbox-custom.png
+
+ \snippet qtquickcontrols2-groupbox-custom.qml file
+
+
+ \section2 Customizing ItemDelegate
+
+ ItemDelegate consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-itemdelegate-custom.png
+
+ \snippet qtquickcontrols2-itemdelegate-custom.qml file
+
+
+ \section2 Customizing Label
+
+ Label can have a visual \l {Label::background}{background} item.
+
+ \image qtquickcontrols2-label-custom.png
+
+ \snippet qtquickcontrols2-label-custom.qml file
+
+
+ \section2 Customizing Menu
+
+ Menu consists of a \l {Popup::}{contentItem}.
+
+ \quotefromfile qtquickcontrols2-menu-custom.qml
+ \skipto import QtQuick 2.6
+ \printuntil import QtQuick.Controls 2.0
+ \skipto Menu
+ \printto contentItem.parent: window
+ \skipline contentItem.parent: window
+ \printuntil text: qsTr("Save")
+ \printuntil }
+ \printuntil }
+
+
+ \section2 Customizing MenuItem
+
+ MenuItem can be customized in the same manner as
+ \l {Customizing Button}{Button}.
+
+
+ \section2 Customizing PageIndicator
+
+ PageIndicator consists of a \l {Control::background}{background}, \l {Control::contentItem}{content item}, and \l {PageIndicator::delegate}{delegate}.
+
+ \image qtquickcontrols2-pageindicator-custom.png
+
+ \snippet qtquickcontrols2-pageindicator-custom.qml file
+
+
+ \section2 Customizing Pane
+
+ Pane consists of a \l {Control::background}{background}.
+
+ \image qtquickcontrols2-pane-custom.png
+
+ \snippet qtquickcontrols2-pane-custom.qml file
+
+
+ \section2 Customizing Popup
+
+ Popup consists of a \l {Popup::background}{background} and
+ \l {Popup::contentItem}{content item}.
+
+ \image qtquickcontrols2-popup-custom.png
+
+ \quotefromfile qtquickcontrols2-popup-custom.qml
+ \skipto import QtQuick 2.6
+ \printuntil import QtQuick.Controls 2.0
+ \codeline
+ \skipto Popup
+ \printuntil {
+ \printuntil }
+ \printuntil }
+ \printuntil }
+
+
+ \section2 Customizing ProgressBar
+
+ ProgressBar consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-progressbar-custom.png
+
+ \snippet qtquickcontrols2-progressbar-custom.qml file
+
+
+ \section2 Customizing RadioButton
+
+ RadioButton consists of three visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{content item} and \l {AbstractButton::indicator}{indicator}.
+
+ \image qtquickcontrols2-radiobutton-custom.png
+
+ \snippet qtquickcontrols2-radiobutton-custom.qml file
+
+
+ \section2 Customizing RadioDelegate
+
+ RadioDelegate consists of three visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{contentItem} and \l {AbstractButton::indicator}{indicator}.
+
+ \image qtquickcontrols2-radiodelegate-custom.png
+
+ \snippet qtquickcontrols2-radiodelegate-custom.qml file
+
+
+ \section2 Customizing RangeSlider
+
+ RangeSlider consists of three visual items:
+ \l {Control::background}{background},
+ \l {RangeSlider::first}{first.handle} and
+ \l {RangeSlider::second.handle}{second.handle}.
+
+ \image qtquickcontrols2-rangeslider-custom.png
+
+ \snippet qtquickcontrols2-rangeslider-custom.qml file
+
+
+ \section2 Customizing ScrollBar
+
+ ScrollBar consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-scrollbar-custom.png
+
+ \snippet qtquickcontrols2-scrollbar-custom.qml file
+
+
+ \section2 Customizing ScrollIndicator
+
+ ScrollIndicator consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-scrollindicator-custom.png
+
+ \snippet qtquickcontrols2-scrollindicator-custom.qml file
+
+
+ \section2 Customizing Slider
+
+ Slider consists of two visual items: \l {Control::background}{background},
+ and \l {Slider::handle}{handle}.
+
+ \image qtquickcontrols2-slider-custom.png
+
+ \snippet qtquickcontrols2-slider-custom.qml file
+
+
+ \section2 Customizing SpinBox
+
+ SpinBox consists of four visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{contentItem}, \l {SpinBox::up.indicator}{up indicator},
+ and \l {SpinBox::down.indicator}{down indicator}.
+
+ \image qtquickcontrols2-spinbox-custom.png
+
+ \snippet qtquickcontrols2-spinbox-custom.qml file
+
+
+ \section2 Customizing StackView
+
+ StackView can have a visual \l {Control::background}{background}
+ item, and it allows customizing the transitions that are used for
+ push, pop, and replace operations.
+
+ \snippet qtquickcontrols2-stackview-custom.qml file
+
+
+ \section2 Customizing SwipeDelegate
+
+ SwipeDelegate consists of six visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{content item}, \l {AbstractButton::indicator}{indicator},
+ \c swipe.left, \c swipe.right, and \c swipe.behind.
+
+ \image qtquickcontrols2-swipedelegate-custom.png
+
+ \snippet qtquickcontrols2-swipedelegate-custom.qml file
+
+
+ \section2 Customizing SwipeView
+
+ SwipeView can have a visual \l {Control::background}{background}
+ item. The navigation is implemented by the \l {Control::contentItem}
+ {content item}.
+
+ \snippet qtquickcontrols2-swipeview-custom.qml file
+
+
+ \section2 Customizing Switch
+
+ Switch consists of three visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{content item} and \l {AbstractButton::indicator}{indicator}.
+
+ \image qtquickcontrols2-switch-custom.png
+
+ \snippet qtquickcontrols2-switch-custom.qml file
+
+ \section2 Customizing SwitchDelegate
+
+ SwitchDelegate consists of three visual items: \l {Control::background}{background},
+ \l {Control::contentItem}{contentItem} and \l {AbstractButton::indicator}{indicator}.
+
+ \image qtquickcontrols2-switchdelegate-custom.png
+
+ \snippet qtquickcontrols2-switchdelegate-custom.qml file
+
+
+ \section2 Customizing TabBar
+
+ TabBar consists of two visual items: \l {Control::background}{background},
+ and \l {Control::contentItem}{contentItem}.
+
+ \image qtquickcontrols2-tabbar-custom.png
+
+ \snippet qtquickcontrols2-tabbar-custom.qml file
+
+
+ \section2 Customizing TabButton
+
+ TabButton can be customized in the same manner as
+ \l {Customizing Button}{Button}.
+
+
+ \section2 Customizing TextArea
+
+ TextArea consists of a \l {TextArea::background}{background} item.
+
+ \image qtquickcontrols2-textarea-custom.png
+
+ \snippet qtquickcontrols2-textarea-custom.qml file
+
+
+ \section2 Customizing TextField
+
+ TextField consists of a \l {TextField::background}{background} item.
+
+ \image qtquickcontrols2-textfield-custom.png
+
+ \snippet qtquickcontrols2-textfield-custom.qml file
+
+
+ \section2 Customizing ToolBar
+
+ ToolBar consists of one visual item: \l {Control::background}{background}.
+
+ \image qtquickcontrols2-toolbar-custom.png
+
+ \snippet qtquickcontrols2-toolbar-custom.qml file
+
+
+ \section2 Customizing ToolButton
+
+ ToolButton consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-toolbutton-custom.png
+
+ \snippet qtquickcontrols2-toolbutton-custom.qml file
+
+
+ \section2 Customizing ToolTip
+
+ ToolTip consists of two visual items: \l {Popup::background}{background}
+ and \l {Popup::contentItem}{content item}.
+
+ \quotefromfile qtquickcontrols2-tooltip-custom.qml
+ \skipto import QtQuick 2.6
+ \printuntil import QtQuick.Controls 2.0
+ \skipto ToolTip
+ \printuntil }
+ \printuntil }
+ \printuntil }
+
+
+ \section2 Customizing Tumbler
+
+ Tumbler consists of three visual items:
+ \l {Control::background}{background},
+ \l {Control::contentItem}{contentItem}, and
+ \l {Tumbler::delegate}{delegate}.
+
+ \image qtquickcontrols2-tumbler-custom.png
+
+ \snippet qtquickcontrols2-tumbler-custom.qml file
+*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-default.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-default.qdoc
index c885c161..88faf25a 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-default.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-default.qdoc
@@ -26,28 +26,30 @@
****************************************************************************/
/*!
- \page qtlabscontrols-default.html
+ \page qtquickcontrols2-default.html
\title Default Style
The Default style is a basic all-round style.
The Default style a simple and light-weight style that offers the maximum
- performance for Qt Labs Controls. It is built with a minimal amount of Qt
+ performance for Qt Quick Controls 2. It is built with a minimal amount of Qt
Quick primitives, and keeps animations and transitions to the minimum.
- \image qtlabscontrols-default.png
+ \image qtquickcontrols2-default.png
- The style is selected by default when running Qt Labs Controls applications.
+ The style is selected by default when running Qt Quick Controls 2 applications.
It is built into the module's resources, so by default it is shipped with
- any application that depends on the Qt Labs Controls module
+ any application that depends on the Qt Quick Controls 2 module
\note The Default style is used as a fallback for other styles. If a style
does not implement a certain control, the Default style implementation of
that control is selected.
+ \b {See also} \l {Material Style}, \l {Universal Style}
+
\section1 Related Information
\list
- \li \l{Styling Qt Labs Controls}
+ \li \l{Styling Qt Quick Controls 2}
\endlist
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc
new file mode 100644
index 00000000..33b97850
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-delegates.html
+ \title Delegate Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for delegate controls
+
+ Qt Quick Controls 2 offers a selection of controls that are used as
+ delegates in views.
+
+ \annotatedlist qtquickcontrols2-delegates
+
+ Each type of delegate has its own specific target use case. The following
+ sections offer guidelines for choosing the appropriate type of delegate,
+ depending on the use case.
+
+ \section1 ItemDelegate Control
+
+ \image qtquickcontrols2-itemdelegate.gif
+
+ \l ItemDelegate presents a checkable control that can be pressed and
+ clicked by the user.
+
+ \section1 RadioDelegate Control
+
+ \image qtquickcontrols2-radiodelegate.gif
+
+ \l RadioDelegate presents a checkable control that can be toggled on
+ (checked) or off (unchecked). Radio delegates are typically used to select
+ one option from a set of options.
+
+ \b {See also} \l {RadioButton Control}.
+
+ \section1 SwipeDelegate Control
+
+ \image qtquickcontrols2-swipedelegate.gif
+
+ \l SwipeDelegate presents a view item that can be swiped left or right to
+ expose more options or information.
+
+ \section1 SwitchDelegate Control
+
+ \image qtquickcontrols2-switchdelegate.gif
+
+ \l SwitchDelegate presents a switchable delegate that can be toggled on or off.
+
+ \b {See also} \l {Switch Control}.
+
+ \section1 Related Information
+ \list
+ \li \l {Qt Quick Controls 2 Guidelines}
+ \endlist
+*/
+
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc
new file mode 100644
index 00000000..fe78ca55
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-deployment.qdoc
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-deployment.html
+ \title Deploying Qt Quick Controls 2 Applications
+
+ Deployment of Qt Quick Controls 2 applications is very similar to
+ deployment of other types of Qt applications. However, there are a few
+ factors to consider.
+
+ \section1 Deploying an Application with Several Styles
+
+ Suppose you have an application that will be deployed to both Android and
+ Windows devices. To ensure that only the minimum set of files that are
+ necessary for the application to run are deployed to each device, you can
+ use file selectors. For example, your directory structure could look like
+ this:
+
+ \code
+ resources.qrc
+ main.qml
+ +windows/MyPage.qml
+ +windows/qtquickcontrols2.conf
+ +android/MyPage.qml
+ +android/qtquickcontrols2.conf
+ \endcode
+
+ In the project above, \c main.qml would import \c QtQuick.Controls, for
+ example, but shouldn't import, say, \c QtQuick.Controls.Material. Any code
+ that is style-specific is moved out into separate files; just as we've done
+ for \c MyPage.qml.
+
+ The \c +windows/qtquickcontrols2.conf file would contain configuration
+ options specific to the Universal style:
+
+ \code
+ [Controls]
+ Style=Universal
+
+ [Universal]
+ Theme=Dark
+ Accent=Red
+ \endcode
+
+ The \c +android/qtquickcontrols2.conf file would contain configuration
+ options specific to the Material style:
+
+ \code
+ [Controls]
+ Style=Material
+
+ [Material]
+ Theme=Light
+ Accent=Brown
+ \endcode
+
+ \section1 Static Builds
+
+ For dynamically built applications, it is not necessary to import a
+ specific style that should be usable by that application. For statically
+ built applications, Qt's build system must be involved to ensure that
+ QML plugins function as expected. Specifically, \c qmake uses
+ \c qmlimportscanner to scan the QML files in your application for import
+ statements. For this reason, any styles that should be usable by a
+ statically built application must explicitly import that style. Where the
+ import occurs is up to the developer, but it is recommended to follow the
+ approach mentioned in the \l {Deploying an Application with Several Styles}
+ section, so that only the minimum set of files that are necessary for a
+ particular device are deployed.
+
+ \sa {Deploying Qt Applications}
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
new file mode 100644
index 00000000..a85890f5
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
@@ -0,0 +1,378 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-differences.html
+ \title Differences between Qt Quick Controls
+
+ Qt Quick Controls were originally developed to support desktop platforms,
+ with mobile and embedded support coming shortly afterwards. They have a
+ very broad scope, in that they provide a styling system flexible enough to
+ allow the development of applications that have either a platform-dependent
+ or platform-independent style.
+
+ On embedded systems, where the hardware has limited resources, this approach
+ can be inefficient. Qt Quick Controls 2 were designed to solve this problem,
+ using
+ \l {https://blog.qt.io/blog/2015/03/31/qt-quick-controls-for-embedded/}{benchmarks}
+ to guide the development.
+
+ \section2 C++ and QML
+
+ In many cases, the internal state of a control can be more efficiently
+ processed in C++. For example, handling input events in C++ makes a
+ difference for controls that would otherwise need to create internal
+ MouseAreas and attached Keys objects.
+
+ \section2 Styles
+
+ Not only does handling events and logic in C++ increase performance, but it
+ allows the visual QML layer to be a simple, declarative layer on top. This
+ is reflected in the structure of the controls project: all visual
+ implementations sit in the \e imports folder, so that users who want to
+ create their own complete style can copy the folder and start tweaking.
+ Read more about implementing a style plugin
+ \l {Creating a Custom Style}{here}.
+
+ In Qt Quick Controls 2, styles no longer provide components that are
+ dynamically instantiated by controls, but controls themselves consist of
+ item delegates that can be replaced. In effect, this means that delegates
+ are Qt Quick items that are instantiated on the spot, as properties of the
+ control, and are simply parented to the control.
+
+ \section2 Modularity and Simplicity
+
+ When it comes to more complex controls, it is sometimes better to split
+ them up into separate building blocks. As an example, the complex
+ ScrollView control:
+
+ \qml
+ ScrollView {
+ horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
+ Flickable {
+ // ...
+ }
+ }
+ \endqml
+
+ Is replaced with simple ScrollBar/ScrollIndicator controls that can be
+ attached to any Flickable:
+
+ \qml
+ Flickable {
+ // ...
+ ScrollBar.vertical: ScrollBar { }
+ }
+ \endqml
+
+ The API of Qt Quick Controls 2 aims to be clean and simple. Common
+ operations are easy, and more advanced ones are liberally documented with
+ snippets that can be copied into your code.
+
+ \section2 Feature Comparison Table
+
+ \table
+ \header
+ \li
+ \li Qt Quick Controls
+ \li Qt Quick Controls 2
+ \row
+ \li Stylable delegates
+ \li Yes
+ \li Yes
+ \row
+ \li Pre-built native styles
+ \li Yes
+ \li No
+ \row
+ \li Runtime style/theme changes
+ \li Yes \sup 1
+ \li Yes \sup 2
+ \row
+ \li Can be used on Desktop
+ \li Yes
+ \li Yes \sup 3
+ \row
+ \li Can be used on Mobile
+ \li Yes \sup 4
+ \li Yes
+ \row
+ \li Can be used on Embedded
+ \li Yes \sup 4
+ \li Yes
+ \row
+ \li Internal event handling
+ \li QML
+ \li C++
+ \endtable
+
+ \list 1
+ \li Not officially supported, but technically possible via private APIs
+ \li Only themes for specific styles can be changed at runtime, styles are fixed
+ \li No hover effects
+ \li Performance may not be optimal
+ \endlist
+
+ \section2 Porting Qt Quick Controls Code
+
+ The API of Qt Quick Controls 2 is very similar to Qt Quick Controls, but it
+ does come with some changes necessary to facilitate the improvements. The
+ majority of changes are to do with styling; all of a control's delegates
+ are now accessible in the control itself, instead of in a separate style
+ object.
+
+ For example, to style a button in Qt Quick Controls:
+
+ \badcode
+ Button {
+ style: ButtonStyle {
+ label: Label {
+ // ...
+ }
+ }
+ }
+ \endcode
+
+ To style a button in Qt Quick Controls 2:
+
+ \qml
+ Button {
+ contentItem: Label {
+ // ...
+ }
+ }
+ \endqml
+
+ \section3 Preparing for Migration
+
+ With this in mind, a good way to prepare for a migration to Qt Quick
+ Controls 2 is to place each control that you have a custom style for in its
+ own QML file. For example, the Qt Quick Controls button above could be
+ moved to a file named \c Button.qml in a directory named \c controls, and
+ used in the following manner:
+
+ \badcode
+ import "controls" as Controls
+
+ Controls.Button {
+ ...
+ }
+ \endcode
+
+ This works with both modules, and will reduce the amount of work needed
+ when the migration begins.
+
+ \section3 Type Comparison Table
+
+ \table
+ \header
+ \li Qt Quick Controls 1, Qt Quick Extras
+ \li Qt Quick Controls 2, Qt Labs Calendar
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {AbstractButton}
+ \row
+ \li \l [QML QtQuickControls] {Action}
+ \li \span {} {\mdash \nbsp \sub {(see \l [QML QtQuick] {Shortcut} instead)}}
+ \row
+ \li \l [QML QtQuickControls] {ApplicationWindow}
+ \li \l [QML QtQuickControls2] {ApplicationWindow}
+ \row
+ \li \l [QML QtQuickControls] {BusyIndicator}
+ \li \l [QML QtQuickControls2] {BusyIndicator}
+ \row
+ \li \l [QML QtQuickControls] {Button}
+ \li \l [QML QtQuickControls2] {Button}
+ \row
+ \li \l [QML QtQuickExtras] {CircularGauge}
+ \li \mdash
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {Control}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {Container}
+ \row
+ \li \l [QML QtQuickControls] {Calendar}
+ \li \l [QML QtLabsCalendar] {MonthGrid},
+ \l [QML QtLabsCalendar] {DayOfWeekRow},
+ \l [QML QtLabsCalendar] {WeekNumberColumn}
+ \row
+ \li \l [QML QtQuickControls] {CheckBox}
+ \li \l [QML QtQuickControls2] {CheckBox}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {CheckDelegate}
+ \row
+ \li \l [QML QtQuickControls] {ComboBox}
+ \li \l [QML QtQuickControls2] {ComboBox}
+ \row
+ \li \l [QML QtQuickExtras] {DelayButton}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickExtras] {Dial}
+ \li \l [QML QtQuickControls2] {Dial}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {Drawer}
+ \row
+ \li \l [QML QtQuickControls] {ExclusiveGroup}
+ \li \l [QML QtQuickControls2] {ButtonGroup}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {Frame}
+ \row
+ \li \l [QML QtQuickExtras] {Gauge}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickControls] {GroupBox}
+ \li \l [QML QtQuickControls2] {GroupBox}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {ItemDelegate}
+ \row
+ \li \l [QML QtQuickControls] {Label}
+ \li \l [QML QtQuickControls2] {Label}
+ \row
+ \li \l [QML QtQuickControls] {Menu}
+ \li \l [QML QtQuickControls2] {Menu}
+ \row
+ \li \l [QML QtQuickControls] {MenuBar}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickControls] {MenuItem}
+ \li \l [QML QtQuickControls2] {MenuItem}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {Page}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {PageIndicator}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {Pane}
+ \row
+ \li \l [QML QtQuickExtras] {Picture}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickExtras] {PieMenu}
+ \li \mdash
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {Popup}
+ \row
+ \li \l [QML QtQuickControls] {ProgressBar}
+ \li \l [QML QtQuickControls2] {ProgressBar}
+ \row
+ \li \l [QML QtQuickControls] {RadioButton}
+ \li \l [QML QtQuickControls2] {RadioButton}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {RadioDelegate}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {RangeSlider}
+ \row
+ \li \l [QML QtQuickControls] {ScrollView}
+ \li \l [QML QtQuickControls2] {ScrollBar},
+ \l [QML QtQuickControls2] {ScrollIndicator}
+ \row
+ \li \l [QML QtQuickControls] {Slider}
+ \li \l [QML QtQuickControls2] {Slider}
+ \row
+ \li \l [QML QtQuickControls] {SplitView}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickControls] {SpinBox}
+ \li \l [QML QtQuickControls2] {SpinBox}
+ \row
+ \li \l [QML QtQuickControls] {StackView},
+ \l [QML QtQuickControls] {StackViewDelegate},
+ \l [QML QtQuickControls] {Stack}
+ \li \l [QML QtQuickControls2] {StackView}
+ \row
+ \li \l [QML QtQuickControls] {StatusBar}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickExtras] {StatusIndicator}
+ \li \mdash
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {SwipeDelegate}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {SwipeView}
+ \row
+ \li \l [QML QtQuickControls] {Switch}
+ \li \l [QML QtQuickControls2] {Switch}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {SwitchDelegate}
+ \row
+ \li \l [QML QtQuickControls] {TabView},
+ \l [QML QtQuickControls] {Tab}
+ \li \l [QML QtQuickControls2] {TabBar},
+ \l [QML QtQuickControls2] {TabButton}
+ \row
+ \li \l [QML QtQuickControls] {TableView}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickControls] {TextArea}
+ \li \l [QML QtQuickControls2] {TextArea}
+ \row
+ \li \l [QML QtQuickControls] {TextField}
+ \li \l [QML QtQuickControls2] {TextField}
+ \row
+ \li \l [QML QtQuickExtras] {ToggleButton}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickControls] {ToolBar}
+ \li \l [QML QtQuickControls2] {ToolBar}
+ \row
+ \li \l [QML QtQuickControls] {ToolButton}
+ \li \l [QML QtQuickControls2] {ToolButton}
+ \row
+ \li \mdash
+ \li \l [QML QtQuickControls2] {ToolTip}
+ \row
+ \li \l [QML QtQuickControls] {TreeView}
+ \li \mdash
+ \row
+ \li \l [QML QtQuickExtras] {Tumbler},
+ \l [QML QtQuickExtras] {TumblerColumn}
+ \li \l [QML QtQuickControls2] {Tumbler}
+ \endtable
+
+ \section1 Related Information
+
+ \list
+ \li \l{Qt Quick}
+ \li \l{Qt Quick Controls 2 QML Types}
+ \li \l{Qt Quick Controls QML Types}
+ \li \l{Qt Quick Extras QML Types}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
new file mode 100644
index 00000000..7c1b1c16
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-environment.html
+ \title Supported Environment Variables in Qt Quick Controls 2
+
+ This page contains a list of all environment variables that Qt Quick Controls 2
+ supports. The environment variables are primarily meant for testing purposes, but
+ they can also be used to set system-wide defaults.
+
+ \table
+ \header
+ \li Variable
+ \li Description
+ \row
+ \li \c QT_QUICK_CONTROLS_STYLE
+ \li Specifies the default \l {Styling Qt Quick Controls 2}{Qt Quick Controls 2 style}.
+ The value can be either one of the built-in styles, for example \c "Material",
+ or the path to a custom style such as \c ":/mystyle".
+ \row
+ \li \c QT_QUICK_CONTROLS_CONF
+ \li Specifies the location of the \l {Qt Quick Controls 2 configuration file}.
+ By default, the configuration file is loaded from the application's
+ resources in \c ":/qtquickcontrols2.conf".
+ \endtable
+
+ \l {Material style} specific environment variables:
+
+ \include qquickmaterialstyle.qdocinc env
+
+ \l {Universal style} specific environment variables:
+
+ \include qquickuniversalstyle.qdocinc env
+
+ \section1 Related Information
+
+ \list
+ \li \l{Styling Qt Quick Controls 2}
+ \li \l{Qt Quick Controls 2 Configuration File}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler-background.qml b/src/imports/controls/doc/src/qtquickcontrols2-examples.qdoc
index 8a423cac..1455d98a 100644
--- a/src/imports/controls/doc/snippets/qtlabscontrols-tumbler-background.qml
+++ b/src/imports/controls/doc/src/qtquickcontrols2-examples.qdoc
@@ -25,15 +25,11 @@
**
****************************************************************************/
-import QtQuick 2.0
-import Qt.labs.controls 1.0
+/*!
+ \group qtquickcontrols2-examples
+ \ingroup all-examples
+ \title Qt Quick Controls 2 Examples
+ \brief A collection of examples for \l {Qt Quick Controls 2}
-Tumbler {
- model: 5
-
- Rectangle {
- anchors.fill: parent
- color: 'transparent'
- border.color: 'red'
- }
-}
+ These examples demonstrate creating user interfaces using \l {Qt Quick Controls 2}.
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc
new file mode 100644
index 00000000..86df60c7
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-fileselectors.qdoc
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-fileselectors.html
+ \title Using File Selectors with Qt Quick Controls 2
+
+ \l {QFileSelector}{File selectors} provide a convenient way of selecting
+ file variants. Qt offers the platform name and the locale as built-in
+ selectors. Qt Quick Controls 2 extends the built-in selectors with the name
+ (lowercase) of the style that an application is running with.
+
+ By using file selectors, style-specific tweaks can be applied without
+ creating a hard dependency to a style. From the available file variants,
+ only the selected QML file is loaded by the QML engine. Each file variant
+ can assume the context, that is, a specific style. This typically leads
+ to some code duplication, but on the other hand, cuts the aforementioned
+ hard dependency to the style, and leads to simpler and more efficient
+ QML code. The same technique is used to implement the \l {Styling Qt
+ Quick Controls 2}{Qt Quick Controls 2 styles}.
+
+ The following example demonstrates a custom rounded button that has a
+ styled drop shadow in the \l {Material Style}{Material style}, and looks
+ flat in other styles. The files are organized so that the Material version
+ of \c CustomButton.qml is placed into a \c +material sub-directory.
+
+ \code
+ :/main.qml
+ :/CustomButton.qml
+ :/+material/CustomButton.qml
+ \endcode
+
+ By default, \c main.qml will use \c CustomButton.qml for the \c CustomButton
+ type. However, when the application is run with the Material style, the
+ \c material selector will be present and the \c +material/CustomButton.qml
+ version will be used instead.
+
+ \code
+ // main.qml
+ import QtQuick 2.6
+ import QtQuick.Controls 2.0
+
+ ApplicationWindow {
+ id: window
+ visible: true
+
+ CustomButton {
+ text: "Button"
+ anchors.centerIn: parent
+ }
+ }
+ \endcode
+
+ The base implementation of the custom button is a simple rounded
+ flat button.
+
+ \code
+ // CustomButton.qml
+ import QtQuick 2.6
+ import QtQuick.Controls 2.0
+
+ Button {
+ id: control
+
+ background: Rectangle {
+ radius: width / 2
+ implicitWidth: 36
+ implicitHeight: 36
+ color: control.pressed ? "#ccc" : "#eee"
+ }
+ }
+ \endcode
+
+ The Material style's implementation of the custom button imports the
+ Material style, requests a dark theme to get light text, and creates
+ a drop shadow for the background.
+
+ \code
+ // +material/CustomButton.qml
+ import QtQuick 2.6
+ import QtGraphicalEffects 1.0
+ import QtQuick.Controls 2.0
+ import QtQuick.Controls.Material 2.0
+
+ Button {
+ id: control
+
+ Material.theme: Material.Dark
+
+ background: Rectangle {
+ implicitWidth: 48
+ implicitHeight: 48
+ color: Material.accentColor
+ radius: width / 2
+
+ layer.enabled: control.enabled
+ layer.effect: DropShadow {
+ verticalOffset: 1
+ color: Material.dropShadowColor
+ samples: control.pressed ? 20 : 10
+ spread: 0.5
+ }
+ }
+ }
+ \endcode
+
+ \note It is recommended to use \l QQmlApplicationEngine, which internally
+ creates a \l QQmlFileSelector instance. This is all that is needed to take
+ QML file selectors into use.
+
+ \section1 Related Information
+ \list
+ \li \l {QFileSelector}
+ \li \l {QQmlFileSelector}
+ \li \l {Styling Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-gettingstarted.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc
index fda89d5b..4661e8c9 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-gettingstarted.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-gettingstarted.qdoc
@@ -26,8 +26,8 @@
****************************************************************************/
/*!
- \page qtlabscontrols-gettingstarted.html
- \title Getting Started with Qt Labs Controls
+ \page qtquickcontrols2-gettingstarted.html
+ \title Getting Started with Qt Quick Controls 2
A basic example of a QML file that makes use of controls is shown here:
@@ -39,7 +39,7 @@
C++ application, doing this means you can only set window properties from
C++.
- With Qt Labs Controls, declare an ApplicationWindow as the root item of
+ With Qt Quick Controls 2, declare an ApplicationWindow as the root item of
your application and launch it by using QQmlApplicationEngine instead.
This ensures that you can control top level window properties from QML.
diff --git a/src/imports/controls/doc/src/qtlabscontrols-menus.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-guidelines.qdoc
index 65b4f04c..87ba4cf1 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-menus.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-guidelines.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -26,18 +26,19 @@
****************************************************************************/
/*!
- \page qtlabscontrols-menus.html
- \title Menu Controls
+ \page qtquickcontrols2-guidelines.html
+ \title Qt Quick Controls 2 Guidelines
- \annotatedlist qtlabscontrols-menus
+ Qt Quick Controls 2 offers a selection of controls that can be used to
+ build complete interfaces in Qt Quick.
- Each type of menu control has its own specific target use case. The
- following sections offer guidelines for choosing the appropriate type
- of menu control, depending on the use case.
+ Below you will find practical guidelines on how and when to use
+ the controls.
- \section1 Menu Control
+ \annotatedlist qtquickcontrols2-guidelines
- \image qtlabscontrols-menu.png
-
- \l Menu is a traditional menu.
+ \section1 Related Information
+ \list
+ \li \l{Qt Quick Controls 2 QML Types}{All Qt Quick Controls 2 QML Types}
+ \endlist
*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-highdpi.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-highdpi.qdoc
index e9f6a88b..301337e4 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-highdpi.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-highdpi.qdoc
@@ -26,10 +26,10 @@
****************************************************************************/
/*!
- \page qtlabscontrols-highdpi.html
- \title High-DPI Support in Qt Labs Controls
+ \page qtquickcontrols2-highdpi.html
+ \title High-DPI Support in Qt Quick Controls 2
- Qt Labs Controls support Qt's cross-platform high-DPI scaling introduced in Qt 5.6.
+ Qt Quick Controls 2 support Qt's cross-platform high-DPI scaling introduced in Qt 5.6.
The feature is opt-in, and can be enabled by setting the \c Qt::AA_EnableHighDpiScaling
application attribute in C++ before QGuiApplication is constructed:
@@ -52,7 +52,7 @@
\warning \l {Qt Quick Controls}{Qt Quick Controls 1.x} are not compatible with Qt's
automatic high-DPI scaling. There is currently no available solution for high-DPI
- support in applications wishing to mix Qt Quick Controls and Qt Labs Controls.
+ support in applications wishing to mix Qt Quick Controls and Qt Quick Controls 2.
\section1 Related Information
\list
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
new file mode 100644
index 00000000..cdb20a27
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-index.html
+ \title Qt Quick Controls 2
+
+ \brief Provides a set of UI controls for Qt Quick.
+
+ Qt Quick Controls 2 provides a set of controls that can be used
+ to build complete interfaces in Qt Quick.
+
+ \section1 Prerequisites
+
+ The \l{Qt Quick Controls 2 QML Types}{QML types} can be imported into your
+ application using the following import statement in your \c {.qml} file:
+
+ \code
+ import QtQuick.Controls 2.0
+ \endcode
+
+ The \l{Qt Quick Controls 2 C++ Classes}{C++ classes} can be included into
+ your application using the following include statement:
+
+ \code
+ #include <QtQuickControls2>
+ \endcode
+
+ To link against the corresponding C++ libraries, add the following to your
+ qmake project file:
+
+ \code
+ QT += quickcontrols2
+ \endcode
+
+ For more details, see \l {Getting Started with Qt Quick Controls 2}.
+
+ \section1 Important Concepts in Qt Quick Controls 2
+
+ \list
+ \li \l{Qt Quick Controls 2 Guidelines}
+ \li \l{Styling Qt Quick Controls 2}
+ \li \l{Customizing Qt Quick Controls 2}
+ \li \l{High-DPI Support in Qt Quick Controls 2}
+ \li \l{Using File Selectors with Qt Quick Controls 2}
+ \li \l{Differences between Qt Quick Controls}
+ \li \l{Deploying Qt Quick Controls 2 Applications}
+ \li \l{Qt Quick Controls 2 Configuration File}
+ \li \l{Supported Environment Variables in Qt Quick Controls 2}
+ \endlist
+
+ \section1 Reference
+
+ \list
+ \li \l{Qt Quick Controls 2 QML Types}{QML Types}
+ \li \l{Qt Quick Controls 2 C++ Classes}{C++ Classes}
+ \endlist
+
+ \section1 Examples
+
+ \list
+ \li \l{Qt Quick Controls 2 - Gallery}{Gallery}
+ \li \l{Qt Quick Controls 2 - Chat Tutorial}{Chat Tutorial}
+ \li \l{Qt Quick Controls 2 Examples}{All Examples}
+ \endlist
+
+ \section1 Related Modules
+
+ \list
+ \li \l{Qt Quick}
+ \li \l{Qt Quick Layouts}
+ \li \l{Qt Quick Templates 2}
+ \li \l{Qt Labs Calendar}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-indicators.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-indicators.qdoc
index 11d440f7..84367278 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-indicators.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-indicators.qdoc
@@ -26,12 +26,14 @@
****************************************************************************/
/*!
- \page qtlabscontrols-indicators.html
+ \page qtquickcontrols2-indicators.html
\title Indicator Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for indicator controls
- Qt Labs Controls offers a selection of indicator-like controls.
+ Qt Quick Controls 2 offers a selection of indicator-like controls.
- \annotatedlist qtlabscontrols-indicators
+ \annotatedlist qtquickcontrols2-indicators
Each type of indicator has its own specific target use case. The following
sections offer guidelines for choosing the appropriate type of indicator,
@@ -39,20 +41,27 @@
\section1 BusyIndicator Control
- \image qtlabscontrols-busyindicator.png
+ \image qtquickcontrols2-busyindicator.png
\l BusyIndicator should be used to indicate activity.
\section1 PageIndicator Control
- \image qtlabscontrols-pageindicator.png
+ \image qtquickcontrols2-pageindicator.png
- \l PageIndicator is used to indicate the currently active page in
- a container of multiple pages.
+ \l BusyIndicator can be used to show that an operation is in progress,
+ and that the UI has to wait for the operation to complete.
+
+ \section1 ProgressBar Control
+
+ \image qtquickcontrols2-progressbar.gif
+
+ \l ProgressBar indicates the progress of an operation. The value should be
+ updated regularly.
\section1 ScrollBar Control
- \image qtlabscontrols-scrollbar.png
+ \image qtquickcontrols2-scrollbar.gif
\l ScrollBar is an interactive bar that indicates the current scroll
position, and can be used to scroll to a specific position in a
@@ -60,8 +69,14 @@
\section1 ScrollIndicator Control
- \image qtlabscontrols-scrollindicator.png
+ \image qtquickcontrols2-scrollindicator.gif
\l ScrollIndicator is a non-interactive indicator that indicates the
- current scroll position in a \l Flickable.
+ current scroll position, and can be used to scroll to a specific position in a
+ \l {Flickable}.
+
+ \section1 Related Information
+ \list
+ \li \l {Qt Quick Controls 2 Guidelines}
+ \endlist
*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-input.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
index 06c0b40d..ce7b6aa4 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-input.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
@@ -26,13 +26,15 @@
****************************************************************************/
/*!
- \page qtlabscontrols-input.html
+ \page qtquickcontrols2-input.html
\title Input Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for input controls
- Qt Labs Controls offers a variety of input controls for both numeric
+ Qt Quick Controls 2 offers a variety of input controls for both numeric
and textual input.
- \annotatedlist qtlabscontrols-input
+ \annotatedlist qtquickcontrols2-input
Each type of input control has its own specific target use case. The
following sections offer guidelines for choosing the appropriate type
@@ -40,44 +42,73 @@
\section1 ComboBox Control
- \image qtlabscontrols-combobox.png
+ \image qtquickcontrols2-combobox.gif
- \l ComboBox is used to select a value from a drop-down list.
+ \l ComboBox is used to select a value from a static multiple-line drop-down list.
+ It is not possible to add new values, and only one option can be selected.
+
+ Recommendations:
+ \list
+ \li If the number of values is very large, consider applying a filter.
+ \li If the list is very limited, consider using RadioButton. This has the
+ advantage that the user can see all options at the same time.
+ \li Select a default value, the value that will be chosen most often.
+ \endlist
+
+ \b {See also} \l {CheckBox Control}, \l {Tumbler Control}.
\section1 Dial Control
- \image qtlabscontrols-dial.png
+ \image qtquickcontrols2-dial.png
+
+ \l Dial is similar to a traditional dial knob that is found on devices such
+ as stereos or industrial equipment.
- \l Dial is a circular dial that is rotated to set a value.
+ The dial is rotated by clicking and dragging, with the handle indicating the
+ value of the dial.
+
+ \b {See also} \l {Tumbler Control}.
\section1 TextArea Control
- \image qtlabscontrols-textarea.png
+ \image qtquickcontrols2-textarea.png
\l TextArea is a multi-line text editor.
\section1 TextField Control
- \image qtlabscontrols-textfield.png
+ \image qtquickcontrols2-textfield.png
\l TextField is a single line text editor.
+ \b {See also} \l {Tumbler Control}.
+
\section1 Slider Control
- \image qtlabscontrols-slider.png
+ \image qtquickcontrols2-slider.gif
\l Slider is used to select a value by sliding a handle along a track.
\section1 RangeSlider Control
- \image qtlabscontrols-rangeslider.png
+ \image qtquickcontrols2-rangeslider.gif
\l RangeSlider is used to select a range specified by two values,
by sliding each handle along a track.
+
+ \b {See also} \l {Slider Control}.
+
\section1 Tumbler Control
- \image qtlabscontrols-tumbler.png
+ \image qtquickcontrols2-tumbler.png
\l Tumbler is a spinnable wheel of items that can be selected.
+
+ \b {See also} \l {ComboBox Control}.
+
+ \section1 Related Information
+ \list
+ \li \l {Qt Quick Controls 2 Guidelines}
+ \endlist
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
new file mode 100644
index 00000000..9842fee6
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
@@ -0,0 +1,367 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-material.html
+ \title Material Style
+
+ The Material Style is based on the Google Material Design Guidelines.
+ \l{detailed-desc-material}{More...}
+
+ \styleimport {QtQuick.Controls.Material 2.0} {Qt 5.7}
+
+ \section1 Attached Properties
+
+ \list
+ \li \l {material-accent-attached-prop}{\b accent} : color
+ \li \l {material-background-attached-prop}{\b background} : color
+ \li \l {material-elevation-attached-prop}{\b elevation} : int
+ \li \l {material-foreground-attached-prop}{\b foreground} : color
+ \li \l {material-primary-attached-prop}{\b primary} : color
+ \li \l {material-theme-attached-prop}{\b theme} : enumeration
+ \endlist
+
+ \section1 Attached Methods
+
+ \list
+ \li color \l {material-color-attached-method}{\b color}(enumeration predefined, enumeration shade)
+ \endlist
+
+ \section1 Detailed Description
+ \target detailed-desc-material
+
+ The Material style is based on the \l {https://www.google.com/design/spec/material-design/introduction.html}
+ {Google Material Design Guidelines}. It allows for a unified experience
+ across platforms and device sizes.
+
+ \image qtquickcontrols2-material.png
+ \caption The Material style in light and dark themes
+
+ To run an application with the Material style, see
+ \l {Using Styles in Qt Quick Controls 2}.
+
+ \note The Material style is not a native Android style. The Material
+ style is a 100% cross-platform Qt Quick Controls 2 style implementation that
+ follows the Google Material Design Guidelines. The style runs on any
+ platform, and looks more or less identical everywhere. Minor differences
+ may occur due to differences in available system fonts and font rendering
+ engines.
+
+ \section2 Customization
+
+ The Material style allows customizing five attributes, \l {material-theme-attached-prop}{theme},
+ \l {material-primary-attached-prop}{primary}, \l {material-accent-attached-prop}{accent},
+ \l {material-foreground-attached-prop}{foreground}, and \l {material-background-attached-prop}{background}.
+
+ \image qtquickcontrols2-material-attributes.png
+
+ All attributes can be specified for any window or item, and they automatically
+ propagate to children in the same manner as \l {Control::font}{fonts}. In the
+ following example, the window and all three radio buttons appear in the dark
+ theme using a purple accent color:
+
+ \table
+ \row
+ \li
+ \qml
+ import QtQuick 2.0
+ import QtQuick.Controls 2.0
+ import QtQuick.Controls.Material 2.0
+
+ ApplicationWindow {
+ visible: true
+
+ Material.theme: Material.Dark
+ Material.accent: Material.Purple
+
+ Column {
+ anchors.centerIn: parent
+
+ RadioButton { text: qsTr("Small") }
+ RadioButton { text: qsTr("Medium"); checked: true }
+ RadioButton { text: qsTr("Large") }
+ }
+ }
+ \endqml
+ \li
+ \image qtquickcontrols2-material-dark.png
+ \endtable
+
+ In addition to specifying the attributes in QML, it is also possible to
+ specify them via environment variables or in a configuration file. Attributes
+ specified in QML take precedence over all other methods.
+
+ \section3 Configuration File
+
+ \include qquickmaterialstyle.qdocinc conf
+
+ See \l {Qt Quick Controls 2 Configuration File} for more details about the
+ configuration file.
+
+ \section3 Environment Variables
+
+ \include qquickmaterialstyle.qdocinc env
+
+ See \l {Supported Environment Variables in Qt Quick Controls 2} for the full
+ list of supported environment variables.
+
+ \section2 Dependency
+
+ The Material style must be separately imported to gain access to the
+ attributes that are specific to the Material style. It should be noted
+ that regardless of the references to the Material style, the same
+ application code runs with any other style. Material-specific attributes
+ only have an effect when the application is run with the Material style.
+
+ If the Material style is imported in a QML file that is always loaded, the
+ Material style must be deployed with the application in order to be able
+ to run the application regardless of which style the application is run with.
+ By using \l {Using File Selectors with Qt Quick Controls 2}{file selectors},
+ style-specific tweaks can be applied without creating a hard dependency to
+ a style.
+
+ \section2 Pre-defined Material Colors
+
+ Even though primary and accent can be any \l {colorbasictypedocs}{color}, it
+ is recommended to use one of the pre-defined colors that have been designed
+ to work well with the rest of the Material style palette:
+
+ Available pre-defined colors:
+ \value Material.Red \stylecolor {#F44336} {}
+ \value Material.Pink \stylecolor {#E91E63} {(default accent)}
+ \value Material.Purple \stylecolor {#9C27B0} {}
+ \value Material.DeepPurple \stylecolor {#673AB7} {}
+ \value Material.Indigo \stylecolor {#3F51B5} {(default primary)}
+ \value Material.Blue \stylecolor {#2196F3} {}
+ \value Material.LightBlue \stylecolor {#03A9F4} {}
+ \value Material.Cyan \stylecolor {#00BCD4} {}
+ \value Material.Teal \stylecolor {#009688} {}
+ \value Material.Green \stylecolor {#4CAF50} {}
+ \value Material.LightGreen \stylecolor {#8BC34A} {}
+ \value Material.Lime \stylecolor {#CDDC39} {}
+ \value Material.Yellow \stylecolor {#FFEB3B} {}
+ \value Material.Amber \stylecolor {#FFC107} {}
+ \value Material.Orange \stylecolor {#FF9800} {}
+ \value Material.DeepOrange \stylecolor {#FF5722} {}
+ \value Material.Brown \stylecolor {#795548} {}
+ \value Material.Grey \stylecolor {#9E9E9E} {}
+ \value Material.BlueGrey \stylecolor {#607D8B} {}
+
+ When the dark theme is in use, different \l {Pre-defined Shades}{shades} of
+ the pre-defined colors are used by default:
+
+ \value Material.Red \stylecolor {#EF9A9A} {}
+ \value Material.Pink \stylecolor {#F48FB1} {(default accent)}
+ \value Material.Purple \stylecolor {#CE93D8} {}
+ \value Material.DeepPurple \stylecolor {#B39DDB} {}
+ \value Material.Indigo \stylecolor {#9FA8DA} {(default primary)}
+ \value Material.Blue \stylecolor {#90CAF9} {}
+ \value Material.LightBlue \stylecolor {#81D4FA} {}
+ \value Material.Cyan \stylecolor {#80DEEA} {}
+ \value Material.Teal \stylecolor {#80CBC4} {}
+ \value Material.Green \stylecolor {#A5D6A7} {}
+ \value Material.LightGreen \stylecolor {#C5E1A5} {}
+ \value Material.Lime \stylecolor {#E6EE9C} {}
+ \value Material.Yellow \stylecolor {#FFF59D} {}
+ \value Material.Amber \stylecolor {#FFE082} {}
+ \value Material.Orange \stylecolor {#FFCC80} {}
+ \value Material.DeepOrange \stylecolor {#FFAB91} {}
+ \value Material.Brown \stylecolor {#BCAAA4} {}
+ \value Material.Grey \stylecolor {#EEEEEE} {}
+ \value Material.BlueGrey \stylecolor {#B0BEC5} {}
+
+ \section2 Pre-defined Shades
+
+ There are several different
+ \l {https://material.google.com/style/color.html#color-color-palette}{shades}
+ of each \l {Pre-defined Material Colors}{pre-defined color} that can be passed
+ to the \l {material-color-attached-method}{Material.color()} function:
+ \value Material.Shade50
+ \value Material.Shade100
+ \value Material.Shade200
+ \value Material.Shade300
+ \value Material.Shade400
+ \value Material.Shade500
+ \value Material.Shade600
+ \value Material.Shade700
+ \value Material.Shade800
+ \value Material.Shade900
+ \value Material.ShadeA100
+ \value Material.ShadeA200
+ \value Material.ShadeA400
+ \value Material.ShadeA700
+
+ \b {See also} \l {Default Style}, \l {Universal Style}
+
+ \section1 Attached Property Documentation
+
+ \styleproperty {Material.accent} {color} {material-accent-attached-prop}
+ \target material-accent-attached-prop
+ This attached property holds the accent color of the theme. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ The default value is \c Material.Pink.
+
+ In the following example, the accent color of the highlighted button is
+ changed to \c Material.Orange:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-material-accent.qml 1
+ \li
+ \image qtquickcontrols2-material-accent.png
+ \endtable
+
+ \note Even though the accent can be any \l {colorbasictypedocs}{color}, it is
+ recommended to use one of the \l {pre-defined Material colors} that have been
+ designed to work well with the rest of the Material style palette.
+
+ \endstyleproperty
+
+ \styleproperty {Material.background} {color} {material-background-attached-prop}
+ \target material-background-attached-prop
+ This attached property holds the background color of the theme. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ The default value is theme-specific (light or dark).
+
+ In the following example, the background color of the button is changed to
+ \c Material.Teal:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-material-background.qml 1
+ \li
+ \image qtquickcontrols2-material-background.png
+ \endtable
+
+ \endstyleproperty
+
+ \styleproperty {Material.elevation} {int} {material-elevation-attached-prop}
+ \target material-elevation-attached-prop
+ This attached property holds the elevation of the control. The higher the
+ elevation, the deeper the shadow. The property can be attached to any control,
+ but not all controls visualize elevation.
+
+ The default value is control-specific.
+
+ In the following example, the elevation of the pane is set to \c 6
+ in order to achieve the look of an
+ \l {https://material.google.com/components/cards.html}{elevated card}:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-material-elevation.qml 1
+ \li
+ \image qtquickcontrols2-material-elevation.png
+ \endtable
+
+ \endstyleproperty
+
+ \styleproperty {Material.foreground} {color} {material-foreground-attached-prop}
+ \target material-foreground-attached-prop
+ This attached property holds the foreground color of the theme. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ The default value is theme-specific (light or dark).
+
+ In the following example, the foreground color of the button is set to \c
+ Material.Pink:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-material-foreground.qml 1
+ \li
+ \image qtquickcontrols2-material-foreground.png
+ \endtable
+
+ \endstyleproperty
+
+ \styleproperty {Material.primary} {color} {material-primary-attached-prop}
+ \target material-primary-attached-prop
+ This attached property holds the primary color of the theme. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ The primary color is used as the background color of ToolBar by default.
+
+ The default value is \c Material.Indigo.
+
+ \note Even though the primary can be any \l {colorbasictypedocs}{color}, it is
+ recommended to use one of the \l {pre-defined Material colors} that have been
+ designed to work well with the rest of the Material style palette.
+
+ \endstyleproperty
+
+ \styleproperty {Material.theme} {enumeration} {material-theme-attached-prop}
+ \target material-theme-attached-prop
+ This attached property holds whether the theme is light or dark. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ Available themes:
+ \value Material.Light Light theme (default)
+ \value Material.Dark Dark theme
+
+ In the following example, the theme for both the pane and the button is set
+ to \c Material.Dark:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-material-theme.qml 1
+ \li
+ \image qtquickcontrols2-material-theme.png
+ \endtable
+
+ \endstyleproperty
+
+ \section1 Attached Method Documentation
+
+ \stylemethod2 {color} {color} {enumeration} {predefined} {enumeration} {shade} {material-color-attached-method}
+ \target material-color-attached-method
+ This attached method returns the effective color value of the specified
+ \l {pre-defined Material colors}{pre-defined Material color} combined with
+ the given \l {pre-defined shades}{shade}. If omitted, the shade argument
+ defaults to \c Material.Shade500.
+
+ \qml
+ Rectangle {
+ color: Material.color(Material.Red)
+ }
+ \endqml
+
+ \endstylemethod2
+
+ \section1 Related Information
+
+ \list
+ \li \l{Styling Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols-navigation.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc
index 8d919d45..faa8c3bc 100644
--- a/src/imports/controls/doc/src/qtlabscontrols-navigation.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-menus.qdoc
@@ -26,31 +26,30 @@
****************************************************************************/
/*!
- \page qtlabscontrols-navigation.html
- \title Navigation Controls
+ \page qtquickcontrols2-menus.html
+ \title Menu Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for menu controls
- Qt Labs Controls offers a selection of navigation models.
+ \annotatedlist qtquickcontrols2-menus
- \annotatedlist qtlabscontrols-navigation
+ Each type of menu control has its own specific target use case. The
+ following sections offer guidelines for choosing the appropriate type
+ of menu control, depending on the use case.
- The following sections offer guidelines for choosing the appropriate type
- of navigation model, depending on the use case.
+ \section1 Menu Control
- \section1 StackView Control
+ \image qtquickcontrols2-menu.png
- \image qtlabscontrols-stackview-wireframe.png
+ \l Menu control can be used for context menus; for example, after
+ right-clicking. It can also be used for popup menus; for example, a
+ menu that is shown after clicking a button.
- \l StackView provides a stack-based navigation model.
-
- \section1 SwipeView Control
-
- \image qtlabscontrols-swipeview-wireframe.png
-
- \l SwipeView provides a swipe-based navigation model.
-
- \section1 TabBar and TabButton Controls
-
- \image qtlabscontrols-tabbar-wireframe.png
-
- \l TabBar and \l TabButton provide a tab-based navigation model.
+ \l MenuItem is an item in the Menu control. Each item in a menu:
+ \list
+ \li displays text to the user
+ \li allows checking/unchecking
+ \li is highlighted (for example, on keyboard navigation)
+ \li performs some action on activation
+ \endlist
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-navigation.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-navigation.qdoc
new file mode 100644
index 00000000..a2bd15a6
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-navigation.qdoc
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-navigation.html
+ \title Navigation Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for navigation controls
+
+ Qt Quick Controls 2 offers a selection of navigation models.
+
+ \annotatedlist qtquickcontrols2-navigation
+
+ The following sections offer guidelines for choosing the appropriate type
+ of navigation model, depending on the use case.
+
+ \section1 StackView Control
+
+ \image qtquickcontrols2-stackview-wireframe.png
+
+ \l StackView provides a stack-based navigation model which can be used
+ with a set of interlinked pages. StackView works according to a last-in
+ first-out principle: the page pushed last on the stack is the one visible.
+ Popping a page removes the last page and makes the previous one visible.
+
+ \section1 SwipeView Control
+
+ \image qtquickcontrols2-swipeview-wireframe.png
+
+ \l SwipeView provides a navigation model that simplifies horizontal paged
+ scrolling. The page indicator on the bottom shows which is the presently
+ active page.
+
+ \section1 TabBar
+
+ \image qtquickcontrols2-tabbar-wireframe.png
+
+ \l TabBar is a bar with icons or text that allows the user to switch
+ between different subtasks, views, or modes.
+
+ \section1 TabButton Control
+
+ \image qtquickcontrols2-tabbutton.png
+
+ \l TabButton is a button with a layout suitable for a TabBar control.
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-popups.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-popups.qdoc
new file mode 100644
index 00000000..aa2efb90
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-popups.qdoc
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-popups.html
+ \title Popup Controls
+ \ingroup qtquickcontrols2-guidelines
+ \brief Guidelines for popup controls
+
+ \annotatedlist qtquickcontrols2-popups
+
+ Each type of popup control has its own specific target use case. The
+ following sections offer guidelines for choosing the appropriate type
+ of popup control, depending on the use case.
+
+ \section1 Drawer Control
+
+ \image qtquickcontrols2-drawer-expanded-wireframe.png
+
+ \l Drawer provides a swipe-based side panel, similar to those often used
+ in touch interfaces to provide a central location for navigation.
+
+ The drawer can be positioned at any of the four edges of the screen. It allows
+ the user to add navigation without taking up valuable screen space. The user can
+ show and hide the drawer at any time with a simple swipe movement.
+
+ \section1 Menu Control
+
+ \image qtquickcontrols2-menu.png
+
+ The \l Menu control displays a vertical list of items that can be selected. It can
+ be used for offering a list of actions that can be taken in a given context.
+
+ \b {See also} \l {Drawer Control}.
+
+ \section1 Popup Control
+
+ \image qtquickcontrols2-popup-settings.png
+
+ A \l Popup displays content over other application content.
+ It prompts the user to make a decision or enter information.
+
+ Popups can be modal or non-modal. A modal popup blocks users from interacting
+ with the application until they have made a choice and closed the popup.
+
+ A popup can be used for:
+
+ \list
+ \li communicating a message to the user that he must read and acknowledge.
+ \li displaying an error message.
+ \li prompting the user to make a choice and/or enter a value.
+ \endlist
+
+ \section1 ToolTip Control
+
+ \image qtquickcontrols2-tooltip.png
+
+ \l ToolTip shows a short piece of text that informs the user of a control's
+ function. It is typically placed above or below the parent control.
+
+ Recommendations:
+ \list
+ \li Use a tooltip if a control has little or no descriptive text, or needs
+ a short explanation.
+ \li Use a tooltip only if the information on a particular control is not
+ available elsewhere in the screen.
+ \li Keep the tooltip text short so that it does not cover other content
+ while being displayed.
+ \endlist
+
+ \section1 Related Information
+ \list
+ \li \l {Qt Quick Controls 2 Guidelines}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtlabscontrols.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
index 17e93a44..52da41a7 100644
--- a/src/imports/controls/doc/src/qtlabscontrols.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -26,37 +26,31 @@
****************************************************************************/
/*!
- \qmlmodule Qt.labs.controls 1.0
- \title Qt Labs Controls QML Types
+ \qmlmodule QtQuick.Controls 2.0
+ \title Qt Quick Controls 2 QML Types
\ingroup qmlmodules
- \brief Provides QML types for user interfaces (Qt Labs Controls).
+ \brief Provides QML types for user interfaces (Qt Quick Controls 2).
- \l{Qt Labs Controls} provides QML types for creating user interfaces.
+ \l{Qt Quick Controls 2} provides QML types for creating user interfaces.
These QML types work in conjunction with \l{Qt Quick} and
\l{Qt Quick Layouts}.
- Qt Labs Controls QML types can be imported into your application
+ Qt Quick Controls 2 QML types can be imported into your application
using the following import statement in your .qml file:
\badcode
- import Qt.labs.controls 1.0
+ import QtQuick.Controls 2.0
\endcode
- The calendar related QML types can be imported using the
- following statement:
-
- \badcode
- import Qt.labs.calendar 1.0
- \endcode
-
- \labs
-
\section1 QML Types
+ \generatelist {qmltypesbymodule QtQuick.Controls}
+ \noautolist
- \section2 Qt.labs.controls Module
- \generatelist {qmltypesbymodule Qt.labs.controls}
+ For more information on the Qt Quick Controls 2 module, see the
+ \l {Qt Quick Controls 2} module documentation.
- \section2 Qt.labs.calendar Module
- \generatelist {qmltypesbymodule Qt.labs.calendar}
- \noautolist
+ \section1 Related Information
+ \list
+ \li \l {Qt Quick Controls 2 Guidelines}
+ \endlist
*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
new file mode 100644
index 00000000..d9c03ec3
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
@@ -0,0 +1,146 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-styles.html
+ \title Styling Qt Quick Controls 2
+
+ Qt Quick Controls 2 comes with a selection of styles.
+
+ \raw HTML
+ <table style="background:transparent; border:0px">
+ <tr>
+ <td style="border:0px">
+ <a href="qtquickcontrols2-default.html">
+ <img src="images/qtquickcontrols2-default.png" width="45%"/>
+ </a>
+ </td>
+ <td style="border:0px">
+ <a href="qtquickcontrols2-material.html">
+ <img src="images/qtquickcontrols2-material.png" width="75%"/>
+ </a>
+ </td>
+ <td style="border:0px">
+ <a href="qtquickcontrols2-universal.html">
+ <img src="images/qtquickcontrols2-universal.png" width="75%"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="border:0px">
+ The <a href="qtquickcontrols2-default.html">Default</a> style is
+ a simple and light-weight all-round style that offers the maximum
+ performance for Qt Quick Controls 2.
+ </td>
+ <td style="border:0px">
+ The <a href="qtquickcontrols2-material.html">Material</a> style offers an appealing design
+ based on the <a href="https://www.google.com/design/spec/material-design/introduction.html">
+ Google Material Design Guidelines</a>, but requires more system resources than the Default style.
+ </td>
+ <td style="border:0px">
+ The <a href="qtquickcontrols2-universal.html">Universal</a> style offers an appealing design
+ based on the <a href="https://dev.windows.com/design">Microsoft Universal Design Guidelines</a>,
+ but requires more system resources than the Default style.
+ </td>
+ </tr>
+ </table>
+ \endraw
+
+ \section1 Using Styles in Qt Quick Controls 2
+
+ In order to run an application with a specific style, either configure the
+ style using \l QQuickStyle in C++, pass a command line argument, or set an
+ environment variable. Alternatively, the preferred style and style-specific
+ attributes can be specified in a configuration file.
+
+ The priority of these approaches follows the order they are listed below,
+ from highest to lowest. That is, using QQuickStyle to set the style will
+ always take priority over using the command line argument, for example.
+
+ \section2 Using QQuickStyle in C++
+
+ \l QQuickStyle provides C++ API for configuring a specific style. The following
+ example runs a Qt Quick Controls 2 application with the Material style:
+
+ \code
+ QQuickStyle::setStyle("Material");
+ \endcode
+
+ See the detailed description of \l QQuickStyle for more details.
+
+ \section2 Command line argument
+
+ Passing a \c -style command line argument is the convenient way to test different
+ styles. It takes precedence over the other methods listed below. The following
+ example runs a Qt Quick Controls 2 application with the Material style:
+
+ \code
+ ./app -style material
+ \endcode
+
+ \section2 Environment variable
+
+ Setting the \c QT_QUICK_CONTROLS_STYLE environment variable can be used to set
+ a system-wide style preference. It takes precedence over the configuration file
+ mentioned below. The following example runs a Qt Quick Controls 2 application with
+ the Universal style:
+
+ \code
+ QT_QUICK_CONTROLS_STYLE=universal ./app
+ \endcode
+
+ See \l {Supported Environment Variables in Qt Quick Controls 2} for the full list
+ of supported environment variables.
+
+ \section2 Configuration file
+
+ Qt Quick Controls 2 support a special configuration file, \c :/qtquickcontrols2.conf,
+ that is built into an application's resources.
+
+ The configuration file can specify the preferred style (may be overridden by either
+ of the methods described earlier) and certain style-specific attributes. The following
+ example specifies that the preferred style is the Material style.
+
+ \code
+ [Controls]
+ Style=Material
+ \endcode
+
+ See \l {Qt Quick Controls 2 Configuration File} for more details about the
+ configuration file.
+
+ \section1 Related Information
+ \list
+ \li \l {Default Style}
+ \li \l {Material Style}
+ \li \l {Universal Style}
+ \li \l{Using File Selectors with Qt Quick Controls 2}
+ \li \l {Deploying Qt Quick Controls 2 Applications}
+ \li \l {Qt Quick Controls 2 Configuration File}
+ \li \l {Supported Environment Variables in Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
new file mode 100644
index 00000000..c0e2daee
--- /dev/null
+++ b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
@@ -0,0 +1,278 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquickcontrols2-universal.html
+ \title Universal Style
+
+ The Universal Style is based on the Microsoft Universal Design Guidelines.
+ \l {detailed-desc-universal}{More...}
+
+ \styleimport {QtQuick.Controls.Universal 2.0} {Qt 5.7}
+
+ \section1 Attached Properties
+
+ \list
+ \li \l {universal-accent-attached-prop}{\b accent} : color
+ \li \l {universal-background-attached-prop}{\b background} : color
+ \li \l {universal-foreground-attached-prop}{\b foreground} : color
+ \li \l {universal-theme-attached-prop}{\b theme} : enumeration
+ \endlist
+
+ \section1 Attached Methods
+
+ \list
+ \li color \l {color-attached-method}{\b color}(enumeration predefined)
+ \endlist
+
+ \section1 Detailed Description
+ \target detailed-desc-universal
+
+ The Universal style is a device-agnostic style based on the
+ \l {https://dev.windows.com/design}{Microsoft Universal Design Guidelines}.
+ The Universal style has been designed to look good on all devices, from
+ phones and tablets to PCs.
+
+ \image qtquickcontrols2-universal.png
+ \caption The Universal style in light and dark themes
+
+ To run an application with the Universal style, see
+ \l {Using Styles in Qt Quick Controls 2}.
+
+ \note The Universal style is not a native Windows 10 style. The Universal
+ style is a 100% cross-platform Qt Quick Controls 2 style implementation that
+ follows the Microsoft Universal Design Guidelines. The style runs on any
+ platform, and looks more or less identical everywhere. Minor differences
+ may occur due to differences in available system fonts and font rendering
+ engines.
+
+ \section2 Customization
+
+ The Universal style allows customizing four attributes, \l {universal-theme-attached-prop}{theme},
+ \l {universal-accent-attached-prop}{accent}, \l {universal-foreground-attached-prop}{foreground}, and
+ \l {universal-background-attached-prop}{background}.
+
+ \image qtquickcontrols2-universal-attributes.png
+
+ Both attributes can be specified for any window or item, and they automatically
+ propagate to children in the same manner as \l {Control::font}{fonts}. In the
+ following example, the window and all three radio buttons appear in the dark
+ theme using a violet accent color:
+
+ \table
+ \row
+ \li
+ \qml
+ import QtQuick 2.0
+ import QtQuick.Controls 2.0
+ import QtQuick.Controls.Universal 2.0
+
+ ApplicationWindow {
+ visible: true
+
+ Universal.theme: Universal.Dark
+ Universal.accent: Universal.Violet
+
+ Column {
+ anchors.centerIn: parent
+
+ RadioButton { text: qsTr("Small") }
+ RadioButton { text: qsTr("Medium"); checked: true }
+ RadioButton { text: qsTr("Large") }
+ }
+ }
+ \endqml
+ \li
+ \image qtquickcontrols2-universal-dark.png
+ \endtable
+
+ In addition to specifying the attributes in QML, it is also possible to
+ specify them via environment variables or in a configuration file. Attributes
+ specified in QML take precedence over all other methods.
+
+ \section3 Configuration File
+
+ \include qquickuniversalstyle.qdocinc conf
+
+ See \l {Qt Quick Controls 2 Configuration File} for more details about the
+ configuration file.
+
+ \section3 Environment Variables
+
+ \include qquickuniversalstyle.qdocinc env
+
+ See \l {Supported Environment Variables in Qt Quick Controls 2} for the full
+ list of supported environment variables.
+
+ \section2 Dependency
+
+ The Universal style must be separately imported to gain access to the
+ attributes that are specific to the Universal style. It should be noted
+ that regardless of the references to the Universal style, the same
+ application code runs with any other style. Universal-specific attributes
+ only have an effect when the application is run with the Universal style.
+
+ If the Universal style is imported in a QML file that is always loaded, the
+ Universal style must be deployed with the application in order to be able
+ to run the application regardless of which style the application is run with.
+ By using \l {Using File Selectors with Qt Quick Controls 2}{file selectors},
+ style-specific tweaks can be applied without creating a hard dependency to
+ a style.
+
+ \section2 Pre-defined Universal Colors
+
+ Available pre-defined colors:
+ \value Universal.Lime \stylecolor {#A4C400} {}
+ \value Universal.Green \stylecolor {#60A917} {}
+ \value Universal.Emerald \stylecolor {#008A00} {}
+ \value Universal.Teal \stylecolor {#00ABA9} {}
+ \value Universal.Cyan \stylecolor {#1BA1E2} {}
+ \value Universal.Cobalt \stylecolor {#3E65FF} {(default accent)}
+ \value Universal.Indigo \stylecolor {#6A00FF} {}
+ \value Universal.Violet \stylecolor {#AA00FF} {}
+ \value Universal.Pink \stylecolor {#F472D0} {}
+ \value Universal.Magenta \stylecolor {#D80073} {}
+ \value Universal.Crimson \stylecolor {#A20025} {}
+ \value Universal.Red \stylecolor {#E51400} {}
+ \value Universal.Orange \stylecolor {#FA6800} {}
+ \value Universal.Amber \stylecolor {#F0A30A} {}
+ \value Universal.Yellow \stylecolor {#E3C800} {}
+ \value Universal.Brown \stylecolor {#825A2C} {}
+ \value Universal.Olive \stylecolor {#6D8764} {}
+ \value Universal.Steel \stylecolor {#647687} {}
+ \value Universal.Mauve \stylecolor {#76608A} {}
+ \value Universal.Taupe \stylecolor {#87794E} {}
+
+ \b {See also} \l {Default Style}, \l {Material Style}
+
+ \section1 Attached Property Documentation
+
+ \styleproperty {Universal.accent} {color} {universal-accent-attached-prop}
+ \target universal-accent-attached-prop
+ This attached property holds the accent color of the theme. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ The default value is \c Universal.Cobalt.
+
+ In the following example, the accent color of the highlighted button is
+ changed to \c Universal.Orange:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-universal-accent.qml 1
+ \li
+ \image qtquickcontrols2-universal-accent.png
+ \endtable
+
+ \note Even though the accent can be any \l {colorbasictypedocs}{color}, it is
+ recommended to use one of the \l {pre-defined Universal colors} that have been
+ designed to work well with the rest of the Universal style palette.
+
+ \endstyleproperty
+
+ \styleproperty {Universal.background} {color} {universal-background-attached-prop}
+ \target universal-background-attached-prop
+ This attached property holds the background color of the theme. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ The default value is theme-specific (light or dark).
+
+ In the following example, the background color of the pane is changed to
+ \c Universal.Steel:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-universal-background.qml 1
+ \li
+ \image qtquickcontrols2-universal-background.png
+ \endtable
+
+ \endstyleproperty
+
+ \styleproperty {Universal.foreground} {color} {universal-foreground-attached-prop}
+ \target universal-foreground-attached-prop
+ This attached property holds the foreground color of the theme. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ The default value is theme-specific (light or dark).
+
+ In the following example, the foreground color of the button is set to \c
+ Universal.Pink:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-universal-foreground.qml 1
+ \li
+ \image qtquickcontrols2-universal-foreground.png
+ \endtable
+
+ \styleproperty {Universal.theme} {enumeration} {universal-theme-attached-prop}
+ \target universal-theme-attached-prop
+ This attached property holds whether the theme is light or dark. The property
+ can be attached to any window or item. The value is propagated to children.
+
+ Available themes:
+ \value Universal.Light Light theme (default)
+ \value Universal.Dark Dark theme
+
+ In the following example, the theme for both the pane and the button is set
+ to \c Universal.Dark:
+
+ \table
+ \row
+ \li
+ \snippet qtquickcontrols2-universal-theme.qml 1
+ \li
+ \image qtquickcontrols2-universal-theme.png
+ \endtable
+
+ \endstyleproperty
+
+ \section1 Attached Method Documentation
+
+ \stylemethod {color} {color} {enumeration} {predefined} {color-attached-method}
+ \target color-attached-method
+ This attached method returns the effective color value of the specified
+ \l {pre-defined Universal colors}{pre-defined Universal color}.
+
+ \qml
+ Rectangle {
+ color: Universal.color(Universal.Red)
+ }
+ \endqml
+
+ \endstylemethod
+
+ \section1 Related Information
+
+ \list
+ \li \l{Styling Qt Quick Controls 2}
+ \endlist
+*/
diff --git a/src/imports/controls/doc/src/templates/qtlabstemplates-index.qdoc b/src/imports/controls/doc/src/templates/qtquicktemplates2-index.qdoc
index fded42cd..2e22196b 100644
--- a/src/imports/controls/doc/src/templates/qtlabstemplates-index.qdoc
+++ b/src/imports/controls/doc/src/templates/qtquicktemplates2-index.qdoc
@@ -26,11 +26,11 @@
****************************************************************************/
/*!
- \page qtlabstemplates-index.html
- \title Qt Labs Templates
+ \page qtquicktemplates2-index.html
+ \title Qt Quick Templates 2
\brief A set of templates to create user interface controls in Qt Quick
- Qt Labs Templates are the foundations of \l {Qt Labs Controls}. Templates
+ Qt Quick Templates are the foundations of \l {Qt Quick Controls 2}. Templates
are non-visual implementations of controls' logic and behavior. They offer
an interface to visualize the controls in QML using \l {Qt Quick}.
@@ -48,7 +48,7 @@
\list
\li \l{Qt Quick}
- \li \l{Qt Labs Controls}
- \li \l{Qt Labs Templates QML Types}
+ \li \l{Qt Quick Controls 2}
+ \li \l{Qt Quick Templates 2 QML Types}
\endlist
*/
diff --git a/src/imports/controls/doc/src/templates/qtlabstemplates.qdoc b/src/imports/controls/doc/src/templates/qtquicktemplates2.qdoc
index 0f7f7d86..1ddfe763 100644
--- a/src/imports/controls/doc/src/templates/qtlabstemplates.qdoc
+++ b/src/imports/controls/doc/src/templates/qtquicktemplates2.qdoc
@@ -26,39 +26,37 @@
****************************************************************************/
/*!
- \qmlmodule Qt.labs.templates 1.0
- \title Qt Labs Templates QML Types
+ \qmlmodule QtQuick.Templates 2.0
+ \title Qt Quick Templates 2 QML Types
\ingroup qmlmodules
- \brief Provides QML types for templates (Qt Labs Templates).
+ \brief Provides QML types for templates (Qt Quick Templates).
- The \l {Qt Labs Templates} module provides a set of non-visual templates
+ The \l {Qt Quick Templates 2} module provides a set of non-visual templates
that can be used to build user interface controls in QML using \l {Qt Quick}.
The QML types can be imported using the following import statement in your
\c .qml file:
\badcode
- import Qt.labs.templates 1.0 as T
+ import QtQuick.Templates 2.0 as T
\endcode
- \labs
-
For the sake of clarity, there is a one-to-one mapping between the types
- provided by the \c Qt.labs.templates and \c Qt.labs.controls imports. For
- every type available in the \c Qt.labs.controls import, a non-visual template
- type by the same name exists in the \c Qt.labs.templates import.
+ provided by the \c QtQuick.Templates and \c QtQuick.Controls imports. For
+ every type available in the \c QtQuick.Controls import, a non-visual template
+ type by the same name exists in the \c QtQuick.Templates import.
\note It is recommended to use a namespace for the templates import to avoid
- overlap with the types provided by the \c Qt.labs.controls import.
+ overlap with the types provided by the \c QtQuick.Controls import.
\section1 QML Types
- \generatelist {qmltypesbymodule Qt.labs.controls}
+ \generatelist {qmltypesbymodule QtQuick.Controls}
\section1 Related Information
\list
- \li \l {Qt Labs Controls QML Types}
+ \li \l {Qt Quick Controls 2 QML Types}
\endlist
\noautolist
diff --git a/src/imports/controls/images/check@2x.png b/src/imports/controls/images/check@2x.png
index 597aab7f..bc5aaabe 100644
--- a/src/imports/controls/images/check@2x.png
+++ b/src/imports/controls/images/check@2x.png
Binary files differ
diff --git a/src/imports/controls/images/check@3x.png b/src/imports/controls/images/check@3x.png
index 1a10289b..0f515e0b 100644
--- a/src/imports/controls/images/check@3x.png
+++ b/src/imports/controls/images/check@3x.png
Binary files differ
diff --git a/src/imports/controls/images/check@4x.png b/src/imports/controls/images/check@4x.png
index 54e885f6..8ad1fe21 100644
--- a/src/imports/controls/images/check@4x.png
+++ b/src/imports/controls/images/check@4x.png
Binary files differ
diff --git a/src/imports/controls/images/dial-indicator.png b/src/imports/controls/images/dial-indicator.png
index 92357c51..8cb0824f 100644
--- a/src/imports/controls/images/dial-indicator.png
+++ b/src/imports/controls/images/dial-indicator.png
Binary files differ
diff --git a/src/imports/controls/images/dial-indicator@2x.png b/src/imports/controls/images/dial-indicator@2x.png
index f436443b..cd4f8d81 100644
--- a/src/imports/controls/images/dial-indicator@2x.png
+++ b/src/imports/controls/images/dial-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/images/dial-indicator@3x.png b/src/imports/controls/images/dial-indicator@3x.png
index d883045b..f443605c 100644
--- a/src/imports/controls/images/dial-indicator@3x.png
+++ b/src/imports/controls/images/dial-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/images/dial-indicator@4x.png b/src/imports/controls/images/dial-indicator@4x.png
index 79477712..dec99715 100644
--- a/src/imports/controls/images/dial-indicator@4x.png
+++ b/src/imports/controls/images/dial-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/images/double-arrow.png b/src/imports/controls/images/double-arrow.png
new file mode 100644
index 00000000..a6d84dbc
--- /dev/null
+++ b/src/imports/controls/images/double-arrow.png
Binary files differ
diff --git a/src/imports/controls/images/double-arrow@2x.png b/src/imports/controls/images/double-arrow@2x.png
new file mode 100644
index 00000000..36ffd5fe
--- /dev/null
+++ b/src/imports/controls/images/double-arrow@2x.png
Binary files differ
diff --git a/src/imports/controls/images/double-arrow@3x.png b/src/imports/controls/images/double-arrow@3x.png
new file mode 100644
index 00000000..5a2a59fe
--- /dev/null
+++ b/src/imports/controls/images/double-arrow@3x.png
Binary files differ
diff --git a/src/imports/controls/images/double-arrow@4x.png b/src/imports/controls/images/double-arrow@4x.png
new file mode 100644
index 00000000..22977545
--- /dev/null
+++ b/src/imports/controls/images/double-arrow@4x.png
Binary files differ
diff --git a/src/imports/controls/images/drop-indicator@4x.png b/src/imports/controls/images/drop-indicator@4x.png
index 58311fbe..b82b6db3 100644
--- a/src/imports/controls/images/drop-indicator@4x.png
+++ b/src/imports/controls/images/drop-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/material/ApplicationWindow.qml b/src/imports/controls/material/ApplicationWindow.qml
index e69c46da..db27f25b 100644
--- a/src/imports/controls/material/ApplicationWindow.qml
+++ b/src/imports/controls/material/ApplicationWindow.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -36,15 +36,20 @@
import QtQuick 2.6
import QtQuick.Window 2.2
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.ApplicationWindow {
id: window
color: Material.backgroundColor
- overlay.background: Rectangle {
+ overlay.modal: Rectangle {
+ color: window.Material.backgroundDimColor
+ Behavior on opacity { NumberAnimation { duration: 150 } }
+ }
+
+ overlay.modeless: Rectangle {
color: window.Material.backgroundDimColor
Behavior on opacity { NumberAnimation { duration: 150 } }
}
diff --git a/src/imports/controls/material/BoxShadow.qml b/src/imports/controls/material/BoxShadow.qml
new file mode 100644
index 00000000..b70fcee5
--- /dev/null
+++ b/src/imports/controls/material/BoxShadow.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtGraphicalEffects 1.0
+
+/*!
+ A implementation of CSS's box-shadow, used by ElevationEffect for a Material Design
+ elevation shadow effect.
+ */
+RectangularGlow {
+ // The 4 properties from CSS box-shadow, plus the inherited color property
+ property int offsetX
+ property int offsetY
+ property int blurRadius
+ property int spreadRadius
+
+ // The source item the shadow is being applied to, used for correctly
+ // calculating the corner radious
+ property Item source
+
+ property bool fullWidth
+ property bool fullHeight
+
+ x: (parent.width - width)/2 + offsetX
+ y: (parent.height - height)/2 + offsetY
+
+ implicitWidth: source ? source.width : parent.width
+ implicitHeight: source ? source.height : parent.height
+
+ width: implicitWidth + 2 * spreadRadius + (fullWidth ? 2 * cornerRadius : 0)
+ height: implicitHeight + 2 * spreadRadius + (fullHeight ? 2 * cornerRadius : 0)
+ glowRadius: blurRadius/2
+ spread: 0.05
+ cornerRadius: blurRadius + (source && source.radius || 0)
+}
diff --git a/src/imports/controls/material/BusyIndicator.qml b/src/imports/controls/material/BusyIndicator.qml
index 9eb48613..387ffb71 100644
--- a/src/imports/controls/material/BusyIndicator.qml
+++ b/src/imports/controls/material/BusyIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,9 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
-import Qt.labs.controls.material.impl 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.BusyIndicator {
id: control
@@ -47,7 +47,6 @@ T.BusyIndicator {
padding: 6
- //! [contentItem]
contentItem: ProgressRing {
id: ring
x: control.leftPadding + (control.availableWidth - width) / 2
@@ -68,5 +67,4 @@ T.BusyIndicator {
running: control.visible && control.running
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/material/Button.qml b/src/imports/controls/material/Button.qml
index a869c915..f2fad313 100644
--- a/src/imports/controls/material/Button.qml
+++ b/src/imports/controls/material/Button.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,42 +35,40 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
-import QtGraphicalEffects 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Button {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
// external vertical padding is 6 (to increase touch area)
padding: 12
- leftPadding: 8
- rightPadding: 8
+ leftPadding: padding - 4
+ rightPadding: padding - 4
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
+ Material.elevation: flat ? control.down || control.hovered ? 2 : 0
+ : control.down ? 8 : 2
+ Material.background: flat ? "transparent" : undefined
+ contentItem: Text {
text: control.text
font: control.font
color: !control.enabled ? control.Material.hintTextColor :
+ control.flat && control.highlighted ? control.Material.accentColor :
control.highlighted ? control.Material.primaryHighlightedTextColor : control.Material.primaryTextColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
- //! [label]
- //! [background]
+ // TODO: Add a proper ripple/ink effect for mouse/touch input and focus state
background: Rectangle {
implicitWidth: 64
implicitHeight: 48
@@ -80,10 +78,16 @@ T.Button {
width: parent.width
height: parent.height - 12
radius: 2
- color: !control.enabled ? (control.highlighted ? control.Material.raisedHighlightedButtonDisabledColor : control.Material.raisedButtonDisabledColor) :
- (control.pressed ? (control.highlighted ? control.Material.raisedHighlightedButtonPressColor : control.Material.raisedButtonPressColor) :
- (control.activeFocus ? (control.highlighted ? control.Material.raisedHighlightedButtonHoverColor : control.Material.raisedButtonHoverColor) :
- (control.highlighted ? control.Material.raisedHighlightedButtonColor : control.Material.raisedButtonColor)))
+ color: !control.enabled
+ ? control.Material.buttonDisabledColor
+ : control.down
+ ? control.highlighted ? control.Material.highlightedButtonPressColor
+ : control.Material.buttonPressColor
+ : control.visualFocus || control.checked
+ ? control.highlighted ? control.Material.highlightedButtonHoverColor
+ : control.Material.buttonHoverColor
+ : control.highlighted ? control.Material.highlightedButtonColor
+ : control.Material.buttonColor
Behavior on color {
ColorAnimation {
@@ -91,21 +95,12 @@ T.Button {
}
}
- Rectangle {
- width: parent.width
- height: parent.height
- radius: parent.radius
- visible: control.activeFocus
- color: control.Material.checkBoxUncheckedRippleColor
- }
-
- layer.enabled: control.enabled
- layer.effect: DropShadow {
- verticalOffset: 1
- color: control.Material.dropShadowColor
- samples: control.pressed ? 15 : 9
- spread: 0.5
+ // The layer is disabled when the button color is transparent so you can do
+ // Material.background: "transparent" and get a proper flat button without needing
+ // to set Material.elevation as well
+ layer.enabled: control.enabled && control.Material.buttonColor.a > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
}
}
- //! [background]
}
diff --git a/src/imports/controls/material/CheckBox.qml b/src/imports/controls/material/CheckBox.qml
index 230f696f..1c6848d8 100644
--- a/src/imports/controls/material/CheckBox.qml
+++ b/src/imports/controls/material/CheckBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,120 +35,34 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.CheckBox {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
spacing: 8
- topPadding: 14
- leftPadding: 8
- rightPadding: 8
- bottomPadding: 14
+ padding: 8
+ topPadding: padding + 7
+ bottomPadding: padding + 7
- //! [indicator]
- indicator: Rectangle {
- id: indicatorItem
+ indicator: CheckIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- implicitWidth: 20
- implicitHeight: 20
- color: "transparent"
- border.color: control.checked && control.enabled ? control.Material.accentColor : control.Material.secondaryTextColor
- border.width: control.checked ? width / 2 : 2
- radius: 2
-
- Behavior on border.width {
- NumberAnimation {
- duration: 100
- easing.type: Easing.OutCubic
- }
- }
-
- Behavior on border.color {
- ColorAnimation {
- duration: 100
- easing.type: Easing.OutCubic
- }
- }
-
- Ripple {
- width: parent.width
- height: width
- control: control
- colored: control.checked
- opacity: control.pressed || control.activeFocus ? 1 : 0
- }
-
- // TODO: This needs to be transparent
- Image {
- id: checkImage
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 16
- height: 16
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/material/images/check.png"
- fillMode: Image.PreserveAspectFit
-
- scale: control.checkState === Qt.Checked ? 1 : 0
- Behavior on scale { NumberAnimation { duration: 100 } }
- }
-
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 12
- height: 3
- visible: control.checkState === Qt.PartiallyChecked
- }
-
- states: [
- State {
- name: "checked"
- when: control.checkState === Qt.Checked
- },
- State {
- name: "partiallychecked"
- when: control.checkState === Qt.PartiallyChecked
- }
- ]
-
- transitions: Transition {
- SequentialAnimation {
- NumberAnimation {
- target: indicatorItem
- property: "scale"
- // Go down 2 pixels in size.
- to: 1 - 2 / indicatorItem.width
- duration: 120
- }
- NumberAnimation {
- target: indicatorItem
- property: "scale"
- to: 1
- duration: 120
- }
- }
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -158,5 +72,4 @@ T.CheckBox {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
}
diff --git a/src/imports/controls/material/CheckDelegate.qml b/src/imports/controls/material/CheckDelegate.qml
new file mode 100644
index 00000000..d5785467
--- /dev/null
+++ b/src/imports/controls/material/CheckDelegate.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
+
+T.CheckDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 16
+ topPadding: 14
+ bottomPadding: 14
+ spacing: 16
+
+ indicator: CheckIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ implicitHeight: 48
+
+ visible: control.down || control.highlighted
+ color: control.down ? control.Material.buttonPressColor : control.Material.listHighlightColor
+ }
+}
diff --git a/src/imports/controls/material/CheckIndicator.qml b/src/imports/controls/material/CheckIndicator.qml
new file mode 100644
index 00000000..f64ca168
--- /dev/null
+++ b/src/imports/controls/material/CheckIndicator.qml
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls.Material 2.0
+
+Rectangle {
+ id: indicatorItem
+ implicitWidth: 18
+ implicitHeight: 18
+ color: "transparent"
+ border.color: control.checked && control.enabled ? control.Material.accentColor : control.Material.secondaryTextColor
+ border.width: control.checked ? width / 2 : 2
+ radius: 2
+
+ property alias control: ripple.control
+
+ Behavior on border.width {
+ NumberAnimation {
+ duration: 100
+ easing.type: Easing.OutCubic
+ }
+ }
+
+ Behavior on border.color {
+ ColorAnimation {
+ duration: 100
+ easing.type: Easing.OutCubic
+ }
+ }
+
+ Ripple {
+ id: ripple
+ width: parent.width
+ height: width
+ control: control
+ colored: control.checked
+ opacity: control.down || control.visualFocus ? 1 : 0
+ }
+
+ // TODO: This needs to be transparent
+ Image {
+ id: checkImage
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 14
+ height: 14
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/check.png"
+ fillMode: Image.PreserveAspectFit
+
+ scale: control.checkState === Qt.Checked ? 1 : 0
+ Behavior on scale { NumberAnimation { duration: 100 } }
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 12
+ height: 3
+
+ scale: control.checkState === Qt.PartiallyChecked ? 1 : 0
+ Behavior on scale { NumberAnimation { duration: 100 } }
+ }
+
+ states: [
+ State {
+ name: "checked"
+ when: control.checkState === Qt.Checked
+ },
+ State {
+ name: "partiallychecked"
+ when: control.checkState === Qt.PartiallyChecked
+ }
+ ]
+
+ transitions: Transition {
+ SequentialAnimation {
+ NumberAnimation {
+ target: indicatorItem
+ property: "scale"
+ // Go down 2 pixels in size.
+ to: 1 - 2 / indicatorItem.width
+ duration: 120
+ }
+ NumberAnimation {
+ target: indicatorItem
+ property: "scale"
+ to: 1
+ duration: 120
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index 97724585..183bcef9 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -36,48 +36,65 @@
import QtQuick 2.6
import QtQuick.Window 2.2
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
-import QtGraphicalEffects 1.0
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.ComboBox {
id: control
+ Material.elevation: control.pressed ? 8 : 2
+
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
baselineOffset: contentItem.y + contentItem.baselineOffset
spacing: 6
+ // external vertical padding is 6 (to increase touch area)
padding: 12
+ leftPadding: padding - 4
+ rightPadding: padding - 4
+
+ // Don't use toolTextColor, as that is often white when we have a white background.
+ Material.foreground: Material.foreground === Material.toolTextColor ? undefined : Material.foreground
- //! [delegate]
delegate: MenuItem {
- width: control.width
+ width: control.popup.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
+ Material.foreground: control.currentIndex === index ? control.Material.accent : control.Material.foreground
highlighted: control.highlightedIndex === index
- pressed: highlighted && control.pressed
}
- //! [delegate]
- //! [contentItem]
+ indicator: Image {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ opacity: !control.enabled ? 0.5 : 1.0
+ source: "qrc:/qt-project.org/imports/QtQuick/Controls.2/Material/images/drop-indicator.png"
+ }
+
contentItem: Text {
+ leftPadding: control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0
+
text: control.displayText
font: control.font
color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
- rightPadding: 14 + control.spacing
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 120
- implicitHeight: 32
+ implicitHeight: 48
+ // external vertical padding is 6 (to increase touch area)
+ y: 6
+ height: parent.height - 12
radius: 2
color: control.Material.dialogColor
@@ -87,36 +104,23 @@ T.ComboBox {
}
}
- layer.enabled: control.enabled
- layer.effect: DropShadow {
- verticalOffset: 1
- color: control.Material.dropShadowColor
- samples: control.pressed ? 15 : 9
- spread: 0.5
- }
-
- Image {
- x: parent.width - width - control.rightPadding
- y: (parent.height - height) / 2
- opacity: !control.enabled ? 0.5 : 1.0
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/material/images/drop-indicator.png"
+ layer.enabled: control.enabled && control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
}
Rectangle {
width: parent.width
height: parent.height
radius: parent.radius
- visible: control.activeFocus
+ visible: control.visualFocus
color: control.Material.checkBoxUncheckedRippleColor
}
}
- //! [background]
- //! [popup]
popup: T.Popup {
- y: control.height
- implicitWidth: control.width
- implicitHeight: listview.contentHeight
+ width: control.width
+ implicitHeight: contentItem.implicitHeight
transformOrigin: Item.Top
topMargin: 12
bottomMargin: 12
@@ -138,26 +142,24 @@ T.ComboBox {
}
contentItem: ListView {
- id: listview
clip: true
+ implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
+ highlightRangeMode: ListView.ApplyRange
+ highlightMoveDuration: 0
T.ScrollIndicator.vertical: ScrollIndicator { }
}
background: Rectangle {
- radius: 3
+ radius: 2
color: control.Material.dialogColor
layer.enabled: control.enabled
- layer.effect: DropShadow {
- verticalOffset: 1
- color: control.Material.dropShadowColor
- samples: 15
- spread: 0.5
+ layer.effect: ElevationEffect {
+ elevation: 8
}
}
}
- //! [popup]
}
diff --git a/src/imports/controls/material/Dial.qml b/src/imports/controls/material/Dial.qml
index a05982cc..c07cd423 100644
--- a/src/imports/controls/material/Dial.qml
+++ b/src/imports/controls/material/Dial.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.Dial {
id: control
@@ -44,20 +44,17 @@ T.Dial {
implicitWidth: 100
implicitHeight: 100
- //! [background]
background: Rectangle {
x: control.width / 2 - width / 2
y: control.height / 2 - height / 2
width: Math.max(64, Math.min(control.width, control.height))
- height: Math.max(64, Math.min(control.width, control.height))
+ height: width
color: "transparent"
radius: width / 2
border.color: control.enabled ? control.Material.accentColor : control.Material.hintTextColor
}
- //! [background]
- //! [handle]
handle: Rectangle {
id: handleItem
@@ -78,5 +75,4 @@ T.Dial {
radius: width / 2
color: control.enabled ? control.Material.accentColor : control.Material.hintTextColor
}
- //! [handle]
}
diff --git a/src/imports/controls/material/Drawer.qml b/src/imports/controls/material/Drawer.qml
index 133ea9c8..1c15e689 100644
--- a/src/imports/controls/material/Drawer.qml
+++ b/src/imports/controls/material/Drawer.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,19 +35,33 @@
****************************************************************************/
import QtQuick 2.6
-import QtQuick.Window 2.2
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Drawer {
id: control
- parent: T.ApplicationWindow.overlay || Window.contentItem
- width: parent ? parent.width : 0 // TODO: Window.width
- height: parent ? parent.height : 0 // TODO: Window.height
+ parent: T.ApplicationWindow.overlay
- // TODO: make this a proper transition
- animation: SmoothedAnimation {
- velocity: 5
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ enter: Transition { SmoothedAnimation { velocity: 5 } }
+ exit: Transition { SmoothedAnimation { velocity: 5 } }
+
+ contentItem: Item { }
+
+ background: Rectangle {
+ color: control.Material.dialogColor
+
+ layer.enabled: control.position > 0
+ layer.effect: ElevationEffect {
+ elevation: 16
+ fullHeight: true
+ }
}
}
diff --git a/src/imports/controls/material/ElevationEffect.qml b/src/imports/controls/material/ElevationEffect.qml
new file mode 100644
index 00000000..4ee4369c
--- /dev/null
+++ b/src/imports/controls/material/ElevationEffect.qml
@@ -0,0 +1,279 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
+
+/*!
+ An effect for standard Material Design elevation shadows. Useful for using as \c layer.effect.
+ */
+Item {
+ id: effect
+
+ /*!
+ The source the effect is applied to.
+ */
+ property var source
+
+ /*!
+ The elevation of the \l source Item.
+ */
+ property int elevation: 0
+
+ /*!
+ Set to \c true if the \l source Item is the same width as its parent and the shadow
+ should be full width instead of rounding around the corner of the Item.
+
+ \sa fullHeight
+ */
+ property bool fullWidth: false
+
+ /*!
+ Set to \c true if the \l source Item is the same height as its parent and the shadow
+ should be full height instead of rounding around the corner of the Item.
+
+ \sa fullWidth
+ */
+ property bool fullHeight: false
+
+ /*!
+ \internal
+
+ The actual source Item the effect is applied to.
+ */
+ readonly property Item sourceItem: source.sourceItem
+
+ /*
+ * The following shadow values are taken from Angular Material
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2014-2016 Google, Inc. http://angularjs.org
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+ /*!
+ \internal
+
+ The shadows to use for each possible elevation. There are three shadows that when combined
+ make up the elevation.
+ */
+ readonly property var _shadows: [
+ [{offset: 0, blur: 0, spread: 0},
+ {offset: 0, blur: 0, spread: 0},
+ {offset: 0, blur: 0, spread: 0}],
+
+ [{offset: 1, blur: 3, spread: 0},
+ {offset: 1, blur: 1, spread: 0},
+ {offset: 2, blur: 1, spread: -1}],
+
+ [{offset: 1, blur: 5, spread: 0},
+ {offset: 2, blur: 2, spread: 0},
+ {offset: 3, blur: 1, spread: -2}],
+
+ [{offset: 1, blur: 8, spread: 0},
+ {offset: 3, blur: 4, spread: 0},
+ {offset: 3, blur: 3, spread: -2}],
+
+ [{offset: 2, blur: 4, spread: -1},
+ {offset: 4, blur: 5, spread: 0},
+ {offset: 1, blur: 10, spread: 0}],
+
+ [{offset: 3, blur: 5, spread: -1},
+ {offset: 5, blur: 8, spread: 0},
+ {offset: 1, blur: 14, spread: 0}],
+
+ [{offset: 3, blur: 5, spread: -1},
+ {offset: 6, blur: 10, spread: 0},
+ {offset: 1, blur: 18, spread: 0}],
+
+ [{offset: 4, blur: 5, spread: -2},
+ {offset: 7, blur: 10, spread: 1},
+ {offset: 2, blur: 16, spread: 1}],
+
+ [{offset: 5, blur: 5, spread: -3},
+ {offset: 8, blur: 10, spread: 1},
+ {offset: 3, blur: 14, spread: 2}],
+
+ [{offset: 5, blur: 6, spread: -3},
+ {offset: 9, blur: 12, spread: 1},
+ {offset: 3, blur: 16, spread: 2}],
+
+ [{offset: 6, blur: 6, spread: -3},
+ {offset: 10, blur: 14, spread: 1},
+ {offset: 4, blur: 18, spread: 3}],
+
+ [{offset: 6, blur: 7, spread: -4},
+ {offset: 11, blur: 15, spread: 1},
+ {offset: 4, blur: 20, spread: 3}],
+
+ [{offset: 7, blur: 8, spread: -4},
+ {offset: 12, blur: 17, spread: 2},
+ {offset: 5, blur: 22, spread: 4}],
+
+ [{offset: 7, blur: 8, spread: -4},
+ {offset: 13, blur: 19, spread: 2},
+ {offset: 5, blur: 24, spread: 4}],
+
+ [{offset: 7, blur: 9, spread: -4},
+ {offset: 14, blur: 21, spread: 2},
+ {offset: 5, blur: 26, spread: 4}],
+
+ [{offset: 8, blur: 9, spread: -5},
+ {offset: 15, blur: 22, spread: 2},
+ {offset: 6, blur: 28, spread: 5}],
+
+ [{offset: 8, blur: 10, spread: -5},
+ {offset: 16, blur: 24, spread: 2},
+ {offset: 6, blur: 30, spread: 5}],
+
+ [{offset: 8, blur: 11, spread: -5},
+ {offset: 17, blur: 26, spread: 2},
+ {offset: 6, blur: 32, spread: 5}],
+
+ [{offset: 9, blur: 11, spread: -5},
+ {offset: 18, blur: 28, spread: 2},
+ {offset: 7, blur: 34, spread: 6}],
+
+ [{offset: 9, blur: 12, spread: -6},
+ {offset: 19, blur: 29, spread: 2},
+ {offset: 7, blur: 36, spread: 6}],
+
+ [{offset: 10, blur: 13, spread: -6},
+ {offset: 20, blur: 31, spread: 3},
+ {offset: 8, blur: 38, spread: 7}],
+
+ [{offset: 10, blur: 13, spread: -6},
+ {offset: 21, blur: 33, spread: 3},
+ {offset: 8, blur: 40, spread: 7}],
+
+ [{offset: 10, blur: 14, spread: -6},
+ {offset: 22, blur: 35, spread: 3},
+ {offset: 8, blur: 42, spread: 7}],
+
+ [{offset: 11, blur: 14, spread: -7},
+ {offset: 23, blur: 36, spread: 3},
+ {offset: 9, blur: 44, spread: 8}],
+
+ [{offset: 11, blur: 15, spread: -7},
+ {offset: 24, blur: 38, spread: 3},
+ {offset: 9, blur: 46, spread: 8}]
+ ]
+
+ /*!
+ \internal
+
+ The current shadow based on the elevation.
+ */
+ readonly property var _shadow: _shadows[Math.max(0, Math.min(elevation, _shadows.length - 1))]
+
+ // Nest the shadows and source view in two items rendered as a layer
+ // so the shadow is not clipped by the bounds of the source view
+ Item {
+ property int margin: -100
+
+ x: margin
+ y: margin
+ width: parent.width - 2 * margin
+ height: parent.height - 2 * margin
+
+ // By rendering as a layer, the shadow will never show through the source item,
+ // even when the source item's opacity is less than 1
+ layer.enabled: true
+
+ // The box shadows automatically pick up the size of the source Item and not
+ // the size of the parent, so we don't need to worry about the extra padding
+ // in the parent Item
+ BoxShadow {
+ offsetY: _shadow[0].offset
+ blurRadius: _shadow[0].blur
+ spreadRadius: _shadow[0].spread
+ color: Qt.rgba(0,0,0, 0.2)
+
+ fullWidth: effect.fullWidth
+ fullHeight: effect.fullHeight
+ source: effect.sourceItem
+ }
+
+ BoxShadow {
+ offsetY: _shadow[1].offset
+ blurRadius: _shadow[1].blur
+ spreadRadius: _shadow[1].spread
+ color: Qt.rgba(0,0,0, 0.14)
+
+ fullWidth: effect.fullWidth
+ fullHeight: effect.fullHeight
+ source: effect.sourceItem
+ }
+
+ BoxShadow {
+ offsetY: _shadow[2].offset
+ blurRadius: _shadow[2].blur
+ spreadRadius: _shadow[2].spread
+ color: Qt.rgba(0,0,0, 0.12)
+
+ fullWidth: effect.fullWidth
+ fullHeight: effect.fullHeight
+ source: effect.sourceItem
+ }
+
+ ShaderEffect {
+ property alias source: effect.source
+
+ x: (parent.width - width)/2
+ y: (parent.height - height)/2
+ width: sourceItem.width
+ height: sourceItem.height
+ }
+ }
+}
diff --git a/src/imports/controls/material/Frame.qml b/src/imports/controls/material/Frame.qml
index 9336850d..c2f623ae 100644
--- a/src/imports/controls/material/Frame.qml
+++ b/src/imports/controls/material/Frame.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Frame {
id: control
@@ -47,20 +48,18 @@ T.Frame {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- padding: 6
+ padding: 12
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [frame]
- frame: Rectangle {
- width: parent.width
- height: parent.height
-
- radius: 3
- color: "transparent"
+ background: Rectangle {
+ radius: 2
+ color: control.Material.elevation > 0 ? control.Material.backgroundColor : "transparent"
border.color: control.Material.frameColor
+
+ layer.enabled: control.enabled && control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
+ }
}
- //! [frame]
}
diff --git a/src/imports/controls/material/GroupBox.qml b/src/imports/controls/material/GroupBox.qml
index 3461cb6e..6d84197c 100644
--- a/src/imports/controls/material/GroupBox.qml
+++ b/src/imports/controls/material/GroupBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.GroupBox {
id: control
@@ -50,14 +51,11 @@ T.GroupBox {
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
spacing: 6
- padding: 6
- topPadding: 6 + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
+ padding: 12
+ topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
- //! [contentItem]
contentItem: Item {}
- //! [contentItem]
- //! [label]
label: Text {
x: control.leftPadding
width: control.availableWidth
@@ -69,17 +67,19 @@ T.GroupBox {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [frame]
- frame: Rectangle {
+ background: Rectangle {
y: control.topPadding - control.padding
width: parent.width
height: parent.height - control.topPadding + control.padding
- radius: 3
- color: "transparent"
+ radius: 2
+ color: control.Material.elevation > 0 ? control.Material.backgroundColor : "transparent"
border.color: control.Material.frameColor
+
+ layer.enabled: control.enabled && control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
+ }
}
- //! [frame]
}
diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml
index acfbfb98..e43fc981 100644
--- a/src/imports/controls/material/ItemDelegate.qml
+++ b/src/imports/controls/material/ItemDelegate.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,105 +35,25 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.ItemDelegate {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 16
spacing: 16
- //! [indicator]
- indicator: Rectangle {
- id: indicatorItem
- x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
- y: control.topPadding + (control.availableHeight - height) / 2
- implicitWidth: 20
- implicitHeight: 20
- color: "transparent"
- border.color: control.checked ? control.Material.accentColor : control.Material.secondaryTextColor
- border.width: control.checked ? width / 2 : 2
- radius: 2
-
- visible: control.checkable
-
- Behavior on border.width {
- NumberAnimation {
- duration: 100
- easing.type: Easing.OutCubic
- }
- }
-
- Behavior on border.color {
- ColorAnimation {
- duration: 100
- easing.type: Easing.OutCubic
- }
- }
-
- Ripple {
- width: parent.width
- height: width
- control: control
- colored: control.checked
- opacity: control.pressed ? 1 : 0
- }
-
- // TODO: This needs to be transparent
- Image {
- id: checkImage
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 16
- height: 16
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/material/images/check.png"
- fillMode: Image.PreserveAspectFit
-
- scale: control.checked ? 1 : 0
- Behavior on scale { NumberAnimation { duration: 100 } }
- }
-
- states: State {
- name: "checked"
- when: control.checked
- }
-
- transitions: Transition {
- SequentialAnimation {
- NumberAnimation {
- target: indicatorItem
- property: "scale"
- // Go down 2 pixels in size.
- to: 1 - 2 / indicatorItem.width
- duration: 120
- }
- NumberAnimation {
- target: indicatorItem
- property: "scale"
- to: 1
- duration: 120
- }
- }
- }
- }
- //! [indicator]
-
- //! [label]
- label: Text {
- x: control.mirrored || !control.checkable ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - (control.checkable ? indicator.width + control.spacing : 0)
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.checkable && !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ rightPadding: control.checkable && control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
text: control.text
font: control.font
@@ -143,12 +63,11 @@ T.ItemDelegate {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [background]
background: Rectangle {
- visible: control.pressed || control.highlighted
- color: control.pressed ? control.Material.flatButtonPressColor : control.Material.listHighlightColor
+ implicitHeight: 48
+
+ visible: control.down || control.highlighted
+ color: control.down ? control.Material.buttonPressColor : control.Material.listHighlightColor
}
- //! [background]
}
diff --git a/src/imports/controls/material/Label.qml b/src/imports/controls/material/Label.qml
index 3d8952f2..8bda5cc2 100644
--- a/src/imports/controls/material/Label.qml
+++ b/src/imports/controls/material/Label.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,12 +35,12 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.Label {
id: control
- color: Material.primaryTextColor
+ color: enabled ? Material.primaryTextColor : Material.hintTextColor
linkColor: Material.accentColor
}
diff --git a/src/imports/controls/material/Menu.qml b/src/imports/controls/material/Menu.qml
index 755f5a56..b11c00b6 100644
--- a/src/imports/controls/material/Menu.qml
+++ b/src/imports/controls/material/Menu.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,18 +35,24 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
-import QtGraphicalEffects 1.0
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Menu {
id: control
+ Material.elevation: 8
+
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
- implicitHeight: Math.min(background ? background.implicitHeight : 0,
- contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
+
+ margins: 0
+ topPadding: 8
+ bottomPadding: 8
transformOrigin: Item.Top
@@ -62,7 +68,6 @@ T.Menu {
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing.type: Easing.OutCubic; duration: 150 }
}
- //! [contentItem]
contentItem: ListView {
implicitHeight: contentHeight
@@ -75,23 +80,17 @@ T.Menu {
ScrollIndicator.vertical: ScrollIndicator {}
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 200
- implicitHeight: 200
+ implicitHeight: 48
radius: 3
color: control.Material.dialogColor
- layer.enabled: true
- layer.effect: DropShadow {
- verticalOffset: 1
- color: control.Material.dropShadowColor
- samples: 15
- spread: 0.5
+ layer.enabled: control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
}
}
- //! [background]
}
diff --git a/src/imports/controls/material/MenuItem.qml b/src/imports/controls/material/MenuItem.qml
index 89867e15..27c2922c 100644
--- a/src/imports/controls/material/MenuItem.qml
+++ b/src/imports/controls/material/MenuItem.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,105 +35,35 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.MenuItem {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 16
+ topPadding: 12
+ bottomPadding: 12
spacing: 16
- //! [indicator]
- indicator: Rectangle {
- id: indicatorItem
+ indicator: CheckIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- implicitWidth: 20
- implicitHeight: 20
- color: "transparent"
- border.color: control.checked ? control.Material.accentColor : control.Material.secondaryTextColor
- border.width: control.checked ? width / 2 : 2
- radius: 2
-
visible: control.checkable
-
- Behavior on border.width {
- NumberAnimation {
- duration: 100
- easing.type: Easing.OutCubic
- }
- }
-
- Behavior on border.color {
- ColorAnimation {
- duration: 100
- easing.type: Easing.OutCubic
- }
- }
-
- Ripple {
- width: parent.width
- height: width
- control: control
- colored: control.checked
- opacity: control.pressed ? 1 : 0
- }
-
- // TODO: This needs to be transparent
- Image {
- id: checkImage
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 16
- height: 16
- source: "qrc:/qt-project.org/imports/Qt/labs/controls/material/images/check.png"
- fillMode: Image.PreserveAspectFit
-
- scale: control.checked ? 1 : 0
- Behavior on scale { NumberAnimation { duration: 100 } }
- }
-
- states: State {
- name: "checked"
- when: control.checked
- }
-
- transitions: Transition {
- SequentialAnimation {
- NumberAnimation {
- target: indicatorItem
- property: "scale"
- // Go down 2 pixels in size.
- to: 1 - 2 / indicatorItem.width
- duration: 120
- }
- NumberAnimation {
- target: indicatorItem
- property: "scale"
- to: 1
- duration: 120
- }
- }
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored || !control.checkable ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - (control.checkable ? indicator.width + control.spacing : 0)
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -143,13 +73,11 @@ T.MenuItem {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [background]
background: Rectangle {
implicitWidth: 200
- visible: control.pressed || control.highlighted
- color: control.pressed ? control.Material.flatButtonPressColor : control.Material.listHighlightColor
+ implicitHeight: 48
+ visible: control.down || control.highlighted
+ color: control.down ? control.Material.buttonPressColor : control.Material.listHighlightColor
}
- //! [background]
}
diff --git a/src/imports/controls/material/Page.qml b/src/imports/controls/material/Page.qml
index 4ff3541f..92c85b58 100644
--- a/src/imports/controls/material/Page.qml
+++ b/src/imports/controls/material/Page.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,19 +35,15 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.Page {
id: control
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
color: control.Material.backgroundColor
}
- //! [background]
}
diff --git a/src/imports/controls/material/PageIndicator.qml b/src/imports/controls/material/PageIndicator.qml
index 1d646f97..78372afe 100644
--- a/src/imports/controls/material/PageIndicator.qml
+++ b/src/imports/controls/material/PageIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.PageIndicator {
id: control
@@ -49,20 +49,17 @@ T.PageIndicator {
padding: 6
spacing: 6
- //! [delegate]
delegate: Rectangle {
implicitWidth: 8
implicitHeight: 8
radius: width / 2
- color: control.Material.primaryTextColor
+ color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
opacity: index === currentIndex ? 0.95 : pressed ? 0.7 : 0.45
Behavior on opacity { OpacityAnimator { duration: 100 } }
}
- //! [delegate]
- //! [contentItem]
contentItem: Row {
spacing: control.spacing
@@ -71,5 +68,4 @@ T.PageIndicator {
delegate: control.delegate
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/material/Pane.qml b/src/imports/controls/material/Pane.qml
index b936f08f..251492ea 100644
--- a/src/imports/controls/material/Pane.qml
+++ b/src/imports/controls/material/Pane.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Pane {
id: control
@@ -47,15 +48,17 @@ T.Pane {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- padding: 6
+ padding: 12
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
color: control.Material.backgroundColor
+ radius: control.Material.elevation > 0 ? 2 : 0
+
+ layer.enabled: control.enabled && control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
+ }
}
- //! [background]
}
diff --git a/src/imports/controls/material/Popup.qml b/src/imports/controls/material/Popup.qml
index d882840a..19fd6b79 100644
--- a/src/imports/controls/material/Popup.qml
+++ b/src/imports/controls/material/Popup.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,13 +35,15 @@
****************************************************************************/
import QtQuick 2.6
-import QtGraphicalEffects 1.0
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Popup {
id: control
+ Material.elevation: 24
+
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
@@ -50,7 +52,7 @@ T.Popup {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- padding: 6
+ padding: 12
enter: Transition {
// grow_fade_in
@@ -67,15 +69,12 @@ T.Popup {
contentItem: Item { }
background: Rectangle {
- radius: 3
+ radius: 2
color: control.Material.dialogColor
- layer.enabled: true
- layer.effect: DropShadow {
- verticalOffset: 1
- color: control.Material.dropShadowColor
- samples: 15
- spread: 0.5
+ layer.enabled: control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
}
}
}
diff --git a/src/imports/controls/material/ProgressBar.qml b/src/imports/controls/material/ProgressBar.qml
index 08e0323e..eb8bf3ce 100644
--- a/src/imports/controls/material/ProgressBar.qml
+++ b/src/imports/controls/material/ProgressBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,25 +35,21 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
-import Qt.labs.controls.material.impl 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.ProgressBar {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- indicator ? indicator.implicitWidth : 0) + leftPadding + rightPadding
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding
+ contentItem.implicitHeight + topPadding + bottomPadding)
- //! [indicator]
- indicator: ProgressStrip {
+ contentItem: ProgressStrip {
id: strip
- x: control.leftPadding
- y: control.topPadding + (control.availableHeight - height) / 2
- width: control.availableWidth
- height: 4
+ implicitHeight: 4
scale: control.mirrored ? -1 : 1
indeterminate: control.indeterminate
@@ -65,9 +61,7 @@ T.ProgressBar {
running: control.visible && control.indeterminate
}
}
- //! [indicator]
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 4
@@ -78,5 +72,4 @@ T.ProgressBar {
color: Qt.rgba(control.Material.accentColor.r, control.Material.accentColor.g, control.Material.accentColor.b, 0.25)
}
- //! [background]
}
diff --git a/src/imports/controls/material/RadioButton.qml b/src/imports/controls/material/RadioButton.qml
index f01d2dc9..3ea2cf4d 100644
--- a/src/imports/controls/material/RadioButton.qml
+++ b/src/imports/controls/material/RadioButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,64 +35,34 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.RadioButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
spacing: 8
- topPadding: 14
- leftPadding: 8
- rightPadding: 8
- bottomPadding: 14
+ padding: 8
+ topPadding: padding + 6
+ bottomPadding: padding + 6
- //! [indicator]
- indicator: Rectangle {
+ indicator: RadioIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- implicitWidth: 20
- implicitHeight: 20
- radius: width / 2
- border.width: 2
- border.color: control.checked || control.pressed ? control.Material.accentColor : control.Material.secondaryTextColor
- color: "transparent"
-
- Ripple {
- width: parent.width
- height: width
- control: control
- colored: control.checked
- opacity: control.pressed || control.activeFocus ? 1 : 0
- }
-
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: 10
- height: 10
- radius: width / 2
- color: parent.border.color
- visible: control.checked || control.pressed
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -102,5 +72,4 @@ T.RadioButton {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
}
diff --git a/src/imports/controls/material/RadioDelegate.qml b/src/imports/controls/material/RadioDelegate.qml
new file mode 100644
index 00000000..95bfb19b
--- /dev/null
+++ b/src/imports/controls/material/RadioDelegate.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+
+T.RadioDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 16
+ topPadding: 8
+ bottomPadding: 8
+ spacing: 16
+
+ indicator: RadioIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ implicitHeight: 48
+
+ visible: control.down || control.highlighted
+ color: control.down ? control.Material.buttonPressColor : control.Material.listHighlightColor
+ }
+}
diff --git a/src/imports/controls/material/RadioIndicator.qml b/src/imports/controls/material/RadioIndicator.qml
new file mode 100644
index 00000000..4090c732
--- /dev/null
+++ b/src/imports/controls/material/RadioIndicator.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
+
+Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ radius: width / 2
+ border.width: 2
+ border.color: control.checked || control.down ? control.Material.accentColor : control.Material.secondaryTextColor
+ color: "transparent"
+
+ property alias control: ripple.control
+
+ Ripple {
+ id: ripple
+ width: parent.width
+ height: width
+ control: control
+ colored: control.checked
+ opacity: control.down || control.visualFocus ? 1 : 0
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: 10
+ height: 10
+ radius: width / 2
+ color: parent.border.color
+ visible: control.checked || control.down
+ }
+}
diff --git a/src/imports/controls/material/RangeSlider.qml b/src/imports/controls/material/RangeSlider.qml
index bf8c16ef..dc2c25fa 100644
--- a/src/imports/controls/material/RangeSlider.qml
+++ b/src/imports/controls/material/RangeSlider.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,24 +35,22 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.RangeSlider {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- Math.max(track ? track.implicitWidth : 0,
- first.handle ? first.handle.implicitWidth : 0,
- second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
+ Math.max(first.handle ? first.handle.implicitWidth : 0,
+ second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(track ? track.implicitHeight : 0,
- first.handle ? first.handle.implicitHeight : 0,
- second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
+ Math.max(first.handle ? first.handle.implicitHeight : 0,
+ second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
padding: 6
- //! [firstHandle]
first.handle: SliderHandle {
x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
@@ -60,9 +58,7 @@ T.RangeSlider {
handleHasFocus: activeFocus
handlePressed: first.pressed
}
- //! [firstHandle]
- //! [secondHandle]
second.handle: SliderHandle {
x: control.leftPadding + (horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
@@ -70,16 +66,14 @@ T.RangeSlider {
handleHasFocus: activeFocus
handlePressed: second.pressed
}
- //! [secondHandle]
- //! [track]
- track: Rectangle {
+ background: Rectangle {
x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- implicitWidth: horizontal ? 200 : 1
- implicitHeight: horizontal ? 1 : 200
- width: horizontal ? control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.availableHeight
+ implicitWidth: horizontal ? 200 : 48
+ implicitHeight: horizontal ? 48 : 200
+ width: horizontal ? control.availableWidth : 1
+ height: horizontal ? 1 : control.availableHeight
color: control.Material.primaryTextColor
scale: horizontal && control.mirrored ? -1 : 1
@@ -94,5 +88,4 @@ T.RangeSlider {
color: control.Material.accentColor
}
}
- //! [track]
}
diff --git a/src/imports/controls/material/Ripple.qml b/src/imports/controls/material/Ripple.qml
index a8fd27e8..15650384 100644
--- a/src/imports/controls/material/Ripple.qml
+++ b/src/imports/controls/material/Ripple.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls.material 1.0
+import QtQuick.Controls.Material 2.0
Rectangle {
property Item control
diff --git a/src/imports/controls/material/ScrollBar.qml b/src/imports/controls/material/ScrollBar.qml
index 72130c63..84f2d33a 100644
--- a/src/imports/controls/material/ScrollBar.qml
+++ b/src/imports/controls/material/ScrollBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,21 +35,23 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.ScrollBar {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- handle.implicitWidth + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- handle.implicitHeight + topPadding + bottomPadding)
+ contentItem.implicitHeight + topPadding + bottomPadding)
padding: 2
+ topPadding: padding + (control.orientation === Qt.Horizontal ? 12 : 0)
+ leftPadding: padding + (control.orientation === Qt.Vertical && !control.mirrored ? 12 : 0)
+ rightPadding: padding + (control.orientation === Qt.Vertical && control.mirrored ? 12 : 0)
- //! [handle]
- handle: Rectangle {
+ contentItem: Rectangle {
id: handle
implicitWidth: 4
@@ -59,12 +61,6 @@ T.ScrollBar {
visible: control.size < 1.0
opacity: 0.0
- readonly property bool horizontal: control.orientation === Qt.Horizontal
- x: control.leftPadding + (horizontal ? control.position * control.availableWidth : 0)
- y: control.topPadding + (horizontal ? 0 : control.position * control.availableHeight)
- width: horizontal ? control.size * control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.size * control.availableHeight
-
states: State {
name: "active"
when: control.active
@@ -79,5 +75,4 @@ T.ScrollBar {
}
}
}
- //! [handle]
}
diff --git a/src/imports/controls/material/ScrollIndicator.qml b/src/imports/controls/material/ScrollIndicator.qml
index f92b366f..b5f25d33 100644
--- a/src/imports/controls/material/ScrollIndicator.qml
+++ b/src/imports/controls/material/ScrollIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,21 +35,20 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.ScrollIndicator {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- indicator.implicitWidth + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- indicator.implicitHeight + topPadding + bottomPadding)
+ contentItem.implicitHeight + topPadding + bottomPadding)
padding: 2
- //! [indicator]
- indicator: Rectangle {
+ contentItem: Rectangle {
id: indicator
implicitWidth: 4
@@ -59,12 +58,6 @@ T.ScrollIndicator {
visible: control.size < 1.0
opacity: 0.0
- readonly property bool horizontal: control.orientation === Qt.Horizontal
- x: control.leftPadding + (horizontal ? control.position * control.width : 0)
- y: control.topPadding + (horizontal ? 0 : control.position * control.height)
- width: horizontal ? control.size * control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.size * control.availableHeight
-
states: State {
name: "active"
when: control.active
@@ -81,5 +74,4 @@ T.ScrollIndicator {
}
]
}
- //! [indicator]
}
diff --git a/src/imports/controls/material/Slider.qml b/src/imports/controls/material/Slider.qml
index 139c9151..15c8edb2 100644
--- a/src/imports/controls/material/Slider.qml
+++ b/src/imports/controls/material/Slider.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,52 +35,47 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.Slider {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- Math.max(track ? track.implicitWidth : 0,
- handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
+ (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(track ? track.implicitHeight : 0,
- handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
+ (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
padding: 6
- //! [handle]
handle: SliderHandle {
x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
value: control.value
- handleHasFocus: control.activeFocus
+ handleHasFocus: control.visualFocus
handlePressed: control.pressed
}
- //! [handle]
- //! [track]
- track: Rectangle {
+ background: Rectangle {
x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
- implicitWidth: horizontal ? 200 : 1
- implicitHeight: horizontal ? 1 : 200
- width: horizontal ? control.availableWidth : implicitWidth
- height: horizontal ? 1 : control.position * implicitHeight - 4
+ implicitWidth: horizontal ? 200 : 48
+ implicitHeight: horizontal ? 48 : 200
+ width: horizontal ? control.availableWidth : 1
+ height: horizontal ? 1 : control.availableHeight
color: control.Material.primaryTextColor
scale: horizontal && control.mirrored ? -1 : 1
readonly property bool horizontal: control.orientation === Qt.Horizontal
Rectangle {
- x: 0
- y: parent.horizontal ? -1 : control.visualPosition * parent.height + 3
+ x: parent.horizontal ? 0 : (parent.width - width) / 2
+ y: parent.horizontal ? (parent.height - height) / 2 : control.visualPosition * parent.height
width: parent.horizontal ? control.position * parent.width : 3
- height: parent.horizontal ? 3 : control.availableHeight
+ height: parent.horizontal ? 3 : control.position * parent.height
color: control.Material.accentColor
}
}
- //! [track]
}
diff --git a/src/imports/controls/material/SliderHandle.qml b/src/imports/controls/material/SliderHandle.qml
index 6f54eaf5..49f833d0 100644
--- a/src/imports/controls/material/SliderHandle.qml
+++ b/src/imports/controls/material/SliderHandle.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls.material 1.0
+import QtQuick.Controls.Material 2.0
Item {
id: root
diff --git a/src/imports/controls/material/SpinBox.qml b/src/imports/controls/material/SpinBox.qml
index 0c9fe767..e28815e8 100644
--- a/src/imports/controls/material/SpinBox.qml
+++ b/src/imports/controls/material/SpinBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,15 +35,15 @@
****************************************************************************/
import QtQuick 2.6
-import QtGraphicalEffects 1.0
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.SpinBox {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- contentItem.implicitWidth + 2 * padding +
+ contentItem.implicitWidth +
(up.indicator ? up.indicator.implicitWidth : 0) +
(down.indicator ? down.indicator.implicitWidth : 0))
implicitHeight: Math.max(contentItem.implicitHeight + topPadding + bottomPadding,
@@ -52,24 +52,23 @@ T.SpinBox {
down.indicator ? down.indicator.implicitHeight : 0)
baselineOffset: contentItem.y + contentItem.baselineOffset
- padding: 6
- leftPadding: 6 + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
- rightPadding: 6 + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
+ spacing: 6
+ topPadding: 8
+ bottomPadding: 16
+ leftPadding: (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
+ rightPadding: (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
- //! [validator]
validator: IntValidator {
locale: control.locale.name
bottom: Math.min(control.from, control.to)
top: Math.max(control.from, control.to)
}
- //! [validator]
- //! [contentItem]
contentItem: TextInput {
text: control.textFromValue(control.value, control.locale)
font: control.font
- color: control.Material.primaryTextColor
+ color: enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
selectionColor: control.Material.textSelectionColor
selectedTextColor: control.Material.primaryTextColor
horizontalAlignment: Qt.AlignHCenter
@@ -93,77 +92,77 @@ T.SpinBox {
id: timer
running: control.activeFocus
repeat: true
- interval: Qt.styleHints.cursorFlashTime
+ interval: Qt.styleHints.cursorFlashTime / 2
onTriggered: cursor.opacity = !cursor.opacity ? 1 : 0
// force the cursor visible when gaining focus
onRunningChanged: cursor.opacity = 1
}
}
+ readOnly: !control.editable
validator: control.validator
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
- //! [contentItem]
- //! [up.indicator]
- up.indicator: Rectangle {
+ up.indicator: PaddedRectangle {
x: control.mirrored ? 0 : parent.width - width
- implicitWidth: 26
+ implicitWidth: 48
+ implicitHeight: 48
height: parent.height
- radius: 3
- color: Qt.tint(Qt.tint(control.Material.raisedButtonColor,
- control.activeFocus ? control.Material.raisedButtonHoverColor : "transparent"),
- control.up.pressed ? control.Material.raisedButtonPressColor: "transparent")
+ width: height
+ padding: control.spacing
+ radius: 2
+ color: Qt.tint(Qt.tint(control.Material.buttonColor,
+ control.activeFocus ? control.Material.buttonHoverColor : "transparent"),
+ control.up.pressed ? control.Material.buttonPressColor: "transparent")
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: Math.min(parent.width / 3, parent.width / 3)
height: 2
- color: control.Material.primaryTextColor
+ color: enabled ? control.Material.primaryTextColor : control.Material.spinBoxDisabledIconColor
}
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: 2
height: Math.min(parent.width / 3, parent.width / 3)
- color: control.Material.primaryTextColor
+ color: enabled ? control.Material.primaryTextColor : control.Material.spinBoxDisabledIconColor
}
}
- //! [up.indicator]
- //! [down.indicator]
- down.indicator: Rectangle {
+ down.indicator: PaddedRectangle {
x: control.mirrored ? parent.width - width : 0
- implicitWidth: 26
+ implicitWidth: 48
+ implicitHeight: 48
height: parent.height
- radius: 3
- color: Qt.tint(Qt.tint(control.Material.raisedButtonColor,
- control.activeFocus ? control.Material.raisedButtonHoverColor : "transparent"),
- control.down.pressed ? control.Material.raisedButtonPressColor : "transparent")
+ width: height
+ padding: control.spacing
+ radius: 2
+ color: Qt.tint(Qt.tint(control.Material.buttonColor,
+ control.activeFocus ? control.Material.buttonHoverColor : "transparent"),
+ control.down.pressed ? control.Material.buttonPressColor : "transparent")
Rectangle {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
width: parent.width / 3
height: 2
- color: control.Material.primaryTextColor
+ color: enabled ? control.Material.primaryTextColor : control.Material.spinBoxDisabledIconColor
}
}
- //! [down.indicator]
- //! [background]
background: Item {
- implicitWidth: 100
- implicitHeight: 26
+ implicitWidth: 192
+ implicitHeight: 48
Rectangle {
x: parent.width / 2 - width / 2
- y: parent.y + parent.height - height
+ y: parent.y + parent.height - height - control.bottomPadding / 2
width: control.availableWidth
height: control.activeFocus ? 2 : 1
color: control.activeFocus ? control.Material.accentColor : control.Material.hintTextColor
}
}
- //! [background]
}
diff --git a/src/imports/controls/material/StackView.qml b/src/imports/controls/material/StackView.qml
index c31c13d2..982a37cb 100644
--- a/src/imports/controls/material/StackView.qml
+++ b/src/imports/controls/material/StackView.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,56 +35,44 @@
****************************************************************************/
import QtQuick 2.4
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.StackView {
- id: root
+ id: control
- //! [popEnter]
popEnter: Transition {
// slide_in_left
- NumberAnimation { property: "x"; from: (root.mirrored ? -0.5 : 0.5) * -root.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * -control.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200; easing.type: Easing.OutCubic }
}
- //! [popEnter]
- //! [popExit]
popExit: Transition {
// slide_out_right
- NumberAnimation { property: "x"; from: 0; to: (root.mirrored ? -0.5 : 0.5) * root.width; duration: 200; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * control.width; duration: 200; easing.type: Easing.OutCubic }
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; easing.type: Easing.OutCubic }
}
- //! [popExit]
- //! [pushEnter]
pushEnter: Transition {
// slide_in_right
- NumberAnimation { property: "x"; from: (root.mirrored ? -0.5 : 0.5) * root.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * control.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200; easing.type: Easing.OutCubic }
}
- //! [pushEnter]
- //! [pushExit]
pushExit: Transition {
// slide_out_left
- NumberAnimation { property: "x"; from: 0; to: (root.mirrored ? -0.5 : 0.5) * -root.width; duration: 200; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * -control.width; duration: 200; easing.type: Easing.OutCubic }
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; easing.type: Easing.OutCubic }
}
- //! [pushExit]
- //! [replaceEnter]
replaceEnter: Transition {
// slide_in_right
- NumberAnimation { property: "x"; from: (root.mirrored ? -0.5 : 0.5) * root.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: (control.mirrored ? -0.5 : 0.5) * control.width; to: 0; duration: 200; easing.type: Easing.OutCubic }
NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200; easing.type: Easing.OutCubic }
}
- //! [replaceEnter]
- //! [replaceExit]
replaceExit: Transition {
// slide_out_left
- NumberAnimation { property: "x"; from: 0; to: (root.mirrored ? -0.5 : 0.5) * -root.width; duration: 200; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: 0; to: (control.mirrored ? -0.5 : 0.5) * -control.width; duration: 200; easing.type: Easing.OutCubic }
NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; easing.type: Easing.OutCubic }
}
- //! [replaceExit]
}
diff --git a/src/imports/controls/material/SwipeDelegate.qml b/src/imports/controls/material/SwipeDelegate.qml
new file mode 100644
index 00000000..dec2d12f
--- /dev/null
+++ b/src/imports/controls/material/SwipeDelegate.qml
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
+
+T.SwipeDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 16
+ topPadding: 8
+ bottomPadding: 8
+ spacing: 16
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0
+ rightPadding: control.mirrored ? (control.indicator ? control.indicator.width + control.spacing : 0) : 0
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ Behavior on x {
+ enabled: !control.down
+ NumberAnimation {
+ easing.type: Easing.InOutCubic
+ duration: 400
+ }
+ }
+ }
+
+ background: Rectangle {
+ implicitHeight: 48
+
+ color: control.Material.backgroundColor
+
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ visible: control.down || control.highlighted || control.visualFocus
+ color: control.down ? control.Material.buttonPressColor :
+ control.visualFocus || control.hovered ? control.Material.swipeDelegateHoverColor :
+ control.Material.listHighlightColor
+ }
+
+ Behavior on x {
+ enabled: !control.down
+ NumberAnimation {
+ easing.type: Easing.InOutCubic
+ duration: 400
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/material/SwipeView.qml b/src/imports/controls/material/SwipeView.qml
index 00655bcb..38c12b6b 100644
--- a/src/imports/controls/material/SwipeView.qml
+++ b/src/imports/controls/material/SwipeView.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,7 +35,7 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
+import QtQuick.Templates 2.0 as T
T.SwipeView {
id: control
@@ -45,7 +45,6 @@ T.SwipeView {
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem.implicitHeight + topPadding + bottomPadding)
- //! [contentItem]
contentItem: ListView {
model: control.contentModel
currentIndex: control.currentIndex
@@ -60,5 +59,4 @@ T.SwipeView {
preferredHighlightEnd: 0
highlightMoveDuration: 250
}
- //! [contentItem]
}
diff --git a/src/imports/controls/material/Switch.qml b/src/imports/controls/material/Switch.qml
index 0b9edcab..ca739e62 100644
--- a/src/imports/controls/material/Switch.qml
+++ b/src/imports/controls/material/Switch.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,84 +35,32 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls.material 1.0
-import Qt.labs.templates 1.0 as T
-import QtGraphicalEffects 1.0
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
+import QtQuick.Templates 2.0 as T
T.Switch {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 8
spacing: 8
- //! [indicator]
- indicator: Item {
+ indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
- implicitWidth: 38
- implicitHeight: 32
-
- Ripple {
- x: handle.x + handle.width / 2 - width / 2
- y: handle.y + handle.height / 2 - height / 2
- width: handle.width
- height: width
- control: control
- colored: control.checked
- opacity: control.pressed || control.activeFocus ? 1 : 0
- }
-
- Rectangle {
- width: parent.width
- height: 14
- radius: height / 2
- y: parent.height / 2 - height / 2
- color: control.enabled ? (control.checked ? control.Material.switchCheckedTrackColor : control.Material.switchUncheckedTrackColor)
- : control.Material.switchDisabledTrackColor
- }
-
- Rectangle {
- id: handle
- x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
- y: (parent.height - height) / 2
- width: 20
- height: 20
- radius: width / 2
- color: control.enabled ? (control.checked ? control.Material.switchCheckedHandleColor : control.Material.switchUncheckedHandleColor)
- : control.Material.switchDisabledHandleColor
-
- Behavior on x {
- enabled: !control.pressed
- SmoothedAnimation {
- duration: 300
- }
- }
-
- layer.enabled: true
- layer.effect: DropShadow {
- verticalOffset: 1
- color: control.Material.dropShadowColor
- spread: 0.3
- }
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -122,5 +70,4 @@ T.Switch {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
}
diff --git a/src/imports/controls/material/SwitchDelegate.qml b/src/imports/controls/material/SwitchDelegate.qml
new file mode 100644
index 00000000..097f0acd
--- /dev/null
+++ b/src/imports/controls/material/SwitchDelegate.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
+
+T.SwitchDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ padding: 16
+ topPadding: 8
+ bottomPadding: 8
+ spacing: 16
+
+ indicator: SwitchIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ background: Rectangle {
+ implicitHeight: 48
+
+ visible: control.down || control.highlighted
+ color: control.down ? control.Material.buttonPressColor : control.Material.listHighlightColor
+ }
+}
diff --git a/src/imports/controls/material/SwitchIndicator.qml b/src/imports/controls/material/SwitchIndicator.qml
new file mode 100644
index 00000000..0d2163b2
--- /dev/null
+++ b/src/imports/controls/material/SwitchIndicator.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
+
+Item {
+ id: indicator
+ implicitWidth: 38
+ implicitHeight: 32
+
+ property alias control: ripple.control
+
+ Material.elevation: 1
+
+ Ripple {
+ id: ripple
+ x: handle.x + handle.width / 2 - width / 2
+ y: handle.y + handle.height / 2 - height / 2
+ width: handle.width
+ height: width
+ colored: control.checked
+ opacity: control.pressed || control.visualFocus ? 1 : 0
+ }
+
+ Rectangle {
+ width: parent.width
+ height: 14
+ radius: height / 2
+ y: parent.height / 2 - height / 2
+ color: control.enabled ? (control.checked ? control.Material.switchCheckedTrackColor : control.Material.switchUncheckedTrackColor)
+ : control.Material.switchDisabledTrackColor
+ }
+
+ Rectangle {
+ id: handle
+ x: Math.max(0, Math.min(parent.width - width, control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+ width: 20
+ height: 20
+ radius: width / 2
+ color: control.enabled ? (control.checked ? control.Material.switchCheckedHandleColor : control.Material.switchUncheckedHandleColor)
+ : control.Material.switchDisabledHandleColor
+
+ Behavior on x {
+ enabled: !control.pressed
+ SmoothedAnimation {
+ duration: 300
+ }
+ }
+ layer.enabled: indicator.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: indicator.Material.elevation
+ }
+ }
+}
diff --git a/src/imports/controls/material/TabBar.qml b/src/imports/controls/material/TabBar.qml
index dbc62512..901e3328 100644
--- a/src/imports/controls/material/TabBar.qml
+++ b/src/imports/controls/material/TabBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,9 +34,10 @@
**
****************************************************************************/
-import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick 2.7
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.TabBar {
id: control
@@ -48,7 +49,6 @@ T.TabBar {
spacing: 1
- //! [contentItem]
contentItem: ListView {
implicitWidth: contentWidth
implicitHeight: 48
@@ -59,20 +59,34 @@ T.TabBar {
spacing: control.spacing
orientation: ListView.Horizontal
boundsBehavior: Flickable.StopAtBounds
+ flickableDirection: Flickable.AutoFlickIfNeeded
snapMode: ListView.SnapToItem
highlightMoveDuration: 250
highlightResizeDuration: 0
highlightFollowsCurrentItem: true
+ highlightRangeMode: ListView.ApplyRange
+ preferredHighlightBegin: 48
+ preferredHighlightEnd: width - 48
+
highlight: Item {
z: 2
Rectangle {
height: 2
width: parent.width
- y: parent.height - height
+ y: control.position === T.TabBar.Footer ? 0 : parent.height - height
color: control.Material.accentColor
}
}
}
- //! [contentItem]
+
+ background: Rectangle {
+ color: control.Material.backgroundColor
+
+ layer.enabled: control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
+ fullWidth: true
+ }
+ }
}
diff --git a/src/imports/controls/material/TabButton.qml b/src/imports/controls/material/TabButton.qml
index 27b27e3b..535dfc02 100644
--- a/src/imports/controls/material/TabButton.qml
+++ b/src/imports/controls/material/TabButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,39 +35,30 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.TabButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.contentWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.contentHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 12
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ contentItem: Text {
text: control.text
font: control.font
elide: Text.ElideRight
- color: !control.enabled ? control.Material.hintTextColor : control.pressed || control.checked ? control.Material.accentColor : control.Material.primaryTextColor
+ color: !control.enabled ? control.Material.hintTextColor : control.down || control.checked ? control.Material.accentColor : control.Material.primaryTextColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [background]
background: Item {
implicitHeight: 48
}
- //! [background]
}
diff --git a/src/imports/controls/material/TextArea.qml b/src/imports/controls/material/TextArea.qml
index 40c8c412..38502ed6 100644
--- a/src/imports/controls/material/TextArea.qml
+++ b/src/imports/controls/material/TextArea.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.TextArea {
id: control
@@ -56,6 +56,7 @@ T.TextArea {
selectedTextColor: Material.primaryHighlightedTextColor
cursorDelegate: Rectangle {
id: cursor
+ clip: true // TODO
color: control.Material.accentColor
width: 2
visible: control.activeFocus && control.selectionStart === control.selectionEnd
@@ -73,14 +74,13 @@ T.TextArea {
id: timer
running: control.activeFocus
repeat: true
- interval: Qt.styleHints.cursorFlashTime
+ interval: Qt.styleHints.cursorFlashTime / 2
onTriggered: cursor.opacity = !cursor.opacity ? 1 : 0
// force the cursor visible when gaining focus
onRunningChanged: cursor.opacity = 1
}
}
- //! [placeholder]
Text {
id: placeholder
x: control.leftPadding
@@ -93,16 +93,13 @@ T.TextArea {
horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
- visible: !control.length && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
}
- //! [placeholder]
- //! [background]
background: Rectangle {
- y: control.height - height - control.bottomPadding / 2
+ y: parent.height - height - control.bottomPadding / 2
implicitWidth: 120
height: control.activeFocus ? 2 : 1
color: control.activeFocus ? control.Material.accentColor : control.Material.hintTextColor
}
- //! [background]
}
diff --git a/src/imports/controls/material/TextField.qml b/src/imports/controls/material/TextField.qml
index 0f929a00..ab6f6187 100644
--- a/src/imports/controls/material/TextField.qml
+++ b/src/imports/controls/material/TextField.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,16 +35,18 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.TextField {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- placeholder.implicitWidth + leftPadding + rightPadding)
- implicitHeight: Math.max(background ? background.implicitHeight : 0,
- placeholder.implicitHeight + 1 + topPadding + bottomPadding)
+ placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0)
+ || contentWidth + leftPadding + rightPadding
+ implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
+ background ? background.implicitHeight : 0,
+ placeholder.implicitHeight + topPadding + bottomPadding)
topPadding: 8
bottomPadding: 16
@@ -72,14 +74,13 @@ T.TextField {
id: timer
running: control.activeFocus
repeat: true
- interval: Qt.styleHints.cursorFlashTime
+ interval: Qt.styleHints.cursorFlashTime / 2
onTriggered: cursor.opacity = !cursor.opacity ? 1 : 0
// force the cursor visible when gaining focus
onRunningChanged: cursor.opacity = 1
}
}
- //! [placeholder]
Text {
id: placeholder
x: control.leftPadding
@@ -92,17 +93,14 @@ T.TextField {
horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
- visible: !control.displayText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
}
- //! [placeholder]
- //! [background]
background: Rectangle {
y: control.height - height - control.bottomPadding / 2
implicitWidth: 120
height: control.activeFocus ? 2 : 1
color: control.activeFocus ? control.Material.accentColor : control.Material.hintTextColor
}
- //! [background]
}
diff --git a/src/imports/controls/material/ToolBar.qml b/src/imports/controls/material/ToolBar.qml
index 57a70564..f0b50f73 100644
--- a/src/imports/controls/material/ToolBar.qml
+++ b/src/imports/controls/material/ToolBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,26 +35,33 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+import QtQuick.Controls.Material.impl 2.0
T.ToolBar {
id: control
+ Material.elevation: 4
+
implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- //! [contentItem]
+ Material.foreground: Material.toolTextColor
+
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitHeight: 48
- color: control.Material.primaryColor
+ color: control.Material.toolBarColor
+
+ layer.enabled: control.Material.elevation > 0
+ layer.effect: ElevationEffect {
+ elevation: control.Material.elevation
+ fullWidth: true
+ }
}
- //! [background]
}
diff --git a/src/imports/controls/material/ToolButton.qml b/src/imports/controls/material/ToolButton.qml
index ebdc36f2..d8c945a7 100644
--- a/src/imports/controls/material/ToolButton.qml
+++ b/src/imports/controls/material/ToolButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,27 +35,21 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.ToolButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ contentItem: Text {
text: control.text
font: control.font
color: control.enabled ? control.Material.primaryTextColor : control.Material.hintTextColor
@@ -63,15 +57,12 @@ T.ToolButton {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [background]
background: Rectangle {
implicitWidth: 48
implicitHeight: 48
- color: control.pressed ? control.Material.flatButtonPressColor : control.Material.flatButtonFocusColor
- visible: control.enabled && (control.pressed || control.activeFocus || control.checked || control.highlighted)
+ color: control.down ? control.Material.buttonPressColor : control.Material.buttonHoverColor
+ visible: control.enabled && (control.down || control.visualFocus || control.checked || control.highlighted)
}
- //! [background]
}
diff --git a/src/imports/controls/material/ToolTip.qml b/src/imports/controls/material/ToolTip.qml
new file mode 100644
index 00000000..ab3b05d8
--- /dev/null
+++ b/src/imports/controls/material/ToolTip.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
+
+T.ToolTip {
+ id: control
+
+ x: parent ? (parent.width - implicitWidth) / 2 : 0
+ y: -implicitHeight - 24
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ margins: 12
+ padding: 8
+ leftPadding: padding + 8
+ rightPadding: padding + 8
+
+ closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
+
+ Material.theme: Material.Dark
+
+ enter: Transition {
+ // toast_enter
+ NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; easing.type: Easing.OutQuad; duration: 500 }
+ }
+
+ exit: Transition {
+ // toast_exit
+ NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; easing.type: Easing.InQuad; duration: 500 }
+ }
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ // TODO: wrapMode: Label.Wrap
+ color: control.Material.primaryTextColor
+ }
+
+ background: Rectangle {
+ implicitHeight: 32
+ color: control.Material.tooltipColor
+ opacity: 0.9
+ radius: 2
+ }
+}
diff --git a/src/imports/controls/material/Tumbler.qml b/src/imports/controls/material/Tumbler.qml
index e5b930a8..7e914319 100644
--- a/src/imports/controls/material/Tumbler.qml
+++ b/src/imports/controls/material/Tumbler.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,28 +35,25 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.material 1.0
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Material 2.0
T.Tumbler {
id: control
implicitWidth: 60
implicitHeight: 200
- //! [delegate]
delegate: Text {
id: label
text: modelData
color: control.Material.primaryTextColor
font: control.font
- opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.displacement)) * 0.6
+ opacity: (1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)) * (control.enabled ? 1 : 0.6)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [delegate]
- //! [contentItem]
contentItem: PathView {
id: pathView
model: control.model
@@ -78,5 +75,4 @@ T.Tumbler {
property real delegateHeight: control.availableHeight / control.visibleItemCount
}
- //! [contentItem]
}
diff --git a/src/imports/controls/material/images/drop-indicator.png b/src/imports/controls/material/images/drop-indicator.png
index b4396ec6..08bb4855 100644
--- a/src/imports/controls/material/images/drop-indicator.png
+++ b/src/imports/controls/material/images/drop-indicator.png
Binary files differ
diff --git a/src/imports/controls/material/images/drop-indicator.svg b/src/imports/controls/material/images/drop-indicator.svg
new file mode 100644
index 00000000..94b5ca15
--- /dev/null
+++ b/src/imports/controls/material/images/drop-indicator.svg
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" version="1.1">
+ <path d="M7,10l5,5,5-5z" fill="#757575"/>
+</svg>
diff --git a/src/imports/controls/material/images/drop-indicator@2x.png b/src/imports/controls/material/images/drop-indicator@2x.png
index 1c711bc2..ccdfc2b1 100644
--- a/src/imports/controls/material/images/drop-indicator@2x.png
+++ b/src/imports/controls/material/images/drop-indicator@2x.png
Binary files differ
diff --git a/src/imports/controls/material/images/drop-indicator@3x.png b/src/imports/controls/material/images/drop-indicator@3x.png
index 06dd8bd2..00cae691 100644
--- a/src/imports/controls/material/images/drop-indicator@3x.png
+++ b/src/imports/controls/material/images/drop-indicator@3x.png
Binary files differ
diff --git a/src/imports/controls/material/images/drop-indicator@4x.png b/src/imports/controls/material/images/drop-indicator@4x.png
index b2157c30..0a61cb01 100644
--- a/src/imports/controls/material/images/drop-indicator@4x.png
+++ b/src/imports/controls/material/images/drop-indicator@4x.png
Binary files differ
diff --git a/src/imports/controls/material/material.pri b/src/imports/controls/material/material.pri
index e41c7d2d..d6247895 100644
--- a/src/imports/controls/material/material.pri
+++ b/src/imports/controls/material/material.pri
@@ -12,12 +12,16 @@ SOURCES += \
QML_FILES += \
$$PWD/ApplicationWindow.qml \
+ $$PWD/BoxShadow.qml \
$$PWD/BusyIndicator.qml \
$$PWD/Button.qml \
$$PWD/CheckBox.qml \
+ $$PWD/CheckDelegate.qml \
+ $$PWD/CheckIndicator.qml \
$$PWD/ComboBox.qml \
$$PWD/Dial.qml \
$$PWD/Drawer.qml \
+ $$PWD/ElevationEffect.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
$$PWD/ItemDelegate.qml \
@@ -30,6 +34,8 @@ QML_FILES += \
$$PWD/Popup.qml \
$$PWD/ProgressBar.qml \
$$PWD/RadioButton.qml \
+ $$PWD/RadioDelegate.qml \
+ $$PWD/RadioIndicator.qml \
$$PWD/RangeSlider.qml \
$$PWD/Ripple.qml \
$$PWD/ScrollBar.qml \
@@ -38,12 +44,16 @@ QML_FILES += \
$$PWD/SliderHandle.qml \
$$PWD/SpinBox.qml \
$$PWD/StackView.qml \
+ $$PWD/SwipeDelegate.qml \
$$PWD/SwipeView.qml \
$$PWD/Switch.qml \
+ $$PWD/SwitchDelegate.qml \
+ $$PWD/SwitchIndicator.qml \
$$PWD/TabBar.qml \
$$PWD/TabButton.qml \
$$PWD/TextArea.qml \
$$PWD/TextField.qml \
$$PWD/ToolBar.qml \
$$PWD/ToolButton.qml \
+ $$PWD/ToolTip.qml \
$$PWD/Tumbler.qml
diff --git a/src/imports/controls/material/material.pro b/src/imports/controls/material/material.pro
index 63450289..06499467 100644
--- a/src/imports/controls/material/material.pro
+++ b/src/imports/controls/material/material.pro
@@ -1,9 +1,9 @@
-TARGET = qtlabsmaterialstyleplugin
-TARGETPATH = Qt/labs/controls/material
-IMPORT_VERSION = 1.0
+TARGET = qtquickcontrols2materialstyleplugin
+TARGETPATH = QtQuick/Controls.2/Material
+IMPORT_VERSION = 2.0
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private labstemplates-private labscontrols-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
@@ -11,10 +11,10 @@ OTHER_FILES += \
qmldir
SOURCES += \
- $$PWD/qtlabsmaterialstyleplugin.cpp
+ $$PWD/qtquickcontrols2materialstyleplugin.cpp
RESOURCES += \
- $$PWD/qtlabsmaterialstyleplugin.qrc
+ $$PWD/qtquickcontrols2materialstyleplugin.qrc
include(material.pri)
diff --git a/src/imports/controls/material/plugins.qmltypes b/src/imports/controls/material/plugins.qmltypes
new file mode 100644
index 00000000..0ff64084
--- /dev/null
+++ b/src/imports/controls/material/plugins.qmltypes
@@ -0,0 +1,92 @@
+import QtQuick.tooling 1.2
+
+// This file describes the plugin-supplied types contained in the library.
+// It is used for QML tooling purposes only.
+//
+// This file was auto-generated by:
+// 'qmlplugindump -nonrelocatable QtQuick.Controls.Material 2.0'
+
+Module {
+ dependencies: []
+ Component {
+ name: "QQuickMaterialStyle"
+ prototype: "QQuickStyle"
+ exports: ["QtQuick.Controls.Material/Material 2.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Theme"
+ values: {
+ "Light": 0,
+ "Dark": 1
+ }
+ }
+ Enum {
+ name: "Color"
+ values: {
+ "Red": 0,
+ "Pink": 1,
+ "Purple": 2,
+ "DeepPurple": 3,
+ "Indigo": 4,
+ "Blue": 5,
+ "LightBlue": 6,
+ "Cyan": 7,
+ "Teal": 8,
+ "Green": 9,
+ "LightGreen": 10,
+ "Lime": 11,
+ "Yellow": 12,
+ "Amber": 13,
+ "Orange": 14,
+ "DeepOrange": 15,
+ "Brown": 16,
+ "Grey": 17,
+ "BlueGrey": 18
+ }
+ }
+ Enum {
+ name: "Shade"
+ values: {
+ "Shade50": 0,
+ "Shade100": 1,
+ "Shade200": 2,
+ "Shade300": 3,
+ "Shade400": 4,
+ "Shade500": 5,
+ "Shade600": 6,
+ "Shade700": 7,
+ "Shade800": 8,
+ "Shade900": 9,
+ "ShadeA100": 10,
+ "ShadeA200": 11,
+ "ShadeA400": 12,
+ "ShadeA700": 13
+ }
+ }
+ Property { name: "theme"; type: "Theme" }
+ Property { name: "primary"; type: "QVariant" }
+ Property { name: "accent"; type: "QVariant" }
+ Property { name: "foreground"; type: "QVariant" }
+ Property { name: "background"; type: "QVariant" }
+ Signal { name: "paletteChanged" }
+ Method {
+ name: "color"
+ type: "QColor"
+ Parameter { name: "color"; type: "Color" }
+ Parameter { name: "shade"; type: "Shade" }
+ }
+ Method {
+ name: "color"
+ type: "QColor"
+ Parameter { name: "color"; type: "Color" }
+ }
+ Method {
+ name: "shade"
+ type: "QColor"
+ Parameter { name: "color"; type: "QColor" }
+ Parameter { name: "shade"; type: "Shade" }
+ }
+ }
+ Component { name: "QQuickStyle"; prototype: "QObject" }
+}
diff --git a/src/imports/controls/material/qmldir b/src/imports/controls/material/qmldir
index d90e75d8..51dafa08 100644
--- a/src/imports/controls/material/qmldir
+++ b/src/imports/controls/material/qmldir
@@ -1,5 +1,5 @@
-module Qt.labs.controls.material
-plugin qtlabsmaterialstyleplugin
-classname QtLabsMaterialStylePlugin
-depends Qt.labs.controls 1.0
+module QtQuick.Controls.Material
+plugin qtquickcontrols2materialstyleplugin
+classname QtQuickControls2MaterialStylePlugin
+depends QtQuick.Controls 2.0
depends QtGraphicalEffects 1.0
diff --git a/src/imports/controls/material/qquickmaterialprogressring.cpp b/src/imports/controls/material/qquickmaterialprogressring.cpp
index c11a347f..8407c7c2 100644
--- a/src/imports/controls/material/qquickmaterialprogressring.cpp
+++ b/src/imports/controls/material/qquickmaterialprogressring.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -67,13 +67,15 @@ public:
QQuickMaterialRingAnimatorJob();
~QQuickMaterialRingAnimatorJob();
- void initialize(QQuickAnimatorController *controller) Q_DECL_OVERRIDE;
- void updateCurrentTime(int time) Q_DECL_OVERRIDE;
- void writeBack() Q_DECL_OVERRIDE;
- void nodeWasDestroyed() Q_DECL_OVERRIDE;
- void afterNodeSync() Q_DECL_OVERRIDE;
+ void initialize(QQuickAnimatorController *controller) override;
+ void updateCurrentTime(int time) override;
+ void writeBack() override;
+ void nodeWasDestroyed() override;
+ void afterNodeSync() override;
private:
+ int m_lastStartAngle;
+ int m_lastEndAngle;
qreal m_devicePixelRatio;
QSGNode *m_containerNode;
QQuickWindow *m_window;
@@ -134,11 +136,12 @@ QColor QQuickMaterialProgressRing::color() const
void QQuickMaterialProgressRing::setColor(QColor color)
{
- if (m_color != color) {
- m_color = color;
- update();
- emit colorChanged();
- }
+ if (m_color == color)
+ return;
+
+ m_color = color;
+ update();
+ emit colorChanged();
}
static const int spanAnimationDuration = 700;
@@ -166,9 +169,11 @@ QQuickAnimatorJob *QQuickMaterialRingAnimator::createJob() const
}
QQuickMaterialRingAnimatorJob::QQuickMaterialRingAnimatorJob() :
+ m_lastStartAngle(0),
+ m_lastEndAngle(0),
m_devicePixelRatio(1.0),
- m_containerNode(Q_NULLPTR),
- m_window(Q_NULLPTR)
+ m_containerNode(nullptr),
+ m_window(nullptr)
{
}
@@ -214,29 +219,25 @@ void QQuickMaterialRingAnimatorJob::updateCurrentTime(int time)
const int iteration = time / spanAnimationDuration;
int startAngle = 0;
int endAngle = 0;
- static int lastStartAngle = 0;
- static int lastEndAngle = 0;
if (iteration % 2 == 0) {
- if (lastStartAngle > 360 * oneDegree) {
- lastStartAngle -= 360 * oneDegree;
+ if (m_lastStartAngle > 360 * oneDegree) {
+ m_lastStartAngle -= 360 * oneDegree;
}
// The start angle is only affected by the rotation animation for the "grow" phase.
- startAngle = lastStartAngle;
- // TODO: use the correct curve here. QEasingCurve's bezier API doesn't support SVG path data.
+ startAngle = m_lastStartAngle;
QEasingCurve angleCurve(QEasingCurve::OutQuad);
const qreal percentage = angleCurve.valueForProgress(spanPercentageComplete);
- endAngle = lastStartAngle + minSweepSpan + percentage * (maxSweepSpan - minSweepSpan);
- lastEndAngle = endAngle;
+ endAngle = m_lastStartAngle + minSweepSpan + percentage * (maxSweepSpan - minSweepSpan);
+ m_lastEndAngle = endAngle;
} else {
// Both the start angle *and* the span are affected by the "shrink" phase.
- // TODO: use the correct curve here. QEasingCurve's bezier API doesn't support SVG path data.
QEasingCurve angleCurve(QEasingCurve::InQuad);
const qreal percentage = angleCurve.valueForProgress(spanPercentageComplete);
- startAngle = lastEndAngle - maxSweepSpan + percentage * (maxSweepSpan - minSweepSpan);
- endAngle = lastEndAngle;
- lastStartAngle = startAngle;
+ startAngle = m_lastEndAngle - maxSweepSpan + percentage * (maxSweepSpan - minSweepSpan);
+ endAngle = m_lastEndAngle;
+ m_lastStartAngle = startAngle;
}
const int halfPen = pen.width() / 2;
@@ -258,8 +259,8 @@ void QQuickMaterialRingAnimatorJob::writeBack()
void QQuickMaterialRingAnimatorJob::nodeWasDestroyed()
{
- m_containerNode = Q_NULLPTR;
- m_window = Q_NULLPTR;
+ m_containerNode = nullptr;
+ m_window = nullptr;
}
void QQuickMaterialRingAnimatorJob::afterNodeSync()
diff --git a/src/imports/controls/material/qquickmaterialprogressring_p.h b/src/imports/controls/material/qquickmaterialprogressring_p.h
index 6f4ebc6b..8d6cd578 100644
--- a/src/imports/controls/material/qquickmaterialprogressring_p.h
+++ b/src/imports/controls/material/qquickmaterialprogressring_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -60,7 +60,7 @@ class QQuickMaterialProgressRing : public QQuickItem
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
public:
- explicit QQuickMaterialProgressRing(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickMaterialProgressRing(QQuickItem *parent = nullptr);
~QQuickMaterialProgressRing();
QColor color() const;
@@ -70,7 +70,7 @@ Q_SIGNALS:
void colorChanged();
protected:
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
private:
QColor m_color;
@@ -79,11 +79,11 @@ private:
class QQuickMaterialRingAnimator : public QQuickAnimator
{
public:
- QQuickMaterialRingAnimator(QObject *parent = Q_NULLPTR);
+ QQuickMaterialRingAnimator(QObject *parent = nullptr);
protected:
- QString propertyName() const Q_DECL_OVERRIDE;
- QQuickAnimatorJob *createJob() const Q_DECL_OVERRIDE;
+ QString propertyName() const override;
+ QQuickAnimatorJob *createJob() const override;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/material/qquickmaterialprogressstrip.cpp b/src/imports/controls/material/qquickmaterialprogressstrip.cpp
index 1d888183..ce4d676e 100644
--- a/src/imports/controls/material/qquickmaterialprogressstrip.cpp
+++ b/src/imports/controls/material/qquickmaterialprogressstrip.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -54,11 +54,11 @@ class QQuickMaterialProgressStripAnimatorJob : public QQuickAnimatorJob
public:
QQuickMaterialProgressStripAnimatorJob();
- void initialize(QQuickAnimatorController *controller) Q_DECL_OVERRIDE;
- void updateCurrentTime(int time) Q_DECL_OVERRIDE;
- void writeBack() Q_DECL_OVERRIDE;
- void nodeWasDestroyed() Q_DECL_OVERRIDE;
- void afterNodeSync() Q_DECL_OVERRIDE;
+ void initialize(QQuickAnimatorController *controller) override;
+ void updateCurrentTime(int time) override;
+ void writeBack() override;
+ void nodeWasDestroyed() override;
+ void afterNodeSync() override;
void moveNode(QSGTransformNode *node, const QRectF &geometry, qreal progress);
@@ -66,7 +66,7 @@ private:
QSGNode *m_node;
};
-QQuickMaterialProgressStripAnimatorJob::QQuickMaterialProgressStripAnimatorJob() : m_node(Q_NULLPTR)
+QQuickMaterialProgressStripAnimatorJob::QQuickMaterialProgressStripAnimatorJob() : m_node(nullptr)
{
}
@@ -111,7 +111,7 @@ void QQuickMaterialProgressStripAnimatorJob::writeBack()
void QQuickMaterialProgressStripAnimatorJob::nodeWasDestroyed()
{
- m_node = Q_NULLPTR;
+ m_node = nullptr;
}
void QQuickMaterialProgressStripAnimatorJob::afterNodeSync()
@@ -207,12 +207,17 @@ QSGNode *QQuickMaterialProgressStrip::updatePaintNode(QSGNode *oldNode, UpdatePa
{
QQuickItemPrivate *d = QQuickItemPrivate::get(this);
+ QRectF bounds = boundingRect();
+ bounds.setHeight(implicitHeight());
+ bounds.moveTop((height() - bounds.height()) / 2.0);
+
if (!oldNode)
- oldNode = new QSGSimpleRectNode(boundingRect(), Qt::transparent);
- static_cast<QSGSimpleRectNode *>(oldNode)->setRect(boundingRect());
+ oldNode = new QSGSimpleRectNode(bounds, Qt::transparent);
+ static_cast<QSGSimpleRectNode *>(oldNode)->setRect(bounds);
const int count = m_indeterminate ? 2 : 1;
const qreal w = m_indeterminate ? 0 : m_progress * width();
+ const QRectF rect(0, bounds.y(), w, bounds.height());
QSGNode *transformNode = oldNode->firstChild();
for (int i = 0; i < count; ++i) {
@@ -230,7 +235,7 @@ QSGNode *QQuickMaterialProgressStrip::updatePaintNode(QSGNode *oldNode, UpdatePa
QSGRectangleNode *rectNode = static_cast<QSGRectangleNode *>(transformNode->firstChild());
Q_ASSERT(rectNode->type() == QSGNode::GeometryNodeType);
- rectNode->setRect(QRectF(0, 0, w, height()));
+ rectNode->setRect(rect);
rectNode->setColor(m_color);
rectNode->update();
diff --git a/src/imports/controls/material/qquickmaterialprogressstrip_p.h b/src/imports/controls/material/qquickmaterialprogressstrip_p.h
index d0618af6..f441c09d 100644
--- a/src/imports/controls/material/qquickmaterialprogressstrip_p.h
+++ b/src/imports/controls/material/qquickmaterialprogressstrip_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -61,7 +61,7 @@ class QQuickMaterialProgressStrip : public QQuickItem
Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL)
public:
- QQuickMaterialProgressStrip(QQuickItem *parent = Q_NULLPTR);
+ QQuickMaterialProgressStrip(QQuickItem *parent = nullptr);
QColor color() const;
void setColor(const QColor &color);
@@ -73,7 +73,7 @@ public:
void setIndeterminate(bool indeterminate);
protected:
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
private:
QColor m_color;
@@ -86,11 +86,11 @@ class QQuickMaterialStripAnimator : public QQuickAnimator
Q_OBJECT
public:
- QQuickMaterialStripAnimator(QObject *parent = Q_NULLPTR);
+ QQuickMaterialStripAnimator(QObject *parent = nullptr);
protected:
- QString propertyName() const Q_DECL_OVERRIDE;
- QQuickAnimatorJob *createJob() const Q_DECL_OVERRIDE;
+ QString propertyName() const override;
+ QQuickAnimatorJob *createJob() const override;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index d7a25914..1c19bbd3 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -39,7 +39,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qsettings.h>
#include <QtQml/qqmlinfo.h>
-#include <QtLabsControls/private/qquickstyle_p.h>
+#include <QtQuickControls2/private/qquickstyleattached_p.h>
QT_BEGIN_NAMESPACE
@@ -369,41 +369,67 @@ static const QRgb colors[][14] = {
}
};
-static QQuickMaterialStyle::Theme defaultTheme = QQuickMaterialStyle::Light;
-static uint defaultPrimary = QQuickMaterialStyle::Indigo;
-static uint defaultAccent = QQuickMaterialStyle::Pink;
-static bool defaultPrimaryCustom = false;
-static bool defaultAccentCustom = false;
+// If no value was inherited from a parent or explicitly set, the "global" values are used.
+// The initial, default values of the globals are hard-coded here, but the environment
+// variables and .conf file override them if specified.
+static QQuickMaterialStyle::Theme globalTheme = QQuickMaterialStyle::Light;
+static uint globalPrimary = QQuickMaterialStyle::Indigo;
+static uint globalAccent = QQuickMaterialStyle::Pink;
+static uint globalForeground = 0xDD000000; // primaryTextColorLight
+static uint globalBackground = 0xFFFAFAFA; // backgroundColorLight
+// These represent whether a global foreground/background was set.
+// Each style's m_hasForeground/m_hasBackground are initialized to these values.
+static bool hasGlobalForeground = false;
+static bool hasGlobalBackground = false;
+// These represent whether or not the global color value was specified as one of the
+// values that QColor accepts, as opposed to one of the pre-defined colors like Red.
+static bool globalPrimaryCustom = false;
+static bool globalAccentCustom = false;
+static bool globalForegroundCustom = true;
+static bool globalBackgroundCustom = true;
+
static const QRgb backgroundColorLight = 0xFFFAFAFA;
static const QRgb backgroundColorDark = 0xFF303030;
static const QRgb dialogColorLight = 0xFFFFFFFF;
-static const QRgb dialogColorDark = 0xFF303030;
+static const QRgb dialogColorDark = 0xFF424242;
static const QRgb primaryTextColorLight = 0xDD000000;
static const QRgb primaryTextColorDark = 0xFFFFFFFF;
static const QRgb secondaryTextColorLight = 0x89000000;
static const QRgb secondaryTextColorDark = 0xB2FFFFFF;
static const QRgb hintTextColorLight = 0x60000000;
static const QRgb hintTextColorDark = 0x4CFFFFFF;
-static const QRgb dividerTextColorLight = 0x1E000000;
-static const QRgb dividerTextColorDark = 0x1EFFFFFF;
+static const QRgb dividerColorLight = 0x1E000000;
+static const QRgb dividerColorDark = 0x1EFFFFFF;
+static const QRgb iconColorLight = 0x89000000;
+static const QRgb iconColorDark = 0xFFFFFFFF;
+static const QRgb iconDisabledColorLight = 0x42000000;
+static const QRgb iconDisabledColorDark = 0x4CFFFFFF;
static const QRgb raisedButtonColorLight = 0xFFD6D7D7;
-// TODO: find out actual value
-static const QRgb raisedButtonPressColorLight = 0xFFCCCDCD;
-static const QRgb raisedButtonDisabledColorLight = dividerTextColorLight;
-static const QRgb raisedButtonDisabledColorDark = dividerTextColorDark;
+static const QRgb raisedButtonColorDark = 0x3FCCCCCC;
+static const QRgb raisedButtonDisabledColorLight = dividerColorLight;
+static const QRgb raisedButtonDisabledColorDark = dividerColorDark;
static const QRgb flatButtonPressColorLight = 0x66999999;
static const QRgb flatButtonPressColorDark = 0x3FCCCCCC;
static const QRgb flatButtonFocusColorLight = 0x33CCCCCC;
static const QRgb flatButtonFocusColorDark = 0x26CCCCCC;
+static const QRgb swipeDelegateColorLight = 0xFFD6D7D7;
+static const QRgb swipeDelegateColorDark = 0xFF525252;
+static const QRgb swipeDelegateHoverColorLight = 0xFFDFDFDF;
+static const QRgb swipeDelegateHoverColorDark = 0xFF5D5D5D;
+static const QRgb swipeDelegatePressColorLight = 0xFFCFCFCF;
+static const QRgb swipeDelegatePressColorDark = 0xFF484848;
+static const QRgb swipeDelegateDisabledColorLight = 0xFFEFEFEF;
+static const QRgb swipeDelegateDisabledColorDark = 0xFF7C7C7C;
static const QRgb frameColorLight = hintTextColorLight;
static const QRgb frameColorDark = hintTextColorDark;
static const QRgb switchUncheckedTrackColorLight = 0x42000000;
static const QRgb switchUncheckedTrackColorDark = 0x4CFFFFFF;
static const QRgb switchDisabledTrackColorLight = 0x1E000000;
static const QRgb switchDisabledTrackColorDark = 0x19FFFFFF;
-// TODO: find out actual values
static const QRgb checkBoxUncheckedRippleColorLight = 0x10000000;
static const QRgb checkBoxUncheckedRippleColorDark = 0x20FFFFFF;
+static const QRgb spinBoxDisabledIconColorLight = 0xFFCCCCCC;
+static const QRgb spinBoxDisabledIconColorDark = 0xFF666666;
static QColor alphaBlend(const QColor &bg, const QColor &fg)
{
@@ -415,15 +441,24 @@ static QColor alphaBlend(const QColor &bg, const QColor &fg)
return result;
}
-QQuickMaterialStyle::QQuickMaterialStyle(QObject *parent) : QQuickStyle(parent),
+QQuickMaterialStyle::QQuickMaterialStyle(QObject *parent) : QQuickStyleAttached(parent),
m_explicitTheme(false),
m_explicitPrimary(false),
m_explicitAccent(false),
- m_customPrimary(defaultPrimaryCustom),
- m_customAccent(defaultAccentCustom),
- m_theme(defaultTheme),
- m_primary(defaultPrimary),
- m_accent(defaultAccent)
+ m_explicitForeground(false),
+ m_explicitBackground(false),
+ m_customPrimary(globalPrimaryCustom),
+ m_customAccent(globalAccentCustom),
+ m_customForeground(globalForegroundCustom),
+ m_customBackground(globalBackgroundCustom),
+ m_hasForeground(hasGlobalForeground),
+ m_hasBackground(hasGlobalBackground),
+ m_theme(globalTheme),
+ m_primary(globalPrimary),
+ m_accent(globalAccent),
+ m_foreground(globalForeground),
+ m_background(globalBackground),
+ m_elevation(0)
{
init();
}
@@ -441,27 +476,42 @@ QQuickMaterialStyle::Theme QQuickMaterialStyle::theme() const
void QQuickMaterialStyle::setTheme(Theme theme)
{
m_explicitTheme = true;
- if (m_theme != theme) {
- m_theme = theme;
- propagateTheme();
- emit themeChanged();
- emit paletteChanged();
- }
+ if (m_theme == theme)
+ return;
+
+ m_theme = theme;
+ propagateTheme();
+ emit themeChanged();
+ emit paletteChanged();
+ if (!m_customAccent)
+ emit accentChanged();
+ if (!m_hasBackground)
+ emit backgroundChanged();
+ if (!m_hasForeground)
+ emit foregroundChanged();
}
void QQuickMaterialStyle::inheritTheme(Theme theme)
{
- if (!m_explicitTheme && m_theme != theme) {
- m_theme = theme;
- propagateTheme();
- emit themeChanged();
- emit paletteChanged();
- }
+ if (m_explicitTheme || m_theme == theme)
+ return;
+
+ m_theme = theme;
+ propagateTheme();
+ emit themeChanged();
+ emit paletteChanged();
+ if (!m_customAccent)
+ emit accentChanged();
+ if (!m_hasBackground)
+ emit backgroundChanged();
+ if (!m_hasForeground)
+ emit foregroundChanged();
}
void QQuickMaterialStyle::propagateTheme()
{
- foreach (QQuickStyle *child, childStyles()) {
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritTheme(m_theme);
@@ -470,11 +520,12 @@ void QQuickMaterialStyle::propagateTheme()
void QQuickMaterialStyle::resetTheme()
{
- if (m_explicitTheme) {
- m_explicitTheme = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
- inheritTheme(material ? material->theme() : defaultTheme);
- }
+ if (!m_explicitTheme)
+ return;
+
+ m_explicitTheme = false;
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ inheritTheme(material ? material->theme() : globalTheme);
}
QVariant QQuickMaterialStyle::primary() const
@@ -486,52 +537,36 @@ void QQuickMaterialStyle::setPrimary(const QVariant &var)
{
QRgb primary = 0;
bool custom = false;
- if (var.type() == QVariant::Int) {
- int val = var.toInt();
- if (val > BlueGrey) {
- qmlInfo(parent()) << "unknown Material.primary value: " << val;
- return;
- }
- primary = val;
- } else {
- int val = QMetaEnum::fromType<Color>().keyToValue(var.toByteArray());
- if (val != -1) {
- primary = val;
- } else {
- QColor color(var.toString());
- if (!color.isValid()) {
- qmlInfo(parent()) << "unknown Material.primary value: " << var.toString();
- return;
- }
- custom = true;
- primary = color.rgba();
- }
- }
+ if (!variantToRgba(var, "primary", &primary, &custom))
+ return;
m_explicitPrimary = true;
- if (m_primary != primary) {
- m_customPrimary = custom;
- m_primary = primary;
- propagatePrimary();
- emit primaryChanged();
- emit paletteChanged();
- }
+ if (m_primary == primary)
+ return;
+
+ m_customPrimary = custom;
+ m_primary = primary;
+ propagatePrimary();
+ emit primaryChanged();
+ emit paletteChanged();
}
void QQuickMaterialStyle::inheritPrimary(uint primary, bool custom)
{
- if (!m_explicitPrimary && m_primary != primary) {
- m_customPrimary = custom;
- m_primary = primary;
- propagatePrimary();
- emit primaryChanged();
- emit paletteChanged();
- }
+ if (m_explicitPrimary || m_primary == primary)
+ return;
+
+ m_customPrimary = custom;
+ m_primary = primary;
+ propagatePrimary();
+ emit primaryChanged();
+ emit paletteChanged();
}
void QQuickMaterialStyle::propagatePrimary()
{
- foreach (QQuickStyle *child, childStyles()) {
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritPrimary(m_primary, m_customPrimary);
@@ -540,12 +575,16 @@ void QQuickMaterialStyle::propagatePrimary()
void QQuickMaterialStyle::resetPrimary()
{
- if (m_explicitPrimary) {
- m_customPrimary = false;
- m_explicitPrimary = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
- inheritPrimary(material ? material->m_primary : defaultPrimary, true);
- }
+ if (!m_explicitPrimary)
+ return;
+
+ m_customPrimary = false;
+ m_explicitPrimary = false;
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ if (material)
+ inheritPrimary(material->m_primary, material->m_customPrimary);
+ else
+ inheritPrimary(globalPrimary, false);
}
QVariant QQuickMaterialStyle::accent() const
@@ -557,52 +596,36 @@ void QQuickMaterialStyle::setAccent(const QVariant &var)
{
QRgb accent = 0;
bool custom = false;
- if (var.type() == QVariant::Int) {
- int val = var.toInt();
- if (val > BlueGrey) {
- qmlInfo(parent()) << "unknown Material.accent value: " << val;
- return;
- }
- accent = val;
- } else {
- int val = QMetaEnum::fromType<Color>().keyToValue(var.toByteArray());
- if (val != -1) {
- accent = val;
- } else {
- QColor color(var.toString());
- if (!color.isValid()) {
- qmlInfo(parent()) << "unknown Material.accent value: " << var.toString();
- return;
- }
- custom = true;
- accent = color.rgba();
- }
- }
+ if (!variantToRgba(var, "accent", &accent, &custom))
+ return;
m_explicitAccent = true;
- if (m_accent != accent) {
- m_customAccent = custom;
- m_accent = accent;
- propagateAccent();
- emit accentChanged();
- emit paletteChanged();
- }
+ if (m_accent == accent)
+ return;
+
+ m_customAccent = custom;
+ m_accent = accent;
+ propagateAccent();
+ emit accentChanged();
+ emit paletteChanged();
}
void QQuickMaterialStyle::inheritAccent(uint accent, bool custom)
{
- if (!m_explicitAccent && m_accent != accent) {
- m_customAccent = custom;
- m_accent = accent;
- propagateAccent();
- emit accentChanged();
- emit paletteChanged();
- }
+ if (m_explicitAccent || m_accent == accent)
+ return;
+
+ m_customAccent = custom;
+ m_accent = accent;
+ propagateAccent();
+ emit accentChanged();
+ emit paletteChanged();
}
void QQuickMaterialStyle::propagateAccent()
{
- foreach (QQuickStyle *child, childStyles()) {
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
if (material)
material->inheritAccent(m_accent, m_customAccent);
@@ -611,14 +634,153 @@ void QQuickMaterialStyle::propagateAccent()
void QQuickMaterialStyle::resetAccent()
{
- if (m_explicitAccent) {
- m_customAccent = false;
- m_explicitAccent = false;
- QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
- inheritAccent(material ? material->m_accent : defaultAccent, true);
+ if (!m_explicitAccent)
+ return;
+
+ m_customAccent = false;
+ m_explicitAccent = false;
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ if (material)
+ inheritAccent(material->m_accent, material->m_customAccent);
+ else
+ inheritAccent(globalAccent, false);
+}
+
+QVariant QQuickMaterialStyle::foreground() const
+{
+ return primaryTextColor();
+}
+
+void QQuickMaterialStyle::setForeground(const QVariant &var)
+{
+ QRgb foreground = 0;
+ bool custom = false;
+ if (!variantToRgba(var, "foreground", &foreground, &custom))
+ return;
+
+ m_hasForeground = true;
+ m_explicitForeground = true;
+ if (m_foreground == foreground)
+ return;
+
+ m_customForeground = custom;
+ m_foreground = foreground;
+ propagateForeground();
+ emit foregroundChanged();
+}
+
+void QQuickMaterialStyle::inheritForeground(uint foreground, bool custom, bool has)
+{
+ if (m_explicitForeground || m_foreground == foreground)
+ return;
+
+ m_hasForeground = has;
+ m_customForeground = custom;
+ m_foreground = foreground;
+ propagateForeground();
+ emit foregroundChanged();
+}
+
+void QQuickMaterialStyle::propagateForeground()
+{
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
+ if (material)
+ material->inheritForeground(m_foreground, m_customForeground, m_hasForeground);
}
}
+void QQuickMaterialStyle::resetForeground()
+{
+ if (!m_explicitForeground)
+ return;
+
+ m_hasForeground = false;
+ m_customForeground = false;
+ m_explicitForeground = false;
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ inheritForeground(material ? material->m_foreground : globalForeground, true, material ? material->m_hasForeground : false);
+}
+
+QVariant QQuickMaterialStyle::background() const
+{
+ return backgroundColor();
+}
+
+void QQuickMaterialStyle::setBackground(const QVariant &var)
+{
+ QRgb background = 0;
+ bool custom = false;
+ if (!variantToRgba(var, "background", &background, &custom))
+ return;
+
+ m_hasBackground = true;
+ m_explicitBackground = true;
+ if (m_background == background)
+ return;
+
+ m_customBackground = custom;
+ m_background = background;
+ propagateBackground();
+ emit backgroundChanged();
+ emit paletteChanged();
+}
+
+void QQuickMaterialStyle::inheritBackground(uint background, bool custom, bool has)
+{
+ if (m_explicitBackground || m_background == background)
+ return;
+
+ m_hasBackground = has;
+ m_customBackground = custom;
+ m_background = background;
+ propagateBackground();
+ emit backgroundChanged();
+ emit paletteChanged();
+}
+
+void QQuickMaterialStyle::propagateBackground()
+{
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(child);
+ if (material)
+ material->inheritBackground(m_background, m_customBackground, m_hasBackground);
+ }
+}
+
+void QQuickMaterialStyle::resetBackground()
+{
+ if (!m_explicitBackground)
+ return;
+
+ m_hasBackground = false;
+ m_customBackground = false;
+ m_explicitBackground = false;
+ QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(parentStyle());
+ inheritBackground(material ? material->m_background : globalBackground, true, material ? material->m_hasBackground : false);
+}
+
+int QQuickMaterialStyle::elevation() const
+{
+ return m_elevation;
+}
+
+void QQuickMaterialStyle::setElevation(int elevation)
+{
+ if (m_elevation == elevation)
+ return;
+
+ m_elevation = elevation;
+ emit elevationChanged();
+}
+
+void QQuickMaterialStyle::resetElevation()
+{
+ setElevation(0);
+}
+
QColor QQuickMaterialStyle::primaryColor() const
{
if (m_customPrimary)
@@ -628,27 +790,53 @@ QColor QQuickMaterialStyle::primaryColor() const
return colors[m_primary][Shade500];
}
-QColor QQuickMaterialStyle::accentColor() const
+QColor QQuickMaterialStyle::accentColor(Shade shade) const
{
if (m_customAccent)
- return QColor::fromRgba(m_accent);
+ return shade == themeShade() ? QColor::fromRgba(m_accent)
+ : this->shade(QColor::fromRgba(m_accent), shade);
if (m_accent > BlueGrey)
return QColor();
- return colors[m_accent][m_theme == Light ? Shade500 : Shade200];
+ return colors[m_accent][shade];
+}
+
+QColor QQuickMaterialStyle::accentColor() const
+{
+ return accentColor(themeShade());
+}
+
+QColor QQuickMaterialStyle::backgroundColor(Shade shade) const
+{
+ if (!m_hasBackground)
+ return QColor::fromRgba(m_theme == Light ? backgroundColorLight : backgroundColorDark);
+ if (m_customBackground)
+ return shade == themeShade() ? QColor::fromRgba(m_background)
+ : this->shade(QColor::fromRgba(m_background), shade);
+ if (m_background > BlueGrey)
+ return QColor();
+ return colors[m_background][shade];
}
QColor QQuickMaterialStyle::backgroundColor() const
{
- return QColor::fromRgba(m_theme == Light ? backgroundColorLight : backgroundColorDark);
+ return backgroundColor(themeShade());
}
QColor QQuickMaterialStyle::primaryTextColor() const
{
- return QColor::fromRgba(m_theme == Light ? primaryTextColorLight : primaryTextColorDark);
+ if (!m_hasForeground)
+ return QColor::fromRgba(m_theme == Light ? primaryTextColorLight : primaryTextColorDark);
+ if (m_customForeground)
+ return QColor::fromRgba(m_foreground);
+ if (m_foreground > BlueGrey)
+ return QColor();
+ return colors[m_foreground][Shade500];
}
QColor QQuickMaterialStyle::primaryHighlightedTextColor() const
{
+ if (m_explicitForeground)
+ return primaryTextColor();
return QColor::fromRgba(primaryTextColorDark);
}
@@ -676,60 +864,117 @@ QColor QQuickMaterialStyle::dropShadowColor() const
QColor QQuickMaterialStyle::dividerColor() const
{
- return QColor::fromRgba(m_theme == Light ? dividerTextColorLight : dividerTextColorDark);
+ return QColor::fromRgba(m_theme == Light ? dividerColorLight : dividerColorDark);
}
-QColor QQuickMaterialStyle::raisedButtonColor() const
+QColor QQuickMaterialStyle::iconColor() const
{
- return QColor::fromRgba(m_theme == Light ? raisedButtonColorLight : flatButtonFocusColorDark);
+ return QColor::fromRgba(m_theme == Light ? iconColorLight : iconColorDark);
}
-QColor QQuickMaterialStyle::raisedButtonHoverColor() const
+QColor QQuickMaterialStyle::iconDisabledColor() const
{
- // The specs don't specify different colors here for the light theme.
- return QColor::fromRgba(m_theme == Light ? raisedButtonColorLight : flatButtonPressColorDark);
+ return QColor::fromRgba(m_theme == Light ? iconDisabledColorLight : iconDisabledColorDark);
}
-QColor QQuickMaterialStyle::raisedButtonPressColor() const
+QColor QQuickMaterialStyle::buttonColor(bool highlighted, bool pressed, bool hover) const
{
- return QColor::fromRgba(m_theme == Light ? raisedButtonPressColorLight : flatButtonPressColorDark);
+ Shade shade = pressed ? (m_theme == Light ? Shade700 : Shade100)
+ : themeShade();
+
+ QColor color = Qt::transparent;
+
+ if (m_explicitBackground) {
+ color = backgroundColor(shade);
+ } else if (highlighted) {
+ color = accentColor(shade);
+ } else if (elevation() > 0) {
+ color = QColor::fromRgba(m_theme == Light ? raisedButtonColorLight
+ : raisedButtonColorDark);
+
+ if (pressed) {
+ color = this->shade(color, shade);
+ }
+ }
+
+ if (color == Qt::transparent) {
+ if (pressed) {
+ return QColor::fromRgba(m_theme == Light ? flatButtonPressColorLight
+ : flatButtonPressColorDark);
+ } else if (hover) {
+ return QColor::fromRgba(m_theme == Light ? flatButtonFocusColorLight
+ : flatButtonFocusColorDark);
+ } else {
+ return color;
+ }
+ }
+
+ if (pressed || hover) {
+ // Add overlaying black shadow 12% opacity
+ return alphaBlend(color, QColor::fromRgba(0x1F000000));
+ } else {
+ return color;
+ }
}
-QColor QQuickMaterialStyle::raisedButtonDisabledColor() const
+QColor QQuickMaterialStyle::buttonColor() const
{
- return QColor::fromRgba(m_theme == Light ? raisedButtonDisabledColorLight : raisedButtonDisabledColorDark);
+ return buttonColor(false, false, false);
}
-QColor QQuickMaterialStyle::raisedHighlightedButtonColor() const
+QColor QQuickMaterialStyle::buttonHoverColor() const
{
- return accentColor();
+ return buttonColor(false, false, true);
}
-QColor QQuickMaterialStyle::raisedHighlightedButtonHoverColor() const
+QColor QQuickMaterialStyle::buttonPressColor() const
{
- // Add overlaying black shadow 12% opacity
- return alphaBlend(accentColor(), QColor::fromRgba(0x1F000000));
+ return buttonColor(false, true, false);
}
-QColor QQuickMaterialStyle::raisedHighlightedButtonPressColor() const
+QColor QQuickMaterialStyle::buttonDisabledColor() const
{
- // Add overlaying black shadow 12% opacity
- return alphaBlend(shade(accentColor(), m_theme == Light ? Shade700 : Shade100), QColor::fromRgba(0x1F000000));
+ if (elevation() > 0) {
+ return QColor::fromRgba(m_theme == Light ? raisedButtonDisabledColorLight
+ : raisedButtonDisabledColorDark);
+ } else {
+ return Qt::transparent;
+ }
+}
+
+QColor QQuickMaterialStyle::highlightedButtonColor() const
+{
+ return buttonColor(true, false, false);
+}
+
+QColor QQuickMaterialStyle::highlightedButtonHoverColor() const
+{
+ return buttonColor(true, false, true);
+}
+
+QColor QQuickMaterialStyle::highlightedButtonPressColor() const
+{
+ return buttonColor(true, true, false);
}
-QColor QQuickMaterialStyle::raisedHighlightedButtonDisabledColor() const
+QColor QQuickMaterialStyle::swipeDelegateColor() const
{
- return QColor::fromRgba(m_theme == Light ? raisedButtonDisabledColorLight : raisedButtonDisabledColorDark);
+ return QColor::fromRgba(m_theme == Light ? swipeDelegateColorLight : swipeDelegateColorDark);
}
-QColor QQuickMaterialStyle::flatButtonPressColor() const
+QColor QQuickMaterialStyle::swipeDelegateHoverColor() const
{
- return QColor::fromRgba(m_theme == Light ? flatButtonPressColorLight : flatButtonPressColorDark);
+ return QColor::fromRgba(m_theme == Light ? swipeDelegateHoverColorLight : swipeDelegateHoverColorDark);
}
-QColor QQuickMaterialStyle::flatButtonFocusColor() const
+QColor QQuickMaterialStyle::swipeDelegatePressColor() const
{
- return QColor::fromRgba(m_theme == Light ? flatButtonFocusColorLight : flatButtonFocusColorDark);
+ return QColor::fromRgba(m_theme == Light ? swipeDelegatePressColorLight : swipeDelegatePressColorDark);
+}
+
+QColor QQuickMaterialStyle::swipeDelegateDisabledColor() const
+{
+ return QColor::fromRgba(m_theme == Light ? swipeDelegateDisabledColorLight : swipeDelegateDisabledColorDark);
}
QColor QQuickMaterialStyle::frameColor() const
@@ -745,7 +990,6 @@ QColor QQuickMaterialStyle::checkBoxUncheckedRippleColor() const
QColor QQuickMaterialStyle::checkBoxCheckedRippleColor() const
{
QColor pressColor = accentColor();
- // TODO: find out actual value
pressColor.setAlpha(m_theme == Light ? 30 : 50);
return pressColor;
}
@@ -757,7 +1001,7 @@ QColor QQuickMaterialStyle::switchUncheckedTrackColor() const
QColor QQuickMaterialStyle::switchCheckedTrackColor() const
{
- QColor trackColor = m_theme == Light ? accentColor() : shade(accentColor(), Shade200);
+ QColor trackColor(accentColor());
trackColor.setAlphaF(0.5);
return trackColor;
}
@@ -792,13 +1036,10 @@ QColor QQuickMaterialStyle::scrollBarPressedColor() const
return QColor::fromRgba(m_theme == Light ? 0x80000000 : 0x80FFFFFF);
}
-QColor QQuickMaterialStyle::drawerBackgroundColor() const
-{
- return QColor::fromRgba(dividerTextColorLight);
-}
-
QColor QQuickMaterialStyle::dialogColor() const
{
+ if (m_hasBackground)
+ return backgroundColor();
return QColor::fromRgba(m_theme == Light ? dialogColorLight : dialogColorDark);
}
@@ -812,6 +1053,61 @@ QColor QQuickMaterialStyle::listHighlightColor() const
return QColor::fromRgba(m_theme == Light ? 0x1e000000 : 0x1effffff);
}
+QColor QQuickMaterialStyle::tooltipColor() const
+{
+ if (m_explicitBackground)
+ return backgroundColor();
+ return color(Grey, Shade700);
+}
+
+QColor QQuickMaterialStyle::toolBarColor() const
+{
+ if (m_explicitBackground)
+ return backgroundColor();
+ return primaryColor();
+}
+
+QColor QQuickMaterialStyle::toolTextColor() const
+{
+ if (m_hasForeground || m_customPrimary)
+ return primaryTextColor();
+
+ switch (m_primary) {
+ case Red:
+ case Pink:
+ case Purple:
+ case DeepPurple:
+ case Indigo:
+ case Blue:
+ case Teal:
+ case DeepOrange:
+ case Brown:
+ case BlueGrey:
+ return QColor::fromRgba(primaryTextColorDark);
+
+ case LightBlue:
+ case Cyan:
+ case Green:
+ case LightGreen:
+ case Lime:
+ case Yellow:
+ case Amber:
+ case Orange:
+ case Grey:
+ return QColor::fromRgba(primaryTextColorLight);
+
+ default:
+ break;
+ }
+
+ return primaryTextColor();
+}
+
+QColor QQuickMaterialStyle::spinBoxDisabledIconColor() const
+{
+ return QColor::fromRgba(m_theme == Light ? spinBoxDisabledIconColorLight : spinBoxDisabledIconColorDark);
+}
+
QColor QQuickMaterialStyle::color(QQuickMaterialStyle::Color color, QQuickMaterialStyle::Shade shade) const
{
int count = sizeof(colors) / sizeof(colors[0]);
@@ -832,13 +1128,18 @@ static QColor lighterShade(const QColor &color, qreal amount)
return hsl.convertTo(color.spec());
}
-QColor darkerShade(const QColor &color, qreal amount)
+static QColor darkerShade(const QColor &color, qreal amount)
{
QColor hsl = color.toHsl();
hsl.setHslF(hsl.hueF(), hsl.saturationF(), qBound<qreal>(0.0, hsl.lightnessF() - amount, 1.0), color.alphaF());
return hsl.convertTo(color.spec());
}
+QQuickMaterialStyle::Shade QQuickMaterialStyle::themeShade() const
+{
+ return m_theme == Light ? Shade500 : Shade200;
+}
+
/*
* The following lightness values originate from the Material Design Color Generator project.
*
@@ -864,6 +1165,8 @@ QColor darkerShade(const QColor &color, qreal amount)
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+
+// Returns the same color, if shade == themeShade()
QColor QQuickMaterialStyle::shade(const QColor &color, Shade shade) const
{
switch (shade) {
@@ -901,13 +1204,15 @@ QColor QQuickMaterialStyle::shade(const QColor &color, Shade shade) const
}
}
-void QQuickMaterialStyle::parentStyleChange(QQuickStyle *newParent, QQuickStyle *oldParent)
+void QQuickMaterialStyle::parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent)
{
Q_UNUSED(oldParent);
QQuickMaterialStyle *material = qobject_cast<QQuickMaterialStyle *>(newParent);
if (material) {
inheritPrimary(material->m_primary, material->m_customPrimary);
inheritAccent(material->m_accent, material->m_customAccent);
+ inheritForeground(material->m_foreground, material->m_customForeground, material->m_hasForeground);
+ inheritBackground(material->m_background, material->m_customBackground, material->m_hasBackground);
inheritTheme(material->theme());
}
}
@@ -919,54 +1224,123 @@ static Enum toEnumValue(const QByteArray &value, bool *ok)
return static_cast<Enum>(enumeration.keyToValue(value, ok));
}
+static QByteArray resolveSetting(const QByteArray &env, const QSharedPointer<QSettings> &settings, const QString &name)
+{
+ QByteArray value = qgetenv(env);
+ if (value.isNull() && !settings.isNull())
+ value = settings->value(name).toByteArray();
+ return value;
+}
+
void QQuickMaterialStyle::init()
{
- static bool defaultsInitialized = false;
- if (!defaultsInitialized) {
- QSharedPointer<QSettings> settings = QQuickStyle::settings(QStringLiteral("Material"));
- if (!settings.isNull()) {
- bool ok = false;
- QByteArray value = settings->value(QStringLiteral("Theme")).toByteArray();
- Theme theme = toEnumValue<Theme>(value, &ok);
- if (ok)
- defaultTheme = m_theme = theme;
- else if (!value.isEmpty())
- qWarning().nospace().noquote() << settings->fileName() << ": unknown Material theme value: " << value;
-
- value = settings->value(QStringLiteral("Primary")).toByteArray();
- Color primary = toEnumValue<Color>(value, &ok);
- if (ok) {
- defaultPrimaryCustom = m_customPrimary = false;
- defaultPrimary = m_primary = primary;
+ static bool globalsInitialized = false;
+ if (!globalsInitialized) {
+ QSharedPointer<QSettings> settings = QQuickStyleAttached::settings(QStringLiteral("Material"));
+
+ bool ok = false;
+ QByteArray themeValue = resolveSetting("QT_QUICK_CONTROLS_MATERIAL_THEME", settings, QStringLiteral("Theme"));
+ Theme themeEnum = toEnumValue<Theme>(themeValue, &ok);
+ if (ok)
+ globalTheme = m_theme = themeEnum;
+ else if (!themeValue.isEmpty())
+ qWarning().nospace().noquote() << "Material: unknown theme value: " << themeValue;
+
+ QByteArray primaryValue = resolveSetting("QT_QUICK_CONTROLS_MATERIAL_PRIMARY", settings, QStringLiteral("Primary"));
+ Color primaryEnum = toEnumValue<Color>(primaryValue, &ok);
+ if (ok) {
+ globalPrimaryCustom = m_customPrimary = false;
+ globalPrimary = m_primary = primaryEnum;
+ } else {
+ QColor color(primaryValue.constData());
+ if (color.isValid()) {
+ globalPrimaryCustom = m_customPrimary = true;
+ globalPrimary = m_primary = color.rgba();
+ } else if (!primaryValue.isEmpty()) {
+ qWarning().nospace().noquote() << "Material: unknown primary value: " << primaryValue;
+ }
+ }
+
+ QByteArray accentValue = resolveSetting("QT_QUICK_CONTROLS_MATERIAL_ACCENT", settings, QStringLiteral("Accent"));
+ Color accentEnum = toEnumValue<Color>(accentValue, &ok);
+ if (ok) {
+ globalAccentCustom = m_customAccent = false;
+ globalAccent = m_accent = accentEnum;
+ } else if (!accentValue.isEmpty()) {
+ QColor color(accentValue.constData());
+ if (color.isValid()) {
+ globalAccentCustom = m_customAccent = true;
+ globalAccent = m_accent = color.rgba();
} else {
- QColor color(value.constData());
- if (color.isValid()) {
- defaultPrimaryCustom = m_customPrimary = true;
- defaultPrimary = m_primary = color.rgba();
- } else if (!value.isEmpty()) {
- qWarning().nospace().noquote() << settings->fileName() << ": unknown Material primary value: " << value;
- }
+ qWarning().nospace().noquote() << "Material: unknown accent value: " << accentValue;
}
+ }
+
+ QByteArray foregroundValue = resolveSetting("QT_QUICK_CONTROLS_MATERIAL_FOREGROUND", settings, QStringLiteral("Foreground"));
+ Color foregroundEnum = toEnumValue<Color>(foregroundValue, &ok);
+ if (ok) {
+ globalForegroundCustom = m_customForeground = false;
+ globalForeground = m_foreground = foregroundEnum;
+ hasGlobalForeground = m_hasForeground = true;
+ } else if (!foregroundValue.isEmpty()) {
+ QColor color(foregroundValue.constData());
+ if (color.isValid()) {
+ globalForegroundCustom = m_customForeground = true;
+ globalForeground = m_foreground = color.rgba();
+ hasGlobalForeground = m_hasForeground = true;
+ } else {
+ qWarning().nospace().noquote() << "Material: unknown foreground value: " << foregroundValue;
+ }
+ }
- value = settings->value(QStringLiteral("Accent")).toByteArray();
- Color accent = toEnumValue<Color>(value, &ok);
- if (ok) {
- defaultAccentCustom = m_customAccent = false;
- defaultAccent = m_accent = accent;
+ QByteArray backgroundValue = resolveSetting("QT_QUICK_CONTROLS_MATERIAL_BACKGROUND", settings, QStringLiteral("Background"));
+ Color backgroundEnum = toEnumValue<Color>(backgroundValue, &ok);
+ if (ok) {
+ globalBackgroundCustom = m_customBackground = false;
+ globalBackground = m_background = backgroundEnum;
+ hasGlobalBackground = m_hasBackground = true;
+ } else if (!backgroundValue.isEmpty()) {
+ QColor color(backgroundValue.constData());
+ if (color.isValid()) {
+ globalBackgroundCustom = m_customBackground = true;
+ globalBackground = m_background = color.rgba();
+ hasGlobalBackground = m_hasBackground = true;
} else {
- QColor color(value.constData());
- if (color.isValid()) {
- defaultAccentCustom = m_customAccent = true;
- defaultAccent = m_accent = color.rgba();
- } else if (!value.isEmpty()) {
- qWarning().nospace().noquote() << settings->fileName() << ": unknown Material accent value: " << value;
- }
+ qWarning().nospace().noquote() << "Material: unknown background value: " << backgroundValue;
}
}
- defaultsInitialized = true;
+
+ globalsInitialized = true;
}
- QQuickStyle::init(); // TODO: lazy init?
+ QQuickStyleAttached::init(); // TODO: lazy init?
+}
+
+bool QQuickMaterialStyle::variantToRgba(const QVariant &var, const char *name, QRgb *rgba, bool *custom) const
+{
+ *custom = false;
+ if (var.type() == QVariant::Int) {
+ int val = var.toInt();
+ if (val > BlueGrey) {
+ qmlInfo(parent()) << "unknown Material." << name << " value: " << val;
+ return false;
+ }
+ *rgba = val;
+ } else {
+ int val = QMetaEnum::fromType<Color>().keyToValue(var.toByteArray());
+ if (val != -1) {
+ *rgba = val;
+ } else {
+ QColor color(var.toString());
+ if (!color.isValid()) {
+ qmlInfo(parent()) << "unknown Material." << name << " value: " << var.toString();
+ return false;
+ }
+ *custom = true;
+ *rgba = color.rgba();
+ }
+ }
+ return true;
}
QT_END_NAMESPACE
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index f92bfe9d..af5638f1 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -49,38 +49,44 @@
//
#include <QtGui/qcolor.h>
-#include <QtLabsControls/private/qquickstyle_p.h>
+#include <QtQuickControls2/private/qquickstyleattached_p.h>
QT_BEGIN_NAMESPACE
-class QQuickMaterialStylePrivate;
-
-class QQuickMaterialStyle : public QQuickStyle
+class QQuickMaterialStyle : public QQuickStyleAttached
{
Q_OBJECT
Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL)
Q_PROPERTY(QVariant primary READ primary WRITE setPrimary RESET resetPrimary NOTIFY primaryChanged FINAL)
Q_PROPERTY(QVariant accent READ accent WRITE setAccent RESET resetAccent NOTIFY accentChanged FINAL)
+ Q_PROPERTY(QVariant foreground READ foreground WRITE setForeground RESET resetForeground NOTIFY foregroundChanged FINAL)
+ Q_PROPERTY(QVariant background READ background WRITE setBackground RESET resetBackground NOTIFY backgroundChanged FINAL)
+ Q_PROPERTY(int elevation READ elevation WRITE setElevation RESET resetElevation NOTIFY elevationChanged FINAL)
+
+
Q_PROPERTY(QColor primaryColor READ primaryColor NOTIFY primaryChanged FINAL) // TODO: remove?
Q_PROPERTY(QColor accentColor READ accentColor NOTIFY accentChanged FINAL) // TODO: remove?
- Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor primaryTextColor READ primaryTextColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY backgroundChanged FINAL)
+ Q_PROPERTY(QColor primaryTextColor READ primaryTextColor NOTIFY foregroundChanged FINAL) // TODO: rename to foregroundColor()?
Q_PROPERTY(QColor primaryHighlightedTextColor READ primaryHighlightedTextColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor secondaryTextColor READ secondaryTextColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor hintTextColor READ hintTextColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor textSelectionColor READ textSelectionColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor dropShadowColor READ dropShadowColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor dividerColor READ dividerColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedButtonColor READ raisedButtonColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedButtonHoverColor READ raisedButtonHoverColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedButtonPressColor READ raisedButtonPressColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedButtonDisabledColor READ raisedButtonDisabledColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedHighlightedButtonColor READ raisedHighlightedButtonColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedHighlightedButtonHoverColor READ raisedHighlightedButtonHoverColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedHighlightedButtonPressColor READ raisedHighlightedButtonPressColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor raisedHighlightedButtonDisabledColor READ raisedHighlightedButtonDisabledColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor flatButtonPressColor READ flatButtonPressColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor flatButtonFocusColor READ flatButtonFocusColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor iconColor READ iconColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor iconDisabledColor READ iconDisabledColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor buttonColor READ buttonColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor buttonHoverColor READ buttonHoverColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor buttonPressColor READ buttonPressColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor buttonDisabledColor READ buttonDisabledColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor highlightedButtonColor READ highlightedButtonColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor highlightedButtonHoverColor READ highlightedButtonHoverColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor highlightedButtonPressColor READ highlightedButtonPressColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor swipeDelegateColor READ swipeDelegateColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor swipeDelegateHoverColor READ swipeDelegateHoverColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor swipeDelegatePressColor READ swipeDelegatePressColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor swipeDelegateDisabledColor READ swipeDelegateDisabledColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor frameColor READ frameColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor checkBoxUncheckedRippleColor READ checkBoxUncheckedRippleColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor checkBoxCheckedRippleColor READ checkBoxCheckedRippleColor NOTIFY paletteChanged FINAL)
@@ -92,10 +98,13 @@ class QQuickMaterialStyle : public QQuickStyle
Q_PROPERTY(QColor switchDisabledHandleColor READ switchDisabledHandleColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor scrollBarColor READ scrollBarColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor scrollBarPressedColor READ scrollBarPressedColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor drawerBackgroundColor READ drawerBackgroundColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor dialogColor READ dialogColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor backgroundDimColor READ backgroundDimColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor listHighlightColor READ listHighlightColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor tooltipColor READ tooltipColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor toolBarColor READ toolBarColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor toolTextColor READ toolTextColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor spinBoxDisabledIconColor READ spinBoxDisabledIconColor NOTIFY paletteChanged FINAL)
public:
enum Theme {
@@ -146,7 +155,7 @@ public:
Q_ENUM(Color)
Q_ENUM(Shade)
- explicit QQuickMaterialStyle(QObject *parent = Q_NULLPTR);
+ explicit QQuickMaterialStyle(QObject *parent = nullptr);
static QQuickMaterialStyle *qmlAttachedProperties(QObject *object);
@@ -168,6 +177,22 @@ public:
void propagateAccent();
void resetAccent();
+ QVariant foreground() const;
+ void setForeground(const QVariant &foreground);
+ void inheritForeground(uint foreground, bool custom, bool has);
+ void propagateForeground();
+ void resetForeground();
+
+ QVariant background() const;
+ void setBackground(const QVariant &background);
+ void inheritBackground(uint background, bool custom, bool has);
+ void propagateBackground();
+ void resetBackground();
+
+ int elevation() const;
+ void setElevation(int elevation);
+ void resetElevation();
+
QColor primaryColor() const;
QColor accentColor() const;
QColor backgroundColor() const;
@@ -178,16 +203,20 @@ public:
QColor textSelectionColor() const;
QColor dropShadowColor() const;
QColor dividerColor() const;
- QColor raisedButtonColor() const;
- QColor raisedButtonHoverColor() const;
- QColor raisedButtonPressColor() const;
- QColor raisedButtonDisabledColor() const;
- QColor raisedHighlightedButtonColor() const;
- QColor raisedHighlightedButtonHoverColor() const;
- QColor raisedHighlightedButtonPressColor() const;
- QColor raisedHighlightedButtonDisabledColor() const;
- QColor flatButtonPressColor() const;
- QColor flatButtonFocusColor() const;
+ QColor iconColor() const;
+ QColor iconDisabledColor() const;
+ QColor buttonColor() const;
+ QColor buttonHoverColor() const;
+ QColor buttonPressColor() const;
+ QColor buttonDisabledColor() const;
+ QColor highlightedButtonColor() const;
+ QColor highlightedButtonHoverColor() const;
+ QColor highlightedButtonPressColor() const;
+ QColor highlightedButtonDisabledColor() const;
+ QColor swipeDelegateColor() const;
+ QColor swipeDelegateHoverColor() const;
+ QColor swipeDelegatePressColor() const;
+ QColor swipeDelegateDisabledColor() const;
QColor frameColor() const;
QColor checkBoxUncheckedRippleColor() const;
QColor checkBoxCheckedRippleColor() const;
@@ -199,10 +228,13 @@ public:
QColor switchDisabledHandleColor() const;
QColor scrollBarColor() const;
QColor scrollBarPressedColor() const;
- QColor drawerBackgroundColor() const;
QColor dialogColor() const;
QColor backgroundDimColor() const;
QColor listHighlightColor() const;
+ QColor tooltipColor() const;
+ QColor toolBarColor() const;
+ QColor toolTextColor() const;
+ QColor spinBoxDisabledIconColor() const;
Q_INVOKABLE QColor color(Color color, Shade shade = Shade500) const;
Q_INVOKABLE QColor shade(const QColor &color, Shade shade) const;
@@ -211,22 +243,51 @@ Q_SIGNALS:
void themeChanged();
void primaryChanged();
void accentChanged();
+ void foregroundChanged();
+ void backgroundChanged();
+ void elevationChanged();
+
void paletteChanged();
protected:
- void parentStyleChange(QQuickStyle *newParent, QQuickStyle *oldParent) Q_DECL_OVERRIDE;
+ void parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent) override;
private:
void init();
+ bool variantToRgba(const QVariant &var, const char *name, QRgb *rgba, bool *custom) const;
+
+ QColor backgroundColor(Shade shade) const;
+ QColor accentColor(Shade shade) const;
+ QColor buttonColor(bool highlighted, bool pressed, bool hover) const;
+ Shade themeShade() const;
+ // These reflect whether a color value was explicitly set on the specific
+ // item that this attached style object represents.
bool m_explicitTheme;
bool m_explicitPrimary;
bool m_explicitAccent;
+ bool m_explicitForeground;
+ bool m_explicitBackground;
+ // These reflect whether the color value that was either inherited or
+ // explicitly set is in the form that QColor expects, rather than one of
+ // our pre-defined color enum values.
bool m_customPrimary;
bool m_customAccent;
+ bool m_customForeground;
+ bool m_customBackground;
+ // These will be true when this item has an explicit or inherited foreground/background
+ // color, or these colors were declared globally via settings (e.g. conf or env vars).
+ // Some color properties of the style will return different values depending on whether
+ // or not these are set.
+ bool m_hasForeground;
+ bool m_hasBackground;
+ // The actual values for this item, whether explicit, inherited or globally set.
Theme m_theme;
uint m_primary;
uint m_accent;
+ uint m_foreground;
+ uint m_background;
+ int m_elevation;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/material/qquickmaterialtheme.cpp b/src/imports/controls/material/qquickmaterialtheme.cpp
index 5c89d382..1967a74b 100644
--- a/src/imports/controls/material/qquickmaterialtheme.cpp
+++ b/src/imports/controls/material/qquickmaterialtheme.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -37,6 +37,7 @@
#include "qquickmaterialtheme_p.h"
#include <QtGui/qfont.h>
+#include <QtGui/qfontinfo.h>
QT_BEGIN_NAMESPACE
@@ -44,15 +45,22 @@ QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme)
: QQuickProxyTheme(theme)
{
QFont font;
- font.setFamily(QStringLiteral("Roboto"));
- if (!font.exactMatch())
- font.setFamily(QStringLiteral("Noto"));
+ font.setFamily(QLatin1String("Roboto"));
+ QString family = QFontInfo(font).family();
- if (font.exactMatch()) {
- systemFont.setFamily(font.family());
- buttonFont.setFamily(font.family());
- itemViewFont.setFamily(font.family());
- menuItemFont.setFamily(font.family());
+ if (family != QLatin1String("Roboto")) {
+ font.setFamily(QLatin1String("Noto"));
+ family = QFontInfo(font).family();
+ }
+
+ if (family == QLatin1String("Roboto") || family == QLatin1String("Noto")) {
+ systemFont.setFamily(family);
+ buttonFont.setFamily(family);
+ toolTipFont.setFamily(family);
+ itemViewFont.setFamily(family);
+ listViewFont.setFamily(family);
+ menuItemFont.setFamily(family);
+ editorFont.setFamily(family);
}
systemFont.setPixelSize(14);
@@ -61,14 +69,17 @@ QQuickMaterialTheme::QQuickMaterialTheme(QPlatformTheme *theme)
buttonFont.setCapitalization(QFont::AllUppercase);
buttonFont.setWeight(QFont::Medium);
+ toolTipFont.setPixelSize(14);
+ toolTipFont.setWeight(QFont::Medium);
+
itemViewFont.setPixelSize(14);
itemViewFont.setWeight(QFont::Medium);
+ listViewFont.setPixelSize(16);
+
menuItemFont.setPixelSize(16);
-}
-QQuickMaterialTheme::~QQuickMaterialTheme()
-{
+ editorFont.setPixelSize(16);
}
const QFont *QQuickMaterialTheme::font(QPlatformTheme::Font type) const
@@ -78,11 +89,17 @@ const QFont *QQuickMaterialTheme::font(QPlatformTheme::Font type) const
case QPlatformTheme::PushButtonFont:
case QPlatformTheme::ToolButtonFont:
return &buttonFont;
+ case QPlatformTheme::TipLabelFont:
+ return &toolTipFont;
case QPlatformTheme::ItemViewFont:
return &itemViewFont;
+ case QPlatformTheme::ListViewFont:
+ return &listViewFont;
case QPlatformTheme::MenuItemFont:
case QPlatformTheme::ComboMenuItemFont:
return &menuItemFont;
+ case QPlatformTheme::EditorFont:
+ return &editorFont;
default:
return &systemFont;
}
diff --git a/src/imports/controls/material/qquickmaterialtheme_p.h b/src/imports/controls/material/qquickmaterialtheme_p.h
index 28008a14..9bd62fc1 100644
--- a/src/imports/controls/material/qquickmaterialtheme_p.h
+++ b/src/imports/controls/material/qquickmaterialtheme_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKMATERIALTHEME_H
-#define QQUICKMATERIALTHEME_H
+#ifndef QQUICKMATERIALTHEME_P_H
+#define QQUICKMATERIALTHEME_P_H
//
// W A R N I N G
@@ -48,28 +48,28 @@
// We mean it.
//
-#include <QtGui/qpa/qplatformtheme.h>
#include <QtGui/qfont.h>
-#include <QtLabsControls/private/qquickproxytheme_p.h>
+#include <QtQuickControls2/private/qquickproxytheme_p.h>
QT_BEGIN_NAMESPACE
class QQuickMaterialTheme : public QQuickProxyTheme
{
public:
- QQuickMaterialTheme(QPlatformTheme *theme);
+ explicit QQuickMaterialTheme(QPlatformTheme *theme = nullptr);
- ~QQuickMaterialTheme();
-
- const QFont *font(Font type = SystemFont) const Q_DECL_OVERRIDE;
+ const QFont *font(Font type = SystemFont) const override;
private:
QFont systemFont;
QFont buttonFont;
+ QFont toolTipFont;
QFont itemViewFont;
+ QFont listViewFont;
QFont menuItemFont;
+ QFont editorFont;
};
QT_END_NAMESPACE
-#endif // QQUICKMATERIALTHEME_H
+#endif // QQUICKMATERIALTHEME_P_H
diff --git a/src/imports/controls/material/qtlabsmaterialstyleplugin.cpp b/src/imports/controls/material/qtlabsmaterialstyleplugin.cpp
deleted file mode 100644
index 6dd9e563..00000000
--- a/src/imports/controls/material/qtlabsmaterialstyleplugin.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/qqmlextensionplugin.h>
-
-#include "qquickmaterialstyle_p.h"
-#include "qquickmaterialtheme_p.h"
-#include "qquickmaterialprogressring_p.h"
-#include "qquickmaterialprogressstrip_p.h"
-
-#include <QtGui/private/qguiapplication_p.h>
-#include <QtLabsControls/private/qquickstyleselector_p.h>
-
-static inline void initResources()
-{
- Q_INIT_RESOURCE(qtlabsmaterialstyleplugin);
-}
-
-QT_BEGIN_NAMESPACE
-
-class QtLabsMaterialStylePlugin : public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-
-public:
- ~QtLabsMaterialStylePlugin();
- void registerTypes(const char *uri) Q_DECL_OVERRIDE;
- void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE;
-
-private:
- QQuickProxyTheme *theme;
-};
-
-QtLabsMaterialStylePlugin::~QtLabsMaterialStylePlugin()
-{
- if (theme) {
- QPlatformTheme *old = theme->theme();
- QGuiApplicationPrivate::platform_theme = old;
- delete theme;
- }
-}
-
-void QtLabsMaterialStylePlugin::registerTypes(const char *uri)
-{
- qmlRegisterUncreatableType<QQuickMaterialStyle>(uri, 1, 0, "Material", tr("Material is an attached property"));
-}
-
-void QtLabsMaterialStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- Q_UNUSED(engine);
- Q_UNUSED(uri);
-
- QQuickStyleSelector selector;
- if (selector.style() == QLatin1String("material")) {
- QPlatformTheme *old = QGuiApplicationPrivate::platform_theme;
- if (old) {
- QQuickProxyTheme *theme = new QQuickMaterialTheme(old);
- QGuiApplicationPrivate::platform_theme = theme;
- }
- }
-
- initResources();
-
- QByteArray import = QByteArray(uri) + ".impl";
- qmlRegisterType<QQuickMaterialProgressRing>(import, 1, 0, "ProgressRing");
- qmlRegisterType<QQuickMaterialProgressStrip>(import, 1, 0, "ProgressStrip");
- qmlRegisterType<QQuickMaterialRingAnimator>(import, 1, 0, "RingAnimator");
- qmlRegisterType<QQuickMaterialStripAnimator>(import, 1, 0, "StripAnimator");
-}
-
-QT_END_NAMESPACE
-
-#include "qtlabsmaterialstyleplugin.moc"
diff --git a/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
new file mode 100644
index 00000000..ac11e95b
--- /dev/null
+++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.cpp
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtQuickControls2/private/qquickstyleplugin_p.h>
+
+#include "qquickmaterialstyle_p.h"
+#include "qquickmaterialtheme_p.h"
+#include "qquickmaterialprogressring_p.h"
+#include "qquickmaterialprogressstrip_p.h"
+
+#include <QtQuickControls2/private/qquickstyleselector_p.h>
+#include <QtQuickControls2/private/qquickpaddedrectangle_p.h>
+
+static inline void initResources()
+{
+ Q_INIT_RESOURCE(qtquickcontrols2materialstyleplugin);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtQuick_Controls_2_Material);
+#endif
+}
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2MaterialStylePlugin : public QQuickStylePlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2MaterialStylePlugin(QObject *parent = nullptr);
+
+ void registerTypes(const char *uri) override;
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
+
+ QString name() const override;
+ QQuickProxyTheme *createTheme() const override;
+};
+
+QtQuickControls2MaterialStylePlugin::QtQuickControls2MaterialStylePlugin(QObject *parent) : QQuickStylePlugin(parent)
+{
+ initResources();
+}
+
+void QtQuickControls2MaterialStylePlugin::registerTypes(const char *uri)
+{
+ qmlRegisterUncreatableType<QQuickMaterialStyle>(uri, 2, 0, "Material", tr("Material is an attached property"));
+}
+
+void QtQuickControls2MaterialStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+ QQuickStylePlugin::initializeEngine(engine, uri);
+
+ QByteArray import = QByteArray(uri) + ".impl";
+ qmlRegisterType<QQuickPaddedRectangle>(import, 2, 0, "PaddedRectangle");
+ qmlRegisterType<QQuickMaterialProgressRing>(import, 2, 0, "ProgressRing");
+ qmlRegisterType<QQuickMaterialProgressStrip>(import, 2, 0, "ProgressStrip");
+ qmlRegisterType<QQuickMaterialRingAnimator>(import, 2, 0, "RingAnimator");
+ qmlRegisterType<QQuickMaterialStripAnimator>(import, 2, 0, "StripAnimator");
+ qmlRegisterType(typeUrl(QStringLiteral("BoxShadow.qml")), import, 2, 0, "BoxShadow");
+ qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("ElevationEffect.qml")), import, 2, 0, "ElevationEffect");
+ qmlRegisterType(typeUrl(QStringLiteral("Ripple.qml")), import, 2, 0, "Ripple");
+ qmlRegisterType(typeUrl(QStringLiteral("SliderHandle.qml")), import, 2, 0, "SliderHandle");
+ qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator");
+}
+
+QString QtQuickControls2MaterialStylePlugin::name() const
+{
+ return QStringLiteral("material");
+}
+
+QQuickProxyTheme *QtQuickControls2MaterialStylePlugin::createTheme() const
+{
+ return new QQuickMaterialTheme;
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2materialstyleplugin.moc"
diff --git a/src/imports/controls/material/qtlabsmaterialstyleplugin.qrc b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
index 8398d505..47257ce4 100644
--- a/src/imports/controls/material/qtlabsmaterialstyleplugin.qrc
+++ b/src/imports/controls/material/qtquickcontrols2materialstyleplugin.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/qt-project.org/imports/Qt/labs/controls/material">
+ <qresource prefix="/qt-project.org/imports/QtQuick/Controls.2/Material">
<file>images/check.png</file>
<file>images/check@2x.png</file>
<file>images/check@3x.png</file>
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index 029597cb..e661056c 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -4,126 +4,522 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable Qt.labs.controls 1.0'
+// 'qmlplugindump -nonrelocatable QtQuick.Controls 2.0 -merge ..\templates\plugins.qmltypes -dependencies dep.json'
Module {
- dependencies: [
- "Qt.labs.templates 1.0",
- "QtGraphicalEffects 1.0",
- "QtGraphicalEffects.private 1.0",
- "QtQuick 2.6",
- "QtQuick.Window 2.2"
- ]
+ dependencies: ["QtQuick.Templates 2.0", "QtQuick.Window 2.2", "QtQuick 2.7"]
Component {
- name: "QQuickAbstractButton"
- defaultProperty: "data"
- prototype: "QQuickControl"
- exports: ["Qt.labs.templates/AbstractButton 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "text"; type: "string" }
- Property { name: "pressed"; type: "bool" }
- Property { name: "checked"; type: "bool" }
- Property { name: "checkable"; type: "bool" }
- Property { name: "highlighted"; type: "bool" }
- Property { name: "autoExclusive"; type: "bool" }
- Property { name: "autoRepeat"; type: "bool" }
- Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
- Property { name: "label"; type: "QQuickItem"; isPointer: true }
- Signal { name: "pressed" }
- Signal { name: "released" }
- Signal { name: "canceled" }
- Signal { name: "clicked" }
- Signal { name: "pressAndHold" }
- Signal { name: "doubleClicked" }
- Method { name: "toggle" }
- }
- //
- // Manually added to work around QtC limitations:
- //
- Component {
- name: "QQuickWindowQmlImpl"
- defaultProperty: "data"
- prototype: "QQuickWindow"
- exports: ["QtQuick.Window/Window 2.1", "QtQuick.Window/Window 2.2"]
- exportMetaObjectRevisions: [0, 1]
- attachedType: "QQuickWindowAttached"
- Property { name: "visible"; type: "bool" }
- Property { name: "visibility"; type: "Visibility" }
+ name: "QQuickAbstractAnimation"
+ prototype: "QObject"
+ Enum {
+ name: "Loops"
+ values: {
+ "Infinite": -2
+ }
+ }
+ Property { name: "running"; type: "bool" }
+ Property { name: "paused"; type: "bool" }
+ Property { name: "alwaysRunToEnd"; type: "bool" }
+ Property { name: "loops"; type: "int" }
+ Signal { name: "started" }
+ Signal { name: "stopped" }
Signal {
- name: "visibleChanged"
- Parameter { name: "arg"; type: "bool" }
+ name: "runningChanged"
+ Parameter { type: "bool" }
}
Signal {
- name: "visibilityChanged"
- Parameter { name: "visibility"; type: "QWindow::Visibility" }
+ name: "pausedChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "alwaysRunToEndChanged"
+ Parameter { type: "bool" }
+ }
+ Signal {
+ name: "loopCountChanged"
+ Parameter { type: "int" }
}
+ Method { name: "restart" }
+ Method { name: "start" }
+ Method { name: "pause" }
+ Method { name: "resume" }
+ Method { name: "stop" }
+ Method { name: "complete" }
}
Component {
- name: "QQuickWindow"
- defaultProperty: "data"
- prototype: "QWindow"
+ name: "QQuickAnimator"
+ prototype: "QQuickAbstractAnimation"
exports: [
- "QtQuick.Window/Window 2.0",
- "QtQuick.Window/Window 2.1",
- "QtQuick.Window/Window 2.2"
+ "QtQuick.Controls.impl/BusyRingAnimator 2.0",
+ "QtQuick.Controls.impl/ProgressStripAnimator 2.0"
]
- exportMetaObjectRevisions: [0, 1, 2]
- Enum {
- name: "SceneGraphError"
- values: {
- "ContextNotAvailable": 1
- }
- }
- Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
- Property { name: "color"; type: "QColor" }
- Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
- Property {
- name: "activeFocusItem"
- revision: 1
- type: "QQuickItem"
- isReadonly: true
- isPointer: true
+ exportMetaObjectRevisions: [0, 0]
+ Property { name: "target"; type: "QQuickItem"; isPointer: true }
+ Property { name: "easing"; type: "QEasingCurve" }
+ Property { name: "duration"; type: "int" }
+ Property { name: "to"; type: "double" }
+ Property { name: "from"; type: "double" }
+ Signal {
+ name: "targetItemChanged"
+ Parameter { type: "QQuickItem"; isPointer: true }
}
- Signal { name: "frameSwapped" }
Signal {
- name: "openglContextCreated"
- revision: 2
- Parameter { name: "context"; type: "QOpenGLContext"; isPointer: true }
+ name: "durationChanged"
+ Parameter { name: "duration"; type: "int" }
}
- Signal { name: "sceneGraphInitialized" }
- Signal { name: "sceneGraphInvalidated" }
- Signal { name: "beforeSynchronizing" }
- Signal { name: "afterSynchronizing"; revision: 2 }
- Signal { name: "beforeRendering" }
- Signal { name: "afterRendering" }
- Signal { name: "afterAnimating"; revision: 2 }
- Signal { name: "sceneGraphAboutToStop"; revision: 2 }
Signal {
- name: "closing"
- revision: 1
- Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true }
+ name: "easingChanged"
+ Parameter { name: "curve"; type: "QEasingCurve" }
}
Signal {
- name: "colorChanged"
- Parameter { type: "QColor" }
+ name: "toChanged"
+ Parameter { name: "to"; type: "double" }
}
- Signal { name: "activeFocusItemChanged"; revision: 1 }
Signal {
- name: "sceneGraphError"
- revision: 2
- Parameter { name: "error"; type: "QQuickWindow::SceneGraphError" }
- Parameter { name: "message"; type: "string" }
+ name: "fromChanged"
+ Parameter { name: "from"; type: "double" }
}
- Method { name: "update" }
- Method { name: "releaseResources" }
+ }
+ Component {
+ name: "QQuickBusyIndicatorRing"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtQuick.Controls.impl/BusyRing 2.0"]
+ exportMetaObjectRevisions: [0]
+ }
+ Component {
+ name: "QQuickButtonGroup"
+ prototype: "QObject"
+ exports: ["QtQuick.Controls/ButtonGroup 2.0"]
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickButtonGroupAttached"
+ Property { name: "checkedButton"; type: "QQuickAbstractButton"; isPointer: true }
+ Property { name: "buttons"; type: "QQuickAbstractButton"; isList: true; isReadonly: true }
+ Method {
+ name: "addButton"
+ Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
+ }
+ Method {
+ name: "removeButton"
+ Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
+ }
+ }
+ Component {
+ name: "QQuickButtonGroupAttached"
+ prototype: "QObject"
+ Property { name: "group"; type: "QQuickButtonGroup"; isPointer: true }
+ }
+ Component {
+ name: "QQuickDialRing"
+ defaultProperty: "data"
+ prototype: "QQuickPaintedItem"
+ exports: ["QtQuick.Controls.impl/DialRing 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "progress"; type: "double" }
+ Property { name: "color"; type: "QColor" }
+ }
+ Component {
+ name: "QQuickPaintedItem"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ Enum {
+ name: "RenderTarget"
+ values: {
+ "Image": 0,
+ "FramebufferObject": 1,
+ "InvertedYFramebufferObject": 2
+ }
+ }
+ Property { name: "contentsSize"; type: "QSize" }
+ Property { name: "fillColor"; type: "QColor" }
+ Property { name: "contentsScale"; type: "double" }
+ Property { name: "renderTarget"; type: "RenderTarget" }
+ Property { name: "textureSize"; type: "QSize" }
+ }
+ Component {
+ name: "QQuickProgressStrip"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ exports: ["QtQuick.Controls.impl/ProgressStrip 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "indeterminate"; type: "bool" }
+ Property { name: "progress"; type: "double" }
+ }
+ Component {
+ prototype: "QQuickApplicationWindow"
+ name: "QtQuick.Controls/ApplicationWindow 2.0"
+ exports: ["QtQuick.Controls/ApplicationWindow 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickBusyIndicator"
+ name: "QtQuick.Controls/BusyIndicator 2.0"
+ exports: ["QtQuick.Controls/BusyIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickButton"
+ name: "QtQuick.Controls/Button 2.0"
+ exports: ["QtQuick.Controls/Button 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickCheckBox"
+ name: "QtQuick.Controls/CheckBox 2.0"
+ exports: ["QtQuick.Controls/CheckBox 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickCheckDelegate"
+ name: "QtQuick.Controls/CheckDelegate 2.0"
+ exports: ["QtQuick.Controls/CheckDelegate 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.impl/CheckIndicator 2.0"
+ exports: ["QtQuick.Controls.impl/CheckIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "control"; type: "QQuickItem"; isPointer: true }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "gradient"; type: "QQuickGradient"; isPointer: true }
+ Property { name: "border"; type: "QQuickPen"; isReadonly: true; isPointer: true }
+ Property { name: "radius"; type: "double" }
+ }
+ Component {
+ prototype: "QQuickComboBox"
+ name: "QtQuick.Controls/ComboBox 2.0"
+ exports: ["QtQuick.Controls/ComboBox 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickDial"
+ name: "QtQuick.Controls/Dial 2.0"
+ exports: ["QtQuick.Controls/Dial 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickDrawer"
+ name: "QtQuick.Controls/Drawer 2.0"
+ exports: ["QtQuick.Controls/Drawer 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickFrame"
+ name: "QtQuick.Controls/Frame 2.0"
+ exports: ["QtQuick.Controls/Frame 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickGroupBox"
+ name: "QtQuick.Controls/GroupBox 2.0"
+ exports: ["QtQuick.Controls/GroupBox 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickItemDelegate"
+ name: "QtQuick.Controls/ItemDelegate 2.0"
+ exports: ["QtQuick.Controls/ItemDelegate 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickLabel"
+ name: "QtQuick.Controls/Label 2.0"
+ exports: ["QtQuick.Controls/Label 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickMenu"
+ name: "QtQuick.Controls/Menu 2.0"
+ exports: ["QtQuick.Controls/Menu 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickMenuItem"
+ name: "QtQuick.Controls/MenuItem 2.0"
+ exports: ["QtQuick.Controls/MenuItem 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickPage"
+ name: "QtQuick.Controls/Page 2.0"
+ exports: ["QtQuick.Controls/Page 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickPageIndicator"
+ name: "QtQuick.Controls/PageIndicator 2.0"
+ exports: ["QtQuick.Controls/PageIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickPane"
+ name: "QtQuick.Controls/Pane 2.0"
+ exports: ["QtQuick.Controls/Pane 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickPopup"
+ name: "QtQuick.Controls/Popup 2.0"
+ exports: ["QtQuick.Controls/Popup 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickProgressBar"
+ name: "QtQuick.Controls/ProgressBar 2.0"
+ exports: ["QtQuick.Controls/ProgressBar 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickRadioButton"
+ name: "QtQuick.Controls/RadioButton 2.0"
+ exports: ["QtQuick.Controls/RadioButton 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickRadioDelegate"
+ name: "QtQuick.Controls/RadioDelegate 2.0"
+ exports: ["QtQuick.Controls/RadioDelegate 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.impl/RadioIndicator 2.0"
+ exports: ["QtQuick.Controls.impl/RadioIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "control"; type: "QQuickItem"; isPointer: true }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "gradient"; type: "QQuickGradient"; isPointer: true }
+ Property { name: "border"; type: "QQuickPen"; isReadonly: true; isPointer: true }
+ Property { name: "radius"; type: "double" }
+ }
+ Component {
+ prototype: "QQuickRangeSlider"
+ name: "QtQuick.Controls/RangeSlider 2.0"
+ exports: ["QtQuick.Controls/RangeSlider 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickScrollBar"
+ name: "QtQuick.Controls/ScrollBar 2.0"
+ exports: ["QtQuick.Controls/ScrollBar 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickScrollIndicator"
+ name: "QtQuick.Controls/ScrollIndicator 2.0"
+ exports: ["QtQuick.Controls/ScrollIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickSlider"
+ name: "QtQuick.Controls/Slider 2.0"
+ exports: ["QtQuick.Controls/Slider 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickSpinBox"
+ name: "QtQuick.Controls/SpinBox 2.0"
+ exports: ["QtQuick.Controls/SpinBox 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickStackView"
+ name: "QtQuick.Controls/StackView 2.0"
+ exports: ["QtQuick.Controls/StackView 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickSwipeDelegate"
+ name: "QtQuick.Controls/SwipeDelegate 2.0"
+ exports: ["QtQuick.Controls/SwipeDelegate 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickSwipeView"
+ name: "QtQuick.Controls/SwipeView 2.0"
+ exports: ["QtQuick.Controls/SwipeView 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickSwitch"
+ name: "QtQuick.Controls/Switch 2.0"
+ exports: ["QtQuick.Controls/Switch 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickSwitchDelegate"
+ name: "QtQuick.Controls/SwitchDelegate 2.0"
+ exports: ["QtQuick.Controls/SwitchDelegate 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickItem"
+ name: "QtQuick.Controls.impl/SwitchIndicator 2.0"
+ exports: ["QtQuick.Controls.impl/SwitchIndicator 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ Property { name: "control"; type: "QQuickItem"; isPointer: true }
+ }
+ Component {
+ prototype: "QQuickTabBar"
+ name: "QtQuick.Controls/TabBar 2.0"
+ exports: ["QtQuick.Controls/TabBar 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickTabButton"
+ name: "QtQuick.Controls/TabButton 2.0"
+ exports: ["QtQuick.Controls/TabButton 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickTextArea"
+ name: "QtQuick.Controls/TextArea 2.0"
+ exports: ["QtQuick.Controls/TextArea 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickTextField"
+ name: "QtQuick.Controls/TextField 2.0"
+ exports: ["QtQuick.Controls/TextField 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickToolBar"
+ name: "QtQuick.Controls/ToolBar 2.0"
+ exports: ["QtQuick.Controls/ToolBar 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickToolButton"
+ name: "QtQuick.Controls/ToolButton 2.0"
+ exports: ["QtQuick.Controls/ToolButton 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ prototype: "QQuickToolTip"
+ name: "QtQuick.Controls/ToolTip 2.0"
+ exports: ["QtQuick.Controls/ToolTip 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "contentData"
+ }
+ Component {
+ prototype: "QQuickTumbler"
+ name: "QtQuick.Controls/Tumbler 2.0"
+ exports: ["QtQuick.Controls/Tumbler 2.0"]
+ exportMetaObjectRevisions: [0]
+ isComposite: true
+ defaultProperty: "data"
+ }
+ Component {
+ name: "QQuickAbstractButton"
+ defaultProperty: "data"
+ prototype: "QQuickControl"
+ exports: ["QtQuick.Templates/AbstractButton 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "text"; type: "string" }
+ Property { name: "down"; type: "bool" }
+ Property { name: "pressed"; type: "bool"; isReadonly: true }
+ Property { name: "checked"; type: "bool" }
+ Property { name: "autoExclusive"; type: "bool" }
+ Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
+ Signal { name: "pressed" }
+ Signal { name: "released" }
+ Signal { name: "canceled" }
+ Signal { name: "clicked" }
+ Signal { name: "pressAndHold" }
+ Signal { name: "doubleClicked" }
+ Method { name: "toggle" }
}
Component {
name: "QQuickApplicationWindow"
defaultProperty: "data"
prototype: "QQuickWindowQmlImpl"
- exports: ["Qt.labs.templates/ApplicationWindow 1.0"]
+ exports: ["QtQuick.Templates/ApplicationWindow 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQuickApplicationWindowAttached"
+ Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "activeFocusControl"; type: "QQuickItem"; isReadonly: true; isPointer: true }
@@ -134,165 +530,6 @@ Module {
Property { name: "locale"; type: "QLocale" }
}
Component {
- name: "QWindow"
- prototype: "QObject"
- Enum {
- name: "Visibility"
- values: {
- "Hidden": 0,
- "AutomaticVisibility": 1,
- "Windowed": 2,
- "Minimized": 3,
- "Maximized": 4,
- "FullScreen": 5
- }
- }
- Property { name: "title"; type: "string" }
- Property { name: "modality"; type: "Qt::WindowModality" }
- Property { name: "flags"; type: "Qt::WindowFlags" }
- Property { name: "x"; type: "int" }
- Property { name: "y"; type: "int" }
- Property { name: "width"; type: "int" }
- Property { name: "height"; type: "int" }
- Property { name: "minimumWidth"; type: "int" }
- Property { name: "minimumHeight"; type: "int" }
- Property { name: "maximumWidth"; type: "int" }
- Property { name: "maximumHeight"; type: "int" }
- Property { name: "visible"; type: "bool" }
- Property { name: "active"; revision: 1; type: "bool"; isReadonly: true }
- Property { name: "visibility"; revision: 1; type: "Visibility" }
- Property { name: "contentOrientation"; type: "Qt::ScreenOrientation" }
- Property { name: "opacity"; revision: 1; type: "double" }
- Signal {
- name: "screenChanged"
- Parameter { name: "screen"; type: "QScreen"; isPointer: true }
- }
- Signal {
- name: "modalityChanged"
- Parameter { name: "modality"; type: "Qt::WindowModality" }
- }
- Signal {
- name: "windowStateChanged"
- Parameter { name: "windowState"; type: "Qt::WindowState" }
- }
- Signal {
- name: "windowTitleChanged"
- revision: 2
- Parameter { name: "title"; type: "string" }
- }
- Signal {
- name: "xChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "yChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "widthChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "heightChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "minimumWidthChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "minimumHeightChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "maximumWidthChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "maximumHeightChanged"
- Parameter { name: "arg"; type: "int" }
- }
- Signal {
- name: "visibleChanged"
- Parameter { name: "arg"; type: "bool" }
- }
- Signal {
- name: "visibilityChanged"
- revision: 1
- Parameter { name: "visibility"; type: "QWindow::Visibility" }
- }
- Signal { name: "activeChanged"; revision: 1 }
- Signal {
- name: "contentOrientationChanged"
- Parameter { name: "orientation"; type: "Qt::ScreenOrientation" }
- }
- Signal {
- name: "focusObjectChanged"
- Parameter { name: "object"; type: "QObject"; isPointer: true }
- }
- Signal {
- name: "opacityChanged"
- revision: 1
- Parameter { name: "opacity"; type: "double" }
- }
- Method { name: "requestActivate"; revision: 1 }
- Method {
- name: "setVisible"
- Parameter { name: "visible"; type: "bool" }
- }
- Method { name: "show" }
- Method { name: "hide" }
- Method { name: "showMinimized" }
- Method { name: "showMaximized" }
- Method { name: "showFullScreen" }
- Method { name: "showNormal" }
- Method { name: "close"; type: "bool" }
- Method { name: "raise" }
- Method { name: "lower" }
- Method {
- name: "setTitle"
- Parameter { type: "string" }
- }
- Method {
- name: "setX"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setY"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setWidth"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setHeight"
- Parameter { name: "arg"; type: "int" }
- }
- Method {
- name: "setMinimumWidth"
- Parameter { name: "w"; type: "int" }
- }
- Method {
- name: "setMinimumHeight"
- Parameter { name: "h"; type: "int" }
- }
- Method {
- name: "setMaximumWidth"
- Parameter { name: "w"; type: "int" }
- }
- Method {
- name: "setMaximumHeight"
- Parameter { name: "h"; type: "int" }
- }
- Method {
- name: "alert"
- revision: 1
- Parameter { name: "msec"; type: "int" }
- }
- Method { name: "requestUpdate"; revision: 3 }
- }
- Component {
name: "QQuickApplicationWindowAttached"
prototype: "QObject"
Property { name: "window"; type: "QQuickApplicationWindow"; isReadonly: true; isPointer: true }
@@ -306,7 +543,7 @@ Module {
name: "QQuickBusyIndicator"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/BusyIndicator 1.0"]
+ exports: ["QtQuick.Templates/BusyIndicator 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "running"; type: "bool" }
}
@@ -314,14 +551,27 @@ Module {
name: "QQuickButton"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["Qt.labs.templates/Button 1.0"]
+ exports: ["QtQuick.Templates/Button 2.0"]
exportMetaObjectRevisions: [0]
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "autoRepeat"; type: "bool" }
+ Property { name: "highlighted"; type: "bool" }
+ Property { name: "flat"; type: "bool" }
}
Component {
name: "QQuickCheckBox"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["Qt.labs.templates/CheckBox 1.0"]
+ exports: ["QtQuick.Templates/CheckBox 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "tristate"; type: "bool" }
+ Property { name: "checkState"; type: "Qt::CheckState" }
+ }
+ Component {
+ name: "QQuickCheckDelegate"
+ defaultProperty: "data"
+ prototype: "QQuickItemDelegate"
+ exports: ["QtQuick.Templates/CheckDelegate 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "tristate"; type: "bool" }
Property { name: "checkState"; type: "Qt::CheckState" }
@@ -330,7 +580,7 @@ Module {
name: "QQuickComboBox"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/ComboBox 1.0"]
+ exports: ["QtQuick.Templates/ComboBox 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "model"; type: "QVariant" }
@@ -342,6 +592,7 @@ Module {
Property { name: "displayText"; type: "string" }
Property { name: "textRole"; type: "string" }
Property { name: "delegate"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
Property { name: "popup"; type: "QQuickPopup"; isPointer: true }
Signal {
name: "activated"
@@ -351,6 +602,8 @@ Module {
name: "highlighted"
Parameter { name: "index"; type: "int" }
}
+ Method { name: "incrementCurrentIndex" }
+ Method { name: "decrementCurrentIndex" }
Method {
name: "textAt"
type: "string"
@@ -372,7 +625,7 @@ Module {
name: "QQuickContainer"
defaultProperty: "contentData"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/Container 1.0"]
+ exports: ["QtQuick.Templates/Container 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "count"; type: "int"; isReadonly: true }
Property { name: "contentModel"; type: "QVariant"; isReadonly: true }
@@ -412,7 +665,7 @@ Module {
name: "QQuickControl"
defaultProperty: "data"
prototype: "QQuickItem"
- exports: ["Qt.labs.templates/Control 1.0"]
+ exports: ["QtQuick.Templates/Control 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "font"; type: "QFont" }
Property { name: "availableWidth"; type: "double"; isReadonly: true }
@@ -425,7 +678,12 @@ Module {
Property { name: "spacing"; type: "double" }
Property { name: "locale"; type: "QLocale" }
Property { name: "mirrored"; type: "bool"; isReadonly: true }
+ Property { name: "focusPolicy"; type: "Qt::FocusPolicy" }
Property { name: "focusReason"; type: "Qt::FocusReason" }
+ Property { name: "visualFocus"; type: "bool"; isReadonly: true }
+ Property { name: "hovered"; type: "bool"; isReadonly: true }
+ Property { name: "hoverEnabled"; type: "bool" }
+ Property { name: "wheelEnabled"; type: "bool" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
}
@@ -433,7 +691,7 @@ Module {
name: "QQuickDial"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/Dial 1.0"]
+ exports: ["QtQuick.Templates/Dial 2.0"]
exportMetaObjectRevisions: [0]
Enum {
name: "SnapMode"
@@ -450,6 +708,7 @@ Module {
Property { name: "angle"; type: "double"; isReadonly: true }
Property { name: "stepSize"; type: "double" }
Property { name: "snapMode"; type: "SnapMode" }
+ Property { name: "wrap"; type: "bool" }
Property { name: "pressed"; type: "bool"; isReadonly: true }
Property { name: "handle"; type: "QQuickItem"; isPointer: true }
Method { name: "increase" }
@@ -457,31 +716,26 @@ Module {
}
Component {
name: "QQuickDrawer"
- defaultProperty: "contentItem"
- prototype: "QQuickControl"
- exports: ["Qt.labs.templates/Drawer 1.0"]
+ defaultProperty: "contentData"
+ prototype: "QQuickPopup"
+ exports: ["QtQuick.Templates/Drawer 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "edge"; type: "Qt::Edge" }
Property { name: "position"; type: "double" }
- Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
- Property { name: "animation"; type: "QQuickPropertyAnimation"; isPointer: true }
- Signal { name: "clicked" }
- Method { name: "open" }
- Method { name: "close" }
+ Property { name: "dragMargin"; type: "double" }
}
Component {
name: "QQuickFrame"
defaultProperty: "contentData"
prototype: "QQuickPane"
- exports: ["Qt.labs.templates/Frame 1.0"]
+ exports: ["QtQuick.Templates/Frame 2.0"]
exportMetaObjectRevisions: [0]
- Property { name: "frame"; type: "QQuickItem"; isPointer: true }
}
Component {
name: "QQuickGroupBox"
defaultProperty: "contentData"
prototype: "QQuickFrame"
- exports: ["Qt.labs.templates/GroupBox 1.0"]
+ exports: ["QtQuick.Templates/GroupBox 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "title"; type: "string" }
Property { name: "label"; type: "QQuickItem"; isPointer: true }
@@ -499,14 +753,15 @@ Module {
name: "QQuickItemDelegate"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["Qt.labs.templates/ItemDelegate 1.0"]
+ exports: ["QtQuick.Templates/ItemDelegate 2.0"]
exportMetaObjectRevisions: [0]
+ Property { name: "highlighted"; type: "bool" }
}
Component {
name: "QQuickLabel"
defaultProperty: "data"
prototype: "QQuickText"
- exports: ["Qt.labs.templates/Label 1.0"]
+ exports: ["QtQuick.Templates/Label 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "font"; type: "QFont" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
@@ -515,7 +770,7 @@ Module {
name: "QQuickMenu"
defaultProperty: "contentData"
prototype: "QQuickPopup"
- exports: ["Qt.labs.templates/Menu 1.0"]
+ exports: ["QtQuick.Templates/Menu 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "contentModel"; type: "QVariant"; isReadonly: true }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
@@ -548,15 +803,18 @@ Module {
name: "QQuickMenuItem"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["Qt.labs.templates/MenuItem 1.0"]
+ exports: ["QtQuick.Templates/MenuItem 2.0"]
exportMetaObjectRevisions: [0]
+ Property { name: "checkable"; type: "bool" }
+ Property { name: "highlighted"; type: "bool" }
Signal { name: "triggered" }
}
Component {
name: "QQuickOverlay"
defaultProperty: "data"
prototype: "QQuickItem"
- Property { name: "background"; type: "QQuickItem"; isPointer: true }
+ Property { name: "modal"; type: "QQuickItem"; isPointer: true }
+ Property { name: "modeless"; type: "QQuickItem"; isPointer: true }
Signal { name: "pressed" }
Signal { name: "released" }
}
@@ -564,8 +822,9 @@ Module {
name: "QQuickPage"
defaultProperty: "contentData"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/Page 1.0"]
+ exports: ["QtQuick.Templates/Page 2.0"]
exportMetaObjectRevisions: [0]
+ Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
@@ -575,7 +834,7 @@ Module {
name: "QQuickPageIndicator"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/PageIndicator 1.0"]
+ exports: ["QtQuick.Templates/PageIndicator 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "count"; type: "int" }
Property { name: "currentIndex"; type: "int" }
@@ -586,7 +845,7 @@ Module {
name: "QQuickPane"
defaultProperty: "contentData"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/Pane 1.0"]
+ exports: ["QtQuick.Templates/Pane 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "contentWidth"; type: "double" }
Property { name: "contentHeight"; type: "double" }
@@ -597,17 +856,17 @@ Module {
name: "QQuickPopup"
defaultProperty: "contentData"
prototype: "QObject"
- exports: ["Qt.labs.templates/Popup 1.0"]
+ exports: ["QtQuick.Templates/Popup 2.0"]
exportMetaObjectRevisions: [0]
Enum {
name: "ClosePolicy"
values: {
"NoAutoClose": 0,
- "OnPressOutside": 1,
- "OnPressOutsideParent": 2,
- "OnReleaseOutside": 4,
- "OnReleaseOutsideParent": 8,
- "OnEscape": 16
+ "CloseOnPressOutside": 1,
+ "CloseOnPressOutsideParent": 2,
+ "CloseOnReleaseOutside": 4,
+ "CloseOnReleaseOutsideParent": 8,
+ "CloseOnEscape": 16
}
}
Enum {
@@ -645,6 +904,8 @@ Module {
Property { name: "leftPadding"; type: "double" }
Property { name: "rightPadding"; type: "double" }
Property { name: "bottomPadding"; type: "double" }
+ Property { name: "locale"; type: "QLocale" }
+ Property { name: "font"; type: "QFont" }
Property { name: "parent"; type: "QQuickItem"; isPointer: true }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "contentItem"; type: "QQuickItem"; isPointer: true }
@@ -654,6 +915,7 @@ Module {
Property { name: "focus"; type: "bool" }
Property { name: "activeFocus"; type: "bool"; isReadonly: true }
Property { name: "modal"; type: "bool" }
+ Property { name: "dim"; type: "bool" }
Property { name: "visible"; type: "bool" }
Property { name: "opacity"; type: "double" }
Property { name: "scale"; type: "double" }
@@ -661,8 +923,14 @@ Module {
Property { name: "transformOrigin"; type: "TransformOrigin" }
Property { name: "enter"; type: "QQuickTransition"; isPointer: true }
Property { name: "exit"; type: "QQuickTransition"; isPointer: true }
+ Signal {
+ name: "windowChanged"
+ Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
+ }
Signal { name: "aboutToShow" }
Signal { name: "aboutToHide" }
+ Signal { name: "opened" }
+ Signal { name: "closed" }
Method { name: "open" }
Method { name: "close" }
}
@@ -670,7 +938,7 @@ Module {
name: "QQuickProgressBar"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/ProgressBar 1.0"]
+ exports: ["QtQuick.Templates/ProgressBar 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "from"; type: "double" }
Property { name: "to"; type: "double" }
@@ -678,20 +946,26 @@ Module {
Property { name: "position"; type: "double"; isReadonly: true }
Property { name: "visualPosition"; type: "double"; isReadonly: true }
Property { name: "indeterminate"; type: "bool" }
- Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
}
Component {
name: "QQuickRadioButton"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["Qt.labs.templates/RadioButton 1.0"]
+ exports: ["QtQuick.Templates/RadioButton 2.0"]
+ exportMetaObjectRevisions: [0]
+ }
+ Component {
+ name: "QQuickRadioDelegate"
+ defaultProperty: "data"
+ prototype: "QQuickItemDelegate"
+ exports: ["QtQuick.Templates/RadioDelegate 2.0"]
exportMetaObjectRevisions: [0]
}
Component {
name: "QQuickRangeSlider"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/RangeSlider 1.0"]
+ exports: ["QtQuick.Templates/RangeSlider 2.0"]
exportMetaObjectRevisions: [0]
Enum {
name: "SnapMode"
@@ -708,7 +982,6 @@ Module {
Property { name: "stepSize"; type: "double" }
Property { name: "snapMode"; type: "SnapMode" }
Property { name: "orientation"; type: "Qt::Orientation" }
- Property { name: "track"; type: "QQuickItem"; isPointer: true }
Method {
name: "setValues"
Parameter { name: "firstValue"; type: "double" }
@@ -727,18 +1000,33 @@ Module {
Method { name: "decrease" }
}
Component {
+ name: "QQuickRootItem"
+ defaultProperty: "data"
+ prototype: "QQuickItem"
+ Method {
+ name: "setWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ }
+ Component {
name: "QQuickScrollBar"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/ScrollBar 1.0"]
+ exports: ["QtQuick.Templates/ScrollBar 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQuickScrollBarAttached"
Property { name: "size"; type: "double" }
Property { name: "position"; type: "double" }
+ Property { name: "stepSize"; type: "double" }
Property { name: "active"; type: "bool" }
Property { name: "pressed"; type: "bool" }
Property { name: "orientation"; type: "Qt::Orientation" }
- Property { name: "handle"; type: "QQuickItem"; isPointer: true }
+ Method { name: "increase" }
+ Method { name: "decrease" }
Method {
name: "setSize"
Parameter { name: "size"; type: "double" }
@@ -758,14 +1046,13 @@ Module {
name: "QQuickScrollIndicator"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/ScrollIndicator 1.0"]
+ exports: ["QtQuick.Templates/ScrollIndicator 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQuickScrollIndicatorAttached"
Property { name: "size"; type: "double" }
Property { name: "position"; type: "double" }
Property { name: "active"; type: "bool" }
Property { name: "orientation"; type: "Qt::Orientation" }
- Property { name: "indicator"; type: "QQuickItem"; isPointer: true }
Method {
name: "setSize"
Parameter { name: "size"; type: "double" }
@@ -785,7 +1072,7 @@ Module {
name: "QQuickSlider"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/Slider 1.0"]
+ exports: ["QtQuick.Templates/Slider 2.0"]
exportMetaObjectRevisions: [0]
Enum {
name: "SnapMode"
@@ -805,7 +1092,6 @@ Module {
Property { name: "pressed"; type: "bool" }
Property { name: "orientation"; type: "Qt::Orientation" }
Property { name: "handle"; type: "QQuickItem"; isPointer: true }
- Property { name: "track"; type: "QQuickItem"; isPointer: true }
Method { name: "increase" }
Method { name: "decrease" }
}
@@ -813,12 +1099,13 @@ Module {
name: "QQuickSpinBox"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/SpinBox 1.0"]
+ exports: ["QtQuick.Templates/SpinBox 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "from"; type: "int" }
Property { name: "to"; type: "int" }
Property { name: "value"; type: "int" }
Property { name: "stepSize"; type: "int" }
+ Property { name: "editable"; type: "bool" }
Property { name: "validator"; type: "QValidator"; isPointer: true }
Property { name: "textFromValue"; type: "QJSValue" }
Property { name: "valueFromText"; type: "QJSValue" }
@@ -844,7 +1131,7 @@ Module {
name: "QQuickStackView"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/StackView 1.0"]
+ exports: ["QtQuick.Templates/StackView 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQuickStackAttached"
Enum {
@@ -917,10 +1204,30 @@ Module {
}
}
Component {
+ name: "QQuickSwipe"
+ prototype: "QObject"
+ Property { name: "position"; type: "double"; isReadonly: true }
+ Property { name: "complete"; type: "bool"; isReadonly: true }
+ Property { name: "left"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "behind"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "right"; type: "QQmlComponent"; isPointer: true }
+ Property { name: "leftItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "behindItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property { name: "rightItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ }
+ Component {
+ name: "QQuickSwipeDelegate"
+ defaultProperty: "data"
+ prototype: "QQuickItemDelegate"
+ exports: ["QtQuick.Templates/SwipeDelegate 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "swipe"; type: "QQuickSwipe"; isReadonly: true; isPointer: true }
+ }
+ Component {
name: "QQuickSwipeView"
defaultProperty: "contentData"
prototype: "QQuickContainer"
- exports: ["Qt.labs.templates/SwipeView 1.0"]
+ exports: ["QtQuick.Templates/SwipeView 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQuickSwipeViewAttached"
}
@@ -935,7 +1242,16 @@ Module {
name: "QQuickSwitch"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["Qt.labs.templates/Switch 1.0"]
+ exports: ["QtQuick.Templates/Switch 2.0"]
+ exportMetaObjectRevisions: [0]
+ Property { name: "position"; type: "double" }
+ Property { name: "visualPosition"; type: "double"; isReadonly: true }
+ }
+ Component {
+ name: "QQuickSwitchDelegate"
+ defaultProperty: "data"
+ prototype: "QQuickItemDelegate"
+ exports: ["QtQuick.Templates/SwitchDelegate 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "position"; type: "double" }
Property { name: "visualPosition"; type: "double"; isReadonly: true }
@@ -944,14 +1260,22 @@ Module {
name: "QQuickTabBar"
defaultProperty: "contentData"
prototype: "QQuickContainer"
- exports: ["Qt.labs.templates/TabBar 1.0"]
+ exports: ["QtQuick.Templates/TabBar 2.0"]
exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Position"
+ values: {
+ "Header": 0,
+ "Footer": 1
+ }
+ }
+ Property { name: "position"; type: "Position" }
}
Component {
name: "QQuickTabButton"
defaultProperty: "data"
prototype: "QQuickAbstractButton"
- exports: ["Qt.labs.templates/TabButton 1.0"]
+ exports: ["QtQuick.Templates/TabButton 2.0"]
exportMetaObjectRevisions: [0]
}
Component {
@@ -1086,23 +1410,23 @@ Module {
}
Signal {
name: "styleChanged"
- Parameter { name: "style"; type: "TextStyle" }
+ Parameter { name: "style"; type: "QQuickText::TextStyle" }
}
Signal {
name: "horizontalAlignmentChanged"
- Parameter { name: "alignment"; type: "HAlignment" }
+ Parameter { name: "alignment"; type: "QQuickText::HAlignment" }
}
Signal {
name: "verticalAlignmentChanged"
- Parameter { name: "alignment"; type: "VAlignment" }
+ Parameter { name: "alignment"; type: "QQuickText::VAlignment" }
}
Signal {
name: "textFormatChanged"
- Parameter { name: "textFormat"; type: "TextFormat" }
+ Parameter { name: "textFormat"; type: "QQuickText::TextFormat" }
}
Signal {
name: "elideModeChanged"
- Parameter { name: "mode"; type: "TextElideMode" }
+ Parameter { name: "mode"; type: "QQuickText::TextElideMode" }
}
Signal { name: "contentSizeChanged" }
Signal {
@@ -1135,20 +1459,28 @@ Module {
name: "QQuickTextArea"
defaultProperty: "data"
prototype: "QQuickTextEdit"
- exports: ["Qt.labs.templates/TextArea 1.0"]
+ exports: ["QtQuick.Templates/TextArea 2.0"]
exportMetaObjectRevisions: [0]
+ attachedType: "QQuickTextAreaAttached"
Property { name: "font"; type: "QFont" }
Property { name: "implicitWidth"; type: "double" }
Property { name: "implicitHeight"; type: "double" }
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "placeholderText"; type: "string" }
Property { name: "focusReason"; type: "Qt::FocusReason" }
+ Signal { name: "implicitWidthChanged3" }
+ Signal { name: "implicitHeightChanged3" }
Signal {
name: "pressAndHold"
Parameter { name: "event"; type: "QQuickMouseEvent"; isPointer: true }
}
}
Component {
+ name: "QQuickTextAreaAttached"
+ prototype: "QObject"
+ Property { name: "flickable"; type: "QQuickTextArea"; isPointer: true }
+ }
+ Component {
name: "QQuickTextEdit"
defaultProperty: "data"
prototype: "QQuickImplicitSizeItem"
@@ -1251,6 +1583,8 @@ Module {
Property { name: "leftPadding"; revision: 6; type: "double" }
Property { name: "rightPadding"; revision: 6; type: "double" }
Property { name: "bottomPadding"; revision: 6; type: "double" }
+ Property { name: "preeditText"; revision: 7; type: "string"; isReadonly: true }
+ Signal { name: "preeditTextChanged"; revision: 7 }
Signal { name: "contentSizeChanged" }
Signal {
name: "colorChanged"
@@ -1362,6 +1696,7 @@ Module {
revision: 2
Parameter { name: "text"; type: "string" }
}
+ Method { name: "clear"; revision: 7 }
Method {
name: "inputMethodQuery"
revision: 4
@@ -1413,7 +1748,7 @@ Module {
name: "QQuickTextField"
defaultProperty: "data"
prototype: "QQuickTextInput"
- exports: ["Qt.labs.templates/TextField 1.0"]
+ exports: ["QtQuick.Templates/TextField 2.0"]
exportMetaObjectRevisions: [0]
Property { name: "font"; type: "QFont" }
Property { name: "implicitWidth"; type: "double" }
@@ -1421,6 +1756,8 @@ Module {
Property { name: "background"; type: "QQuickItem"; isPointer: true }
Property { name: "placeholderText"; type: "string" }
Property { name: "focusReason"; type: "Qt::FocusReason" }
+ Signal { name: "implicitWidthChanged3" }
+ Signal { name: "implicitHeightChanged3" }
Signal {
name: "pressAndHold"
Parameter { name: "mouse"; type: "QQuickMouseEvent"; isPointer: true }
@@ -1514,6 +1851,7 @@ Module {
Property { name: "passwordCharacter"; type: "string" }
Property { name: "passwordMaskDelay"; revision: 3; type: "int" }
Property { name: "displayText"; type: "string"; isReadonly: true }
+ Property { name: "preeditText"; revision: 7; type: "string"; isReadonly: true }
Property { name: "autoScroll"; type: "bool" }
Property { name: "selectByMouse"; type: "bool" }
Property { name: "mouseSelectionMode"; type: "SelectionMode" }
@@ -1538,11 +1876,11 @@ Module {
}
Signal {
name: "horizontalAlignmentChanged"
- Parameter { name: "alignment"; type: "HAlignment" }
+ Parameter { name: "alignment"; type: "QQuickTextInput::HAlignment" }
}
Signal {
name: "verticalAlignmentChanged"
- Parameter { name: "alignment"; type: "VAlignment" }
+ Parameter { name: "alignment"; type: "QQuickTextInput::VAlignment" }
}
Signal {
name: "readOnlyChanged"
@@ -1562,13 +1900,14 @@ Module {
}
Signal {
name: "echoModeChanged"
- Parameter { name: "echoMode"; type: "EchoMode" }
+ Parameter { name: "echoMode"; type: "QQuickTextInput::EchoMode" }
}
Signal {
name: "passwordMaskDelayChanged"
revision: 3
Parameter { name: "delay"; type: "int" }
}
+ Signal { name: "preeditTextChanged"; revision: 7 }
Signal {
name: "activeFocusOnPressChanged"
Parameter { name: "activeFocusOnPress"; type: "bool" }
@@ -1583,7 +1922,7 @@ Module {
}
Signal {
name: "mouseSelectionModeChanged"
- Parameter { name: "mode"; type: "SelectionMode" }
+ Parameter { name: "mode"; type: "QQuickTextInput::SelectionMode" }
}
Signal { name: "contentSizeChanged" }
Signal { name: "paddingChanged"; revision: 6 }
@@ -1625,6 +1964,7 @@ Module {
revision: 3
Parameter { name: "position"; type: "int" }
}
+ Method { name: "clear"; revision: 7 }
Method {
name: "positionAt"
Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true }
@@ -1661,21 +2001,61 @@ Module {
name: "QQuickToolBar"
defaultProperty: "contentData"
prototype: "QQuickFrame"
- exports: ["Qt.labs.templates/ToolBar 1.0"]
+ exports: ["QtQuick.Templates/ToolBar 2.0"]
exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Position"
+ values: {
+ "Header": 0,
+ "Footer": 1
+ }
+ }
+ Property { name: "position"; type: "Position" }
}
Component {
name: "QQuickToolButton"
defaultProperty: "data"
prototype: "QQuickButton"
- exports: ["Qt.labs.templates/ToolButton 1.0"]
+ exports: ["QtQuick.Templates/ToolButton 2.0"]
exportMetaObjectRevisions: [0]
}
Component {
+ name: "QQuickToolTip"
+ defaultProperty: "contentData"
+ prototype: "QQuickPopup"
+ exports: ["QtQuick.Templates/ToolTip 2.0"]
+ exportMetaObjectRevisions: [0]
+ attachedType: "QQuickToolTipAttached"
+ Property { name: "delay"; type: "int" }
+ Property { name: "timeout"; type: "int" }
+ Property { name: "text"; type: "string" }
+ Method { name: "open" }
+ Method { name: "close" }
+ }
+ Component {
+ name: "QQuickToolTipAttached"
+ prototype: "QObject"
+ Property { name: "text"; type: "string" }
+ Property { name: "delay"; type: "int" }
+ Property { name: "timeout"; type: "int" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "toolTip"; type: "QQuickToolTip"; isReadonly: true; isPointer: true }
+ Method {
+ name: "show"
+ Parameter { name: "text"; type: "string" }
+ Parameter { name: "ms"; type: "int" }
+ }
+ Method {
+ name: "show"
+ Parameter { name: "text"; type: "string" }
+ }
+ Method { name: "hide" }
+ }
+ Component {
name: "QQuickTumbler"
defaultProperty: "data"
prototype: "QQuickControl"
- exports: ["Qt.labs.templates/Tumbler 1.0"]
+ exports: ["QtQuick.Templates/Tumbler 2.0"]
exportMetaObjectRevisions: [0]
attachedType: "QQuickTumblerAttached"
Property { name: "model"; type: "QVariant" }
@@ -1691,314 +2071,240 @@ Module {
Property { name: "tumbler"; type: "QQuickTumbler"; isReadonly: true; isPointer: true }
Property { name: "displacement"; type: "double"; isReadonly: true }
}
+
+ Component {
+ name: "QQuickWindowQmlImpl"
+ defaultProperty: "data"
+ prototype: "QQuickWindow"
+ exports: ["QtQuick.Window/Window 2.1", "QtQuick.Window/Window 2.2"]
+ exportMetaObjectRevisions: [0, 1]
+ attachedType: "QQuickWindowAttached"
+ Property { name: "visible"; type: "bool" }
+ Property { name: "visibility"; type: "Visibility" }
+ Signal {
+ name: "visibleChanged"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Signal {
+ name: "visibilityChanged"
+ Parameter { name: "visibility"; type: "QWindow::Visibility" }
+ }
+ }
+
Component {
- name: "QQuickBusyIndicatorRing"
+ name: "QQuickWindow"
defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["Qt.labs.controls.impl/BusyRing 1.0"]
+ prototype: "QWindow"
+ exports: ["QtQuick.Window/Window 2.0"]
exportMetaObjectRevisions: [0]
+ Enum {
+ name: "SceneGraphError"
+ values: {
+ "ContextNotAvailable": 1
+ }
+ }
+ Property { name: "data"; type: "QObject"; isList: true; isReadonly: true }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "contentItem"; type: "QQuickItem"; isReadonly: true; isPointer: true }
+ Property {
+ name: "activeFocusItem"
+ revision: 1
+ type: "QQuickItem"
+ isReadonly: true
+ isPointer: true
+ }
+ Signal { name: "frameSwapped" }
+ Signal {
+ name: "openglContextCreated"
+ revision: 2
+ Parameter { name: "context"; type: "QOpenGLContext"; isPointer: true }
+ }
+ Signal { name: "sceneGraphInitialized" }
+ Signal { name: "sceneGraphInvalidated" }
+ Signal { name: "beforeSynchronizing" }
+ Signal { name: "afterSynchronizing"; revision: 2 }
+ Signal { name: "beforeRendering" }
+ Signal { name: "afterRendering" }
+ Signal { name: "afterAnimating"; revision: 2 }
+ Signal { name: "sceneGraphAboutToStop"; revision: 2 }
+ Signal {
+ name: "closing"
+ revision: 1
+ Parameter { name: "close"; type: "QQuickCloseEvent"; isPointer: true }
+ }
+ Signal {
+ name: "colorChanged"
+ Parameter { type: "QColor" }
+ }
+ Signal { name: "activeFocusItemChanged"; revision: 1 }
+ Signal {
+ name: "sceneGraphError"
+ revision: 2
+ Parameter { name: "error"; type: "QQuickWindow::SceneGraphError" }
+ Parameter { name: "message"; type: "string" }
+ }
+ Method { name: "update" }
+ Method { name: "releaseResources" }
}
+
Component {
- name: "QQuickButtonGroup"
+ name: "QWindow"
prototype: "QObject"
- exports: ["Qt.labs.controls/ButtonGroup 1.0"]
- exportMetaObjectRevisions: [0]
- attachedType: "QQuickButtonGroupAttached"
- Property { name: "checkedButton"; type: "QQuickAbstractButton"; isPointer: true }
- Property { name: "buttons"; type: "QQuickAbstractButton"; isList: true; isReadonly: true }
+ Enum {
+ name: "Visibility"
+ values: {
+ "Hidden": 0,
+ "AutomaticVisibility": 1,
+ "Windowed": 2,
+ "Minimized": 3,
+ "Maximized": 4,
+ "FullScreen": 5
+ }
+ }
+ Property { name: "title"; type: "string" }
+ Property { name: "modality"; type: "Qt::WindowModality" }
+ Property { name: "flags"; type: "Qt::WindowFlags" }
+ Property { name: "x"; type: "int" }
+ Property { name: "y"; type: "int" }
+ Property { name: "width"; type: "int" }
+ Property { name: "height"; type: "int" }
+ Property { name: "minimumWidth"; type: "int" }
+ Property { name: "minimumHeight"; type: "int" }
+ Property { name: "maximumWidth"; type: "int" }
+ Property { name: "maximumHeight"; type: "int" }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "active"; revision: 1; type: "bool"; isReadonly: true }
+ Property { name: "visibility"; revision: 1; type: "Visibility" }
+ Property { name: "contentOrientation"; type: "Qt::ScreenOrientation" }
+ Property { name: "opacity"; revision: 1; type: "double" }
+ Signal {
+ name: "screenChanged"
+ Parameter { name: "screen"; type: "QScreen"; isPointer: true }
+ }
+ Signal {
+ name: "modalityChanged"
+ Parameter { name: "modality"; type: "Qt::WindowModality" }
+ }
+ Signal {
+ name: "windowStateChanged"
+ Parameter { name: "windowState"; type: "Qt::WindowState" }
+ }
+ Signal {
+ name: "windowTitleChanged"
+ revision: 2
+ Parameter { name: "title"; type: "string" }
+ }
+ Signal {
+ name: "xChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "yChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "widthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "heightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "minimumWidthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "minimumHeightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "maximumWidthChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "maximumHeightChanged"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Signal {
+ name: "visibleChanged"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Signal {
+ name: "visibilityChanged"
+ revision: 1
+ Parameter { name: "visibility"; type: "QWindow::Visibility" }
+ }
+ Signal { name: "activeChanged"; revision: 1 }
+ Signal {
+ name: "contentOrientationChanged"
+ Parameter { name: "orientation"; type: "Qt::ScreenOrientation" }
+ }
+ Signal {
+ name: "focusObjectChanged"
+ Parameter { name: "object"; type: "QObject"; isPointer: true }
+ }
+ Signal {
+ name: "opacityChanged"
+ revision: 1
+ Parameter { name: "opacity"; type: "double" }
+ }
+ Method { name: "requestActivate"; revision: 1 }
Method {
- name: "addButton"
- Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
+ name: "setVisible"
+ Parameter { name: "visible"; type: "bool" }
}
+ Method { name: "show" }
+ Method { name: "hide" }
+ Method { name: "showMinimized" }
+ Method { name: "showMaximized" }
+ Method { name: "showFullScreen" }
+ Method { name: "showNormal" }
+ Method { name: "close"; type: "bool" }
+ Method { name: "raise" }
+ Method { name: "lower" }
Method {
- name: "removeButton"
- Parameter { name: "button"; type: "QQuickAbstractButton"; isPointer: true }
+ name: "setTitle"
+ Parameter { type: "string" }
}
+ Method {
+ name: "setX"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setY"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setWidth"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setHeight"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setMinimumWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setMinimumHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ Method {
+ name: "setMaximumWidth"
+ Parameter { name: "w"; type: "int" }
+ }
+ Method {
+ name: "setMaximumHeight"
+ Parameter { name: "h"; type: "int" }
+ }
+ Method {
+ name: "alert"
+ revision: 1
+ Parameter { name: "msec"; type: "int" }
+ }
+ Method { name: "requestUpdate"; revision: 3 }
}
- Component {
- name: "QQuickButtonGroupAttached"
- prototype: "QObject"
- Property { name: "group"; type: "QQuickButtonGroup"; isPointer: true }
- }
- Component {
- name: "QQuickProgressStrip"
- defaultProperty: "data"
- prototype: "QQuickItem"
- exports: ["Qt.labs.controls.impl/ProgressStrip 1.0"]
- exportMetaObjectRevisions: [0]
- Property { name: "indeterminate"; type: "bool" }
- Property { name: "progress"; type: "double" }
- }
- Component {
- prototype: "QQuickApplicationWindow"
- name: "Qt.labs.controls/ApplicationWindow 1.0"
- exports: ["Qt.labs.controls/ApplicationWindow 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickBusyIndicator"
- name: "Qt.labs.controls/BusyIndicator 1.0"
- exports: ["Qt.labs.controls/BusyIndicator 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickButton"
- name: "Qt.labs.controls/Button 1.0"
- exports: ["Qt.labs.controls/Button 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickCheckBox"
- name: "Qt.labs.controls/CheckBox 1.0"
- exports: ["Qt.labs.controls/CheckBox 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickComboBox"
- name: "Qt.labs.controls/ComboBox 1.0"
- exports: ["Qt.labs.controls/ComboBox 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickDial"
- name: "Qt.labs.controls/Dial 1.0"
- exports: ["Qt.labs.controls/Dial 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickDrawer"
- name: "Qt.labs.controls/Drawer 1.0"
- exports: ["Qt.labs.controls/Drawer 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentItem"
- }
- Component {
- prototype: "QQuickFrame"
- name: "Qt.labs.controls/Frame 1.0"
- exports: ["Qt.labs.controls/Frame 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickGroupBox"
- name: "Qt.labs.controls/GroupBox 1.0"
- exports: ["Qt.labs.controls/GroupBox 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickItemDelegate"
- name: "Qt.labs.controls/ItemDelegate 1.0"
- exports: ["Qt.labs.controls/ItemDelegate 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickLabel"
- name: "Qt.labs.controls/Label 1.0"
- exports: ["Qt.labs.controls/Label 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickMenu"
- name: "Qt.labs.controls/Menu 1.0"
- exports: ["Qt.labs.controls/Menu 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickMenuItem"
- name: "Qt.labs.controls/MenuItem 1.0"
- exports: ["Qt.labs.controls/MenuItem 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickPage"
- name: "Qt.labs.controls/Page 1.0"
- exports: ["Qt.labs.controls/Page 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickPageIndicator"
- name: "Qt.labs.controls/PageIndicator 1.0"
- exports: ["Qt.labs.controls/PageIndicator 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickFrame"
- name: "Qt.labs.controls/Pane 1.0"
- exports: ["Qt.labs.controls/Pane 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickPopup"
- name: "Qt.labs.controls/Popup 1.0"
- exports: ["Qt.labs.controls/Popup 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickProgressBar"
- name: "Qt.labs.controls/ProgressBar 1.0"
- exports: ["Qt.labs.controls/ProgressBar 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickRadioButton"
- name: "Qt.labs.controls/RadioButton 1.0"
- exports: ["Qt.labs.controls/RadioButton 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickRangeSlider"
- name: "Qt.labs.controls/RangeSlider 1.0"
- exports: ["Qt.labs.controls/RangeSlider 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickScrollBar"
- name: "Qt.labs.controls/ScrollBar 1.0"
- exports: ["Qt.labs.controls/ScrollBar 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickScrollIndicator"
- name: "Qt.labs.controls/ScrollIndicator 1.0"
- exports: ["Qt.labs.controls/ScrollIndicator 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickSlider"
- name: "Qt.labs.controls/Slider 1.0"
- exports: ["Qt.labs.controls/Slider 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickSpinBox"
- name: "Qt.labs.controls/SpinBox 1.0"
- exports: ["Qt.labs.controls/SpinBox 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickStackView"
- name: "Qt.labs.controls/StackView 1.0"
- exports: ["Qt.labs.controls/StackView 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickSwipeView"
- name: "Qt.labs.controls/SwipeView 1.0"
- exports: ["Qt.labs.controls/SwipeView 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickSwitch"
- name: "Qt.labs.controls/Switch 1.0"
- exports: ["Qt.labs.controls/Switch 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickTabBar"
- name: "Qt.labs.controls/TabBar 1.0"
- exports: ["Qt.labs.controls/TabBar 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickTabButton"
- name: "Qt.labs.controls/TabButton 1.0"
- exports: ["Qt.labs.controls/TabButton 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickTextArea"
- name: "Qt.labs.controls/TextArea 1.0"
- exports: ["Qt.labs.controls/TextArea 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickTextField"
- name: "Qt.labs.controls/TextField 1.0"
- exports: ["Qt.labs.controls/TextField 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickToolBar"
- name: "Qt.labs.controls/ToolBar 1.0"
- exports: ["Qt.labs.controls/ToolBar 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "contentData"
- }
- Component {
- prototype: "QQuickToolButton"
- name: "Qt.labs.controls/ToolButton 1.0"
- exports: ["Qt.labs.controls/ToolButton 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
- Component {
- prototype: "QQuickTumbler"
- name: "Qt.labs.controls/Tumbler 1.0"
- exports: ["Qt.labs.controls/Tumbler 1.0"]
- exportMetaObjectRevisions: [0]
- isComposite: true
- defaultProperty: "data"
- }
+
}
diff --git a/src/imports/controls/qmldir b/src/imports/controls/qmldir
index 98c57fe1..50f786d7 100644
--- a/src/imports/controls/qmldir
+++ b/src/imports/controls/qmldir
@@ -1,5 +1,5 @@
-module Qt.labs.controls
-plugin qtlabscontrolsplugin
-classname QtLabsControlsPlugin
-depends Qt.labs.templates 1.0
+module QtQuick.Controls
+plugin qtquickcontrols2plugin
+classname QtQuickControls2Plugin
+depends QtQuick.Templates 2.0
designersupported
diff --git a/src/imports/controls/qquickbusyindicatorring.cpp b/src/imports/controls/qquickbusyindicatorring.cpp
index 96213fa4..4f9e9977 100644
--- a/src/imports/controls/qquickbusyindicatorring.cpp
+++ b/src/imports/controls/qquickbusyindicatorring.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -50,11 +50,11 @@ public:
QQuickBusyIndicatorAnimatorJob();
~QQuickBusyIndicatorAnimatorJob();
- void initialize(QQuickAnimatorController *controller) Q_DECL_OVERRIDE;
- void updateCurrentTime(int time) Q_DECL_OVERRIDE;
- void writeBack() Q_DECL_OVERRIDE;
- void nodeWasDestroyed() Q_DECL_OVERRIDE;
- void afterNodeSync() Q_DECL_OVERRIDE;
+ void initialize(QQuickAnimatorController *controller) override;
+ void updateCurrentTime(int time) override;
+ void writeBack() override;
+ void nodeWasDestroyed() override;
+ void afterNodeSync() override;
private:
QSGNode *m_node;
@@ -159,7 +159,7 @@ QQuickAnimatorJob *QQuickBusyIndicatorAnimator::createJob() const
return new QQuickBusyIndicatorAnimatorJob;
}
-QQuickBusyIndicatorAnimatorJob::QQuickBusyIndicatorAnimatorJob() : m_node(Q_NULLPTR)
+QQuickBusyIndicatorAnimatorJob::QQuickBusyIndicatorAnimatorJob() : m_node(nullptr)
{
}
@@ -217,7 +217,7 @@ void QQuickBusyIndicatorAnimatorJob::writeBack()
void QQuickBusyIndicatorAnimatorJob::nodeWasDestroyed()
{
- m_node = Q_NULLPTR;
+ m_node = nullptr;
}
void QQuickBusyIndicatorAnimatorJob::afterNodeSync()
diff --git a/src/imports/controls/qquickbusyindicatorring_p.h b/src/imports/controls/qquickbusyindicatorring_p.h
index 4697628d..ceac0471 100644
--- a/src/imports/controls/qquickbusyindicatorring_p.h
+++ b/src/imports/controls/qquickbusyindicatorring_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKBUSYINDICATOR_P_H
-#define QQUICKBUSYINDICATOR_P_H
+#ifndef QQUICKBUSYINDICATORRING_P_H
+#define QQUICKBUSYINDICATORRING_P_H
//
// W A R N I N G
@@ -58,25 +58,25 @@ class QQuickBusyIndicatorRing : public QQuickItem
Q_OBJECT
public:
- explicit QQuickBusyIndicatorRing(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickBusyIndicatorRing(QQuickItem *parent = nullptr);
~QQuickBusyIndicatorRing();
protected:
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
};
class QQuickBusyIndicatorAnimator : public QQuickAnimator
{
public:
- QQuickBusyIndicatorAnimator(QObject *parent = Q_NULLPTR);
+ QQuickBusyIndicatorAnimator(QObject *parent = nullptr);
protected:
- QString propertyName() const Q_DECL_OVERRIDE;
- QQuickAnimatorJob *createJob() const Q_DECL_OVERRIDE;
+ QString propertyName() const override;
+ QQuickAnimatorJob *createJob() const override;
};
QT_END_NAMESPACE
QML_DECLARE_TYPE(QQuickBusyIndicatorRing)
-#endif // QQUICKBUSYINDICATOR_P_H
+#endif // QQUICKBUSYINDICATORRING_P_H
diff --git a/src/imports/controls/qquickdialring.cpp b/src/imports/controls/qquickdialring.cpp
new file mode 100644
index 00000000..664460e0
--- /dev/null
+++ b/src/imports/controls/qquickdialring.cpp
@@ -0,0 +1,126 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qquickdialring_p.h"
+
+#include <QtCore/qmath.h>
+#include <QtGui/qpainter.h>
+#include <QtQuick/private/qquickitem_p.h>
+
+QT_BEGIN_NAMESPACE
+
+QQuickDialRing::QQuickDialRing(QQuickItem *parent) :
+ QQuickPaintedItem(parent),
+ m_progress(0),
+ m_color(Qt::black)
+{
+}
+
+qreal QQuickDialRing::progress() const
+{
+ return m_progress;
+}
+
+void QQuickDialRing::setProgress(qreal progress)
+{
+ if (progress == m_progress)
+ return;
+
+ m_progress = progress;
+ update();
+ emit progressChanged();
+}
+
+QColor QQuickDialRing::color() const
+{
+ return m_color;
+}
+
+void QQuickDialRing::setColor(const QColor &color)
+{
+ if (color == m_color)
+ return;
+
+ m_color = color;
+ update();
+ emit colorChanged();
+}
+
+void QQuickDialRing::paint(QPainter *painter)
+{
+ if (width() <= 0 || height() <= 0)
+ return;
+
+ QPen pen(m_color);
+ pen.setWidth(8);
+ pen.setCapStyle(Qt::FlatCap);
+ painter->setPen(pen);
+
+ const QRectF bounds = boundingRect();
+ const qreal smallest = qMin(bounds.width(), bounds.height());
+ QRectF rect = QRectF(pen.widthF() / 2.0 + 1, pen.widthF() / 2.0 + 1, smallest - pen.widthF() - 2, smallest - pen.widthF() - 2);
+ rect.moveCenter(bounds.center());
+
+ // Make sure the arc is aligned to whole pixels.
+ if (rect.x() - int(rect.x()) > 0)
+ rect.setX(qCeil(rect.x()));
+ if (rect.y() - int(rect.y()) > 0)
+ rect.setY(qCeil(rect.y()));
+ if (rect.width() - int(rect.width()) > 0)
+ rect.setWidth(qFloor(rect.width()));
+ if (rect.height() - int(rect.height()) > 0)
+ rect.setHeight(qFloor(rect.height()));
+
+ painter->setRenderHint(QPainter::Antialiasing);
+
+ const qreal startAngle = (140 + 90);
+ const qreal spanAngle = (m_progress * 280) * -1;
+ QPainterPath path;
+ path.arcMoveTo(rect, startAngle);
+ path.arcTo(rect, startAngle, spanAngle);
+ painter->drawPath(path);
+
+ rect.adjust(-pen.widthF() / 2.0, -pen.widthF() / 2.0, pen.widthF() / 2.0, pen.widthF() / 2.0);
+ pen.setWidth(1);
+ painter->setPen(pen);
+
+ path = QPainterPath();
+ path.arcMoveTo(rect, 0);
+ path.arcTo(rect, 0, 360);
+ painter->drawPath(path);
+}
+
+QT_END_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalimageprovider_p.h b/src/imports/controls/qquickdialring_p.h
index 15648157..1048552b 100644
--- a/src/imports/controls/universal/qquickuniversalimageprovider_p.h
+++ b/src/imports/controls/qquickdialring_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKUNIVERSALIMAGEPROVIDER_P_H
-#define QQUICKUNIVERSALIMAGEPROVIDER_P_H
+#ifndef QQUICKDIALRING_P_H
+#define QQUICKDIALRING_P_H
//
// W A R N I N G
@@ -48,18 +48,37 @@
// We mean it.
//
-#include <QtQuick/qquickimageprovider.h>
+#include <QtGui/qcolor.h>
+#include <QtQuick/qquickpainteditem.h>
QT_BEGIN_NAMESPACE
-class QQuickUniversalImageProvider : public QQuickImageProvider
+class QQuickDialRing : public QQuickPaintedItem
{
+ Q_OBJECT
+ Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
+ Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
+
public:
- QQuickUniversalImageProvider();
+ QQuickDialRing(QQuickItem *parent = nullptr);
+
+ qreal progress() const;
+ void setProgress(qreal progress);
+
+ QColor color() const;
+ void setColor(const QColor &color);
+
+ void paint(QPainter *painter) override;
+
+Q_SIGNALS:
+ void progressChanged();
+ void colorChanged();
- QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize) Q_DECL_OVERRIDE;
+private:
+ qreal m_progress;
+ QColor m_color;
};
QT_END_NAMESPACE
-#endif // QQUICKUNIVERSALIMAGEPROVIDER_P_H
+#endif // QQUICKDIALRING_P_H
diff --git a/src/imports/controls/qquickprogressstrip.cpp b/src/imports/controls/qquickprogressstrip.cpp
index e9480ff1..5b50a28d 100644
--- a/src/imports/controls/qquickprogressstrip.cpp
+++ b/src/imports/controls/qquickprogressstrip.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -47,11 +47,11 @@ public:
QQuickProgressAnimatorJob();
~QQuickProgressAnimatorJob();
- void initialize(QQuickAnimatorController *controller) Q_DECL_OVERRIDE;
- void afterNodeSync() Q_DECL_OVERRIDE;
- void updateCurrentTime(int time) Q_DECL_OVERRIDE;
- void writeBack() Q_DECL_OVERRIDE;
- void nodeWasDestroyed() Q_DECL_OVERRIDE;
+ void initialize(QQuickAnimatorController *controller) override;
+ void afterNodeSync() override;
+ void updateCurrentTime(int time) override;
+ void writeBack() override;
+ void nodeWasDestroyed() override;
private:
QSGNode *m_node;
@@ -63,8 +63,6 @@ QQuickProgressStrip::QQuickProgressStrip(QQuickItem *parent) :
m_indeterminate(false)
{
setFlag(QQuickItem::ItemHasContents);
- setImplicitWidth(116);
- setImplicitHeight(6);
}
QQuickProgressStrip::~QQuickProgressStrip()
@@ -142,6 +140,7 @@ QSGNode *QQuickProgressStrip::updatePaintNode(QSGNode *oldNode, QQuickItem::Upda
}
Q_ASSERT(rootTransformNode->type() == QSGNode::TransformNodeType);
+ const qreal y = (height() - implicitHeight()) / 2;
const QColor color(0x35, 0x36, 0x37);
if (m_indeterminate) {
if (rootTransformNode->childCount() != blocks) {
@@ -167,7 +166,7 @@ QSGNode *QQuickProgressStrip::updatePaintNode(QSGNode *oldNode, QQuickItem::Upda
m.translate(blockStartX(i), 0);
transformNode->setMatrix(m);
- rectNode->setRect(QRectF(QPointF(), QSizeF(blockWidth, height())));
+ rectNode->setRect(QRectF(QPointF(0, y), QSizeF(blockWidth, implicitHeight())));
rectNode->update();
transformNode = static_cast<QSGTransformNode *>(transformNode->nextSibling());
@@ -185,7 +184,7 @@ QSGNode *QQuickProgressStrip::updatePaintNode(QSGNode *oldNode, QQuickItem::Upda
rootTransformNode->appendChildNode(rectNode);
}
- rectNode->setRect(QRectF(QPointF(), QSizeF(m_progress * width(), height())));
+ rectNode->setRect(QRectF(QPointF(0, y), QSizeF(m_progress * width(), implicitHeight())));
rectNode->update();
}
@@ -210,7 +209,7 @@ QQuickAnimatorJob *QQuickProgressAnimator::createJob() const
}
QQuickProgressAnimatorJob::QQuickProgressAnimatorJob() :
- m_node(Q_NULLPTR)
+ m_node(nullptr)
{
}
@@ -308,7 +307,7 @@ void QQuickProgressAnimatorJob::writeBack()
void QQuickProgressAnimatorJob::nodeWasDestroyed()
{
- m_node = Q_NULLPTR;
+ m_node = nullptr;
}
QT_END_NAMESPACE
diff --git a/src/imports/controls/qquickprogressstrip_p.h b/src/imports/controls/qquickprogressstrip_p.h
index c34698dc..d2e297f5 100644
--- a/src/imports/controls/qquickprogressstrip_p.h
+++ b/src/imports/controls/qquickprogressstrip_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Quick Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -60,7 +60,7 @@ class QQuickProgressStrip : public QQuickItem
Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged FINAL)
public:
- explicit QQuickProgressStrip(QQuickItem *parent = Q_NULLPTR);
+ explicit QQuickProgressStrip(QQuickItem *parent = nullptr);
~QQuickProgressStrip();
bool isIndeterminate() const;
@@ -74,7 +74,7 @@ Q_SIGNALS:
void indeterminateChanged();
protected:
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
private:
qreal m_progress;
@@ -84,11 +84,11 @@ private:
class QQuickProgressAnimator : public QQuickAnimator
{
public:
- QQuickProgressAnimator(QObject *parent = Q_NULLPTR);
+ QQuickProgressAnimator(QObject *parent = nullptr);
protected:
- QString propertyName() const Q_DECL_OVERRIDE;
- QQuickAnimatorJob *createJob() const Q_DECL_OVERRIDE;
+ QString propertyName() const override;
+ QQuickAnimatorJob *createJob() const override;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/qtlabscontrolsplugin.cpp b/src/imports/controls/qtlabscontrolsplugin.cpp
deleted file mode 100644
index 16e99cd5..00000000
--- a/src/imports/controls/qtlabscontrolsplugin.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQml/qqmlextensionplugin.h>
-#include <QtCore/qurl.h>
-#include <QtCore/qcoreapplication.h>
-
-#include <QtLabsTemplates/private/qquickabstractbutton_p.h>
-#include <QtLabsTemplates/private/qquickbuttongroup_p.h>
-#include <QtLabsTemplates/private/qquickcontainer_p.h>
-#include <QtLabsTemplates/private/qquickcontrol_p.h>
-#include <QtLabsTemplates/private/qquickpopup_p.h>
-#include <QtLabsControls/private/qquickstyleselector_p.h>
-
-#include "qquickbusyindicatorring_p.h"
-#include "qquickprogressstrip_p.h"
-
-static inline void initResources()
-{
- Q_INIT_RESOURCE(qtlabscontrolsplugin);
-}
-
-QT_BEGIN_NAMESPACE
-
-class QtLabsControlsPlugin: public QQmlExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-
-public:
- void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
-};
-
-void QtLabsControlsPlugin::registerTypes(const char *uri)
-{
- qmlRegisterType<QQuickAbstractButton>(uri, 1, 0, "AbstractButton");
- qmlRegisterType<QQuickButtonGroup>(uri, 1, 0, "ButtonGroup");
- qmlRegisterType<QQuickButtonGroupAttached>();
- qmlRegisterType<QQuickContainer>(uri, 1, 0, "Container");
- qmlRegisterType<QQuickControl>(uri, 1, 0, "Control");
-
- QQuickStyleSelector selector;
- selector.setBaseUrl(baseUrl());
-
- qmlRegisterType(selector.select(QStringLiteral("/ApplicationWindow.qml")), uri, 1, 0, "ApplicationWindow");
- qmlRegisterType(selector.select(QStringLiteral("/BusyIndicator.qml")), uri, 1, 0, "BusyIndicator");
- qmlRegisterType(selector.select(QStringLiteral("/Button.qml")), uri, 1, 0, "Button");
- qmlRegisterType(selector.select(QStringLiteral("/CheckBox.qml")), uri, 1, 0, "CheckBox");
- qmlRegisterType(selector.select(QStringLiteral("/ComboBox.qml")), uri, 1, 0, "ComboBox");
- qmlRegisterType(selector.select(QStringLiteral("/Dial.qml")), uri, 1, 0, "Dial");
- qmlRegisterType(selector.select(QStringLiteral("/Drawer.qml")), uri, 1, 0, "Drawer");
- qmlRegisterType(selector.select(QStringLiteral("/Frame.qml")), uri, 1, 0, "Frame");
- qmlRegisterType(selector.select(QStringLiteral("/GroupBox.qml")), uri, 1, 0, "GroupBox");
- qmlRegisterType(selector.select(QStringLiteral("/ItemDelegate.qml")), uri, 1, 0, "ItemDelegate");
- qmlRegisterType(selector.select(QStringLiteral("/Label.qml")), uri, 1, 0, "Label");
- qmlRegisterType(selector.select(QStringLiteral("/Menu.qml")), uri, 1, 0, "Menu");
- qmlRegisterType(selector.select(QStringLiteral("/MenuItem.qml")), uri, 1, 0, "MenuItem");
- qmlRegisterType(selector.select(QStringLiteral("/Page.qml")), uri, 1, 0, "Page");
- qmlRegisterType(selector.select(QStringLiteral("/PageIndicator.qml")), uri, 1, 0, "PageIndicator");
- qmlRegisterType(selector.select(QStringLiteral("/Pane.qml")), uri, 1, 0, "Pane");
- qmlRegisterType(selector.select(QStringLiteral("/Popup.qml")), uri, 1, 0, "Popup");
- qmlRegisterType(selector.select(QStringLiteral("/ProgressBar.qml")), uri, 1, 0, "ProgressBar");
- qmlRegisterType(selector.select(QStringLiteral("/RadioButton.qml")), uri, 1, 0, "RadioButton");
- qmlRegisterType(selector.select(QStringLiteral("/RangeSlider.qml")), uri, 1, 0, "RangeSlider");
- qmlRegisterType(selector.select(QStringLiteral("/ScrollBar.qml")), uri, 1, 0, "ScrollBar");
- qmlRegisterType(selector.select(QStringLiteral("/ScrollIndicator.qml")), uri, 1, 0, "ScrollIndicator");
- qmlRegisterType(selector.select(QStringLiteral("/Slider.qml")), uri, 1, 0, "Slider");
- qmlRegisterType(selector.select(QStringLiteral("/SpinBox.qml")), uri, 1, 0, "SpinBox");
- qmlRegisterType(selector.select(QStringLiteral("/StackView.qml")), uri, 1, 0, "StackView");
- qmlRegisterType(selector.select(QStringLiteral("/SwipeView.qml")), uri, 1, 0, "SwipeView");
- qmlRegisterType(selector.select(QStringLiteral("/Switch.qml")), uri, 1, 0, "Switch");
- qmlRegisterType(selector.select(QStringLiteral("/TabBar.qml")), uri, 1, 0, "TabBar");
- qmlRegisterType(selector.select(QStringLiteral("/TabButton.qml")), uri, 1, 0, "TabButton");
- qmlRegisterType(selector.select(QStringLiteral("/TextArea.qml")), uri, 1, 0, "TextArea");
- qmlRegisterType(selector.select(QStringLiteral("/TextField.qml")), uri, 1, 0, "TextField");
- qmlRegisterType(selector.select(QStringLiteral("/ToolBar.qml")), uri, 1, 0, "ToolBar");
- qmlRegisterType(selector.select(QStringLiteral("/ToolButton.qml")), uri, 1, 0, "ToolButton");
- qmlRegisterType(selector.select(QStringLiteral("/Tumbler.qml")), uri, 1, 0, "Tumbler");
-}
-
-void QtLabsControlsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
-{
- Q_UNUSED(engine);
- Q_UNUSED(uri);
- initResources();
-
- const QByteArray import = QByteArray(uri) + ".impl";
- qmlRegisterType<QQuickBusyIndicatorRing>(import, 1, 0, "BusyRing");
- qmlRegisterType<QQuickBusyIndicatorAnimator>(import, 1, 0, "BusyRingAnimator");
- qmlRegisterType<QQuickProgressStrip>(import, 1, 0, "ProgressStrip");
- qmlRegisterType<QQuickProgressAnimator>(import, 1, 0, "ProgressStripAnimator");
-}
-
-QT_END_NAMESPACE
-
-#include "qtlabscontrolsplugin.moc"
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp
new file mode 100644
index 00000000..8e41a58c
--- /dev/null
+++ b/src/imports/controls/qtquickcontrols2plugin.cpp
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/private/qfileselector_p.h>
+#include <QtQuickControls2/qquickstyle.h>
+#include <QtQuickControls2/private/qquickstyleplugin_p.h>
+#include <QtQuickControls2/private/qquickstyleselector_p.h>
+#include <QtQuickControls2/private/qquickcolorimageprovider_p.h>
+#include <QtQuickTemplates2/private/qquickbuttongroup_p.h>
+
+#include "qquickbusyindicatorring_p.h"
+#include "qquickdialring_p.h"
+#include "qquickprogressstrip_p.h"
+
+static inline void initResources()
+{
+ Q_INIT_RESOURCE(qtquickcontrols2plugin);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtQuick_Controls_2);
+#endif
+}
+
+QT_BEGIN_NAMESPACE
+
+class QtQuickControls2Plugin: public QQuickStylePlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
+
+public:
+ QtQuickControls2Plugin(QObject *parent = nullptr);
+ void registerTypes(const char *uri);
+ void initializeEngine(QQmlEngine *engine, const char *uri);
+};
+
+QtQuickControls2Plugin::QtQuickControls2Plugin(QObject *parent) : QQuickStylePlugin(parent)
+{
+ initResources();
+}
+
+void QtQuickControls2Plugin::registerTypes(const char *uri)
+{
+ qmlRegisterType<QQuickButtonGroup>(uri, 2, 0, "ButtonGroup");
+ qmlRegisterType<QQuickButtonGroupAttached>();
+
+ QQuickStyleSelector selector;
+ selector.setBaseUrl(typeUrl());
+
+ const QString style = QQuickStyle::name();
+ if (!style.isEmpty())
+ QFileSelectorPrivate::addStatics(QStringList() << style.toLower());
+
+ qmlRegisterType(selector.select(QStringLiteral("AbstractButton.qml")), uri, 2, 0, "AbstractButton");
+ qmlRegisterType(selector.select(QStringLiteral("ApplicationWindow.qml")), uri, 2, 0, "ApplicationWindow");
+ qmlRegisterType(selector.select(QStringLiteral("BusyIndicator.qml")), uri, 2, 0, "BusyIndicator");
+ qmlRegisterType(selector.select(QStringLiteral("Button.qml")), uri, 2, 0, "Button");
+ qmlRegisterType(selector.select(QStringLiteral("CheckBox.qml")), uri, 2, 0, "CheckBox");
+ qmlRegisterType(selector.select(QStringLiteral("CheckDelegate.qml")), uri, 2, 0, "CheckDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("ComboBox.qml")), uri, 2, 0, "ComboBox");
+ qmlRegisterType(selector.select(QStringLiteral("Container.qml")), uri, 2, 0, "Container");
+ qmlRegisterType(selector.select(QStringLiteral("Control.qml")), uri, 2, 0, "Control");
+ qmlRegisterType(selector.select(QStringLiteral("Dial.qml")), uri, 2, 0, "Dial");
+ qmlRegisterType(selector.select(QStringLiteral("Drawer.qml")), uri, 2, 0, "Drawer");
+ qmlRegisterType(selector.select(QStringLiteral("Frame.qml")), uri, 2, 0, "Frame");
+ qmlRegisterType(selector.select(QStringLiteral("GroupBox.qml")), uri, 2, 0, "GroupBox");
+ qmlRegisterType(selector.select(QStringLiteral("ItemDelegate.qml")), uri, 2, 0, "ItemDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("Label.qml")), uri, 2, 0, "Label");
+ qmlRegisterType(selector.select(QStringLiteral("Menu.qml")), uri, 2, 0, "Menu");
+ qmlRegisterType(selector.select(QStringLiteral("MenuItem.qml")), uri, 2, 0, "MenuItem");
+ qmlRegisterType(selector.select(QStringLiteral("Page.qml")), uri, 2, 0, "Page");
+ qmlRegisterType(selector.select(QStringLiteral("PageIndicator.qml")), uri, 2, 0, "PageIndicator");
+ qmlRegisterType(selector.select(QStringLiteral("Pane.qml")), uri, 2, 0, "Pane");
+ qmlRegisterType(selector.select(QStringLiteral("Popup.qml")), uri, 2, 0, "Popup");
+ qmlRegisterType(selector.select(QStringLiteral("ProgressBar.qml")), uri, 2, 0, "ProgressBar");
+ qmlRegisterType(selector.select(QStringLiteral("RadioButton.qml")), uri, 2, 0, "RadioButton");
+ qmlRegisterType(selector.select(QStringLiteral("RadioDelegate.qml")), uri, 2, 0, "RadioDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("RangeSlider.qml")), uri, 2, 0, "RangeSlider");
+ qmlRegisterType(selector.select(QStringLiteral("ScrollBar.qml")), uri, 2, 0, "ScrollBar");
+ qmlRegisterType(selector.select(QStringLiteral("ScrollIndicator.qml")), uri, 2, 0, "ScrollIndicator");
+ qmlRegisterType(selector.select(QStringLiteral("Slider.qml")), uri, 2, 0, "Slider");
+ qmlRegisterType(selector.select(QStringLiteral("SpinBox.qml")), uri, 2, 0, "SpinBox");
+ qmlRegisterType(selector.select(QStringLiteral("StackView.qml")), uri, 2, 0, "StackView");
+ qmlRegisterType(selector.select(QStringLiteral("SwipeDelegate.qml")), uri, 2, 0, "SwipeDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("SwipeView.qml")), uri, 2, 0, "SwipeView");
+ qmlRegisterType(selector.select(QStringLiteral("Switch.qml")), uri, 2, 0, "Switch");
+ qmlRegisterType(selector.select(QStringLiteral("SwitchDelegate.qml")), uri, 2, 0, "SwitchDelegate");
+ qmlRegisterType(selector.select(QStringLiteral("TabBar.qml")), uri, 2, 0, "TabBar");
+ qmlRegisterType(selector.select(QStringLiteral("TabButton.qml")), uri, 2, 0, "TabButton");
+ qmlRegisterType(selector.select(QStringLiteral("TextArea.qml")), uri, 2, 0, "TextArea");
+ qmlRegisterType(selector.select(QStringLiteral("TextField.qml")), uri, 2, 0, "TextField");
+ qmlRegisterType(selector.select(QStringLiteral("ToolBar.qml")), uri, 2, 0, "ToolBar");
+ qmlRegisterType(selector.select(QStringLiteral("ToolButton.qml")), uri, 2, 0, "ToolButton");
+ qmlRegisterType(selector.select(QStringLiteral("ToolTip.qml")), uri, 2, 0, "ToolTip");
+ qmlRegisterType(selector.select(QStringLiteral("Tumbler.qml")), uri, 2, 0, "Tumbler");
+}
+
+void QtQuickControls2Plugin::initializeEngine(QQmlEngine *engine, const char *uri)
+{
+ Q_UNUSED(uri);
+
+ engine->addImageProvider(QStringLiteral("default"), new QQuickColorImageProvider(QStringLiteral(":/qt-project.org/imports/QtQuick/Controls.2/images")));
+
+ const QByteArray import = QByteArray(uri) + ".impl";
+ qmlRegisterType<QQuickBusyIndicatorRing>(import, 2, 0, "BusyRing");
+ qmlRegisterType<QQuickBusyIndicatorAnimator>(import, 2, 0, "BusyRingAnimator");
+ qmlRegisterType<QQuickProgressStrip>(import, 2, 0, "ProgressStrip");
+ qmlRegisterType<QQuickProgressAnimator>(import, 2, 0, "ProgressStripAnimator");
+ qmlRegisterType<QQuickDialRing>(import, 2, 0, "DialRing");
+
+ qmlRegisterType(typeUrl(QStringLiteral("CheckIndicator.qml")), import, 2, 0, "CheckIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator");
+}
+
+QT_END_NAMESPACE
+
+#include "qtquickcontrols2plugin.moc"
diff --git a/src/imports/controls/qtlabscontrolsplugin.qrc b/src/imports/controls/qtquickcontrols2plugin.qrc
index 1147ae3d..0948a529 100644
--- a/src/imports/controls/qtlabscontrolsplugin.qrc
+++ b/src/imports/controls/qtquickcontrols2plugin.qrc
@@ -1,5 +1,5 @@
<RCC>
- <qresource prefix="/qt-project.org/imports/Qt/labs/controls">
+ <qresource prefix="/qt-project.org/imports/QtQuick/Controls.2">
<file>images/check.png</file>
<file>images/check@2x.png</file>
<file>images/check@3x.png</file>
@@ -12,5 +12,9 @@
<file>images/drop-indicator@2x.png</file>
<file>images/drop-indicator@3x.png</file>
<file>images/drop-indicator@4x.png</file>
+ <file>images/double-arrow.png</file>
+ <file>images/double-arrow@2x.png</file>
+ <file>images/double-arrow@3x.png</file>
+ <file>images/double-arrow@4x.png</file>
</qresource>
</RCC>
diff --git a/src/imports/controls/universal/ApplicationWindow.qml b/src/imports/controls/universal/ApplicationWindow.qml
index 3113e748..70bd403c 100644
--- a/src/imports/controls/universal/ApplicationWindow.qml
+++ b/src/imports/controls/universal/ApplicationWindow.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,16 +35,20 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
-import Qt.labs.controls.universal.impl 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+import QtQuick.Controls.Universal.impl 2.0
T.ApplicationWindow {
id: window
- color: Universal.altHighColor
+ color: Universal.background
- overlay.background: Rectangle {
+ overlay.modal: Rectangle {
+ color: window.Universal.baseLowColor
+ }
+
+ overlay.modeless: Rectangle {
color: window.Universal.baseLowColor
}
@@ -52,7 +56,6 @@ T.ApplicationWindow {
parent: window.activeFocusControl
width: parent ? parent.width : 0
height: parent ? parent.height : 0
- visible: parent && !!parent.useSystemFocusVisuals
- && (parent.focusReason === Qt.TabFocusReason || parent.focusReason === Qt.BacktabFocusReason)
+ visible: parent && !!parent.useSystemFocusVisuals && !!parent.visualFocus
}
}
diff --git a/src/imports/controls/universal/BusyIndicator.qml b/src/imports/controls/universal/BusyIndicator.qml
index 4a62b800..fe2186a7 100644
--- a/src/imports/controls/universal/BusyIndicator.qml
+++ b/src/imports/controls/universal/BusyIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,9 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
-import Qt.labs.controls.universal.impl 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+import QtQuick.Controls.Universal.impl 2.0
T.BusyIndicator {
id: control
@@ -45,7 +45,6 @@ T.BusyIndicator {
implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
- //! [contentItem]
contentItem: ProgressRing {
id: ring
@@ -62,5 +61,4 @@ T.BusyIndicator {
running: control.visible && control.running
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/universal/Button.qml b/src/imports/controls/universal/Button.qml
index 1dc94c89..6954d31a 100644
--- a/src/imports/controls/universal/Button.qml
+++ b/src/imports/controls/universal/Button.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,50 +35,42 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Button {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
- topPadding: 4
- leftPadding: 8
- rightPadding: 8
- bottomPadding: 4
+ padding: 8
+ topPadding: padding - 4
+ bottomPadding: padding - 4
property bool useSystemFocusVisuals: true
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ contentItem: Text {
text: control.text
font: control.font
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
- //! [background]
background: Rectangle {
implicitWidth: 32
implicitHeight: 32
- color: control.pressed ? control.Universal.baseMediumLowColor :
+ visible: !control.flat || control.down || control.checked || control.highlighted
+ color: control.down ? control.Universal.baseMediumLowColor :
control.enabled && (control.highlighted || control.checked) ? control.Universal.accent :
control.Universal.baseLowColor
}
- //! [background]
}
diff --git a/src/imports/controls/universal/CheckBox.qml b/src/imports/controls/universal/CheckBox.qml
index 37c20d00..a1c3ba6b 100644
--- a/src/imports/controls/universal/CheckBox.qml
+++ b/src/imports/controls/universal/CheckBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,69 +35,34 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+import QtQuick.Controls.Universal.impl 2.0
T.CheckBox {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
spacing: 8
property bool useSystemFocusVisuals: true
- //! [indicator]
- indicator: Rectangle {
- id: normalRectangle
- implicitWidth: 20
- implicitHeight: 20
+ indicator: CheckIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
-
- color: !control.enabled ? "transparent" :
- control.pressed && control.checkState !== Qt.PartiallyChecked ? control.Universal.baseMediumColor :
- control.checkState === Qt.Checked ? control.Universal.accent : "transparent"
- border.color: !control.enabled ? control.Universal.baseLowColor :
- control.pressed ? control.Universal.baseMediumColor :
- control.checked ? control.Universal.accent : control.Universal.baseMediumHighColor
- border.width: 2 // CheckBoxBorderThemeThickness
-
- Image {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
-
- visible: control.checkState === Qt.Checked
- source: "image://universal/checkmark/" + (!control.enabled ? control.Universal.baseLowColor : control.Universal.chromeWhiteColor)
- }
-
- Rectangle {
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: parent.width / 2
- height: parent.height / 2
-
- visible: control.checkState === Qt.PartiallyChecked
- color: !control.enabled ? control.Universal.baseLowColor :
- control.pressed ? control.Universal.baseMediumColor : control.Universal.baseMediumHighColor
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -106,7 +71,7 @@ T.CheckBox {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
}
diff --git a/src/imports/controls/universal/CheckDelegate.qml b/src/imports/controls/universal/CheckDelegate.qml
new file mode 100644
index 00000000..c0ca272e
--- /dev/null
+++ b/src/imports/controls/universal/CheckDelegate.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+T.CheckDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12
+
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
+
+ indicator: CheckIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
+ }
+
+ background: Rectangle {
+ visible: control.down || control.highlighted || control.visualFocus
+ color: control.down ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ visible: control.visualFocus || control.highlighted
+ color: control.Universal.accent
+ opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
+ }
+
+ }
+}
diff --git a/src/imports/controls/universal/CheckIndicator.qml b/src/imports/controls/universal/CheckIndicator.qml
new file mode 100644
index 00000000..eeecf264
--- /dev/null
+++ b/src/imports/controls/universal/CheckIndicator.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+
+ color: !control.enabled ? "transparent" :
+ control.down && control.checkState !== Qt.PartiallyChecked ? control.Universal.baseMediumColor :
+ control.checkState === Qt.Checked ? control.Universal.accent : "transparent"
+ border.color: !control.enabled ? control.Universal.baseLowColor :
+ control.down ? control.Universal.baseMediumColor :
+ control.checked ? control.Universal.accent : control.Universal.baseMediumHighColor
+ border.width: 2 // CheckBoxBorderThemeThickness
+
+ property Item control
+
+ Image {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+
+ visible: control.checkState === Qt.Checked
+ source: "image://universal/checkmark/" + (!control.enabled ? control.Universal.baseLowColor : control.Universal.chromeWhiteColor)
+ sourceSize.width: width
+ sourceSize.height: height
+ }
+
+ Rectangle {
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: parent.width / 2
+ height: parent.height / 2
+
+ visible: control.checkState === Qt.PartiallyChecked
+ color: !control.enabled ? control.Universal.baseLowColor :
+ control.down ? control.Universal.baseMediumColor : control.Universal.baseMediumHighColor
+ }
+}
diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml
index 31a928a3..bb816fc1 100644
--- a/src/imports/controls/universal/ComboBox.qml
+++ b/src/imports/controls/universal/ComboBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -36,8 +36,9 @@
import QtQuick 2.6
import QtQuick.Window 2.2
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.ComboBox {
id: control
@@ -45,37 +46,44 @@ T.ComboBox {
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- contentItem.implicitHeight + topPadding + bottomPadding)
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
baselineOffset: contentItem.y + contentItem.baselineOffset
spacing: 10
- topPadding: 5
- leftPadding: 12
- rightPadding: 10
- bottomPadding: 7
+ padding: 12
+ topPadding: padding - 7
+ rightPadding: padding - 2
+ bottomPadding: padding - 5
- //! [delegate]
delegate: ItemDelegate {
- width: control.width
+ width: control.popup.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
highlighted: control.highlightedIndex === index
- pressed: highlighted && control.pressed
}
- //! [delegate]
- //! [contentItem]
+ indicator: Image {
+ x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
+ y: control.topPadding + (control.availableHeight - height) / 2
+ source: "image://universal/downarrow/" + (!control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumHighColor)
+ sourceSize.width: width
+ sourceSize.height: height
+ }
+
contentItem: Text {
+ leftPadding: control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0
+ rightPadding: !control.mirrored && control.indicator ? control.indicator.width + control.spacing : 0
+
text: control.displayText
font: control.font
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
- rightPadding: 12 + control.spacing
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 120
implicitHeight: 32
@@ -92,24 +100,15 @@ T.ComboBox {
width: parent.width - 4
height: parent.height - 4
- visible: control.activeFocus && (control.focusReason === Qt.TabFocusReason || control.focusReason === Qt.BacktabFocusReason)
+ visible: control.visualFocus
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
-
- Image {
- id: checkmark
- x: parent.width - width - control.rightPadding
- y: (parent.height - height) / 2
- source: "image://universal/downarrow/" + (!control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumHighColor)
- }
}
- //! [background]
- //! [popup]
popup: T.Popup {
- implicitWidth: control.width
- implicitHeight: Math.min(396, listview.contentHeight)
+ width: control.width
+ implicitHeight: Math.min(396, contentItem.implicitHeight)
topMargin: 8
bottomMargin: 8
@@ -117,10 +116,12 @@ T.ComboBox {
Universal.accent: control.Universal.accent
contentItem: ListView {
- id: listview
clip: true
+ implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
+ highlightRangeMode: ListView.ApplyRange
+ highlightMoveDuration: 0
T.ScrollIndicator.vertical: ScrollIndicator { }
}
@@ -131,5 +132,4 @@ T.ComboBox {
border.width: 1 // FlyoutBorderThemeThickness
}
}
- //! [popup]
}
diff --git a/src/imports/controls/universal/Dial.qml b/src/imports/controls/universal/Dial.qml
index 9db1f8a5..6781d387 100644
--- a/src/imports/controls/universal/Dial.qml
+++ b/src/imports/controls/universal/Dial.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Dial {
id: control
@@ -44,20 +44,17 @@ T.Dial {
implicitWidth: 100
implicitHeight: 100
- //! [background]
background: Rectangle {
x: control.width / 2 - width / 2
y: control.height / 2 - height / 2
width: Math.max(64, Math.min(control.width, control.height))
- height: Math.max(64, Math.min(control.width, control.height))
+ height: width
radius: width / 2
color: "transparent"
border.color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseMediumColor
border.width: 2
}
- //! [background]
- //! [handle]
handle: Rectangle {
implicitWidth: 20
implicitHeight: 20
@@ -80,5 +77,4 @@ T.Dial {
}
]
}
- //! [handle]
}
diff --git a/src/imports/controls/universal/Drawer.qml b/src/imports/controls/universal/Drawer.qml
new file mode 100644
index 00000000..84831323
--- /dev/null
+++ b/src/imports/controls/universal/Drawer.qml
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+T.Drawer {
+ id: control
+
+ parent: T.ApplicationWindow.overlay
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
+
+ contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
+ contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
+
+ topPadding: control.edge === Qt.BottomEdge
+ leftPadding: control.edge === Qt.RightEdge
+ rightPadding: control.edge === Qt.LeftEdge
+ bottomPadding: control.edge === Qt.TopEdge
+
+ enter: Transition { SmoothedAnimation { velocity: 5 } }
+ exit: Transition { SmoothedAnimation { velocity: 5 } }
+
+ contentItem: Item { }
+
+ background: Rectangle {
+ color: control.Universal.chromeMediumLowColor
+ Rectangle {
+ readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
+ width: horizontal ? 1 : parent.width
+ height: horizontal ? parent.height : 1
+ color: control.Universal.chromeHighColor
+ x: control.edge === Qt.LeftEdge ? parent.width - 1 : 0
+ y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
+ }
+ }
+}
diff --git a/src/imports/controls/universal/Frame.qml b/src/imports/controls/universal/Frame.qml
index 9427dc2f..d5b327c1 100644
--- a/src/imports/controls/universal/Frame.qml
+++ b/src/imports/controls/universal/Frame.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Frame {
id: control
@@ -49,17 +49,10 @@ T.Frame {
padding: 12
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
-
- //! [frame]
- frame: Rectangle {
- width: parent.width
- height: parent.height
+ background: Rectangle {
color: "transparent"
border.color: control.Universal.chromeDisabledLowColor
}
- //! [frame]
}
diff --git a/src/imports/controls/universal/GroupBox.qml b/src/imports/controls/universal/GroupBox.qml
index b4e28eb1..c75c81a6 100644
--- a/src/imports/controls/universal/GroupBox.qml
+++ b/src/imports/controls/universal/GroupBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.GroupBox {
id: control
@@ -51,28 +51,25 @@ T.GroupBox {
spacing: 12
padding: 12
- topPadding: 12 + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
+ topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [label]
label: Text {
x: control.leftPadding
width: control.availableWidth
text: control.title
font: control.font
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
elide: Text.ElideRight
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
- //! [frame]
- frame: Rectangle {
+ background: Rectangle {
y: control.topPadding - control.padding
width: parent.width
height: parent.height - control.topPadding + control.padding
@@ -80,5 +77,4 @@ T.GroupBox {
color: "transparent"
border.color: control.Universal.chromeDisabledLowColor
}
- //! [frame]
}
diff --git a/src/imports/controls/universal/ItemDelegate.qml b/src/imports/controls/universal/ItemDelegate.qml
index 2aaf270b..6822d658 100644
--- a/src/imports/controls/universal/ItemDelegate.qml
+++ b/src/imports/controls/universal/ItemDelegate.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,44 +35,28 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.ItemDelegate {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
spacing: 12
- topPadding: 11
- leftPadding: 12
- rightPadding: 12
- bottomPadding: 13
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
- //! [indicator]
- indicator: Image {
- x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
- y: control.topPadding + (control.availableHeight - height) / 2
-
- visible: control.checked
- source: !control.checkable ? "" : "image://universal/checkmark/" + (!control.enabled ? control.Universal.baseLowColor : control.pressed ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor)
- }
- //! [indicator]
-
- //! [label]
- label: Text {
- x: control.mirrored || !control.checkable ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - (control.checkable ? indicator.width + control.spacing : 0)
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ rightPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
text: control.text
font: control.font
@@ -81,22 +65,20 @@ T.ItemDelegate {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
- //! [background]
background: Rectangle {
- visible: control.pressed || control.highlighted || control.activeFocus
- color: control.pressed ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
+ visible: control.down || control.highlighted || control.visualFocus
+ color: control.down ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
Rectangle {
width: parent.width
height: parent.height
- visible: control.activeFocus || control.highlighted
+ visible: control.visualFocus || control.highlighted
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
- //! [background]
}
diff --git a/src/imports/controls/universal/Label.qml b/src/imports/controls/universal/Label.qml
index 7630364c..9b50f4f5 100644
--- a/src/imports/controls/universal/Label.qml
+++ b/src/imports/controls/universal/Label.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,12 +35,13 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Label {
id: control
- color: !control.enabled ? Universal.baseLowColor : Universal.baseHighColor
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
linkColor: Universal.accent
}
diff --git a/src/imports/controls/universal/Menu.qml b/src/imports/controls/universal/Menu.qml
index 7cae65f1..5ee2c243 100644
--- a/src/imports/controls/universal/Menu.qml
+++ b/src/imports/controls/universal/Menu.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,19 +35,20 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.controls 1.0
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Menu {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0)
- implicitHeight: Math.min(background ? background.implicitHeight : 0,
- contentItem ? contentItem.implicitHeight + topPadding + bottomPadding : 0)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding
+
+ margins: 0
- //! [contentItem]
contentItem: ListView {
implicitHeight: contentHeight
model: control.contentModel
@@ -59,15 +60,12 @@ T.Menu {
ScrollIndicator.vertical: ScrollIndicator {}
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 200
- implicitHeight: 200
+ implicitHeight: 40
color: control.Universal.chromeMediumLowColor
border.color: control.Universal.chromeHighColor
border.width: 1 // FlyoutBorderThemeThickness
}
- //! [background]
}
diff --git a/src/imports/controls/universal/MenuItem.qml b/src/imports/controls/universal/MenuItem.qml
index fee5d886..d8fdbcd0 100644
--- a/src/imports/controls/universal/MenuItem.qml
+++ b/src/imports/controls/universal/MenuItem.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,31 +35,27 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.MenuItem {
id: control
- implicitWidth: background ? background.implicitWidth
- : (label ? label.implicitWidth : 0) + (indicator ? indicator.implicitWidth : 0)
- + (label && indicator ? spacing : 0) + leftPadding + rightPadding
- implicitHeight: background ? background.implicitHeight
- : (label ? label.implicitHeight : 0) + (indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
- topPadding: 11
- leftPadding: 12
- rightPadding: 12
- bottomPadding: 13
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
spacing: 12
- //! [label]
- label: Text {
- x: control.mirrored || !control.checkable ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - (control.checkable ? indicator.width + control.spacing : 0)
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -69,35 +65,32 @@ T.MenuItem {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [indicator]
indicator: Image {
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
visible: control.checked
- source: !control.checkable ? "" : "image://universal/checkmark/" + (!control.enabled ? control.Universal.baseLowColor : control.pressed ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor)
+ source: !control.checkable ? "" : "image://universal/checkmark/" + (!control.enabled ? control.Universal.baseLowColor : control.down ? control.Universal.baseHighColor : control.Universal.baseMediumHighColor)
+ sourceSize.width: width
+ sourceSize.height: height
}
- //! [indicator]
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
color: !control.enabled ? control.Universal.baseLowColor :
- control.pressed ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
+ control.down ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
Rectangle {
x: 1; y: 1
width: parent.width - 2
height: parent.height - 2
- visible: control.activeFocus
+ visible: control.visualFocus
color: control.Universal.accent
opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
}
}
- //! [background]
}
diff --git a/src/imports/controls/universal/Page.qml b/src/imports/controls/universal/Page.qml
index 975ddfe0..3150715f 100644
--- a/src/imports/controls/universal/Page.qml
+++ b/src/imports/controls/universal/Page.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,19 +35,15 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Page {
id: control
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
- color: control.Universal.altHighColor
+ color: control.Universal.background
}
- //! [background]
}
diff --git a/src/imports/controls/universal/PageIndicator.qml b/src/imports/controls/universal/PageIndicator.qml
index f3ec9a7b..0c4e3b80 100644
--- a/src/imports/controls/universal/PageIndicator.qml
+++ b/src/imports/controls/universal/PageIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.PageIndicator {
id: control
@@ -49,7 +49,6 @@ T.PageIndicator {
padding: 6
spacing: 7
- //! [delegate]
delegate: Rectangle {
implicitWidth: 5
implicitHeight: 5
@@ -58,9 +57,7 @@ T.PageIndicator {
color: index === control.currentIndex ? control.Universal.baseMediumHighColor :
pressed ? control.Universal.baseMediumLowColor : control.Universal.baseLowColor
}
- //! [delegate]
- //! [contentItem]
contentItem: Row {
spacing: control.spacing
@@ -69,5 +66,4 @@ T.PageIndicator {
delegate: control.delegate
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/universal/Pane.qml b/src/imports/controls/universal/Pane.qml
index 138b4ad4..cd62b65c 100644
--- a/src/imports/controls/universal/Pane.qml
+++ b/src/imports/controls/universal/Pane.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Pane {
id: control
@@ -49,13 +49,9 @@ T.Pane {
padding: 12
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
- color: control.Universal.altHighColor
+ color: control.Universal.background
}
- //! [background]
}
diff --git a/src/imports/controls/universal/Popup.qml b/src/imports/controls/universal/Popup.qml
index 7ab79545..892db087 100644
--- a/src/imports/controls/universal/Popup.qml
+++ b/src/imports/controls/universal/Popup.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Popup {
id: control
diff --git a/src/imports/controls/universal/ProgressBar.qml b/src/imports/controls/universal/ProgressBar.qml
index 3d88fc67..66d1aeb8 100644
--- a/src/imports/controls/universal/ProgressBar.qml
+++ b/src/imports/controls/universal/ProgressBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,47 +35,34 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
-import Qt.labs.controls.universal.impl 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+import QtQuick.Controls.Universal.impl 2.0
T.ProgressBar {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- indicator ? indicator.implicitWidth : 0) + leftPadding + rightPadding
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding
+ contentItem.implicitHeight + topPadding + bottomPadding)
- //! [indicator]
- indicator: Rectangle {
- x: control.leftPadding
- y: control.topPadding + (control.availableHeight - height) / 2
- width: control.indeterminate ? 0 : control.position * control.availableWidth
- height: 10
+ contentItem: ProgressStrip {
+ id: strip
+ implicitHeight: 10
scale: control.mirrored ? -1 : 1
+ indeterminate: control.indeterminate
color: control.Universal.accent
+ progress: control.position
+ clip: control.indeterminate
- ProgressStrip {
- id: strip
-
- width: control.availableWidth
- height: control.availableHeight
-
- clip: control.indeterminate
- visible: control.indeterminate
- color: control.Universal.accent
-
- ProgressStripAnimator {
- target: strip
- running: strip.visible
- }
+ ProgressStripAnimator {
+ target: strip
+ running: control.visible && control.indeterminate
}
}
- //! [indicator]
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 10
@@ -88,5 +75,4 @@ T.ProgressBar {
visible: !control.indeterminate
color: control.Universal.baseLowColor
}
- //! [background]
}
diff --git a/src/imports/controls/universal/RadioButton.qml b/src/imports/controls/universal/RadioButton.qml
index 95e55db9..b8986488 100644
--- a/src/imports/controls/universal/RadioButton.qml
+++ b/src/imports/controls/universal/RadioButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,75 +35,34 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+import QtQuick.Controls.Universal.impl 2.0
T.RadioButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
spacing: 8
property bool useSystemFocusVisuals: true
- //! [indicator]
- indicator: Rectangle {
- id: outerEllipse
- implicitWidth: 20
- implicitHeight: 20
+ indicator: RadioIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
-
- radius: width / 2
- color: "transparent"
- border.width: 2 // RadioButtonBorderThemeThickness
- border.color: control.checked ? "transparent" :
- !control.enabled ? control.Universal.baseLowColor :
- control.pressed ? control.Universal.baseMediumColor : control.Universal.baseMediumHighColor
-
- Rectangle {
- id: checkOuterEllipse
- width: parent.width
- height: parent.height
-
- radius: width / 2
- opacity: control.checked ? 1 : 0
- color: "transparent"
- border.width: 2 // RadioButtonBorderThemeThickness
- border.color: !control.enabled ? control.Universal.baseLowColor :
- control.pressed ? control.Universal.baseMediumColor : control.Universal.accent
- }
-
- Rectangle {
- id: checkGlyph
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
- width: parent.width / 2
- height: parent.height / 2
-
- radius: width / 2
- opacity: control.checked ? 1 : 0
- color: !control.enabled ? control.Universal.baseLowColor :
- control.pressed ? control.Universal.baseMediumColor : control.Universal.baseMediumHighColor
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -112,7 +71,7 @@ T.RadioButton {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
}
diff --git a/src/imports/controls/universal/RadioDelegate.qml b/src/imports/controls/universal/RadioDelegate.qml
new file mode 100644
index 00000000..09f86f15
--- /dev/null
+++ b/src/imports/controls/universal/RadioDelegate.qml
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+T.RadioDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12
+
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
+
+ property Item control
+
+ indicator: RadioIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
+ }
+
+ background: Rectangle {
+ visible: control.down || control.highlighted || control.visualFocus
+ color: control.down ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ visible: control.visualFocus || control.highlighted
+ color: control.Universal.accent
+ opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
+ }
+
+ }
+}
diff --git a/src/imports/controls/universal/RadioIndicator.qml b/src/imports/controls/universal/RadioIndicator.qml
new file mode 100644
index 00000000..65790e6a
--- /dev/null
+++ b/src/imports/controls/universal/RadioIndicator.qml
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Controls.Universal 2.0
+
+Rectangle {
+ implicitWidth: 20
+ implicitHeight: 20
+ radius: width / 2
+ color: "transparent"
+ border.width: 2 // RadioButtonBorderThemeThickness
+ border.color: control.checked ? "transparent" :
+ !control.enabled ? control.Universal.baseLowColor :
+ control.down ? control.Universal.baseMediumColor : control.Universal.baseMediumHighColor
+
+ property var control
+
+ Rectangle {
+ id: checkOuterEllipse
+ width: parent.width
+ height: parent.height
+
+ radius: width / 2
+ opacity: control.checked ? 1 : 0
+ color: "transparent"
+ border.width: 2 // RadioButtonBorderThemeThickness
+ border.color: !control.enabled ? control.Universal.baseLowColor :
+ control.down ? control.Universal.baseMediumColor : control.Universal.accent
+ }
+
+ Rectangle {
+ id: checkGlyph
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+ width: parent.width / 2
+ height: parent.height / 2
+
+ radius: width / 2
+ opacity: control.checked ? 1 : 0
+ color: !control.enabled ? control.Universal.baseLowColor :
+ control.down ? control.Universal.baseMediumColor : control.Universal.baseMediumHighColor
+ }
+}
diff --git a/src/imports/controls/universal/RangeSlider.qml b/src/imports/controls/universal/RangeSlider.qml
index f01c06ed..ec2ff7c8 100644
--- a/src/imports/controls/universal/RangeSlider.qml
+++ b/src/imports/controls/universal/RangeSlider.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,24 +35,21 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.RangeSlider {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- Math.max(track ? track.implicitWidth : 0,
- first.handle ? first.handle.implicitWidth : 0,
- second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
+ Math.max(first.handle ? first.handle.implicitWidth : 0,
+ second.handle ? second.handle.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(track ? track.implicitHeight : 0,
- first.handle ? first.handle.implicitHeight : 0,
- second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
+ Math.max(first.handle ? first.handle.implicitHeight : 0,
+ second.handle ? second.handle.implicitHeight : 0) + topPadding + bottomPadding)
padding: 6
- //! [firstHandle]
first.handle: Rectangle {
implicitWidth: horizontal ? 8 : 24
implicitHeight: horizontal ? 24 : 8
@@ -65,9 +62,7 @@ T.RangeSlider {
radius: 4
color: control.first.pressed ? control.Universal.chromeHighColor : control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
- //! [firstHandle]
- //! [secondHandle]
second.handle: Rectangle {
implicitWidth: horizontal ? 8 : 24
implicitHeight: horizontal ? 24 : 8
@@ -80,10 +75,8 @@ T.RangeSlider {
radius: 4
color: control.second.pressed ? control.Universal.chromeHighColor : control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
- //! [secondHandle]
- //! [track]
- track: Item {
+ background: Item {
implicitWidth: horizontal ? 200 : 18
implicitHeight: horizontal ? 18 : 200
@@ -99,20 +92,19 @@ T.RangeSlider {
Rectangle {
x: parent.horizontal ? 0 : (parent.width - width) / 2
y: parent.horizontal ? (parent.height - height) / 2 : 0
- width: parent.horizontal ? parent.width : 2 // SliderTrackThemeHeight
- height: !parent.horizontal ? parent.height : 2 // SliderTrackThemeHeight
+ width: parent.horizontal ? parent.width : 2 // SliderBackgroundThemeHeight
+ height: !parent.horizontal ? parent.height : 2 // SliderBackgroundThemeHeight
color: control.enabled ? control.Universal.baseMediumLowColor : control.Universal.chromeDisabledHighColor
}
Rectangle {
- x: parent.horizontal ? control.first.position * parent.width : 0
+ x: parent.horizontal ? control.first.position * parent.width : (parent.width - width) / 2
y: parent.horizontal ? (parent.height - height) / 2 : control.second.visualPosition * parent.height
- width: parent.horizontal ? control.second.position * parent.width - control.first.position * parent.width : 2 // SliderTrackThemeHeight
- height: !parent.horizontal ? control.second.position * parent.height - control.first.position * parent.height : 2 // SliderTrackThemeHeight
+ width: parent.horizontal ? control.second.position * parent.width - control.first.position * parent.width : 2 // SliderBackgroundThemeHeight
+ height: !parent.horizontal ? control.second.position * parent.height - control.first.position * parent.height : 2 // SliderBackgroundThemeHeight
color: control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
}
- //! [track]
}
diff --git a/src/imports/controls/universal/ScrollBar.qml b/src/imports/controls/universal/ScrollBar.qml
index dd0a81ca..1ac627a7 100644
--- a/src/imports/controls/universal/ScrollBar.qml
+++ b/src/imports/controls/universal/ScrollBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,37 +35,28 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.ScrollBar {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- handle.implicitWidth + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- handle.implicitHeight + topPadding + bottomPadding)
+ contentItem.implicitHeight + topPadding + bottomPadding)
// TODO: arrows
- //! [handle]
- handle: Rectangle {
+ contentItem: Rectangle {
implicitWidth: 12
implicitHeight: 12
color: control.pressed ? control.Universal.baseMediumColor : control.Universal.chromeHighColor
visible: control.size < 1.0
opacity: 0.0
-
- readonly property bool horizontal: control.orientation === Qt.Horizontal
- x: control.leftPadding + (horizontal ? control.position * control.availableWidth : 0)
- y: control.topPadding + (horizontal ? 0 : control.position * control.availableHeight)
- width: horizontal ? control.size * control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.size * control.availableHeight
}
- //! [handle]
- //! [background]
background: Rectangle {
implicitWidth: 12
implicitHeight: 12
@@ -74,7 +65,6 @@ T.ScrollBar {
visible: control.size < 1.0
opacity: 0.0
}
- //! [background]
states: [
State {
@@ -86,13 +76,13 @@ T.ScrollBar {
transitions: [
Transition {
to: "active"
- NumberAnimation { targets: [handle, background]; property: "opacity"; to: 1.0 }
+ NumberAnimation { targets: [contentItem, background]; property: "opacity"; to: 1.0 }
},
Transition {
from: "active"
SequentialAnimation {
PauseAnimation { duration: 3000 }
- NumberAnimation { targets: [handle, background]; property: "opacity"; to: 0.0 }
+ NumberAnimation { targets: [contentItem, background]; property: "opacity"; to: 0.0 }
}
}
]
diff --git a/src/imports/controls/universal/ScrollIndicator.qml b/src/imports/controls/universal/ScrollIndicator.qml
index 5787b60a..ce289ce3 100644
--- a/src/imports/controls/universal/ScrollIndicator.qml
+++ b/src/imports/controls/universal/ScrollIndicator.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,19 +35,20 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.ScrollIndicator {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- indicator.implicitWidth + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- indicator.implicitHeight + topPadding + bottomPadding)
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ contentItem: Rectangle {
+ id: indicator
- //! [indicator]
- indicator: Rectangle {
implicitWidth: 6
implicitHeight: 6
@@ -55,12 +56,6 @@ T.ScrollIndicator {
visible: control.size < 1.0
opacity: 0.0
- readonly property bool horizontal: control.orientation === Qt.Horizontal
- x: control.leftPadding + (horizontal ? control.position * control.width : 0)
- y: control.topPadding + (horizontal ? 0 : control.position * control.height)
- width: horizontal ? control.size * control.availableWidth : implicitWidth
- height: horizontal ? implicitHeight : control.size * control.availableHeight
-
states: [
State {
name: "active"
@@ -82,5 +77,4 @@ T.ScrollIndicator {
}
]
}
- //! [indicator]
}
diff --git a/src/imports/controls/universal/Slider.qml b/src/imports/controls/universal/Slider.qml
index 66357c6e..baf91211 100644
--- a/src/imports/controls/universal/Slider.qml
+++ b/src/imports/controls/universal/Slider.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,24 +35,21 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Slider {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- Math.max(track ? track.implicitWidth : 0,
- handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
+ (handle ? handle.implicitWidth : 0) + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(track ? track.implicitHeight : 0,
- handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
+ (handle ? handle.implicitHeight : 0) + topPadding + bottomPadding)
padding: 6
property bool useSystemFocusVisuals: true
- //! [handle]
handle: Rectangle {
implicitWidth: horizontal ? 8 : 24
implicitHeight: horizontal ? 24 : 8
@@ -65,10 +62,8 @@ T.Slider {
radius: 4
color: control.pressed ? control.Universal.chromeHighColor : control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
- //! [handle]
- //! [track]
- track: Item {
+ background: Item {
implicitWidth: horizontal ? 200 : 18
implicitHeight: horizontal ? 18 : 200
@@ -99,5 +94,4 @@ T.Slider {
color: control.enabled ? control.Universal.accent : control.Universal.chromeDisabledHighColor
}
}
- //! [track]
}
diff --git a/src/imports/controls/universal/SpinBox.qml b/src/imports/controls/universal/SpinBox.qml
index c903baf4..d3647114 100644
--- a/src/imports/controls/universal/SpinBox.qml
+++ b/src/imports/controls/universal/SpinBox.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.SpinBox {
id: control
@@ -52,39 +52,36 @@ T.SpinBox {
baselineOffset: contentItem.y + contentItem.baselineOffset
// TextControlThemePadding + 2 (border)
- topPadding: 5
- bottomPadding: 7
- leftPadding: 12 + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
- rightPadding: 8 + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
+ padding: 12
+ topPadding: padding - 7
+ leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
+ rightPadding: padding - 4 + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
+ bottomPadding: padding - 5
Universal.theme: activeFocus ? Universal.Light : undefined
- //! [validator]
validator: IntValidator {
locale: control.locale.name
bottom: Math.min(control.from, control.to)
top: Math.max(control.from, control.to)
}
- //! [validator]
- //! [contentItem]
contentItem: TextInput {
text: control.textFromValue(control.value, control.locale)
font: control.font
color: !enabled ? control.Universal.chromeDisabledLowColor :
- activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
+ activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.foreground
selectionColor: control.Universal.accent
selectedTextColor: control.Universal.chromeWhiteColor
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: TextInput.AlignVCenter
+ readOnly: !control.editable
validator: control.validator
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
- //! [contentItem]
- //! [up.indicator]
up.indicator: Item {
implicitWidth: 28
height: parent.height + 4
@@ -104,13 +101,13 @@ T.SpinBox {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
source: "image://universal/" + (control.mirrored ? "left" : "right") + "arrow/"
- + (!control.enabled ? control.Universal.chromeDisabledLowColor :
- control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor)
+ + (!enabled ? control.Universal.chromeDisabledLowColor :
+ control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor)
+ sourceSize.width: width
+ sourceSize.height: height
}
}
- //! [up.indicator]
- //! [down.indicator]
down.indicator: Item {
implicitWidth: 28
height: parent.height + 4
@@ -130,13 +127,13 @@ T.SpinBox {
x: (parent.width - width) / 2
y: (parent.height - height) / 2
source: "image://universal/" + (control.mirrored ? "right" : "left") + "arrow/"
- + (!control.enabled ? control.Universal.chromeDisabledLowColor :
- control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor)
+ + (!enabled ? control.Universal.chromeDisabledLowColor :
+ control.activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor)
+ sourceSize.width: width
+ sourceSize.height: height
}
}
- //! [down.indicator]
- //! [background]
background: Rectangle {
implicitWidth: 60 + 28 // TextControlThemeMinWidth - 4 (border)
implicitHeight: 28 // TextControlThemeMinHeight - 4 (border)
@@ -144,7 +141,6 @@ T.SpinBox {
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent : control.Universal.chromeDisabledLowColor
- color: control.enabled ? control.Universal.altHighColor : control.Universal.baseLowColor
+ color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
- //! [background]
}
diff --git a/src/imports/controls/universal/StackView.qml b/src/imports/controls/universal/StackView.qml
index b49c2dbb..4f37bb76 100644
--- a/src/imports/controls/universal/StackView.qml
+++ b/src/imports/controls/universal/StackView.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,54 +35,42 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.StackView {
- id: root
+ id: control
- //! [popEnter]
popEnter: Transition {
ParallelAnimation {
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint }
- NumberAnimation { property: "x"; from: (root.mirrored ? -0.3 : 0.3) * -root.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
}
- //! [popEnter]
- //! [popExit]
popExit: Transition {
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.OutQuint }
}
- //! [popExit]
- //! [pushEnter]
pushEnter: Transition {
ParallelAnimation {
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint }
- NumberAnimation { property: "x"; from: (root.mirrored ? -0.3 : 0.3) * root.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
}
- //! [pushEnter]
- //! [pushExit]
pushExit: Transition {
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.OutQuint }
}
- //! [pushExit]
- //! [replaceEnter]
replaceEnter: Transition {
ParallelAnimation {
NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 200; easing.type: Easing.InQuint }
- NumberAnimation { property: "x"; from: (root.mirrored ? -0.3 : 0.3) * root.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
+ NumberAnimation { property: "x"; from: (control.mirrored ? -0.3 : 0.3) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
}
- //! [replaceEnter]
- //! [replaceExit]
replaceExit: Transition {
NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.OutQuint }
}
- //! [replaceExit]
}
diff --git a/src/imports/controls/universal/SwipeDelegate.qml b/src/imports/controls/universal/SwipeDelegate.qml
new file mode 100644
index 00000000..82c1e744
--- /dev/null
+++ b/src/imports/controls/universal/SwipeDelegate.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+T.SwipeDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12
+
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+ rightPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
+
+ text: control.text
+ font: control.font
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+ renderType: Text.NativeRendering
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
+
+ Behavior on x {
+ enabled: !control.down
+ NumberAnimation {
+ easing.type: Easing.InOutCubic
+ duration: 400
+ }
+ }
+ }
+
+ background: Rectangle {
+ color: control.Universal.background
+
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ color: control.down ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ visible: control.visualFocus || control.highlighted
+ color: control.Universal.accent
+ opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
+ }
+ }
+
+ Behavior on x {
+ enabled: !control.down
+ NumberAnimation {
+ easing.type: Easing.InOutCubic
+ duration: 400
+ }
+ }
+ }
+}
diff --git a/src/imports/controls/universal/Switch.qml b/src/imports/controls/universal/Switch.qml
index 768291fc..b42361dc 100644
--- a/src/imports/controls/universal/Switch.qml
+++ b/src/imports/controls/universal/Switch.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,67 +35,33 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.Switch {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- (label ? label.implicitWidth : 0) +
- (indicator ? indicator.implicitWidth : 0) +
- (label && indicator ? spacing : 0) + leftPadding + rightPadding)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- Math.max(label ? label.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 5
spacing: 8
property bool useSystemFocusVisuals: true
- //! [indicator]
- indicator: Rectangle {
- implicitWidth: 44
- implicitHeight: 20
+ indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
-
- radius: 10
- color: !control.enabled ? "transparent" :
- control.pressed ? control.Universal.baseMediumColor :
- control.checked ? control.Universal.accent : "transparent"
- border.color: !control.enabled ? control.Universal.baseLowColor :
- control.checked && !control.pressed ? control.Universal.accent : control.Universal.baseMediumColor
- border.width: 2
-
- Rectangle {
- width: 10
- height: 10
- radius: 5
-
- color: !control.enabled ? control.Universal.baseLowColor :
- control.pressed || control.checked ? control.Universal.chromeWhiteColor : control.Universal.baseMediumHighColor
-
- x: Math.max(5, Math.min(parent.width - width - 5,
- control.visualPosition * parent.width - (width / 2)))
- y: (parent.height - height) / 2
-
- Behavior on x {
- enabled: !control.pressed
- SmoothedAnimation { velocity: 200 }
- }
- }
+ control: control
}
- //! [indicator]
- //! [label]
- label: Text {
- x: control.mirrored ? control.leftPadding : (indicator.x + indicator.width + control.spacing)
- y: control.topPadding
- width: control.availableWidth - indicator.width - control.spacing
- height: control.availableHeight
+ contentItem: Text {
+ leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
+ rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
text: control.text
font: control.font
@@ -104,7 +70,7 @@ T.Switch {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
}
diff --git a/src/imports/controls/universal/SwitchDelegate.qml b/src/imports/controls/universal/SwitchDelegate.qml
new file mode 100644
index 00000000..558f5cfb
--- /dev/null
+++ b/src/imports/controls/universal/SwitchDelegate.qml
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+T.SwitchDelegate {
+ id: control
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ Math.max(contentItem.implicitHeight,
+ indicator ? indicator.implicitHeight : 0) + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
+
+ spacing: 12
+
+ padding: 12
+ topPadding: padding - 1
+ bottomPadding: padding + 1
+
+ indicator: SwitchIndicator {
+ x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
+ y: control.topPadding + (control.availableHeight - height) / 2
+ control: control
+ }
+
+ contentItem: Text {
+ leftPadding: !control.mirrored ? 0 : control.indicator.width + control.spacing
+ rightPadding: control.mirrored ? 0 : control.indicator.width + control.spacing
+
+ text: control.text
+ font: control.font
+ elide: Text.ElideRight
+ visible: control.text
+ horizontalAlignment: Text.AlignLeft
+ verticalAlignment: Text.AlignVCenter
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
+ }
+
+ background: Rectangle {
+ visible: control.down || control.highlighted || control.visualFocus
+ color: control.down ? control.Universal.listMediumColor : control.Universal.altMediumLowColor
+ Rectangle {
+ width: parent.width
+ height: parent.height
+ visible: control.visualFocus || control.highlighted
+ color: control.Universal.accent
+ opacity: control.Universal.theme === Universal.Light ? 0.4 : 0.6
+ }
+
+ }
+}
diff --git a/src/imports/controls/universal/SwitchIndicator.qml b/src/imports/controls/universal/SwitchIndicator.qml
new file mode 100644
index 00000000..b3d44d9e
--- /dev/null
+++ b/src/imports/controls/universal/SwitchIndicator.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+Rectangle {
+ implicitWidth: 44
+ implicitHeight: 20
+
+ radius: 10
+ color: !control.enabled ? "transparent" :
+ control.pressed ? control.Universal.baseMediumColor :
+ control.checked ? control.Universal.accent : "transparent"
+ border.color: !control.enabled ? control.Universal.baseLowColor :
+ control.checked && !control.pressed ? control.Universal.accent : control.Universal.baseMediumColor
+ border.width: 2
+
+ property Item control
+
+ Rectangle {
+ width: 10
+ height: 10
+ radius: 5
+
+ color: !control.enabled ? control.Universal.baseLowColor :
+ control.pressed || control.checked ? control.Universal.chromeWhiteColor : control.Universal.baseMediumHighColor
+
+ x: Math.max(5, Math.min(parent.width - width - 5,
+ control.visualPosition * parent.width - (width / 2)))
+ y: (parent.height - height) / 2
+
+ Behavior on x {
+ enabled: !control.pressed
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+}
diff --git a/src/imports/controls/universal/TabBar.qml b/src/imports/controls/universal/TabBar.qml
index 1eee3b06..7c2e83a6 100644
--- a/src/imports/controls/universal/TabBar.qml
+++ b/src/imports/controls/universal/TabBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,9 +34,9 @@
**
****************************************************************************/
-import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick 2.7
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.TabBar {
id: control
@@ -46,7 +46,6 @@ T.TabBar {
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem.implicitHeight + topPadding + bottomPadding)
- //! [contentItem]
contentItem: PathView {
implicitWidth: 200
implicitHeight: 48
@@ -56,6 +55,7 @@ T.TabBar {
interactive: false
snapMode: PathView.SnapToItem
+ movementDirection: PathView.Positive
highlightMoveDuration: 100
path: Path {
@@ -67,13 +67,10 @@ T.TabBar {
}
}
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 48
- color: control.Universal.altHighColor
+ color: control.Universal.background
}
- //! [background]
}
diff --git a/src/imports/controls/universal/TabButton.qml b/src/imports/controls/universal/TabButton.qml
index c736a87b..d503c86a 100644
--- a/src/imports/controls/universal/TabButton.qml
+++ b/src/imports/controls/universal/TabButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,33 +35,28 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.TabButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 12 // PivotItemMargin
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ contentItem: Text {
text: control.text
font: control.font
elide: Text.ElideRight
- color: control.checked || control.pressed ? control.Universal.baseHighColor : control.Universal.baseLowColor
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
+
+ opacity: control.checked || control.down ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
}
diff --git a/src/imports/controls/universal/TextArea.qml b/src/imports/controls/universal/TextArea.qml
index 255f5774..43fd40f4 100644
--- a/src/imports/controls/universal/TextArea.qml
+++ b/src/imports/controls/universal/TextArea.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.TextArea {
id: control
@@ -49,15 +49,14 @@ T.TextArea {
placeholder.implicitHeight + topPadding + bottomPadding)
// TextControlThemePadding + 2 (border)
- topPadding: 5
- leftPadding: 12
- rightPadding: 8
- bottomPadding: 7
+ padding: 12
+ topPadding: padding - 7
+ rightPadding: padding - 4
+ bottomPadding: padding - 5
Universal.theme: activeFocus ? Universal.Light : undefined
- color: !enabled ? Universal.chromeDisabledLowColor :
- activeFocus ? Universal.chromeBlackHighColor : Universal.baseHighColor
+ color: !enabled ? Universal.chromeDisabledLowColor : Universal.foreground
selectionColor: Universal.accent
selectedTextColor: Universal.chromeWhiteColor
@@ -72,13 +71,12 @@ T.TextArea {
font: control.font
color: !control.enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackMediumLowColor : control.Universal.baseMediumColor
- visible: !control.length && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
}
- //! [background]
background: Rectangle {
implicitWidth: 60 // TextControlThemeMinWidth - 4 (border)
implicitHeight: 28 // TextControlThemeMinHeight - 4 (border)
@@ -86,7 +84,6 @@ T.TextArea {
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent : control.Universal.chromeDisabledLowColor
- color: control.enabled ? control.Universal.altHighColor : control.Universal.baseLowColor
+ color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
- //! [background]
}
diff --git a/src/imports/controls/universal/TextField.qml b/src/imports/controls/universal/TextField.qml
index fe9e071d..bd496ecc 100644
--- a/src/imports/controls/universal/TextField.qml
+++ b/src/imports/controls/universal/TextField.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,29 +35,28 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.TextField {
id: control
- implicitWidth: Math.max(contentWidth + leftPadding + rightPadding,
- background ? background.implicitWidth : 0,
- placeholder.implicitWidth + leftPadding + rightPadding)
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ placeholderText ? placeholder.implicitWidth + leftPadding + rightPadding : 0)
+ || contentWidth + leftPadding + rightPadding
implicitHeight: Math.max(contentHeight + topPadding + bottomPadding,
background ? background.implicitHeight : 0,
placeholder.implicitHeight + topPadding + bottomPadding)
// TextControlThemePadding + 2 (border)
- topPadding: 5
- leftPadding: 12
- rightPadding: 8
- bottomPadding: 7
+ padding: 12
+ topPadding: padding - 7
+ rightPadding: padding - 4
+ bottomPadding: padding - 5
Universal.theme: activeFocus ? Universal.Light : undefined
- color: !enabled ? Universal.chromeDisabledLowColor :
- activeFocus ? Universal.chromeBlackHighColor : Universal.baseHighColor
+ color: !enabled ? Universal.chromeDisabledLowColor : Universal.foreground
selectionColor: Universal.accent
selectedTextColor: Universal.chromeWhiteColor
verticalAlignment: TextInput.AlignVCenter
@@ -73,13 +72,12 @@ T.TextField {
font: control.font
color: !control.enabled ? control.Universal.chromeDisabledLowColor :
control.activeFocus ? control.Universal.chromeBlackMediumLowColor : control.Universal.baseMediumColor
- visible: !control.displayText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
+ visible: !control.length && !control.preeditText && (!control.activeFocus || control.horizontalAlignment !== Qt.AlignHCenter)
horizontalAlignment: control.horizontalAlignment
verticalAlignment: control.verticalAlignment
elide: Text.ElideRight
}
- //! [background]
background: Rectangle {
implicitWidth: 60 // TextControlThemeMinWidth - 4 (border)
implicitHeight: 28 // TextControlThemeMinHeight - 4 (border)
@@ -87,7 +85,6 @@ T.TextField {
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent : control.Universal.chromeDisabledLowColor
- color: control.enabled ? control.Universal.altHighColor : control.Universal.baseLowColor
+ color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
- //! [background]
}
diff --git a/src/imports/controls/universal/ToolBar.qml b/src/imports/controls/universal/ToolBar.qml
index cefb9dc9..48e200c0 100644
--- a/src/imports/controls/universal/ToolBar.qml
+++ b/src/imports/controls/universal/ToolBar.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,8 +35,8 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.ToolBar {
id: control
@@ -47,14 +47,10 @@ T.ToolBar {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- //! [contentItem]
contentItem: Item { }
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitHeight: 48 // AppBarThemeCompactHeight
color: control.Universal.chromeMediumColor
}
- //! [background]
}
diff --git a/src/imports/controls/universal/ToolButton.qml b/src/imports/controls/universal/ToolButton.qml
index a8fa8bd5..cb87130d 100644
--- a/src/imports/controls/universal/ToolButton.qml
+++ b/src/imports/controls/universal/ToolButton.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,45 +35,38 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
T.ToolButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
- label ? label.implicitWidth + leftPadding + rightPadding : 0)
+ contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
- label ? label.implicitHeight + topPadding + bottomPadding : 0)
- baselineOffset: label ? label.y + label.baselineOffset : 0
+ contentItem.implicitHeight + topPadding + bottomPadding)
+ baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 6
property bool useSystemFocusVisuals: true
- //! [label]
- label: Text {
- x: control.leftPadding
- y: control.topPadding
- width: control.availableWidth
- height: control.availableHeight
-
+ contentItem: Text {
text: control.text
font: control.font
- color: control.enabled ? control.Universal.baseHighColor : control.Universal.baseLowColor
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
+
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
}
- //! [label]
- //! [background]
background: Rectangle {
implicitWidth: 68
implicitHeight: 48 // AppBarThemeCompactHeight
- color: control.pressed ? control.Universal.listMediumColor :
+ color: control.down ? control.Universal.listMediumColor :
control.enabled && (control.highlighted || control.checked) ? control.Universal.accent : "transparent"
}
- //! [background]
}
diff --git a/src/imports/controls/universal/ToolTip.qml b/src/imports/controls/universal/ToolTip.qml
new file mode 100644
index 00000000..423e729d
--- /dev/null
+++ b/src/imports/controls/universal/ToolTip.qml
@@ -0,0 +1,72 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.6
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+
+T.ToolTip {
+ id: control
+
+ x: parent ? (parent.width - implicitWidth) / 2 : 0
+ y: -implicitHeight - 16
+
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ contentItem.implicitWidth + leftPadding + rightPadding)
+ implicitHeight: Math.max(background ? background.implicitHeight : 0,
+ contentItem.implicitHeight + topPadding + bottomPadding)
+
+ margins: 8
+ padding: 8
+ topPadding: padding - 3
+ bottomPadding: padding - 1
+
+ closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ // TODO: wrapMode: Label.Wrap
+ opacity: enabled ? 1.0 : 0.2
+ color: control.Universal.foreground
+ }
+
+ background: Rectangle {
+ color: control.Universal.chromeMediumLowColor
+ border.color: control.Universal.chromeHighColor
+ border.width: 1 // ToolTipBorderThemeThickness
+ }
+}
diff --git a/src/imports/controls/universal/Tumbler.qml b/src/imports/controls/universal/Tumbler.qml
index e1efca06..7b134b84 100644
--- a/src/imports/controls/universal/Tumbler.qml
+++ b/src/imports/controls/universal/Tumbler.qml
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -35,9 +35,9 @@
****************************************************************************/
import QtQuick 2.6
-import Qt.labs.templates 1.0 as T
-import Qt.labs.controls.universal 1.0
-import Qt.labs.controls 1.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Controls.Universal 2.0
+import QtQuick.Controls 2.0
T.Tumbler {
id: control
@@ -45,18 +45,15 @@ T.Tumbler {
implicitWidth: 60
implicitHeight: 200
- //! [delegate]
delegate: Text {
text: modelData
- color: !control.enabled ? control.Universal.baseLowColor : control.Universal.baseHighColor
font: control.font
- opacity: 0.4 + Math.max(0, 1 - Math.abs(Tumbler.displacement)) * 0.6
+ color: control.Universal.foreground
+ opacity: (1.0 - Math.abs(Tumbler.displacement) / (visibleItemCount / 2)) * (control.enabled ? 1 : 0.6)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [delegate]
- //! [contentItem]
contentItem: PathView {
id: pathView
model: control.model
@@ -78,5 +75,4 @@ T.Tumbler {
property real delegateHeight: control.availableHeight / control.visibleItemCount
}
- //! [contentItem]
}
diff --git a/src/imports/controls/universal/plugins.qmltypes b/src/imports/controls/universal/plugins.qmltypes
new file mode 100644
index 00000000..165e658e
--- /dev/null
+++ b/src/imports/controls/universal/plugins.qmltypes
@@ -0,0 +1,61 @@
+import QtQuick.tooling 1.2
+
+// This file describes the plugin-supplied types contained in the library.
+// It is used for QML tooling purposes only.
+//
+// This file was auto-generated by:
+// 'qmlplugindump -nonrelocatable QtQuick.Controls.Universal 2.0'
+
+Module {
+ dependencies: []
+ Component { name: "QQuickStyle"; prototype: "QObject" }
+ Component {
+ name: "QQuickUniversalStyle"
+ prototype: "QQuickStyle"
+ exports: ["QtQuick.Controls.Universal/Universal 2.0"]
+ isCreatable: false
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Theme"
+ values: {
+ "Light": 0,
+ "Dark": 1
+ }
+ }
+ Enum {
+ name: "Color"
+ values: {
+ "Lime": 0,
+ "Green": 1,
+ "Emerald": 2,
+ "Teal": 3,
+ "Cyan": 4,
+ "Cobalt": 5,
+ "Indigo": 6,
+ "Violet": 7,
+ "Pink": 8,
+ "Magenta": 9,
+ "Crimson": 10,
+ "Red": 11,
+ "Orange": 12,
+ "Amber": 13,
+ "Yellow": 14,
+ "Brown": 15,
+ "Olive": 16,
+ "Steel": 17,
+ "Mauve": 18,
+ "Taupe": 19
+ }
+ }
+ Property { name: "theme"; type: "Theme" }
+ Property { name: "accent"; type: "QVariant" }
+ Property { name: "foreground"; type: "QVariant" }
+ Property { name: "background"; type: "QVariant" }
+ Signal { name: "paletteChanged" }
+ Method {
+ name: "color"
+ type: "QColor"
+ Parameter { name: "color"; type: "Color" }
+ }
+ }
+}
diff --git a/src/imports/controls/universal/qmldir b/src/imports/controls/universal/qmldir
index ebf841fb..e4b804a6 100644
--- a/src/imports/controls/universal/qmldir
+++ b/src/imports/controls/universal/qmldir
@@ -1,4 +1,4 @@
-module Qt.labs.controls.universal
-plugin qtlabsuniversalstyleplugin
-classname QtLabsUniversalStylePlugin
-depends Qt.labs.controls 1.0
+module QtQuick.Controls.Universal
+plugin qtquickcontrols2universalstyleplugin
+classname QtQuickControls2UniversalStylePlugin
+depends QtQuick.Controls 2.0
diff --git a/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp b/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp
index 554b8607..bc8a8eef 100644
--- a/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp
+++ b/src/imports/controls/universal/qquickuniversalfocusrectangle.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -55,9 +55,11 @@ void QQuickUniversalFocusRectangle::paint(QPainter *painter)
return;
QRect bounds = boundingRect().toAlignedRect();
- const QString key = QStringLiteral("qquickuniversalfocusrectangle_%1_%2").arg(bounds.width()).arg(bounds.height());
+ const int boundsWidth = bounds.width();
+ const int boundsHeight = bounds.width();
+ const QString key = QStringLiteral("qquickuniversalfocusrectangle_%1_%2").arg(QString::number(boundsWidth), QString::number(boundsHeight));
- QPixmap pixmap(bounds.width(), bounds.height());
+ QPixmap pixmap(boundsWidth, boundsHeight);
if (!QPixmapCache::find(key, &pixmap)) {
bounds.adjust(0, 0, -1, -1);
pixmap.fill(Qt::transparent);
@@ -70,7 +72,7 @@ void QQuickUniversalFocusRectangle::paint(QPainter *painter)
p.drawRect(bounds);
pen.setColor(Qt::black);
- pen.setDashPattern(QVector<qreal>() << 1 << 1);
+ pen.setDashPattern(QVector<qreal>(2, 1));
p.setPen(pen);
p.drawRect(bounds);
diff --git a/src/imports/controls/universal/qquickuniversalfocusrectangle_p.h b/src/imports/controls/universal/qquickuniversalfocusrectangle_p.h
index 6b15bc8d..02372dda 100644
--- a/src/imports/controls/universal/qquickuniversalfocusrectangle_p.h
+++ b/src/imports/controls/universal/qquickuniversalfocusrectangle_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -57,9 +57,9 @@ class QQuickUniversalFocusRectangle : public QQuickPaintedItem
Q_OBJECT
public:
- QQuickUniversalFocusRectangle(QQuickItem *parent = Q_NULLPTR);
+ QQuickUniversalFocusRectangle(QQuickItem *parent = nullptr);
- void paint(QPainter *painter) Q_DECL_OVERRIDE;
+ void paint(QPainter *painter) override;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalprogressring.cpp b/src/imports/controls/universal/qquickuniversalprogressring.cpp
index 2fe66047..ac087c78 100644
--- a/src/imports/controls/universal/qquickuniversalprogressring.cpp
+++ b/src/imports/controls/universal/qquickuniversalprogressring.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -53,11 +53,11 @@ class QQuickUniversalProgressRingAnimatorJob : public QQuickAnimatorJob
public:
QQuickUniversalProgressRingAnimatorJob();
- void initialize(QQuickAnimatorController *controller) Q_DECL_OVERRIDE;
- void updateCurrentTime(int time) Q_DECL_OVERRIDE;
- void writeBack() Q_DECL_OVERRIDE;
- void nodeWasDestroyed() Q_DECL_OVERRIDE;
- void afterNodeSync() Q_DECL_OVERRIDE;
+ void initialize(QQuickAnimatorController *controller) override;
+ void updateCurrentTime(int time) override;
+ void writeBack() override;
+ void nodeWasDestroyed() override;
+ void afterNodeSync() override;
private:
struct Phase {
@@ -73,7 +73,7 @@ private:
Phase m_phases[PhaseCount];
};
-QQuickUniversalProgressRingAnimatorJob::QQuickUniversalProgressRingAnimatorJob() : m_node(Q_NULLPTR)
+QQuickUniversalProgressRingAnimatorJob::QQuickUniversalProgressRingAnimatorJob() : m_node(nullptr)
{
m_phases[0] = Phase(433, -110, 10, QEasingCurve::BezierSpline);
m_phases[1] = Phase(767, 10, 93, QEasingCurve::Linear );
@@ -121,7 +121,7 @@ void QQuickUniversalProgressRingAnimatorJob::updateCurrentTime(int time)
if (visible) {
int phaseIndex, remain = time, elapsed = 0;
- for (phaseIndex = 0; phaseIndex < PhaseCount; ++phaseIndex) {
+ for (phaseIndex = 0; phaseIndex < PhaseCount - 1; ++phaseIndex) {
if (remain <= m_phases[phaseIndex].duration + begin)
break;
remain -= m_phases[phaseIndex].duration;
@@ -153,7 +153,7 @@ void QQuickUniversalProgressRingAnimatorJob::writeBack()
void QQuickUniversalProgressRingAnimatorJob::nodeWasDestroyed()
{
- m_node = Q_NULLPTR;
+ m_node = nullptr;
}
void QQuickUniversalProgressRingAnimatorJob::afterNodeSync()
@@ -191,11 +191,12 @@ int QQuickUniversalProgressRing::count() const
void QQuickUniversalProgressRing::setCount(int count)
{
- if (m_count != count) {
- m_count = count;
- update();
- emit countChanged();
- }
+ if (m_count == count)
+ return;
+
+ m_count = count;
+ update();
+ emit countChanged();
}
QColor QQuickUniversalProgressRing::color() const
@@ -205,11 +206,12 @@ QColor QQuickUniversalProgressRing::color() const
void QQuickUniversalProgressRing::setColor(const QColor &color)
{
- if (m_color != color) {
- m_color = color;
- update();
- emit colorChanged();
- }
+ if (m_color == color)
+ return;
+
+ m_color = color;
+ update();
+ emit colorChanged();
}
QSGNode *QQuickUniversalProgressRing::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
@@ -228,6 +230,7 @@ QSGNode *QQuickUniversalProgressRing::updatePaintNode(QSGNode *oldNode, UpdatePa
qreal diameter = size / 10.0;
qreal radius = diameter / 2;
qreal offset = (size - diameter * 2) / M_PI;
+ const QRectF rect(offset, offset, diameter, diameter);
QSGNode *transformNode = oldNode->firstChild();
for (int i = 0; i < m_count; ++i) {
@@ -249,7 +252,7 @@ QSGNode *QQuickUniversalProgressRing::updatePaintNode(QSGNode *oldNode, UpdatePa
QSGRectangleNode *rectNode = static_cast<QSGRectangleNode *>(opacityNode->firstChild());
Q_ASSERT(rectNode->type() == QSGNode::GeometryNodeType);
- rectNode->setRect(QRectF(offset, offset, diameter, diameter));
+ rectNode->setRect(rect);
rectNode->setColor(m_color);
rectNode->setRadius(radius);
rectNode->update();
diff --git a/src/imports/controls/universal/qquickuniversalprogressring_p.h b/src/imports/controls/universal/qquickuniversalprogressring_p.h
index 1d484e3a..ef73ebed 100644
--- a/src/imports/controls/universal/qquickuniversalprogressring_p.h
+++ b/src/imports/controls/universal/qquickuniversalprogressring_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -60,7 +60,7 @@ class QQuickUniversalProgressRing : public QQuickItem
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
public:
- QQuickUniversalProgressRing(QQuickItem *parent = Q_NULLPTR);
+ QQuickUniversalProgressRing(QQuickItem *parent = nullptr);
int count() const;
void setCount(int count);
@@ -73,7 +73,7 @@ Q_SIGNALS:
void colorChanged();
protected:
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
private:
int m_count;
@@ -85,11 +85,11 @@ class QQuickUniversalProgressRingAnimator : public QQuickAnimator
Q_OBJECT
public:
- QQuickUniversalProgressRingAnimator(QObject *parent = Q_NULLPTR);
+ QQuickUniversalProgressRingAnimator(QObject *parent = nullptr);
protected:
- QString propertyName() const Q_DECL_OVERRIDE;
- QQuickAnimatorJob *createJob() const Q_DECL_OVERRIDE;
+ QString propertyName() const override;
+ QQuickAnimatorJob *createJob() const override;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalprogressstrip.cpp b/src/imports/controls/universal/qquickuniversalprogressstrip.cpp
index 39ce1b5c..16f394f1 100644
--- a/src/imports/controls/universal/qquickuniversalprogressstrip.cpp
+++ b/src/imports/controls/universal/qquickuniversalprogressstrip.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -62,11 +62,11 @@ class QQuickUniversalProgressStripAnimatorJob : public QQuickAnimatorJob
public:
QQuickUniversalProgressStripAnimatorJob();
- void initialize(QQuickAnimatorController *controller) Q_DECL_OVERRIDE;
- void updateCurrentTime(int time) Q_DECL_OVERRIDE;
- void writeBack() Q_DECL_OVERRIDE;
- void nodeWasDestroyed() Q_DECL_OVERRIDE;
- void afterNodeSync() Q_DECL_OVERRIDE;
+ void initialize(QQuickAnimatorController *controller) override;
+ void updateCurrentTime(int time) override;
+ void writeBack() override;
+ void nodeWasDestroyed() override;
+ void afterNodeSync() override;
private:
struct Phase {
@@ -82,7 +82,7 @@ private:
Phase m_ellipsePhases[PhaseCount];
};
-QQuickUniversalProgressStripAnimatorJob::QQuickUniversalProgressStripAnimatorJob() : m_node(Q_NULLPTR)
+QQuickUniversalProgressStripAnimatorJob::QQuickUniversalProgressStripAnimatorJob() : m_node(nullptr)
{
m_borderPhases[0] = Phase( 500, -50, 0);
m_borderPhases[1] = Phase(1500, 0, 0);
@@ -148,7 +148,7 @@ void QQuickUniversalProgressStripAnimatorJob::updateCurrentTime(int time)
if (visible) {
{
int phaseIndex, remain = time, elapsed = 0;
- for (phaseIndex = 0; phaseIndex < PhaseCount; ++phaseIndex) {
+ for (phaseIndex = 0; phaseIndex < PhaseCount - 1; ++phaseIndex) {
if (remain <= m_borderPhases[phaseIndex].duration + begin)
break;
remain -= m_borderPhases[phaseIndex].duration;
@@ -171,7 +171,7 @@ void QQuickUniversalProgressStripAnimatorJob::updateCurrentTime(int time)
curve.addCubicBezierSegment(QPointF(0.4, 0.0), QPointF(0.6, 1.0), QPointF(1.0, 1.0));
int phaseIndex, remain = time, elapsed = 0;
- for (phaseIndex = 0; phaseIndex < PhaseCount; ++phaseIndex) {
+ for (phaseIndex = 0; phaseIndex < PhaseCount - 1; ++phaseIndex) {
if (remain <= m_ellipsePhases[phaseIndex].duration + begin)
break;
remain -= m_ellipsePhases[phaseIndex].duration;
@@ -203,7 +203,7 @@ void QQuickUniversalProgressStripAnimatorJob::writeBack()
void QQuickUniversalProgressStripAnimatorJob::nodeWasDestroyed()
{
- m_node = Q_NULLPTR;
+ m_node = nullptr;
}
void QQuickUniversalProgressStripAnimatorJob::afterNodeSync()
@@ -229,7 +229,7 @@ QQuickAnimatorJob *QQuickUniversalProgressStripAnimator::createJob() const
}
QQuickUniversalProgressStrip::QQuickUniversalProgressStrip(QQuickItem *parent)
- : QQuickItem(parent), m_color(Qt::black)
+ : QQuickItem(parent), m_color(Qt::black), m_progress(0.0), m_indeterminate(false)
{
setFlag(ItemHasContents);
}
@@ -241,25 +241,67 @@ QColor QQuickUniversalProgressStrip::color() const
void QQuickUniversalProgressStrip::setColor(const QColor &color)
{
- if (m_color != color) {
- m_color = color;
- update();
- emit colorChanged();
- }
+ if (m_color == color)
+ return;
+
+ m_color = color;
+ update();
+}
+
+qreal QQuickUniversalProgressStrip::progress() const
+{
+ return m_progress;
+}
+
+void QQuickUniversalProgressStrip::setProgress(qreal progress)
+{
+ if (progress == m_progress)
+ return;
+
+ m_progress = progress;
+ update();
+}
+
+bool QQuickUniversalProgressStrip::isIndeterminate() const
+{
+ return m_indeterminate;
+}
+
+void QQuickUniversalProgressStrip::setIndeterminate(bool indeterminate)
+{
+ if (indeterminate == m_indeterminate)
+ return;
+
+ m_indeterminate = indeterminate;
+ update();
}
QSGNode *QQuickUniversalProgressStrip::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *)
{
QQuickItemPrivate *d = QQuickItemPrivate::get(this);
- if (!oldNode)
- oldNode = new QSGSimpleRectNode(boundingRect(), Qt::transparent);
- static_cast<QSGSimpleRectNode *>(oldNode)->setRect(boundingRect());
+ QRectF bounds = boundingRect();
+ bounds.setHeight(implicitHeight());
+ bounds.moveTop((height() - bounds.height()) / 2.0);
+ if (!m_indeterminate)
+ bounds.setWidth(m_progress * bounds.width());
- QSGTransformNode *gridNode = static_cast<QSGTransformNode *>(oldNode->firstChild());
+ QSGSimpleRectNode *geometryNode = static_cast<QSGSimpleRectNode *>(oldNode);
+ if (!geometryNode)
+ geometryNode = new QSGSimpleRectNode(bounds, Qt::transparent);
+ geometryNode->setRect(bounds);
+ geometryNode->setColor(m_indeterminate ? Qt::transparent : m_color);
+
+ if (!m_indeterminate) {
+ while (QSGNode *node = geometryNode->firstChild())
+ delete node;
+ return geometryNode;
+ }
+
+ QSGTransformNode *gridNode = static_cast<QSGTransformNode *>(geometryNode->firstChild());
if (!gridNode) {
gridNode = new QSGTransformNode;
- oldNode->appendChildNode(gridNode);
+ geometryNode->appendChildNode(gridNode);
}
Q_ASSERT(gridNode->type() == QSGNode::TransformNodeType);
@@ -298,7 +340,7 @@ QSGNode *QQuickUniversalProgressStrip::updatePaintNode(QSGNode *oldNode, UpdateP
borderNode = borderNode->nextSibling();
}
- return oldNode;
+ return geometryNode;
}
QT_END_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalprogressstrip_p.h b/src/imports/controls/universal/qquickuniversalprogressstrip_p.h
index b61e73c6..89350e4d 100644
--- a/src/imports/controls/universal/qquickuniversalprogressstrip_p.h
+++ b/src/imports/controls/universal/qquickuniversalprogressstrip_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -56,22 +56,29 @@ QT_BEGIN_NAMESPACE
class QQuickUniversalProgressStrip : public QQuickItem
{
Q_OBJECT
- Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
+ Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL)
+ Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL)
public:
- QQuickUniversalProgressStrip(QQuickItem *parent = Q_NULLPTR);
+ QQuickUniversalProgressStrip(QQuickItem *parent = nullptr);
QColor color() const;
void setColor(const QColor &color);
-Q_SIGNALS:
- void colorChanged();
+ qreal progress() const;
+ void setProgress(qreal progress);
+
+ bool isIndeterminate() const;
+ void setIndeterminate(bool indeterminate);
protected:
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
private:
QColor m_color;
+ qreal m_progress;
+ bool m_indeterminate;
};
class QQuickUniversalProgressStripAnimator : public QQuickAnimator
@@ -79,11 +86,11 @@ class QQuickUniversalProgressStripAnimator : public QQuickAnimator
Q_OBJECT
public:
- QQuickUniversalProgressStripAnimator(QObject *parent = Q_NULLPTR);
+ QQuickUniversalProgressStripAnimator(QObject *parent = nullptr);
protected:
- QString propertyName() const Q_DECL_OVERRIDE;
- QQuickAnimatorJob *createJob() const Q_DECL_OVERRIDE;
+ QString propertyName() const override;
+ QQuickAnimatorJob *createJob() const override;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalstyle.cpp b/src/imports/controls/universal/qquickuniversalstyle.cpp
index 2f9c86cb..2328f1a5 100644
--- a/src/imports/controls/universal/qquickuniversalstyle.cpp
+++ b/src/imports/controls/universal/qquickuniversalstyle.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -39,11 +39,11 @@
#include <QtCore/qdebug.h>
#include <QtCore/qsettings.h>
#include <QtQml/qqmlinfo.h>
-#include <QtLabsControls/private/qquickstyle_p.h>
+#include <QtQuickControls2/private/qquickstyleattached_p.h>
QT_BEGIN_NAMESPACE
-static QColor qquickuniversal_light_color(QQuickUniversalStyle::SystemColor role)
+static QRgb qquickuniversal_light_color(QQuickUniversalStyle::SystemColor role)
{
static const QRgb colors[] = {
0xFFFFFFFF, // SystemAltHighColor
@@ -71,10 +71,10 @@ static QColor qquickuniversal_light_color(QQuickUniversalStyle::SystemColor role
0x19000000, // SystemListLowColor
0x33000000 // SystemListMediumColor
};
- return QColor::fromRgba(colors[role]);
+ return colors[role];
}
-static QColor qquickuniversal_dark_color(QQuickUniversalStyle::SystemColor role)
+static QRgb qquickuniversal_dark_color(QQuickUniversalStyle::SystemColor role)
{
static const QRgb colors[] = {
0xFF000000, // SystemAltHighColor
@@ -102,10 +102,10 @@ static QColor qquickuniversal_dark_color(QQuickUniversalStyle::SystemColor role)
0x19FFFFFF, // SystemListLowColor
0x33FFFFFF // SystemListMediumColor
};
- return QColor::fromRgba(colors[role]);
+ return colors[role];
}
-static QRgb qquickuniversal_accent_color(QQuickUniversalStyle::Accent accent)
+static QRgb qquickuniversal_accent_color(QQuickUniversalStyle::Color accent)
{
static const QRgb colors[] = {
0xFFA4C400, // Lime
@@ -132,11 +132,22 @@ static QRgb qquickuniversal_accent_color(QQuickUniversalStyle::Accent accent)
return colors[accent];
}
-static QQuickUniversalStyle::Theme DefaultTheme = QQuickUniversalStyle::Light;
-static QRgb DefaultAccent = qquickuniversal_accent_color(QQuickUniversalStyle::Cobalt);
+// If no value was inherited from a parent or explicitly set, the "global" values are used.
+// The initial, default values of the globals are hard-coded here, but the environment
+// variables and .conf file override them if specified.
+static QQuickUniversalStyle::Theme GlobalTheme = QQuickUniversalStyle::Light;
+static QRgb GlobalAccent = qquickuniversal_accent_color(QQuickUniversalStyle::Cobalt);
+static QRgb GlobalForeground = qquickuniversal_light_color(QQuickUniversalStyle::BaseHigh);
+static QRgb GlobalBackground = qquickuniversal_light_color(QQuickUniversalStyle::AltHigh);
+// These represent whether a global foreground/background was set.
+// Each style's m_hasForeground/m_hasBackground are initialized to these values.
+static bool HasGlobalForeground = false;
+static bool HasGlobalBackground = false;
-QQuickUniversalStyle::QQuickUniversalStyle(QObject *parent) : QQuickStyle(parent),
- m_hasTheme(false), m_hasAccent(false), m_theme(DefaultTheme), m_accent(DefaultAccent)
+QQuickUniversalStyle::QQuickUniversalStyle(QObject *parent) : QQuickStyleAttached(parent),
+ m_explicitTheme(false), m_explicitAccent(false), m_explicitForeground(false), m_explicitBackground(false),
+ m_hasForeground(HasGlobalForeground), m_hasBackground(HasGlobalBackground), m_theme(GlobalTheme),
+ m_accent(GlobalAccent), m_foreground(GlobalForeground), m_background(GlobalBackground)
{
init();
}
@@ -153,28 +164,35 @@ QQuickUniversalStyle::Theme QQuickUniversalStyle::theme() const
void QQuickUniversalStyle::setTheme(Theme theme)
{
- m_hasTheme = true;
- if (m_theme != theme) {
- m_theme = theme;
- propagateTheme();
- emit themeChanged();
- emit paletteChanged();
- }
+ m_explicitTheme = true;
+ if (m_theme == theme)
+ return;
+
+ m_theme = theme;
+ propagateTheme();
+ emit themeChanged();
+ emit paletteChanged();
+ emit foregroundChanged();
+ emit backgroundChanged();
}
void QQuickUniversalStyle::inheritTheme(Theme theme)
{
- if (!m_hasTheme && m_theme != theme) {
- m_theme = theme;
- propagateTheme();
- emit themeChanged();
- emit paletteChanged();
- }
+ if (m_explicitTheme || m_theme == theme)
+ return;
+
+ m_theme = theme;
+ propagateTheme();
+ emit themeChanged();
+ emit paletteChanged();
+ emit foregroundChanged();
+ emit backgroundChanged();
}
void QQuickUniversalStyle::propagateTheme()
{
- foreach (QQuickStyle *child, childStyles()) {
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
if (universal)
universal->inheritTheme(m_theme);
@@ -183,11 +201,12 @@ void QQuickUniversalStyle::propagateTheme()
void QQuickUniversalStyle::resetTheme()
{
- if (m_hasTheme) {
- m_hasTheme = false;
- QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
- inheritTheme(universal ? universal->theme() : DefaultTheme);
- }
+ if (!m_explicitTheme)
+ return;
+
+ m_explicitTheme = false;
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ inheritTheme(universal ? universal->theme() : GlobalTheme);
}
QVariant QQuickUniversalStyle::accent() const
@@ -198,47 +217,32 @@ QVariant QQuickUniversalStyle::accent() const
void QQuickUniversalStyle::setAccent(const QVariant &var)
{
QRgb accent = 0;
- if (var.type() == QVariant::Int) {
- int val = var.toInt();
- if (val < Lime || val > Taupe) {
- qmlInfo(parent()) << "unknown Universal.accent value: " << val;
- return;
- }
- accent = qquickuniversal_accent_color(static_cast<Accent>(val));
- } else {
- int val = QMetaEnum::fromType<Accent>().keyToValue(var.toByteArray());
- if (val != -1) {
- accent = qquickuniversal_accent_color(static_cast<Accent>(val));
- } else {
- QColor color(var.toString());
- if (!color.isValid()) {
- qmlInfo(parent()) << "unknown Universal.accent value: " << var.toString();
- return;
- }
- accent = color.rgba();
- }
- }
+ if (!variantToRgba(var, "accent", &accent))
+ return;
- m_hasAccent = true;
- if (m_accent != accent) {
- m_accent = accent;
- propagateAccent();
- emit accentChanged();
- }
+ m_explicitAccent = true;
+ if (m_accent == accent)
+ return;
+
+ m_accent = accent;
+ propagateAccent();
+ emit accentChanged();
}
void QQuickUniversalStyle::inheritAccent(QRgb accent)
{
- if (!m_hasAccent && m_accent != accent) {
- m_accent = accent;
- propagateAccent();
- emit accentChanged();
- }
+ if (m_explicitAccent || m_accent == accent)
+ return;
+
+ m_accent = accent;
+ propagateAccent();
+ emit accentChanged();
}
void QQuickUniversalStyle::propagateAccent()
{
- foreach (QQuickStyle *child, childStyles()) {
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
if (universal)
universal->inheritAccent(m_accent);
@@ -247,145 +251,263 @@ void QQuickUniversalStyle::propagateAccent()
void QQuickUniversalStyle::resetAccent()
{
- if (m_hasAccent) {
- m_hasAccent = false;
- QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
- inheritAccent(universal ? universal->m_accent : DefaultAccent);
+ if (!m_explicitAccent)
+ return;
+
+ m_explicitAccent = false;
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ inheritAccent(universal ? universal->m_accent : GlobalAccent);
+}
+
+QVariant QQuickUniversalStyle::foreground() const
+{
+ if (m_hasForeground)
+ return QColor::fromRgba(m_foreground);
+ return baseHighColor();
+}
+
+void QQuickUniversalStyle::setForeground(const QVariant &var)
+{
+ QRgb foreground = 0;
+ if (!variantToRgba(var, "foreground", &foreground))
+ return;
+
+ m_hasForeground = true;
+ m_explicitForeground = true;
+ if (m_foreground == foreground)
+ return;
+
+ m_foreground = foreground;
+ propagateForeground();
+ emit foregroundChanged();
+}
+
+void QQuickUniversalStyle::inheritForeground(QRgb foreground, bool has)
+{
+ if (m_explicitForeground || m_foreground == foreground)
+ return;
+
+ m_hasForeground = has;
+ m_foreground = foreground;
+ propagateForeground();
+ emit foregroundChanged();
+}
+
+void QQuickUniversalStyle::propagateForeground()
+{
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
+ if (universal)
+ universal->inheritForeground(m_foreground, m_hasForeground);
+ }
+}
+
+void QQuickUniversalStyle::resetForeground()
+{
+ if (!m_explicitForeground)
+ return;
+
+ m_hasForeground = false;
+ m_explicitForeground = false;
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ inheritForeground(universal ? universal->m_foreground : GlobalForeground, universal ? universal->m_hasForeground : false);
+}
+
+QVariant QQuickUniversalStyle::background() const
+{
+ if (m_hasBackground)
+ return QColor::fromRgba(m_background);
+ return altHighColor();
+}
+
+void QQuickUniversalStyle::setBackground(const QVariant &var)
+{
+ QRgb background = 0;
+ if (!variantToRgba(var, "background", &background))
+ return;
+
+ m_hasBackground = true;
+ m_explicitBackground = true;
+ if (m_background == background)
+ return;
+
+ m_background = background;
+ propagateBackground();
+ emit backgroundChanged();
+}
+
+void QQuickUniversalStyle::inheritBackground(QRgb background, bool has)
+{
+ if (m_explicitBackground || m_background == background)
+ return;
+
+ m_hasBackground = has;
+ m_background = background;
+ propagateBackground();
+ emit backgroundChanged();
+}
+
+void QQuickUniversalStyle::propagateBackground()
+{
+ const auto styles = childStyles();
+ for (QQuickStyleAttached *child : styles) {
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(child);
+ if (universal)
+ universal->inheritBackground(m_background, m_hasBackground);
}
}
+void QQuickUniversalStyle::resetBackground()
+{
+ if (!m_explicitBackground)
+ return;
+
+ m_hasBackground = false;
+ m_explicitBackground = false;
+ QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(parentStyle());
+ inheritBackground(universal ? universal->m_background : GlobalBackground, universal ? universal->m_hasBackground : false);
+}
+
+QColor QQuickUniversalStyle::color(Color color) const
+{
+ return qquickuniversal_accent_color(color);
+}
+
QColor QQuickUniversalStyle::altHighColor() const
{
- return getColor(AltHigh);
+ return systemColor(AltHigh);
}
QColor QQuickUniversalStyle::altLowColor() const
{
- return getColor(AltLow);
+ return systemColor(AltLow);
}
QColor QQuickUniversalStyle::altMediumColor() const
{
- return getColor(AltMedium);
+ return systemColor(AltMedium);
}
QColor QQuickUniversalStyle::altMediumHighColor() const
{
- return getColor(AltMediumHigh);
+ return systemColor(AltMediumHigh);
}
QColor QQuickUniversalStyle::altMediumLowColor() const
{
- return getColor(AltMediumLow);
+ return systemColor(AltMediumLow);
}
QColor QQuickUniversalStyle::baseHighColor() const
{
- return getColor(BaseHighColor);
+ return systemColor(BaseHigh);
}
QColor QQuickUniversalStyle::baseLowColor() const
{
- return getColor(BaseLow);
+ return systemColor(BaseLow);
}
QColor QQuickUniversalStyle::baseMediumColor() const
{
- return getColor(BaseMedium);
+ return systemColor(BaseMedium);
}
QColor QQuickUniversalStyle::baseMediumHighColor() const
{
- return getColor(BaseMediumHigh);
+ return systemColor(BaseMediumHigh);
}
QColor QQuickUniversalStyle::baseMediumLowColor() const
{
- return getColor(BaseMediumLow);
+ return systemColor(BaseMediumLow);
}
QColor QQuickUniversalStyle::chromeAltLowColor() const
{
- return getColor(ChromeAltLow);
+ return systemColor(ChromeAltLow);
}
QColor QQuickUniversalStyle::chromeBlackHighColor() const
{
- return getColor(ChromeBlackHigh);
+ return systemColor(ChromeBlackHigh);
}
QColor QQuickUniversalStyle::chromeBlackLowColor() const
{
- return getColor(ChromeBlackLow);
+ return systemColor(ChromeBlackLow);
}
QColor QQuickUniversalStyle::chromeBlackMediumLowColor() const
{
- return getColor(ChromeBlackMediumLow);
+ return systemColor(ChromeBlackMediumLow);
}
QColor QQuickUniversalStyle::chromeBlackMediumColor() const
{
- return getColor(ChromeBlackMedium);
+ return systemColor(ChromeBlackMedium);
}
QColor QQuickUniversalStyle::chromeDisabledHighColor() const
{
- return getColor(ChromeDisabledHigh);
+ return systemColor(ChromeDisabledHigh);
}
QColor QQuickUniversalStyle::chromeDisabledLowColor() const
{
- return getColor(ChromeDisabledLow);
+ return systemColor(ChromeDisabledLow);
}
QColor QQuickUniversalStyle::chromeHighColor() const
{
- return getColor(ChromeHigh);
+ return systemColor(ChromeHigh);
}
QColor QQuickUniversalStyle::chromeLowColor() const
{
- return getColor(ChromeLow);
+ return systemColor(ChromeLow);
}
QColor QQuickUniversalStyle::chromeMediumColor() const
{
- return getColor(ChromeMedium);
+ return systemColor(ChromeMedium);
}
QColor QQuickUniversalStyle::chromeMediumLowColor() const
{
- return getColor(ChromeMediumLow);
+ return systemColor(ChromeMediumLow);
}
QColor QQuickUniversalStyle::chromeWhiteColor() const
{
- return getColor(ChromeWhite);
+ return systemColor(ChromeWhite);
}
QColor QQuickUniversalStyle::listLowColor() const
{
- return getColor(ListLow);
+ return systemColor(ListLow);
}
QColor QQuickUniversalStyle::listMediumColor() const
{
- return getColor(ListMedium);
+ return systemColor(ListMedium);
}
-QColor QQuickUniversalStyle::getColor(SystemColor role) const
+QColor QQuickUniversalStyle::systemColor(SystemColor role) const
{
- return m_theme == QQuickUniversalStyle::Dark ? qquickuniversal_dark_color(role) : qquickuniversal_light_color(role);
+ return QColor::fromRgba(m_theme == QQuickUniversalStyle::Dark ? qquickuniversal_dark_color(role) : qquickuniversal_light_color(role));
}
-void QQuickUniversalStyle::parentStyleChange(QQuickStyle *newParent, QQuickStyle *oldParent)
+void QQuickUniversalStyle::parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent)
{
Q_UNUSED(oldParent);
QQuickUniversalStyle *universal = qobject_cast<QQuickUniversalStyle *>(newParent);
if (universal) {
inheritTheme(universal->theme());
inheritAccent(universal->m_accent);
+ inheritForeground(universal->m_foreground, universal->m_hasForeground);
+ inheritBackground(universal->m_background, universal->m_hasBackground);
}
}
@@ -396,36 +518,99 @@ static Enum toEnumValue(const QByteArray &value, bool *ok)
return static_cast<Enum>(enumeration.keyToValue(value, ok));
}
+static QByteArray resolveSetting(const QByteArray &env, const QSharedPointer<QSettings> &settings, const QString &name)
+{
+ QByteArray value = qgetenv(env);
+ if (value.isNull() && !settings.isNull())
+ value = settings->value(name).toByteArray();
+ return value;
+}
+
void QQuickUniversalStyle::init()
{
- static bool defaultsInitialized = false;
- if (!defaultsInitialized) {
- QSharedPointer<QSettings> settings = QQuickStyle::settings(QStringLiteral("Universal"));
- if (!settings.isNull()) {
- bool ok = false;
- QByteArray value = settings->value(QStringLiteral("Theme")).toByteArray();
- Theme theme = toEnumValue<Theme>(value, &ok);
- if (ok)
- DefaultTheme = m_theme = theme;
- else if (!value.isEmpty())
- qWarning().nospace().noquote() << settings->fileName() << ": unknown Universal theme value: " << value;
-
- value = settings->value(QStringLiteral("Accent")).toByteArray();
- Accent accent = toEnumValue<Accent>(value, &ok);
- if (ok) {
- DefaultAccent = m_accent = qquickuniversal_accent_color(accent);
+ static bool globalsInitialized = false;
+ if (!globalsInitialized) {
+ QSharedPointer<QSettings> settings = QQuickStyleAttached::settings(QStringLiteral("Universal"));
+
+ bool ok = false;
+ QByteArray themeValue = resolveSetting("QT_QUICK_CONTROLS_UNIVERSAL_THEME", settings, QStringLiteral("Theme"));
+ Theme themeEnum = toEnumValue<Theme>(themeValue, &ok);
+ if (ok)
+ GlobalTheme = m_theme = themeEnum;
+ else if (!themeValue.isEmpty())
+ qWarning().nospace().noquote() << "Universal: unknown theme value: " << themeValue;
+
+ QByteArray accentValue = resolveSetting("QT_QUICK_CONTROLS_UNIVERSAL_ACCENT", settings, QStringLiteral("Accent"));
+ Color accentEnum = toEnumValue<Color>(accentValue, &ok);
+ if (ok) {
+ GlobalAccent = m_accent = qquickuniversal_accent_color(accentEnum);
+ } else if (!accentValue.isEmpty()) {
+ QColor color(accentValue.constData());
+ if (color.isValid())
+ GlobalAccent = m_accent = color.rgba();
+ else
+ qWarning().nospace().noquote() << "Universal: unknown accent value: " << accentValue;
+ }
+
+ QByteArray foregroundValue = resolveSetting("QT_QUICK_CONTROLS_UNIVERSAL_FOREGROUND", settings, QStringLiteral("Foreground"));
+ Color foregroundEnum = toEnumValue<Color>(foregroundValue, &ok);
+ if (ok) {
+ GlobalForeground = m_foreground = qquickuniversal_accent_color(foregroundEnum);
+ HasGlobalForeground = m_hasForeground = true;
+ } else if (!foregroundValue.isEmpty()) {
+ QColor color(foregroundValue.constData());
+ if (color.isValid()) {
+ GlobalForeground = m_foreground = color.rgba();
+ HasGlobalForeground = m_hasForeground = true;
+ } else {
+ qWarning().nospace().noquote() << "Universal: unknown foreground value: " << foregroundValue;
+ }
+ }
+
+ QByteArray backgroundValue = resolveSetting("QT_QUICK_CONTROLS_UNIVERSAL_BACKGROUND", settings, QStringLiteral("Background"));
+ Color backgroundEnum = toEnumValue<Color>(backgroundValue, &ok);
+ if (ok) {
+ GlobalBackground = m_background = qquickuniversal_accent_color(backgroundEnum);
+ HasGlobalBackground = m_hasBackground = true;
+ } else if (!backgroundValue.isEmpty()) {
+ QColor color(backgroundValue.constData());
+ if (color.isValid()) {
+ GlobalBackground = m_background = color.rgba();
+ HasGlobalBackground = m_hasBackground = true;
} else {
- QColor color(value.constData());
- if (color.isValid())
- DefaultAccent = m_accent = color.rgba();
- else if (!value.isEmpty())
- qWarning().nospace().noquote() << settings->fileName() << ": unknown Universal accent value: " << value;
+ qWarning().nospace().noquote() << "Universal: unknown background value: " << backgroundValue;
}
}
- defaultsInitialized = true;
+
+ globalsInitialized = true;
}
- QQuickStyle::init(); // TODO: lazy init?
+ QQuickStyleAttached::init(); // TODO: lazy init?
+}
+
+bool QQuickUniversalStyle::variantToRgba(const QVariant &var, const char *name, QRgb *rgba) const
+{
+ if (var.type() == QVariant::Int) {
+ int val = var.toInt();
+ if (val < Lime || val > Taupe) {
+ qmlInfo(parent()) << "unknown Universal." << name << " value: " << val;
+ return false;
+ }
+ *rgba = qquickuniversal_accent_color(static_cast<Color>(val));
+ } else {
+ int val = QMetaEnum::fromType<Color>().keyToValue(var.toByteArray());
+ if (val != -1) {
+ *rgba = qquickuniversal_accent_color(static_cast<Color>(val));
+ } else {
+ QColor color(var.toString());
+ if (!color.isValid()) {
+ qmlInfo(parent()) << "unknown Universal." << name << " value: " << var.toString();
+ return false;
+ }
+ *rgba = color.rgba();
+ }
+ }
+ return true;
}
QT_END_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversalstyle_p.h b/src/imports/controls/universal/qquickuniversalstyle_p.h
index 00a04c65..bf0a84d8 100644
--- a/src/imports/controls/universal/qquickuniversalstyle_p.h
+++ b/src/imports/controls/universal/qquickuniversalstyle_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -49,17 +49,19 @@
//
#include <QtGui/qcolor.h>
-#include <QtLabsControls/private/qquickstyle_p.h>
+#include <QtQuickControls2/private/qquickstyleattached_p.h>
QT_BEGIN_NAMESPACE
class QQuickUniversalStylePrivate;
-class QQuickUniversalStyle : public QQuickStyle
+class QQuickUniversalStyle : public QQuickStyleAttached
{
Q_OBJECT
Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL)
Q_PROPERTY(QVariant accent READ accent WRITE setAccent RESET resetAccent NOTIFY accentChanged FINAL)
+ Q_PROPERTY(QVariant foreground READ foreground WRITE setForeground RESET resetForeground NOTIFY foregroundChanged FINAL)
+ Q_PROPERTY(QVariant background READ background WRITE setBackground RESET resetBackground NOTIFY backgroundChanged FINAL)
Q_PROPERTY(QColor altHighColor READ altHighColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor altLowColor READ altLowColor NOTIFY paletteChanged FINAL)
@@ -87,7 +89,7 @@ class QQuickUniversalStyle : public QQuickStyle
Q_PROPERTY(QColor listMediumColor READ listMediumColor NOTIFY paletteChanged FINAL)
public:
- explicit QQuickUniversalStyle(QObject *parent = Q_NULLPTR);
+ explicit QQuickUniversalStyle(QObject *parent = nullptr);
static QQuickUniversalStyle *qmlAttachedProperties(QObject *object);
@@ -100,7 +102,7 @@ public:
void propagateTheme();
void resetTheme();
- enum Accent {
+ enum Color {
Lime,
Green,
Emerald,
@@ -122,7 +124,7 @@ public:
Mauve,
Taupe
};
- Q_ENUM(Accent)
+ Q_ENUM(Color)
QVariant accent() const;
void setAccent(const QVariant &accent);
@@ -130,6 +132,20 @@ public:
void propagateAccent();
void resetAccent();
+ QVariant foreground() const;
+ void setForeground(const QVariant &foreground);
+ void inheritForeground(QRgb foreground, bool has);
+ void propagateForeground();
+ void resetForeground();
+
+ QVariant background() const;
+ void setBackground(const QVariant &background);
+ void inheritBackground(QRgb background, bool has);
+ void propagateBackground();
+ void resetBackground();
+
+ Q_INVOKABLE QColor color(Color color) const;
+
QColor altHighColor() const;
QColor altLowColor() const;
QColor altMediumColor() const;
@@ -161,7 +177,7 @@ public:
AltMedium,
AltMediumHigh,
AltMediumLow,
- BaseHighColor,
+ BaseHigh,
BaseLow,
BaseMedium,
BaseMediumHigh,
@@ -182,23 +198,39 @@ public:
ListMedium
};
- QColor getColor(SystemColor role) const;
+ QColor systemColor(SystemColor role) const;
Q_SIGNALS:
void themeChanged();
void accentChanged();
+ void foregroundChanged();
+ void backgroundChanged();
void paletteChanged();
protected:
- void parentStyleChange(QQuickStyle *newParent, QQuickStyle *oldParent) Q_DECL_OVERRIDE;
+ void parentStyleChange(QQuickStyleAttached *newParent, QQuickStyleAttached *oldParent) override;
private:
void init();
-
- bool m_hasTheme;
- bool m_hasAccent;
+ bool variantToRgba(const QVariant &var, const char *name, QRgb *rgba) const;
+
+ // These reflect whether a color value was explicitly set on the specific
+ // item that this attached style object represents.
+ bool m_explicitTheme;
+ bool m_explicitAccent;
+ bool m_explicitForeground;
+ bool m_explicitBackground;
+ // These will be true when this item has an explicit or inherited foreground/background
+ // color, or these colors were declared globally via settings (e.g. conf or env vars).
+ // Some color properties of the style will return different values depending on whether
+ // or not these are set.
+ bool m_hasForeground;
+ bool m_hasBackground;
+ // The actual values for this item, whether explicit, inherited or globally set.
QQuickUniversalStyle::Theme m_theme;
QRgb m_accent;
+ QRgb m_foreground;
+ QRgb m_background;
};
QT_END_NAMESPACE
diff --git a/src/imports/controls/universal/qquickuniversaltheme.cpp b/src/imports/controls/universal/qquickuniversaltheme.cpp
index 290faa5d..dc516b45 100644
--- a/src/imports/controls/universal/qquickuniversaltheme.cpp
+++ b/src/imports/controls/universal/qquickuniversaltheme.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -37,17 +37,19 @@
#include "qquickuniversaltheme_p.h"
#include <QtGui/qfont.h>
+#include <QtGui/qfontinfo.h>
QT_BEGIN_NAMESPACE
QQuickUniversalTheme::QQuickUniversalTheme(QPlatformTheme *theme)
: QQuickProxyTheme(theme)
{
- const QFont font(QStringLiteral("Segoe UI"));
- if (font.exactMatch()) {
- systemFont.setFamily(font.family());
- groupBoxTitleFont.setFamily(font.family());
- tabButtonFont.setFamily(font.family());
+ const QFont font(QLatin1String("Segoe UI"));
+ if (QFontInfo(font).family() == QLatin1String("Segoe UI")) {
+ const QString family = font.family();
+ systemFont.setFamily(family);
+ groupBoxTitleFont.setFamily(family);
+ tabButtonFont.setFamily(family);
}
systemFont.setPixelSize(15);
@@ -59,10 +61,6 @@ QQuickUniversalTheme::QQuickUniversalTheme(QPlatformTheme *theme)
tabButtonFont.setWeight(QFont::Light);
}
-QQuickUniversalTheme::~QQuickUniversalTheme()
-{
-}
-
const QFont *QQuickUniversalTheme::font(QPlatformTheme::Font type) const
{
switch (type) {
diff --git a/src/imports/controls/universal/qquickuniversaltheme_p.h b/src/imports/controls/universal/qquickuniversaltheme_p.h
index 20243917..e2a3a436 100644
--- a/src/imports/controls/universal/qquickuniversaltheme_p.h
+++ b/src/imports/controls/universal/qquickuniversaltheme_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,8 +34,8 @@
**
****************************************************************************/
-#ifndef QQUICKUNIVERSALTHEME_H
-#define QQUICKUNIVERSALTHEME_H
+#ifndef QQUICKUNIVERSALTHEME_P_H
+#define QQUICKUNIVERSALTHEME_P_H
//
// W A R N I N G
@@ -48,20 +48,17 @@
// We mean it.
//
-#include <QtGui/qpa/qplatformtheme.h>
#include <QtGui/qfont.h>
-#include <QtLabsControls/private/qquickproxytheme_p.h>
+#include <QtQuickControls2/private/qquickproxytheme_p.h>
QT_BEGIN_NAMESPACE
class QQuickUniversalTheme : public QQuickProxyTheme
{
public:
- QQuickUniversalTheme(QPlatformTheme *theme);
+ explicit QQuickUniversalTheme(QPlatformTheme *theme = nullptr);
- ~QQuickUniversalTheme();
-
- const QFont *font(Font type = SystemFont) const Q_DECL_OVERRIDE;
+ const QFont *font(Font type = SystemFont) const override;
private:
QFont systemFont;
@@ -71,4 +68,4 @@ private:
QT_END_NAMESPACE
-#endif // QQUICKUNIVERSALTHEME_H
+#endif // QQUICKUNIVERSALTHEME_P_H
diff --git a/src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
index 8f6ed194..ddad6548 100644
--- a/src/imports/controls/universal/qtlabsuniversalstyleplugin.cpp
+++ b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
-** This file is part of the Qt Labs Controls module of the Qt Toolkit.
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
@@ -34,74 +34,78 @@
**
****************************************************************************/
-#include <QtQml/qqmlextensionplugin.h>
+#include <QtQuickControls2/private/qquickstyleplugin_p.h>
+
#include "qquickuniversalfocusrectangle_p.h"
-#include "qquickuniversalimageprovider_p.h"
#include "qquickuniversalprogressring_p.h"
#include "qquickuniversalprogressstrip_p.h"
#include "qquickuniversalstyle_p.h"
#include "qquickuniversaltheme_p.h"
-#include <QtGui/private/qguiapplication_p.h>
-#include <QtLabsControls/private/qquickstyleselector_p.h>
+#include <QtQuickControls2/private/qquickcolorimageprovider_p.h>
static inline void initResources()
{
- Q_INIT_RESOURCE(qtlabsuniversalstyleplugin);
+ Q_INIT_RESOURCE(qtquickcontrols2universalstyleplugin);
+#ifdef QT_STATIC
+ Q_INIT_RESOURCE(qmake_QtQuick_Controls_2_Universal);
+#endif
}
QT_BEGIN_NAMESPACE
-class QtLabsUniversalStylePlugin: public QQmlExtensionPlugin
+class QtQuickControls2UniversalStylePlugin: public QQuickStylePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
- ~QtLabsUniversalStylePlugin();
- void registerTypes(const char *uri) Q_DECL_OVERRIDE;
- void initializeEngine(QQmlEngine *engine, const char *uri) Q_DECL_OVERRIDE;
+ QtQuickControls2UniversalStylePlugin(QObject *parent = nullptr);
+
+ void registerTypes(const char *uri) override;
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
-private:
- QQuickProxyTheme *theme;
+ QString name() const override;
+ QQuickProxyTheme *createTheme() const override;
};
-QtLabsUniversalStylePlugin::~QtLabsUniversalStylePlugin()
+QtQuickControls2UniversalStylePlugin::QtQuickControls2UniversalStylePlugin(QObject *parent) : QQuickStylePlugin(parent)
{
- if (theme) {
- QPlatformTheme *old = theme->theme();
- QGuiApplicationPrivate::platform_theme = old;
- delete theme;
- }
+ initResources();
}
-void QtLabsUniversalStylePlugin::registerTypes(const char *uri)
+void QtQuickControls2UniversalStylePlugin::registerTypes(const char *uri)
{
- qmlRegisterUncreatableType<QQuickUniversalStyle>(uri, 1, 0, "Universal", tr("Universal is an attached property"));
+ qmlRegisterUncreatableType<QQuickUniversalStyle>(uri, 2, 0, "Universal", tr("Universal is an attached property"));
}
-void QtLabsUniversalStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
+void QtQuickControls2UniversalStylePlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
- QQuickStyleSelector selector;
- if (selector.style() == QLatin1String("universal")) {
- QPlatformTheme *old = QGuiApplicationPrivate::platform_theme;
- if (old) {
- QQuickProxyTheme *theme = new QQuickUniversalTheme(old);
- QGuiApplicationPrivate::platform_theme = theme;
- }
- }
+ QQuickStylePlugin::initializeEngine(engine, uri);
- initResources();
- engine->addImageProvider(QStringLiteral("universal"), new QQuickUniversalImageProvider);
+ engine->addImageProvider(name(), new QQuickColorImageProvider(QStringLiteral(":/qt-project.org/imports/QtQuick/Controls.2/Universal/images")));
QByteArray import = QByteArray(uri) + ".impl";
- qmlRegisterType<QQuickUniversalFocusRectangle>(import, 1, 0, "FocusRectangle");
- qmlRegisterType<QQuickUniversalProgressRing>(import, 1, 0, "ProgressRing");
- qmlRegisterType<QQuickUniversalProgressRingAnimator>(import, 1, 0, "ProgressRingAnimator");
- qmlRegisterType<QQuickUniversalProgressStrip>(import, 1, 0, "ProgressStrip");
- qmlRegisterType<QQuickUniversalProgressStripAnimator>(import, 1, 0, "ProgressStripAnimator");
+ qmlRegisterType<QQuickUniversalFocusRectangle>(import, 2, 0, "FocusRectangle");
+ qmlRegisterType<QQuickUniversalProgressRing>(import, 2, 0, "ProgressRing");
+ qmlRegisterType<QQuickUniversalProgressRingAnimator>(import, 2, 0, "ProgressRingAnimator");
+ qmlRegisterType<QQuickUniversalProgressStrip>(import, 2, 0, "ProgressStrip");
+ qmlRegisterType<QQuickUniversalProgressStripAnimator>(import, 2, 0, "ProgressStripAnimator");
+
+ qmlRegisterType(typeUrl(QStringLiteral("RadioIndicator.qml")), import, 2, 0, "RadioIndicator");
+ qmlRegisterType(typeUrl(QStringLiteral("SwitchIndicator.qml")), import, 2, 0, "SwitchIndicator");
+}
+
+QString QtQuickControls2UniversalStylePlugin::name() const
+{
+ return QStringLiteral("universal");
+}
+
+QQuickProxyTheme *QtQuickControls2UniversalStylePlugin::createTheme() const
+{
+ return new QQuickUniversalTheme;
}
QT_END_NAMESPACE
-#include "qtlabsuniversalstyleplugin.moc"
+#include "qtquickcontrols2universalstyleplugin.moc"
diff --git a/src/imports/controls/universal/qtlabsuniversalstyleplugin.qrc b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc
index 5a0249d7..cd9ea61f 100644
--- a/src/imports/controls/universal/qtlabsuniversalstyleplugin.qrc
+++ b/src/imports/controls/universal/qtquickcontrols2universalstyleplugin.qrc
@@ -1,5 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
-<qresource prefix="qt-project.org/imports/Qt/labs/controls/universal">
+<qresource prefix="qt-project.org/imports/QtQuick/Controls.2/Universal">
<file>images/checkmark.png</file>
<file>images/checkmark@2x.png</file>
<file>images/checkmark@3x.png</file>
diff --git a/src/imports/controls/universal/universal.pri b/src/imports/controls/universal/universal.pri
index c7717d78..61b6912a 100644
--- a/src/imports/controls/universal/universal.pri
+++ b/src/imports/controls/universal/universal.pri
@@ -3,8 +3,11 @@ QML_FILES += \
$$PWD/BusyIndicator.qml \
$$PWD/Button.qml \
$$PWD/CheckBox.qml \
+ $$PWD/CheckDelegate.qml \
+ $$PWD/CheckIndicator.qml \
$$PWD/ComboBox.qml \
$$PWD/Dial.qml \
+ $$PWD/Drawer.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
$$PWD/ItemDelegate.qml \
@@ -17,12 +20,17 @@ QML_FILES += \
$$PWD/Popup.qml \
$$PWD/ProgressBar.qml \
$$PWD/RadioButton.qml \
+ $$PWD/RadioDelegate.qml \
+ $$PWD/RadioIndicator.qml \
$$PWD/RangeSlider.qml \
$$PWD/ScrollBar.qml \
$$PWD/ScrollIndicator.qml \
$$PWD/Slider.qml \
$$PWD/SpinBox.qml \
$$PWD/StackView.qml \
+ $$PWD/SwipeDelegate.qml \
+ $$PWD/SwitchDelegate.qml \
+ $$PWD/SwitchIndicator.qml \
$$PWD/Switch.qml \
$$PWD/TabBar.qml \
$$PWD/TabButton.qml \
@@ -30,11 +38,11 @@ QML_FILES += \
$$PWD/TextField.qml \
$$PWD/ToolBar.qml \
$$PWD/ToolButton.qml \
+ $$PWD/ToolTip.qml \
$$PWD/Tumbler.qml
HEADERS += \
$$PWD/qquickuniversalfocusrectangle_p.h \
- $$PWD/qquickuniversalimageprovider_p.h \
$$PWD/qquickuniversalprogressring_p.h \
$$PWD/qquickuniversalprogressstrip_p.h \
$$PWD/qquickuniversalstyle_p.h \
@@ -42,7 +50,6 @@ HEADERS += \
SOURCES += \
$$PWD/qquickuniversalfocusrectangle.cpp \
- $$PWD/qquickuniversalimageprovider.cpp \
$$PWD/qquickuniversalprogressring.cpp \
$$PWD/qquickuniversalprogressstrip.cpp \
$$PWD/qquickuniversalstyle.cpp \
diff --git a/src/imports/controls/universal/universal.pro b/src/imports/controls/universal/universal.pro
index 88bad8f7..f10f21b0 100644
--- a/src/imports/controls/universal/universal.pro
+++ b/src/imports/controls/universal/universal.pro
@@ -1,9 +1,9 @@
-TARGET = qtlabsuniversalstyleplugin
-TARGETPATH = Qt/labs/controls/universal
-IMPORT_VERSION = 1.0
+TARGET = qtquickcontrols2universalstyleplugin
+TARGETPATH = QtQuick/Controls.2/Universal
+IMPORT_VERSION = 2.0
QT += qml quick
-QT_PRIVATE += core-private gui-private qml-private quick-private labstemplates-private labscontrols-private
+QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
@@ -11,10 +11,10 @@ OTHER_FILES += \
qmldir
SOURCES += \
- $$PWD/qtlabsuniversalstyleplugin.cpp
+ $$PWD/qtquickcontrols2universalstyleplugin.cpp
RESOURCES += \
- $$PWD/qtlabsuniversalstyleplugin.qrc
+ $$PWD/qtquickcontrols2universalstyleplugin.qrc
include(universal.pri)