From 966c0348c7a19a17c5be53f87ef54d4fbab8d8c8 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 26 Sep 2016 12:48:47 +0200 Subject: Refactor tst_snippets to make it easier to add non-screenshot snippets Add a separate test for non-screenshot snippets and move the screenshot snippets to their own folder. Change-Id: Ic3e7370321e346b83f7df42205e204d1265ce5b0 Reviewed-by: J-P Nurmi --- src/imports/controls/doc/qtquickcontrols2.qdocconf | 3 +- .../doc/snippets/qtlabscalendar-calendarmodel.qml | 57 ----------- .../qtlabscalendar-dayofweekrow-layout.qml | 47 --------- .../doc/snippets/qtlabscalendar-dayofweekrow.qml | 35 ------- .../snippets/qtlabscalendar-monthgrid-layout.qml | 61 ----------- .../doc/snippets/qtlabscalendar-monthgrid.qml | 37 ------- .../qtlabscalendar-weeknumbercolumn-layout.qml | 49 --------- .../snippets/qtlabscalendar-weeknumbercolumn.qml | 37 ------- .../qtquickcontrols2-busyindicator-custom.qml | 88 ---------------- .../snippets/qtquickcontrols2-button-custom.qml | 55 ---------- .../snippets/qtquickcontrols2-button-disabled.qml | 35 ------- .../snippets/qtquickcontrols2-button-focused.qml | 35 ------- .../snippets/qtquickcontrols2-button-normal.qml | 34 ------- .../snippets/qtquickcontrols2-button-pressed.qml | 35 ------- .../snippets/qtquickcontrols2-checkbox-checked.qml | 34 ------- .../snippets/qtquickcontrols2-checkbox-custom.qml | 66 ------------ .../qtquickcontrols2-checkbox-disabled.qml | 34 ------- .../snippets/qtquickcontrols2-checkbox-focused.qml | 34 ------- .../snippets/qtquickcontrols2-checkbox-normal.qml | 33 ------ .../qtquickcontrols2-checkdelegate-custom.qml | 75 -------------- .../snippets/qtquickcontrols2-combobox-custom.qml | 113 --------------------- .../qtquickcontrols2-combobox-delegate.qml | 53 ---------- .../snippets/qtquickcontrols2-combobox-popup.qml | 47 --------- .../doc/snippets/qtquickcontrols2-dial-custom.qml | 67 ------------ .../doc/snippets/qtquickcontrols2-dial-handle.qml | 41 -------- .../doc/snippets/qtquickcontrols2-frame-custom.qml | 43 -------- .../doc/snippets/qtquickcontrols2-frame.qml | 41 -------- .../qtquickcontrols2-groupbox-checkable.qml | 48 --------- .../snippets/qtquickcontrols2-groupbox-custom.qml | 49 --------- .../snippets/qtquickcontrols2-groupbox-label.qml | 41 -------- .../doc/snippets/qtquickcontrols2-groupbox.qml | 42 -------- .../qtquickcontrols2-itemdelegate-custom.qml | 61 ----------- .../doc/snippets/qtquickcontrols2-itemdelegate.qml | 46 --------- .../doc/snippets/qtquickcontrols2-label-custom.qml | 36 ------- .../doc/snippets/qtquickcontrols2-label.qml | 35 ------- .../doc/snippets/qtquickcontrols2-menu-custom.qml | 60 ----------- .../qtquickcontrols2-pageindicator-custom.qml | 53 ---------- .../qtquickcontrols2-pageindicator-delegate.qml | 40 -------- .../qtquickcontrols2-pageindicator-interactive.qml | 58 ----------- .../snippets/qtquickcontrols2-pageindicator.qml | 35 ------- .../doc/snippets/qtquickcontrols2-pane-custom.qml | 41 -------- .../doc/snippets/qtquickcontrols2-pane.qml | 41 -------- .../qtquickcontrols2-progressbar-custom.qml | 57 ----------- .../qtquickcontrols2-progressbar-disabled.qml | 34 ------- .../qtquickcontrols2-progressbar-normal.qml | 33 ------ .../qtquickcontrols2-radiobutton-checked.qml | 34 ------- .../qtquickcontrols2-radiobutton-custom.qml | 66 ------------ .../qtquickcontrols2-radiobutton-disabled.qml | 34 ------- .../qtquickcontrols2-radiobutton-focused.qml | 34 ------- .../qtquickcontrols2-radiobutton-normal.qml | 33 ------ .../qtquickcontrols2-radiodelegate-custom.qml | 75 -------------- .../qtquickcontrols2-rangeslider-custom.qml | 76 -------------- .../qtquickcontrols2-rangeslider-disabled.qml | 35 ------- ...kcontrols2-rangeslider-first-handle-focused.qml | 35 ------- .../qtquickcontrols2-rangeslider-first-handle.qml | 39 ------- .../qtquickcontrols2-rangeslider-normal.qml | 34 ------- ...controls2-rangeslider-second-handle-focused.qml | 35 ------- .../qtquickcontrols2-rangeslider-second-handle.qml | 39 ------- .../snippets/qtquickcontrols2-scrollbar-active.qml | 46 --------- .../snippets/qtquickcontrols2-scrollbar-custom.qml | 46 --------- .../qtquickcontrols2-scrollindicator-active.qml | 46 --------- .../qtquickcontrols2-scrollindicator-custom.qml | 45 -------- .../snippets/qtquickcontrols2-slider-custom.qml | 64 ------------ .../snippets/qtquickcontrols2-slider-disabled.qml | 34 ------- .../snippets/qtquickcontrols2-slider-focused.qml | 34 ------- .../snippets/qtquickcontrols2-slider-handle.qml | 38 ------- .../snippets/qtquickcontrols2-slider-normal.qml | 33 ------ .../snippets/qtquickcontrols2-spinbox-custom.qml | 96 ----------------- .../snippets/qtquickcontrols2-spinbox-double.qml | 56 ---------- .../doc/snippets/qtquickcontrols2-spinbox-down.qml | 38 ------- .../snippets/qtquickcontrols2-spinbox-textual.qml | 55 ---------- .../doc/snippets/qtquickcontrols2-spinbox-up.qml | 38 ------- .../doc/snippets/qtquickcontrols2-spinbox.qml | 35 ------- .../qtquickcontrols2-swipedelegate-custom.qml | 74 -------------- .../qtquickcontrols2-swipeview-indicator.qml | 63 ------------ .../snippets/qtquickcontrols2-switch-checked.qml | 34 ------- .../snippets/qtquickcontrols2-switch-custom.qml | 65 ------------ .../snippets/qtquickcontrols2-switch-disabled.qml | 34 ------- .../snippets/qtquickcontrols2-switch-focused.qml | 34 ------- .../snippets/qtquickcontrols2-switch-normal.qml | 33 ------ .../qtquickcontrols2-switchdelegate-custom.qml | 74 -------------- .../snippets/qtquickcontrols2-tabbar-custom.qml | 49 --------- .../snippets/qtquickcontrols2-tabbar-flickable.qml | 50 --------- .../doc/snippets/qtquickcontrols2-tabbar.qml | 64 ------------ .../doc/snippets/qtquickcontrols2-tabbutton.qml | 43 -------- .../snippets/qtquickcontrols2-textarea-custom.qml | 42 -------- .../qtquickcontrols2-textarea-flickable.qml | 50 --------- .../snippets/qtquickcontrols2-textfield-custom.qml | 43 -------- .../qtquickcontrols2-textfield-disabled.qml | 35 ------- .../qtquickcontrols2-textfield-focused.qml | 35 ------- .../snippets/qtquickcontrols2-textfield-normal.qml | 34 ------- .../snippets/qtquickcontrols2-toolbar-custom.qml | 59 ----------- .../doc/snippets/qtquickcontrols2-toolbar.qml | 47 --------- .../qtquickcontrols2-toolbutton-custom.qml | 55 ---------- .../snippets/qtquickcontrols2-tooltip-hover.qml | 41 -------- .../qtquickcontrols2-tooltip-pressandhold.qml | 39 ------- .../snippets/qtquickcontrols2-tooltip-slider.qml | 53 ---------- .../doc/snippets/qtquickcontrols2-tooltip.qml | 51 ---------- .../snippets/qtquickcontrols2-tumbler-custom.qml | 79 -------------- .../snippets/qtquickcontrols2-tumbler-delegate.qml | 47 --------- .../screenshots/qtlabscalendar-calendarmodel.qml | 57 +++++++++++ .../qtlabscalendar-dayofweekrow-layout.qml | 47 +++++++++ .../screenshots/qtlabscalendar-dayofweekrow.qml | 35 +++++++ .../qtlabscalendar-monthgrid-layout.qml | 61 +++++++++++ .../screenshots/qtlabscalendar-monthgrid.qml | 37 +++++++ .../qtlabscalendar-weeknumbercolumn-layout.qml | 49 +++++++++ .../qtlabscalendar-weeknumbercolumn.qml | 37 +++++++ .../qtquickcontrols2-busyindicator-custom.qml | 88 ++++++++++++++++ .../screenshots/qtquickcontrols2-button-custom.qml | 55 ++++++++++ .../qtquickcontrols2-button-disabled.qml | 35 +++++++ .../qtquickcontrols2-button-focused.qml | 35 +++++++ .../screenshots/qtquickcontrols2-button-normal.qml | 34 +++++++ .../qtquickcontrols2-button-pressed.qml | 35 +++++++ .../qtquickcontrols2-checkbox-checked.qml | 34 +++++++ .../qtquickcontrols2-checkbox-custom.qml | 66 ++++++++++++ .../qtquickcontrols2-checkbox-disabled.qml | 34 +++++++ .../qtquickcontrols2-checkbox-focused.qml | 34 +++++++ .../qtquickcontrols2-checkbox-normal.qml | 33 ++++++ .../qtquickcontrols2-checkdelegate-custom.qml | 75 ++++++++++++++ .../qtquickcontrols2-combobox-custom.qml | 113 +++++++++++++++++++++ .../qtquickcontrols2-combobox-delegate.qml | 53 ++++++++++ .../qtquickcontrols2-combobox-popup.qml | 47 +++++++++ .../screenshots/qtquickcontrols2-dial-custom.qml | 67 ++++++++++++ .../screenshots/qtquickcontrols2-dial-handle.qml | 41 ++++++++ .../screenshots/qtquickcontrols2-frame-custom.qml | 43 ++++++++ .../screenshots/qtquickcontrols2-frame.qml | 41 ++++++++ .../qtquickcontrols2-groupbox-checkable.qml | 48 +++++++++ .../qtquickcontrols2-groupbox-custom.qml | 49 +++++++++ .../qtquickcontrols2-groupbox-label.qml | 41 ++++++++ .../screenshots/qtquickcontrols2-groupbox.qml | 42 ++++++++ .../qtquickcontrols2-itemdelegate-custom.qml | 61 +++++++++++ .../screenshots/qtquickcontrols2-itemdelegate.qml | 46 +++++++++ .../screenshots/qtquickcontrols2-label-custom.qml | 36 +++++++ .../screenshots/qtquickcontrols2-label.qml | 35 +++++++ .../screenshots/qtquickcontrols2-menu-custom.qml | 60 +++++++++++ .../qtquickcontrols2-pageindicator-custom.qml | 53 ++++++++++ .../qtquickcontrols2-pageindicator-delegate.qml | 40 ++++++++ .../qtquickcontrols2-pageindicator-interactive.qml | 58 +++++++++++ .../screenshots/qtquickcontrols2-pageindicator.qml | 35 +++++++ .../screenshots/qtquickcontrols2-pane-custom.qml | 41 ++++++++ .../snippets/screenshots/qtquickcontrols2-pane.qml | 41 ++++++++ .../qtquickcontrols2-progressbar-custom.qml | 57 +++++++++++ .../qtquickcontrols2-progressbar-disabled.qml | 34 +++++++ .../qtquickcontrols2-progressbar-normal.qml | 33 ++++++ .../qtquickcontrols2-radiobutton-checked.qml | 34 +++++++ .../qtquickcontrols2-radiobutton-custom.qml | 66 ++++++++++++ .../qtquickcontrols2-radiobutton-disabled.qml | 34 +++++++ .../qtquickcontrols2-radiobutton-focused.qml | 34 +++++++ .../qtquickcontrols2-radiobutton-normal.qml | 33 ++++++ .../qtquickcontrols2-radiodelegate-custom.qml | 75 ++++++++++++++ .../qtquickcontrols2-rangeslider-custom.qml | 76 ++++++++++++++ .../qtquickcontrols2-rangeslider-disabled.qml | 35 +++++++ ...kcontrols2-rangeslider-first-handle-focused.qml | 35 +++++++ .../qtquickcontrols2-rangeslider-first-handle.qml | 39 +++++++ .../qtquickcontrols2-rangeslider-normal.qml | 34 +++++++ ...controls2-rangeslider-second-handle-focused.qml | 35 +++++++ .../qtquickcontrols2-rangeslider-second-handle.qml | 39 +++++++ .../qtquickcontrols2-scrollbar-active.qml | 46 +++++++++ .../qtquickcontrols2-scrollbar-custom.qml | 46 +++++++++ .../qtquickcontrols2-scrollindicator-active.qml | 46 +++++++++ .../qtquickcontrols2-scrollindicator-custom.qml | 45 ++++++++ .../screenshots/qtquickcontrols2-slider-custom.qml | 64 ++++++++++++ .../qtquickcontrols2-slider-disabled.qml | 34 +++++++ .../qtquickcontrols2-slider-focused.qml | 34 +++++++ .../screenshots/qtquickcontrols2-slider-handle.qml | 38 +++++++ .../screenshots/qtquickcontrols2-slider-normal.qml | 33 ++++++ .../qtquickcontrols2-spinbox-custom.qml | 96 +++++++++++++++++ .../qtquickcontrols2-spinbox-double.qml | 56 ++++++++++ .../screenshots/qtquickcontrols2-spinbox-down.qml | 38 +++++++ .../qtquickcontrols2-spinbox-textual.qml | 55 ++++++++++ .../screenshots/qtquickcontrols2-spinbox-up.qml | 38 +++++++ .../screenshots/qtquickcontrols2-spinbox.qml | 35 +++++++ .../qtquickcontrols2-swipedelegate-custom.qml | 74 ++++++++++++++ .../qtquickcontrols2-swipeview-indicator.qml | 63 ++++++++++++ .../qtquickcontrols2-switch-checked.qml | 34 +++++++ .../screenshots/qtquickcontrols2-switch-custom.qml | 65 ++++++++++++ .../qtquickcontrols2-switch-disabled.qml | 34 +++++++ .../qtquickcontrols2-switch-focused.qml | 34 +++++++ .../screenshots/qtquickcontrols2-switch-normal.qml | 33 ++++++ .../qtquickcontrols2-switchdelegate-custom.qml | 74 ++++++++++++++ .../screenshots/qtquickcontrols2-tabbar-custom.qml | 49 +++++++++ .../qtquickcontrols2-tabbar-flickable.qml | 50 +++++++++ .../screenshots/qtquickcontrols2-tabbar.qml | 64 ++++++++++++ .../screenshots/qtquickcontrols2-tabbutton.qml | 43 ++++++++ .../qtquickcontrols2-textarea-custom.qml | 42 ++++++++ .../qtquickcontrols2-textarea-flickable.qml | 50 +++++++++ .../qtquickcontrols2-textfield-custom.qml | 43 ++++++++ .../qtquickcontrols2-textfield-disabled.qml | 35 +++++++ .../qtquickcontrols2-textfield-focused.qml | 35 +++++++ .../qtquickcontrols2-textfield-normal.qml | 34 +++++++ .../qtquickcontrols2-toolbar-custom.qml | 59 +++++++++++ .../screenshots/qtquickcontrols2-toolbar.qml | 47 +++++++++ .../qtquickcontrols2-toolbutton-custom.qml | 55 ++++++++++ .../screenshots/qtquickcontrols2-tooltip-hover.qml | 41 ++++++++ .../qtquickcontrols2-tooltip-pressandhold.qml | 39 +++++++ .../qtquickcontrols2-tooltip-slider.qml | 53 ++++++++++ .../screenshots/qtquickcontrols2-tooltip.qml | 51 ++++++++++ .../qtquickcontrols2-tumbler-custom.qml | 79 ++++++++++++++ .../qtquickcontrols2-tumbler-delegate.qml | 47 +++++++++ 199 files changed, 4698 insertions(+), 4697 deletions(-) delete mode 100644 src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml delete mode 100644 src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml delete mode 100644 src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml delete mode 100644 src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml delete mode 100644 src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml delete mode 100644 src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml delete mode 100644 src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-busyindicator-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-button-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-button-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-button-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-button-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-button-pressed.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-checked.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-checkdelegate-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-combobox-delegate.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-combobox-popup.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-dial-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-dial-handle.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-frame-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-frame.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-checkable.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-label.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-groupbox.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-itemdelegate-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-itemdelegate.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-label-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-label.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-delegate.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-interactive.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-pane-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-pane.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-checked.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-radiodelegate-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-first-handle-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-first-handle.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-second-handle-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-second-handle.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-active.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-active.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-slider-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-slider-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-slider-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-slider-handle.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-slider-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-double.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-down.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-textual.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-up.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-spinbox.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-swipeview-indicator.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-switch-checked.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-switch-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-switch-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-switch-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-switch-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-switchdelegate-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tabbar-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tabbar-flickable.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tabbar.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tabbutton.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-textarea-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-textarea-flickable.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-textfield-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-textfield-disabled.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-textfield-focused.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-textfield-normal.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-toolbar-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-toolbar.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-toolbutton-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-hover.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-pressandhold.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-slider.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tooltip.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-custom.qml delete mode 100644 src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-delegate.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-busyindicator-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-pressed.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-checked.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkdelegate-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-delegate.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-popup.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-handle.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-checkable.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-label.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-menu-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-delegate.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-interactive.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiodelegate-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-active.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-active.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-handle.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-double.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-down.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-textual.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-up.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipedelegate-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipeview-indicator.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-checked.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switchdelegate-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-flickable.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbutton.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-flickable.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-disabled.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-focused.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-normal.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbutton-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-hover.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-pressandhold.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip-slider.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-custom.qml create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-delegate.qml (limited to 'src/imports/controls') diff --git a/src/imports/controls/doc/qtquickcontrols2.qdocconf b/src/imports/controls/doc/qtquickcontrols2.qdocconf index bec995d3..e83e418e 100644 --- a/src/imports/controls/doc/qtquickcontrols2.qdocconf +++ b/src/imports/controls/doc/qtquickcontrols2.qdocconf @@ -39,7 +39,8 @@ exampledirs += ../../../../examples/quickcontrols2 \ ../../../quicktemplates2 \ ../../calendar \ ../../../../tests/auto/controls/data \ - snippets + snippets \ + snippets/screenshots examplesinstallpath = quickcontrols2 diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml b/src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml deleted file mode 100644 index dfbf4fbc..00000000 --- a/src/imports/controls/doc/snippets/qtlabscalendar-calendarmodel.qml +++ /dev/null @@ -1,57 +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.calendar 1.0 -import QtQuick.Controls 2.0 - -//! [1] -ListView { - id: listview - - width: 200; height: 200 - snapMode: ListView.SnapOneItem - orientation: ListView.Horizontal - highlightRangeMode: ListView.StrictlyEnforceRange - - model: CalendarModel { - from: new Date(2015, 0, 1) - to: new Date(2015, 11, 31) - } - - delegate: MonthGrid { - width: listview.width - height: listview.height - - month: model.month - year: model.year - locale: Qt.locale("en_US") - } - - ScrollIndicator.horizontal: ScrollIndicator { } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml b/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml deleted file mode 100644 index ce41d224..00000000 --- a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow-layout.qml +++ /dev/null @@ -1,47 +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 QtQuick.Layouts 1.0 -import Qt.labs.calendar 1.0 - -//! [1] -ColumnLayout { - DayOfWeekRow { - locale: grid.locale - Layout.fillWidth: true - } - - MonthGrid { - id: grid - month: Calendar.December - year: 2015 - locale: Qt.locale("en_US") - Layout.fillWidth: true - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml b/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.qml deleted file mode 100644 index 5ea3714c..00000000 --- a/src/imports/controls/doc/snippets/qtlabscalendar-dayofweekrow.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.calendar 1.0 - -//! [1] -DayOfWeekRow { - locale: Qt.locale("en_US") -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml b/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml deleted file mode 100644 index 346e6099..00000000 --- a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid-layout.qml +++ /dev/null @@ -1,61 +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 QtQuick.Layouts 1.0 -import Qt.labs.calendar 1.0 - -//! [1] -GridLayout { - columns: 2 - - DayOfWeekRow { - locale: grid.locale - - Layout.column: 1 - Layout.fillWidth: true - } - - WeekNumberColumn { - month: grid.month - year: grid.year - locale: grid.locale - - Layout.fillHeight: true - } - - MonthGrid { - id: grid - month: Calendar.December - year: 2015 - locale: Qt.locale("en_US") - - Layout.fillWidth: true - Layout.fillHeight: true - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml b/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.qml deleted file mode 100644 index 16f872b8..00000000 --- a/src/imports/controls/doc/snippets/qtlabscalendar-monthgrid.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.calendar 1.0 - -//! [1] -MonthGrid { - month: Calendar.December - year: 2015 - locale: Qt.locale("en_US") -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml b/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml deleted file mode 100644 index d105553f..00000000 --- a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn-layout.qml +++ /dev/null @@ -1,49 +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 QtQuick.Layouts 1.0 -import Qt.labs.calendar 1.0 - -//! [1] -RowLayout { - WeekNumberColumn { - month: grid.month - year: grid.year - locale: grid.locale - Layout.fillHeight: true - } - - MonthGrid { - id: grid - month: Calendar.December - year: 2015 - locale: Qt.locale("en_US") - Layout.fillHeight: true - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml b/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.qml deleted file mode 100644 index e58e5c7b..00000000 --- a/src/imports/controls/doc/snippets/qtlabscalendar-weeknumbercolumn.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.calendar 1.0 - -//! [1] -WeekNumberColumn { - month: Calendar.December - year: 2015 - locale: Qt.locale("en_US") -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-busyindicator-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-busyindicator-custom.qml deleted file mode 100644 index 82ed9cdc..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-busyindicator-custom.qml +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-button-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-custom.qml deleted file mode 100644 index eac6b831..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-button-custom.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-button-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-disabled.qml deleted file mode 100644 index f4555c90..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-button-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 QtQuick.Controls 2.0 - -Button { - width: 80 - text: "Disabled" - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-button-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-focused.qml deleted file mode 100644 index a99346a6..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-button-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 QtQuick.Controls 2.0 - -Button { - width: 80 - text: "Focused" - focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-button-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-normal.qml deleted file mode 100644 index f206bcec..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-button-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 QtQuick.Controls 2.0 - -Button { - width: 80 - text: "Normal" -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-button-pressed.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-button-pressed.qml deleted file mode 100644 index 8a941561..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-button-pressed.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 QtQuick.Controls 2.0 - -Button { - width: 80 - text: "Pressed" - down: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-checked.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-checked.qml deleted file mode 100644 index 075e6342..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-checked.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 QtQuick.Controls 2.0 - -CheckBox { - text: "Checked" - checked: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-custom.qml deleted file mode 100644 index 0465ec80..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-custom.qml +++ /dev/null @@ -1,66 +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$ -** -****************************************************************************/ - -//! [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/qtquickcontrols2-checkbox-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-disabled.qml deleted file mode 100644 index 4878cf31..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-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 QtQuick.Controls 2.0 - -CheckBox { - text: "Disabled" - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-focused.qml deleted file mode 100644 index 93f1c214..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-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 QtQuick.Controls 2.0 - -CheckBox { - text: "Focused" - focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-normal.qml deleted file mode 100644 index a840116e..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-checkbox-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 QtQuick.Controls 2.0 - -CheckBox { - text: "Normal" -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-checkdelegate-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-checkdelegate-custom.qml deleted file mode 100644 index 483f9838..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-checkdelegate-custom.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-combobox-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml deleted file mode 100644 index bd261e52..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-combobox-delegate.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-delegate.qml deleted file mode 100644 index d8b5d1fa..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-delegate.qml +++ /dev/null @@ -1,53 +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 QtQuick.Controls 2.0 - -Item { - id: root - width: combo.width - height: combo.height + combo.popup.contentItem.height - ComboBox { - id: combo - model: ["First", "Second", "Third"] - popup.contentItem.parent: root - popup.contentItem.y: combo.height - delegate: ItemDelegate { - width: combo.width - text: modelData - autoExclusive: true - checked: combo.currentIndex === index - Rectangle { - visible: index === 0 - anchors.fill: parent - color: 'transparent' - border.color: 'red' - } - } - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-popup.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-popup.qml deleted file mode 100644 index 36569e15..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-popup.qml +++ /dev/null @@ -1,47 +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 QtQuick.Controls 2.0 - -Item { - id: root - width: combo.width - height: combo.height + combo.popup.contentItem.height - ComboBox { - id: combo - model: ["First", "Second", "Third"] - popup.contentItem.parent: root - popup.contentItem.y: combo.height - } - Rectangle { - parent: combo.popup.contentItem - anchors.fill: parent - color: 'transparent' - border.color: 'red' - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-dial-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-dial-custom.qml deleted file mode 100644 index 658acc4b..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-dial-custom.qml +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** 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 - -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" - radius: width / 2 - border.color: control.pressed ? "#17a81a" : "#21be2b" - opacity: control.enabled ? 1 : 0.3 - } - - handle: Rectangle { - id: handleItem - x: background.x + background.width / 2 - handle.width / 2 - y: background.y + background.height / 2 - handle.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(background.width, background.height) * 0.4 + handle.height / 2 - }, - Rotation { - angle: control.angle - origin.x: handle.width / 2 - origin.y: handle.height / 2 - } - ] - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-dial-handle.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-dial-handle.qml deleted file mode 100644 index 19d943a6..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-dial-handle.qml +++ /dev/null @@ -1,41 +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 QtQuick.Controls 2.0 - -Dial { - id: dial - - Rectangle { - parent: dial.handle - anchors.fill: parent - color: 'transparent' - border.color: 'red' - antialiasing: true - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-frame-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-frame-custom.qml deleted file mode 100644 index d11c431e..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-frame-custom.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** 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 - -Frame { - background: Rectangle { - color: "transparent" - border.color: "#21be2b" - radius: 2 - } - - Label { - text: qsTr("Content goes here!") - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-frame.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-frame.qml deleted file mode 100644 index 1ede733d..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-frame.qml +++ /dev/null @@ -1,41 +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 QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 - -//! [1] -Frame { - ColumnLayout { - anchors.fill: parent - CheckBox { text: qsTr("E-mail") } - CheckBox { text: qsTr("Calendar") } - CheckBox { text: qsTr("Contacts") } - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-checkable.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-checkable.qml deleted file mode 100644 index a2999925..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-checkable.qml +++ /dev/null @@ -1,48 +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 QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 - -//! [1] -GroupBox { - label: CheckBox { - id: checkBox - checked: true - text: qsTr("Synchronize") - } - - ColumnLayout { - anchors.fill: parent - enabled: checkBox.checked - CheckBox { text: qsTr("E-mail") } - CheckBox { text: qsTr("Calendar") } - CheckBox { text: qsTr("Contacts") } - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml deleted file mode 100644 index cb9ed049..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** 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 - -GroupBox { - id: control - title: qsTr("GroupBox") - - background: Rectangle { - y: control.topPadding - control.padding - width: parent.width - height: parent.height - control.topPadding + control.padding - color: "transparent" - border.color: "#21be2b" - radius: 2 - } - - Label { - text: qsTr("Content goes here!") - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-label.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-label.qml deleted file mode 100644 index 74d0ea52..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-label.qml +++ /dev/null @@ -1,41 +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 QtQuick.Controls 2.0 - -GroupBox { - width: 100 - height: 100 - title: "GroupBox" - Rectangle { - parent: label - anchors.fill: parent - color: 'transparent' - border.color: 'red' - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox.qml deleted file mode 100644 index f79f3aef..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox.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 QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 - -//! [1] -GroupBox { - title: qsTr("Synchronize") - ColumnLayout { - anchors.fill: parent - CheckBox { text: qsTr("E-mail") } - CheckBox { text: qsTr("Calendar") } - CheckBox { text: qsTr("Contacts") } - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-itemdelegate-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-itemdelegate-custom.qml deleted file mode 100644 index 002aae69..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-itemdelegate-custom.qml +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -** -** 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 - -ItemDelegate { - 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 { - 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/qtquickcontrols2-itemdelegate.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-itemdelegate.qml deleted file mode 100644 index 143b3323..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-itemdelegate.qml +++ /dev/null @@ -1,46 +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 QtQuick.Controls 2.0 - -//! [1] -ListView { - width: 160 - height: 240 - - model: Qt.fontFamilies() - - delegate: ItemDelegate { - text: modelData - width: parent.width - onClicked: console.log("clicked:", modelData) - } - - ScrollIndicator.vertical: ScrollIndicator { } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-label-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-label-custom.qml deleted file mode 100644 index 98dbdc5e..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-label-custom.qml +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-label.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-label.qml deleted file mode 100644 index 4346c0eb..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-label.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 QtQuick.Controls 2.0 - -//! [1] -Label { - text: "Label" -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml deleted file mode 100644 index a6971232..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-menu-custom.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** 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 { - id: window - width: menu.contentItem.width - height: menu.contentItem.height - visible: true - -// 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" - } - - MenuItem { - text: qsTr("New...") - } - MenuItem { - text: qsTr("Open...") - } - MenuItem { - text: qsTr("Save") - } -} -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-custom.qml deleted file mode 100644 index 65112ef4..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-custom.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** 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 - -PageIndicator { - id: control - count: 5 - currentIndex: 2 - - delegate: Rectangle { - implicitWidth: 8 - implicitHeight: 8 - - 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/qtquickcontrols2-pageindicator-delegate.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-delegate.qml deleted file mode 100644 index 4b3ccf23..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-delegate.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 QtQuick.Controls 2.0 - -PageIndicator { - count: 5 - currentIndex: 2 - Rectangle { - parent: contentItem.children[0] - anchors.fill: parent - color: 'transparent' - border.color: 'red' - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-interactive.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-interactive.qml deleted file mode 100644 index 88cadc27..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator-interactive.qml +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-pageindicator.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator.qml deleted file mode 100644 index 237bc6e7..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-pageindicator.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 QtQuick.Controls 2.0 - -//! [1] -PageIndicator { - count: 5 - currentIndex: 2 -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-pane-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-pane-custom.qml deleted file mode 100644 index 80519939..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-pane-custom.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** 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 - -Pane { - background: Rectangle { - color: "#eeeeee" - } - - Label { - text: qsTr("Content goes here!") - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-pane.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-pane.qml deleted file mode 100644 index 3d86499f..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-pane.qml +++ /dev/null @@ -1,41 +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 QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 - -//! [1] -Pane { - ColumnLayout { - anchors.fill: parent - CheckBox { text: qsTr("E-mail") } - CheckBox { text: qsTr("Calendar") } - CheckBox { text: qsTr("Contacts") } - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-custom.qml deleted file mode 100644 index 00c9ae67..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-custom.qml +++ /dev/null @@ -1,57 +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$ -** -****************************************************************************/ - -//! [file] -import QtQuick 2.6 -import QtQuick.Controls 2.0 - -ProgressBar { - id: control - value: 0.5 - - background: Rectangle { - implicitWidth: 200 - implicitHeight: 4 - x: control.leftPadding - y: parent.height / 2 - height / 2 - color: "#e6e6e6" - radius: 2 - } - - contentItem: Item { - implicitWidth: background.implicitWidth - implicitHeight: background.implicitHeight - - Rectangle { - width: control.visualPosition * background.width - height: parent.height - radius: 2 - color: "#17a81a" - } - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-disabled.qml deleted file mode 100644 index 81c9f4ac..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -ProgressBar { - value: 0.5 - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-progressbar-normal.qml deleted file mode 100644 index a332d4c5..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -ProgressBar { - value: 0.5 -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-checked.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-checked.qml deleted file mode 100644 index c1b1acce..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-checked.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 QtQuick.Controls 2.0 - -RadioButton { - text: "Checked" - checked: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-custom.qml deleted file mode 100644 index dba262be..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-custom.qml +++ /dev/null @@ -1,66 +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$ -** -****************************************************************************/ - -//! [file] -import QtQuick 2.6 -import QtQuick.Controls 2.0 - -RadioButton { - 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/qtquickcontrols2-radiobutton-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-disabled.qml deleted file mode 100644 index 7ab68910..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -RadioButton { - text: "Disabled" - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-focused.qml deleted file mode 100644 index 316a4653..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -RadioButton { - text: "Focused" - focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-radiobutton-normal.qml deleted file mode 100644 index b5ea853b..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -RadioButton { - text: "Normal" -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-radiodelegate-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-radiodelegate-custom.qml deleted file mode 100644 index 6efb7803..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-radiodelegate-custom.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-rangeslider-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-custom.qml deleted file mode 100644 index 7e488d14..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-custom.qml +++ /dev/null @@ -1,76 +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$ -** -****************************************************************************/ - -//! [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/qtquickcontrols2-rangeslider-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-disabled.qml deleted file mode 100644 index e239b72f..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -RangeSlider { - first.value: 0.25 - second.value: 0.75 - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-first-handle-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-first-handle-focused.qml deleted file mode 100644 index a05c8291..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -RangeSlider { - first.value: 0.25 - second.value: 0.75 - first.handle.focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-first-handle.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-first-handle.qml deleted file mode 100644 index c5f064b0..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.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/qtquickcontrols2-rangeslider-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-normal.qml deleted file mode 100644 index a41fbfad..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -RangeSlider { - first.value: 0.25 - second.value: 0.75 -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-second-handle-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-second-handle-focused.qml deleted file mode 100644 index ec19d0c0..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -RangeSlider { - first.value: 0.25 - second.value: 0.75 - second.handle.focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-second-handle.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-rangeslider-second-handle.qml deleted file mode 100644 index 2e2123de..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.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/qtquickcontrols2-scrollbar-active.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-active.qml deleted file mode 100644 index 086541c8..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-active.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** 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 - - 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/qtquickcontrols2-scrollbar-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-custom.qml deleted file mode 100644 index 0bf13b3c..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-custom.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** 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 - -ScrollBar { - id: control - size: 0.3 - position: 0.2 - active: true - 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/qtquickcontrols2-scrollindicator-active.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-active.qml deleted file mode 100644 index c118c7aa..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-active.qml +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-scrollindicator-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-custom.qml deleted file mode 100644 index 5720f4f7..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-custom.qml +++ /dev/null @@ -1,45 +0,0 @@ -/**************************************************************************** -** -** 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 - -ScrollIndicator { - id: control - size: 0.3 - position: 0.2 - active: true - orientation: Qt.Vertical - - contentItem: Rectangle { - implicitWidth: 2 - implicitHeight: 100 - color: "#c2f4c6" - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-slider-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-slider-custom.qml deleted file mode 100644 index ebc11f46..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-slider-custom.qml +++ /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$ -** -****************************************************************************/ - -//! [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/qtquickcontrols2-slider-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-slider-disabled.qml deleted file mode 100644 index bde161aa..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -Slider { - value: 0.5 - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-slider-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-slider-focused.qml deleted file mode 100644 index b32f8b5a..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -Slider { - value: 0.5 - focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-slider-handle.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-slider-handle.qml deleted file mode 100644 index 20b569f3..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-slider-handle.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 QtQuick.Controls 2.0 - -Slider { - value: 0.5 - Rectangle { - anchors.fill: handle - color: "transparent" - border.color: "red" - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-slider-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-slider-normal.qml deleted file mode 100644 index 8363e862..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-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 QtQuick.Controls 2.0 - -Slider { - value: 0.5 -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-custom.qml deleted file mode 100644 index 6433fd80..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-custom.qml +++ /dev/null @@ -1,96 +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$ -** -****************************************************************************/ - -//! [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/qtquickcontrols2-spinbox-double.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-double.qml deleted file mode 100644 index 15af31ae..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-double.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-spinbox-down.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-down.qml deleted file mode 100644 index 419dae5c..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-down.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 QtQuick.Controls 2.0 - -SpinBox { - value: 50 - Rectangle { - anchors.fill: down.indicator - color: "transparent" - border.color: "red" - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-textual.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-textual.qml deleted file mode 100644 index 814b8b28..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-textual.qml +++ /dev/null @@ -1,55 +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 QtQuick.Controls 2.0 - -//! [1] -SpinBox { - from: 0 - to: items.length - 1 - value: 1 // "Medium" - - property var items: ["Small", "Medium", "Large"] - - validator: RegExpValidator { - regExp: new RegExp("(Small|Medium|Large)", "i") - } - - textFromValue: function(value) { - return items[value]; - } - - valueFromText: function(text) { - for (var i = 0; i < items.length; ++i) { - if (items[i].toLowerCase().indexOf(text.toLowerCase()) === 0) - return i - } - return sb.value - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-up.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-up.qml deleted file mode 100644 index b4b0fab3..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox-up.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 QtQuick.Controls 2.0 - -SpinBox { - value: 50 - Rectangle { - anchors.fill: up.indicator - color: "transparent" - border.color: "red" - } -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox.qml deleted file mode 100644 index 6616ed60..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-spinbox.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 QtQuick.Controls 2.0 - -//! [1] -SpinBox { - value: 50 -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-custom.qml deleted file mode 100644 index ae63efed..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-custom.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-swipeview-indicator.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipeview-indicator.qml deleted file mode 100644 index 2ba8df9c..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-swipeview-indicator.qml +++ /dev/null @@ -1,63 +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 QtQuick.Controls 2.0 - -Item { - width: 200 - height: 320 - - //! [1] - SwipeView { - id: view - - currentIndex: 1 - anchors.fill: parent - - Item { - id: firstPage - } - Item { - id: secondPage - } - Item { - id: thirdPage - } - } - - PageIndicator { - id: indicator - - count: view.count - currentIndex: view.currentIndex - - anchors.bottom: view.bottom - anchors.horizontalCenter: parent.horizontalCenter - } - //! [1] -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-checked.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-switch-checked.qml deleted file mode 100644 index f9a18b1c..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-checked.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 QtQuick.Controls 2.0 - -Switch { - text: "Checked" - checked: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-switch-custom.qml deleted file mode 100644 index 698c1a05..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-custom.qml +++ /dev/null @@ -1,65 +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$ -** -****************************************************************************/ - -//! [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/qtquickcontrols2-switch-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-switch-disabled.qml deleted file mode 100644 index a40586b5..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-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 QtQuick.Controls 2.0 - -Switch { - text: "Disabled" - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-switch-focused.qml deleted file mode 100644 index f98f2c90..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-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 QtQuick.Controls 2.0 - -Switch { - text: "Focused" - focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-switch-normal.qml deleted file mode 100644 index a55c2854..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-switch-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 QtQuick.Controls 2.0 - -Switch { - text: "Normal" -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-switchdelegate-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-switchdelegate-custom.qml deleted file mode 100644 index 8d0daa0a..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-switchdelegate-custom.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-tabbar-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tabbar-custom.qml deleted file mode 100644 index 1873fba9..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tabbar-custom.qml +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** 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 - -TabBar { - id: control - - background: Rectangle { - color: "#eeeeee" - } - - TabButton { - text: qsTr("Home") - } - TabButton { - text: qsTr("Discover") - } - TabButton { - text: qsTr("Activity") - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-tabbar-flickable.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tabbar-flickable.qml deleted file mode 100644 index 2a4fac0e..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tabbar-flickable.qml +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** 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: 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/qtquickcontrols2-tabbar.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tabbar.qml deleted file mode 100644 index b445ee67..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tabbar.qml +++ /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$ -** -****************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Layouts 1.3 -import QtQuick.Controls 2.0 - -Column { - width: 300 - - //! [1] - TabBar { - id: bar - width: parent.width - TabButton { - text: qsTr("Home") - } - TabButton { - text: qsTr("Discover") - } - TabButton { - text: qsTr("Activity") - } - } - - StackLayout { - width: parent.width - currentIndex: bar.currentIndex - Item { - id: homeTab - } - Item { - id: discoverTab - } - Item { - id: activityTab - } - } - //! [1] -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-tabbutton.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tabbutton.qml deleted file mode 100644 index 67e5e1e0..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tabbutton.qml +++ /dev/null @@ -1,43 +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 QtQuick.Controls 2.0 - -//! [1] -TabBar { - TabButton { - text: qsTr("Home") - } - TabButton { - text: qsTr("Discover") - } - TabButton { - text: qsTr("Activity") - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-textarea-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-textarea-custom.qml deleted file mode 100644 index f70c7135..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-textarea-custom.qml +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** 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 - -TextArea { - id: control - placeholderText: qsTr("Enter description") - - background: Rectangle { - implicitWidth: 200 - implicitHeight: 40 - border.color: control.enabled ? "#21be2b" : "transparent" - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-textarea-flickable.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-textarea-flickable.qml deleted file mode 100644 index e11750cb..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-textarea-flickable.qml +++ /dev/null @@ -1,50 +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 QtQuick.Controls 2.0 - -Item { - width: 100 - height: 100 - - Binding { target: flickable.ScrollBar.vertical; property: "active"; value: true } - - //! [1] - 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/qtquickcontrols2-textfield-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-custom.qml deleted file mode 100644 index 0deb0e5c..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-custom.qml +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-textfield-disabled.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-disabled.qml deleted file mode 100644 index ac798f53..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-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 QtQuick.Controls 2.0 - -TextField { - width: 80 - text: "Disabled" - enabled: false -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-focused.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-focused.qml deleted file mode 100644 index a4e1b3b1..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-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 QtQuick.Controls 2.0 - -TextField { - width: 80 - text: "Focused" - focus: true -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-normal.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-normal.qml deleted file mode 100644 index 12c7ead9..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-textfield-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 QtQuick.Controls 2.0 - -TextField { - width: 80 - text: "Normal" -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-toolbar-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-toolbar-custom.qml deleted file mode 100644 index 3e98808c..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-toolbar-custom.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** 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.Layouts 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("Undo") - } - ToolButton { - text: qsTr("Redo") - } - } -} -//! [file] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-toolbar.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-toolbar.qml deleted file mode 100644 index fd6754f8..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-toolbar.qml +++ /dev/null @@ -1,47 +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 QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 - -//! [1] -ToolBar { - RowLayout { - anchors.fill: parent - ToolButton { - text: qsTr("\u25C0 Qt") - onClicked: stack.pop() - } - Item { Layout.fillWidth: true } - Switch { - checked: true - text: qsTr("Notifications") - } - } -} -//! [1] diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-toolbutton-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-toolbutton-custom.qml deleted file mode 100644 index 10491cb5..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-toolbutton-custom.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** 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 - -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 - } - - background: Rectangle { - 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/qtquickcontrols2-tooltip-hover.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-hover.qml deleted file mode 100644 index 330ab83c..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-hover.qml +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-tooltip-pressandhold.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-pressandhold.qml deleted file mode 100644 index eddb09e6..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-pressandhold.qml +++ /dev/null @@ -1,39 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-tooltip-slider.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-slider.qml deleted file mode 100644 index e6a386c1..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip-slider.qml +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-tooltip.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip.qml deleted file mode 100644 index c85f91bb..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tooltip.qml +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** 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: 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] - Button { - text: qsTr("Button") - - ToolTip.visible: pressed - ToolTip.text: qsTr("A descriptive tool tip of what the button does") - } - //! [1] -} diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-custom.qml deleted file mode 100644 index d2b4f960..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-custom.qml +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** 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/qtquickcontrols2-tumbler-delegate.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-delegate.qml deleted file mode 100644 index 4d389ab7..00000000 --- a/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-delegate.qml +++ /dev/null @@ -1,47 +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 QtQuick.Controls 2.0 - -Tumbler { - id: tumbler - model: 5 - - Column { - Repeater { - model: 3 - - Rectangle { - width: tumbler.contentItem.width - height: tumbler.contentItem.height / 3 - color: 'transparent' - border.color: 'red' - } - } - } -} diff --git a/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml new file mode 100644 index 00000000..dfbf4fbc --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-calendarmodel.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** 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.calendar 1.0 +import QtQuick.Controls 2.0 + +//! [1] +ListView { + id: listview + + width: 200; height: 200 + snapMode: ListView.SnapOneItem + orientation: ListView.Horizontal + highlightRangeMode: ListView.StrictlyEnforceRange + + model: CalendarModel { + from: new Date(2015, 0, 1) + to: new Date(2015, 11, 31) + } + + delegate: MonthGrid { + width: listview.width + height: listview.height + + month: model.month + year: model.year + locale: Qt.locale("en_US") + } + + ScrollIndicator.horizontal: ScrollIndicator { } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml new file mode 100644 index 00000000..ce41d224 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow-layout.qml @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import Qt.labs.calendar 1.0 + +//! [1] +ColumnLayout { + DayOfWeekRow { + locale: grid.locale + Layout.fillWidth: true + } + + MonthGrid { + id: grid + month: Calendar.December + year: 2015 + locale: Qt.locale("en_US") + Layout.fillWidth: true + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml new file mode 100644 index 00000000..5ea3714c --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-dayofweekrow.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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.calendar 1.0 + +//! [1] +DayOfWeekRow { + locale: Qt.locale("en_US") +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml new file mode 100644 index 00000000..346e6099 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid-layout.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import Qt.labs.calendar 1.0 + +//! [1] +GridLayout { + columns: 2 + + DayOfWeekRow { + locale: grid.locale + + Layout.column: 1 + Layout.fillWidth: true + } + + WeekNumberColumn { + month: grid.month + year: grid.year + locale: grid.locale + + Layout.fillHeight: true + } + + MonthGrid { + id: grid + month: Calendar.December + year: 2015 + locale: Qt.locale("en_US") + + Layout.fillWidth: true + Layout.fillHeight: true + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml new file mode 100644 index 00000000..16f872b8 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-monthgrid.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** 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.calendar 1.0 + +//! [1] +MonthGrid { + month: Calendar.December + year: 2015 + locale: Qt.locale("en_US") +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml new file mode 100644 index 00000000..d105553f --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn-layout.qml @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import Qt.labs.calendar 1.0 + +//! [1] +RowLayout { + WeekNumberColumn { + month: grid.month + year: grid.year + locale: grid.locale + Layout.fillHeight: true + } + + MonthGrid { + id: grid + month: Calendar.December + year: 2015 + locale: Qt.locale("en_US") + Layout.fillHeight: true + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml new file mode 100644 index 00000000..e58e5c7b --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtlabscalendar-weeknumbercolumn.qml @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** 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.calendar 1.0 + +//! [1] +WeekNumberColumn { + month: Calendar.December + year: 2015 + locale: Qt.locale("en_US") +} +//! [1] 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/screenshots/qtquickcontrols2-button-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-disabled.qml new file mode 100644 index 00000000..f4555c90 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-disabled.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Button { + width: 80 + text: "Disabled" + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-focused.qml new file mode 100644 index 00000000..a99346a6 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-focused.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Button { + width: 80 + text: "Focused" + focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-normal.qml new file mode 100644 index 00000000..f206bcec --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-normal.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Button { + width: 80 + text: "Normal" +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-pressed.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-pressed.qml new file mode 100644 index 00000000..8a941561 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-button-pressed.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Button { + width: 80 + text: "Pressed" + down: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-checked.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-checked.qml new file mode 100644 index 00000000..075e6342 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-checked.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +CheckBox { + text: "Checked" + checked: true +} 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/screenshots/qtquickcontrols2-checkbox-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-disabled.qml new file mode 100644 index 00000000..4878cf31 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-disabled.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +CheckBox { + text: "Disabled" + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-focused.qml new file mode 100644 index 00000000..93f1c214 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-focused.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +CheckBox { + text: "Focused" + focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-normal.qml new file mode 100644 index 00000000..a840116e --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-checkbox-normal.qml @@ -0,0 +1,33 @@ +/**************************************************************************** +** +** 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 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/screenshots/qtquickcontrols2-combobox-delegate.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-delegate.qml new file mode 100644 index 00000000..d8b5d1fa --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-delegate.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Item { + id: root + width: combo.width + height: combo.height + combo.popup.contentItem.height + ComboBox { + id: combo + model: ["First", "Second", "Third"] + popup.contentItem.parent: root + popup.contentItem.y: combo.height + delegate: ItemDelegate { + width: combo.width + text: modelData + autoExclusive: true + checked: combo.currentIndex === index + Rectangle { + visible: index === 0 + anchors.fill: parent + color: 'transparent' + border.color: 'red' + } + } + } +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-popup.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-popup.qml new file mode 100644 index 00000000..36569e15 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-popup.qml @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Item { + id: root + width: combo.width + height: combo.height + combo.popup.contentItem.height + ComboBox { + id: combo + model: ["First", "Second", "Third"] + popup.contentItem.parent: root + popup.contentItem.y: combo.height + } + Rectangle { + parent: combo.popup.contentItem + anchors.fill: parent + color: 'transparent' + border.color: 'red' + } +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-custom.qml new file mode 100644 index 00000000..658acc4b --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-custom.qml @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** 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 + +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" + radius: width / 2 + border.color: control.pressed ? "#17a81a" : "#21be2b" + opacity: control.enabled ? 1 : 0.3 + } + + handle: Rectangle { + id: handleItem + x: background.x + background.width / 2 - handle.width / 2 + y: background.y + background.height / 2 - handle.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(background.width, background.height) * 0.4 + handle.height / 2 + }, + Rotation { + angle: control.angle + origin.x: handle.width / 2 + origin.y: handle.height / 2 + } + ] + } +} +//! [file] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-handle.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-handle.qml new file mode 100644 index 00000000..19d943a6 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-dial-handle.qml @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Dial { + id: dial + + Rectangle { + parent: dial.handle + anchors.fill: parent + color: 'transparent' + border.color: 'red' + antialiasing: true + } +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame-custom.qml new file mode 100644 index 00000000..d11c431e --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame-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 + +Frame { + background: Rectangle { + color: "transparent" + border.color: "#21be2b" + radius: 2 + } + + Label { + text: qsTr("Content goes here!") + } +} +//! [file] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame.qml new file mode 100644 index 00000000..1ede733d --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-frame.qml @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 + +//! [1] +Frame { + ColumnLayout { + anchors.fill: parent + CheckBox { text: qsTr("E-mail") } + CheckBox { text: qsTr("Calendar") } + CheckBox { text: qsTr("Contacts") } + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-checkable.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-checkable.qml new file mode 100644 index 00000000..a2999925 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-checkable.qml @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 + +//! [1] +GroupBox { + label: CheckBox { + id: checkBox + checked: true + text: qsTr("Synchronize") + } + + ColumnLayout { + anchors.fill: parent + enabled: checkBox.checked + CheckBox { text: qsTr("E-mail") } + CheckBox { text: qsTr("Calendar") } + CheckBox { text: qsTr("Contacts") } + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-custom.qml new file mode 100644 index 00000000..cb9ed049 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-custom.qml @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** 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 + +GroupBox { + id: control + title: qsTr("GroupBox") + + background: Rectangle { + y: control.topPadding - control.padding + width: parent.width + height: parent.height - control.topPadding + control.padding + color: "transparent" + border.color: "#21be2b" + radius: 2 + } + + Label { + text: qsTr("Content goes here!") + } +} +//! [file] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-label.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-label.qml new file mode 100644 index 00000000..74d0ea52 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox-label.qml @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +GroupBox { + width: 100 + height: 100 + title: "GroupBox" + Rectangle { + parent: label + anchors.fill: parent + color: 'transparent' + border.color: 'red' + } +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox.qml new file mode 100644 index 00000000..f79f3aef --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-groupbox.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 + +//! [1] +GroupBox { + title: qsTr("Synchronize") + ColumnLayout { + anchors.fill: parent + CheckBox { text: qsTr("E-mail") } + CheckBox { text: qsTr("Calendar") } + CheckBox { text: qsTr("Contacts") } + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate-custom.qml new file mode 100644 index 00000000..002aae69 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate-custom.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** 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 + +ItemDelegate { + 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 { + 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/screenshots/qtquickcontrols2-itemdelegate.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate.qml new file mode 100644 index 00000000..143b3323 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-itemdelegate.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +//! [1] +ListView { + width: 160 + height: 240 + + model: Qt.fontFamilies() + + delegate: ItemDelegate { + text: modelData + width: parent.width + onClicked: console.log("clicked:", modelData) + } + + ScrollIndicator.vertical: ScrollIndicator { } +} +//! [1] 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/screenshots/qtquickcontrols2-label.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label.qml new file mode 100644 index 00000000..4346c0eb --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-label.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +//! [1] +Label { + text: "Label" +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-menu-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-menu-custom.qml new file mode 100644 index 00000000..a6971232 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-menu-custom.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** 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 { + id: window + width: menu.contentItem.width + height: menu.contentItem.height + visible: true + +// 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" + } + + MenuItem { + text: qsTr("New...") + } + MenuItem { + text: qsTr("Open...") + } + MenuItem { + text: qsTr("Save") + } +} +} +//! [file] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-custom.qml new file mode 100644 index 00000000..65112ef4 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-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 + +PageIndicator { + id: control + count: 5 + currentIndex: 2 + + delegate: Rectangle { + implicitWidth: 8 + implicitHeight: 8 + + 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/screenshots/qtquickcontrols2-pageindicator-delegate.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-delegate.qml new file mode 100644 index 00000000..4b3ccf23 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator-delegate.qml @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +PageIndicator { + count: 5 + currentIndex: 2 + Rectangle { + 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/screenshots/qtquickcontrols2-pageindicator.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator.qml new file mode 100644 index 00000000..237bc6e7 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pageindicator.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +//! [1] +PageIndicator { + count: 5 + currentIndex: 2 +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane-custom.qml new file mode 100644 index 00000000..80519939 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane-custom.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$ +** +****************************************************************************/ + +//! [file] +import QtQuick 2.6 +import QtQuick.Controls 2.0 + +Pane { + background: Rectangle { + color: "#eeeeee" + } + + Label { + text: qsTr("Content goes here!") + } +} +//! [file] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane.qml new file mode 100644 index 00000000..3d86499f --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-pane.qml @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 + +//! [1] +Pane { + ColumnLayout { + anchors.fill: parent + CheckBox { text: qsTr("E-mail") } + CheckBox { text: qsTr("Calendar") } + CheckBox { text: qsTr("Contacts") } + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-custom.qml new file mode 100644 index 00000000..00c9ae67 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-custom.qml @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** 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 + +ProgressBar { + id: control + value: 0.5 + + background: Rectangle { + implicitWidth: 200 + implicitHeight: 4 + x: control.leftPadding + y: parent.height / 2 - height / 2 + color: "#e6e6e6" + radius: 2 + } + + contentItem: Item { + implicitWidth: background.implicitWidth + implicitHeight: background.implicitHeight + + Rectangle { + width: control.visualPosition * background.width + height: parent.height + radius: 2 + color: "#17a81a" + } + } +} +//! [file] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml new file mode 100644 index 00000000..81c9f4ac --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +ProgressBar { + value: 0.5 + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml new file mode 100644 index 00000000..a332d4c5 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml @@ -0,0 +1,33 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +ProgressBar { + value: 0.5 +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml new file mode 100644 index 00000000..c1b1acce --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RadioButton { + text: "Checked" + checked: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-custom.qml new file mode 100644 index 00000000..dba262be --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-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 + +RadioButton { + 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-radiobutton-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml new file mode 100644 index 00000000..7ab68910 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RadioButton { + text: "Disabled" + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml new file mode 100644 index 00000000..316a4653 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RadioButton { + text: "Focused" + focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml new file mode 100644 index 00000000..b5ea853b --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml @@ -0,0 +1,33 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RadioButton { + text: "Normal" +} 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/screenshots/qtquickcontrols2-rangeslider-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-disabled.qml new file mode 100644 index 00000000..e239b72f --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-disabled.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RangeSlider { + first.value: 0.25 + second.value: 0.75 + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle-focused.qml new file mode 100644 index 00000000..a05c8291 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle-focused.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RangeSlider { + first.value: 0.25 + second.value: 0.75 + first.handle.focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle.qml new file mode 100644 index 00000000..c5f064b0 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle.qml @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.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/screenshots/qtquickcontrols2-rangeslider-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-normal.qml new file mode 100644 index 00000000..a41fbfad --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-normal.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RangeSlider { + first.value: 0.25 + second.value: 0.75 +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle-focused.qml new file mode 100644 index 00000000..ec19d0c0 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle-focused.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +RangeSlider { + first.value: 0.25 + second.value: 0.75 + second.handle.focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle.qml new file mode 100644 index 00000000..2e2123de --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle.qml @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.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/screenshots/qtquickcontrols2-scrollbar-active.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-active.qml new file mode 100644 index 00000000..086541c8 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-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 + + 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/screenshots/qtquickcontrols2-scrollbar-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-custom.qml new file mode 100644 index 00000000..0bf13b3c --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollbar-custom.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$ +** +****************************************************************************/ + +//! [file] +import QtQuick 2.6 +import QtQuick.Controls 2.0 + +ScrollBar { + id: control + size: 0.3 + position: 0.2 + active: true + 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/screenshots/qtquickcontrols2-scrollindicator-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-custom.qml new file mode 100644 index 00000000..5720f4f7 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-scrollindicator-custom.qml @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** 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 + +ScrollIndicator { + id: control + size: 0.3 + position: 0.2 + active: true + 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/screenshots/qtquickcontrols2-slider-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml new file mode 100644 index 00000000..bde161aa --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Slider { + value: 0.5 + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml new file mode 100644 index 00000000..b32f8b5a --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Slider { + value: 0.5 + focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-handle.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-handle.qml new file mode 100644 index 00000000..20b569f3 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-handle.qml @@ -0,0 +1,38 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Slider { + value: 0.5 + Rectangle { + anchors.fill: handle + color: "transparent" + border.color: "red" + } +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml new file mode 100644 index 00000000..8363e862 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml @@ -0,0 +1,33 @@ +/**************************************************************************** +** +** 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 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/screenshots/qtquickcontrols2-spinbox-down.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-down.qml new file mode 100644 index 00000000..419dae5c --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-down.qml @@ -0,0 +1,38 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +SpinBox { + value: 50 + Rectangle { + anchors.fill: down.indicator + color: "transparent" + border.color: "red" + } +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-textual.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-textual.qml new file mode 100644 index 00000000..814b8b28 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-textual.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +//! [1] +SpinBox { + from: 0 + to: items.length - 1 + value: 1 // "Medium" + + property var items: ["Small", "Medium", "Large"] + + validator: RegExpValidator { + regExp: new RegExp("(Small|Medium|Large)", "i") + } + + textFromValue: function(value) { + return items[value]; + } + + valueFromText: function(text) { + for (var i = 0; i < items.length; ++i) { + if (items[i].toLowerCase().indexOf(text.toLowerCase()) === 0) + return i + } + return sb.value + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-up.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-up.qml new file mode 100644 index 00000000..b4b0fab3 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox-up.qml @@ -0,0 +1,38 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +SpinBox { + value: 50 + Rectangle { + anchors.fill: up.indicator + color: "transparent" + border.color: "red" + } +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox.qml new file mode 100644 index 00000000..6616ed60 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-spinbox.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +//! [1] +SpinBox { + value: 50 +} +//! [1] 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/screenshots/qtquickcontrols2-swipeview-indicator.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipeview-indicator.qml new file mode 100644 index 00000000..2ba8df9c --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-swipeview-indicator.qml @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Item { + width: 200 + height: 320 + + //! [1] + SwipeView { + id: view + + currentIndex: 1 + anchors.fill: parent + + Item { + id: firstPage + } + Item { + id: secondPage + } + Item { + id: thirdPage + } + } + + PageIndicator { + id: indicator + + count: view.count + currentIndex: view.currentIndex + + anchors.bottom: view.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + //! [1] +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-checked.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-checked.qml new file mode 100644 index 00000000..f9a18b1c --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-checked.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Switch { + text: "Checked" + checked: true +} 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/screenshots/qtquickcontrols2-switch-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-disabled.qml new file mode 100644 index 00000000..a40586b5 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-disabled.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Switch { + text: "Disabled" + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-focused.qml new file mode 100644 index 00000000..f98f2c90 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-focused.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Switch { + text: "Focused" + focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-normal.qml new file mode 100644 index 00000000..a55c2854 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-switch-normal.qml @@ -0,0 +1,33 @@ +/**************************************************************************** +** +** 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 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/screenshots/qtquickcontrols2-tabbar-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-custom.qml new file mode 100644 index 00000000..1873fba9 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-custom.qml @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** 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 + +TabBar { + id: control + + background: Rectangle { + 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-flickable.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-flickable.qml new file mode 100644 index 00000000..2a4fac0e --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-flickable.qml @@ -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$ +** +****************************************************************************/ + +import QtQuick 2.6 +import QtQuick.Controls 2.0 + +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/screenshots/qtquickcontrols2-tabbar.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar.qml new file mode 100644 index 00000000..b445ee67 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar.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$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.Layouts 1.3 +import QtQuick.Controls 2.0 + +Column { + width: 300 + + //! [1] + TabBar { + id: bar + width: parent.width + TabButton { + text: qsTr("Home") + } + TabButton { + text: qsTr("Discover") + } + TabButton { + text: qsTr("Activity") + } + } + + StackLayout { + width: parent.width + currentIndex: bar.currentIndex + Item { + id: homeTab + } + Item { + id: discoverTab + } + Item { + id: activityTab + } + } + //! [1] +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbutton.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbutton.qml new file mode 100644 index 00000000..67e5e1e0 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbutton.qml @@ -0,0 +1,43 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +//! [1] +TabBar { + TabButton { + text: qsTr("Home") + } + TabButton { + text: qsTr("Discover") + } + TabButton { + text: qsTr("Activity") + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-custom.qml new file mode 100644 index 00000000..f70c7135 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-custom.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$ +** +****************************************************************************/ + +//! [file] +import QtQuick 2.6 +import QtQuick.Controls 2.0 + +TextArea { + id: control + placeholderText: qsTr("Enter description") + + background: Rectangle { + implicitWidth: 200 + implicitHeight: 40 + border.color: control.enabled ? "#21be2b" : "transparent" + } +} +//! [file] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-flickable.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-flickable.qml new file mode 100644 index 00000000..e11750cb --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textarea-flickable.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Item { + width: 100 + height: 100 + + Binding { target: flickable.ScrollBar.vertical; property: "active"; value: true } + + //! [1] + 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/screenshots/qtquickcontrols2-textfield-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-disabled.qml new file mode 100644 index 00000000..ac798f53 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-disabled.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +TextField { + width: 80 + text: "Disabled" + enabled: false +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-focused.qml new file mode 100644 index 00000000..a4e1b3b1 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-focused.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +TextField { + width: 80 + text: "Focused" + focus: true +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-normal.qml new file mode 100644 index 00000000..12c7ead9 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-textfield-normal.qml @@ -0,0 +1,34 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +TextField { + width: 80 + text: "Normal" +} diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar-custom.qml new file mode 100644 index 00000000..3e98808c --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar-custom.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** 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.Layouts 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("Undo") + } + 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..fd6754f8 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 + +//! [1] +ToolBar { + RowLayout { + anchors.fill: parent + ToolButton { + text: qsTr("\u25C0 Qt") + onClicked: stack.pop() + } + Item { Layout.fillWidth: true } + Switch { + checked: true + text: qsTr("Notifications") + } + } +} +//! [1] diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbutton-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbutton-custom.qml new file mode 100644 index 00000000..10491cb5 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbutton-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 + +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 + } + + background: Rectangle { + 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/screenshots/qtquickcontrols2-tooltip.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.qml new file mode 100644 index 00000000..c85f91bb --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tooltip.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.Window 2.2 +import QtQuick.Controls 2.0 + +Item { + id: root + 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] + Button { + text: qsTr("Button") + + ToolTip.visible: pressed + ToolTip.text: qsTr("A descriptive tool tip of what the button does") + } + //! [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/screenshots/qtquickcontrols2-tumbler-delegate.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-delegate.qml new file mode 100644 index 00000000..4d389ab7 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tumbler-delegate.qml @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** 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 QtQuick.Controls 2.0 + +Tumbler { + id: tumbler + model: 5 + + Column { + Repeater { + model: 3 + + Rectangle { + width: tumbler.contentItem.width + height: tumbler.contentItem.height / 3 + color: 'transparent' + border.color: 'red' + } + } + } +} -- cgit v1.2.3 From e1b1191e8df727f546bdbbb7da6b14e897c70e7c Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Thu, 22 Sep 2016 13:44:52 +0200 Subject: Popup: fix some of the documentation review findings Change-Id: I69b60faab1588a45e005ba721c9796680bad6ac1 Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- .../screenshots/qtquickcontrols2-popup-custom.qml | 52 ++++++++++++++++++++++ .../doc/src/includes/qquickpopup-padding.qdocinc | 10 +++++ .../doc/src/qtquickcontrols2-customize.qdoc | 18 ++++++++ 3 files changed, 80 insertions(+) create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-popup-custom.qml create mode 100644 src/imports/controls/doc/src/includes/qquickpopup-padding.qdocinc (limited to 'src/imports/controls') 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..32025cc7 --- /dev/null +++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-popup-custom.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 +import QtQuick.Window 2.2 + +Item { + id: root + width: 200 + height: 200 + + Binding { + target: root + property: "visible" + value: root.Window.active + } +//! [1] +Popup { + background: Rectangle { + implicitWidth: 200 + implicitHeight: 200 + border.color: "#444" + } + contentItem: Column {} +} +//! [1] +} 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/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc index 559c89f0..852a1e03 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc @@ -489,6 +489,24 @@ \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} -- cgit v1.2.3 From ab779f64f2e01ed7aafc3358ac2f0bf42f349516 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 29 Sep 2016 21:01:45 +0200 Subject: TabButton: use Text's implicit size instead of content size Using content size was a workaround (applied in 5f5654f) that helped with mis-aligned tab labels, but broke the implicit size calculation of TabButton itself. Now that the mis-alignment issue in QQuickText has been fixed in qtdeclarative commit 79cfc87, we can restore the correct implicit size calculation. This makes it possible to create tabs that are not squeezed to fit in TabBar: TabBar { TabButton { text: "Foo"; width: implicitWidth } TabButton { text: "Bar"; width: implicitWidth } TabButton { text: "Baz"; width: implicitWidth } } Task-number: QTBUG-55129 Change-Id: If0dbb00794299e324b7a8d8ce1370fe0a3491fe8 Reviewed-by: Mitch Curtis --- src/imports/controls/TabButton.qml | 4 ++-- src/imports/controls/material/TabButton.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/imports/controls') diff --git a/src/imports/controls/TabButton.qml b/src/imports/controls/TabButton.qml index 870edb6d..56b57602 100644 --- a/src/imports/controls/TabButton.qml +++ b/src/imports/controls/TabButton.qml @@ -41,9 +41,9 @@ T.TabButton { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, - contentItem.contentWidth + leftPadding + rightPadding) + contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, - contentItem.contentHeight + topPadding + bottomPadding) + contentItem.implicitHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: 6 diff --git a/src/imports/controls/material/TabButton.qml b/src/imports/controls/material/TabButton.qml index 095645b4..535dfc02 100644 --- a/src/imports/controls/material/TabButton.qml +++ b/src/imports/controls/material/TabButton.qml @@ -42,9 +42,9 @@ T.TabButton { id: control implicitWidth: Math.max(background ? background.implicitWidth : 0, - contentItem.contentWidth + leftPadding + rightPadding) + contentItem.implicitWidth + leftPadding + rightPadding) implicitHeight: Math.max(background ? background.implicitHeight : 0, - contentItem.contentHeight + topPadding + bottomPadding) + contentItem.implicitHeight + topPadding + bottomPadding) baselineOffset: contentItem.y + contentItem.baselineOffset padding: 12 -- cgit v1.2.3 From b749f0041d14234083d150e48d273f08c4b1d253 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 30 Sep 2016 12:32:10 +0200 Subject: Button: add GIFs for flat & highlighted docs This also removes the state table in the detailed description, since we have GIFs now. Change-Id: I4503b67478051eb872f46127da6718092d77d4ff Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- .../doc/images/qtquickcontrols2-button-custom.png | Bin 1294 -> 0 bytes .../doc/images/qtquickcontrols2-button-disabled.png | Bin 1569 -> 0 bytes .../doc/images/qtquickcontrols2-button-flat.gif | Bin 0 -> 2388 bytes .../images/qtquickcontrols2-button-highlighted.gif | Bin 0 -> 1856 bytes .../controls/doc/images/qtquickcontrols2-button.gif | Bin 2171 -> 1863 bytes .../controls/doc/images/qtquickcontrols2-button.png | Bin 1518 -> 0 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/imports/controls/doc/images/qtquickcontrols2-button-custom.png delete mode 100644 src/imports/controls/doc/images/qtquickcontrols2-button-disabled.png create mode 100644 src/imports/controls/doc/images/qtquickcontrols2-button-flat.gif create mode 100644 src/imports/controls/doc/images/qtquickcontrols2-button-highlighted.gif delete mode 100644 src/imports/controls/doc/images/qtquickcontrols2-button.png (limited to 'src/imports/controls') diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-button-custom.png deleted file mode 100644 index 5e68ed44..00000000 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-button-custom.png and /dev/null differ diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-button-disabled.png deleted file mode 100644 index 3375152c..00000000 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-button-disabled.png and /dev/null 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 Binary files /dev/null and b/src/imports/controls/doc/images/qtquickcontrols2-button-flat.gif 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 Binary files /dev/null and b/src/imports/controls/doc/images/qtquickcontrols2-button-highlighted.gif differ diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button.gif b/src/imports/controls/doc/images/qtquickcontrols2-button.gif index 89dcba31..7f2de718 100644 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-button.gif and b/src/imports/controls/doc/images/qtquickcontrols2-button.gif differ diff --git a/src/imports/controls/doc/images/qtquickcontrols2-button.png b/src/imports/controls/doc/images/qtquickcontrols2-button.png deleted file mode 100644 index d8a39e55..00000000 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-button.png and /dev/null differ -- cgit v1.2.3 From 7a418e470b1fa91d73d7ee8d299bd4a95b40eab9 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 30 Sep 2016 14:55:05 +0200 Subject: CheckBox: add GIFs to documentation - Replace the state table in the detailed description with a GIF. - Add a GIF for the tri-state documentation. Change-Id: I00f3835edad6eb454d06847ab342ce0eeb30156b Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi --- .../doc/images/qtquickcontrols2-checkbox-checked.png | Bin 1905 -> 0 bytes .../doc/images/qtquickcontrols2-checkbox-disabled.png | Bin 1529 -> 0 bytes .../doc/images/qtquickcontrols2-checkbox-focused.png | Bin 1628 -> 0 bytes .../doc/images/qtquickcontrols2-checkbox-normal.png | Bin 1339 -> 0 bytes .../doc/images/qtquickcontrols2-checkbox-tristate.gif | Bin 0 -> 4033 bytes .../controls/doc/images/qtquickcontrols2-checkbox.gif | Bin 0 -> 2864 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/imports/controls/doc/images/qtquickcontrols2-checkbox-checked.png delete mode 100644 src/imports/controls/doc/images/qtquickcontrols2-checkbox-disabled.png delete mode 100644 src/imports/controls/doc/images/qtquickcontrols2-checkbox-focused.png delete mode 100644 src/imports/controls/doc/images/qtquickcontrols2-checkbox-normal.png create mode 100644 src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif create mode 100644 src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif (limited to 'src/imports/controls') diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-checked.png b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-checked.png deleted file mode 100644 index 71cb90ca..00000000 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-checked.png and /dev/null differ diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-disabled.png deleted file mode 100644 index 0c4d3bf7..00000000 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-disabled.png and /dev/null differ diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-focused.png deleted file mode 100644 index 5fb6daaf..00000000 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-focused.png and /dev/null differ diff --git a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-normal.png deleted file mode 100644 index 69700ee0..00000000 Binary files a/src/imports/controls/doc/images/qtquickcontrols2-checkbox-normal.png and /dev/null 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..50986f1b Binary files /dev/null and b/src/imports/controls/doc/images/qtquickcontrols2-checkbox-tristate.gif 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..beacdb37 Binary files /dev/null and b/src/imports/controls/doc/images/qtquickcontrols2-checkbox.gif differ -- cgit v1.2.3 From 38e876032834ab6d02b94a798fe2866a79757719 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 30 Sep 2016 15:41:38 +0200 Subject: Material: fix accent update on theme change Change-Id: I9cb3fd6bdbedc0e7ca472b815502bce48dca00b7 Reviewed-by: Mitch Curtis --- src/imports/controls/material/qquickmaterialstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/imports/controls') diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp index ae8c3a11..0ff49732 100644 --- a/src/imports/controls/material/qquickmaterialstyle.cpp +++ b/src/imports/controls/material/qquickmaterialstyle.cpp @@ -479,6 +479,8 @@ void QQuickMaterialStyle::setTheme(Theme theme) propagateTheme(); emit themeChanged(); emit paletteChanged(); + if (!m_customAccent) + emit accentChanged(); if (!m_hasBackground) emit backgroundChanged(); if (!m_hasForeground) @@ -494,6 +496,8 @@ void QQuickMaterialStyle::inheritTheme(Theme theme) propagateTheme(); emit themeChanged(); emit paletteChanged(); + if (!m_customAccent) + emit accentChanged(); if (!m_hasBackground) emit backgroundChanged(); if (!m_hasForeground) -- cgit v1.2.3 From 50148c6fa19bb0af40a9ece8b8893ad621780745 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 30 Sep 2016 17:05:40 +0200 Subject: ComboBox: fix unintentional deps between the popup and its content item Do not use an ID to reference the default content item from the outside, because it should be possible to replace the content item. Change-Id: I8a6cc084fcb7eae431e4db7eeacb8fd2ab8c4bf5 Task-number: QTBUG-56297 Reviewed-by: J-P Nurmi --- src/imports/controls/ComboBox.qml | 3 ++- src/imports/controls/material/ComboBox.qml | 4 ++-- src/imports/controls/universal/ComboBox.qml | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/imports/controls') diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml index 01a6d2ab..5bffbb35 100644 --- a/src/imports/controls/ComboBox.qml +++ b/src/imports/controls/ComboBox.qml @@ -105,13 +105,14 @@ T.ComboBox { popup: T.Popup { y: control.height - (control.visualFocus ? 0 : 1) width: control.width - implicitHeight: listview.contentHeight + 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 diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index f13c6922..9d51f13b 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -114,7 +114,7 @@ T.ComboBox { popup: T.Popup { width: control.width - implicitHeight: listview.contentHeight + implicitHeight: contentItem.implicitHeight transformOrigin: Item.Top topMargin: 12 bottomMargin: 12 @@ -136,8 +136,8 @@ T.ComboBox { } contentItem: ListView { - id: listview clip: true + implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml index a8bf58f8..929232ab 100644 --- a/src/imports/controls/universal/ComboBox.qml +++ b/src/imports/controls/universal/ComboBox.qml @@ -108,7 +108,7 @@ T.ComboBox { popup: T.Popup { width: control.width - implicitHeight: Math.min(396, listview.contentHeight) + implicitHeight: Math.min(396, contentItem.implicitHeight) topMargin: 8 bottomMargin: 8 @@ -116,8 +116,8 @@ 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 -- cgit v1.2.3 From da61768e9195593f3ad5b262b71e1b90c53fc681 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 1 Oct 2016 12:07:42 +0200 Subject: Material: fix dark dialog color https://material.google.com/style/color.html#color-themes Task-number: QTBUG-53266 Change-Id: I870d8e4871cae8d4940264c046d6ddf74dbe023f Reviewed-by: J-P Nurmi --- src/imports/controls/material/qquickmaterialstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/imports/controls') diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp index 0ff49732..6c6a0e3e 100644 --- a/src/imports/controls/material/qquickmaterialstyle.cpp +++ b/src/imports/controls/material/qquickmaterialstyle.cpp @@ -391,7 +391,7 @@ 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; -- cgit v1.2.3 From fda44e6fed0062b8ef91d1cfdb10b1ffa6a3d730 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 2 Oct 2016 10:29:39 +0200 Subject: Make a plain AbstractButton calculate suitable implicit size Just like commit 87b21a57 made Control do it, this applies the same logic to AbstractButton. The simple reasoning is that when customizing both the contentItem and the background, it is much better to use the AbstractButton type that does not have any default building blocks. Previously you would have to supply implicit size calculation as well, but this makes it much more convenient to use. [ChangeLog][Controls][AbstractButton] A plain AbstractButton now calculates its implicit size based on the implicit size of the content item plus paddings, and the implicit size of the background item. Change-Id: Ic380366b25940fbb9f28882c4622d58f4c042a07 Reviewed-by: J-P Nurmi --- src/imports/controls/AbstractButton.qml | 48 +++++++++++++++++++++++++ src/imports/controls/controls.pri | 1 + src/imports/controls/qtquickcontrols2plugin.cpp | 3 +- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 src/imports/controls/AbstractButton.qml (limited to 'src/imports/controls') 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/controls.pri b/src/imports/controls/controls.pri index 788bfe27..dcbcf8e1 100644 --- a/src/imports/controls/controls.pri +++ b/src/imports/controls/controls.pri @@ -9,6 +9,7 @@ SOURCES += \ $$PWD/qquickdialring.cpp QML_CONTROLS = \ + AbstractButton.qml \ ApplicationWindow.qml \ BusyIndicator.qml \ Button.qml \ diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp index 541d18d6..153d61f7 100644 --- a/src/imports/controls/qtquickcontrols2plugin.cpp +++ b/src/imports/controls/qtquickcontrols2plugin.cpp @@ -41,7 +41,6 @@ #include #include -#include #include #include #include @@ -82,7 +81,6 @@ QtQuickControls2Plugin::QtQuickControls2Plugin(QObject *parent) : QQuickStylePlu void QtQuickControls2Plugin::registerTypes(const char *uri) { - qmlRegisterType(uri, 2, 0, "AbstractButton"); qmlRegisterType(uri, 2, 0, "ButtonGroup"); qmlRegisterType(); @@ -93,6 +91,7 @@ void QtQuickControls2Plugin::registerTypes(const char *uri) 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"); -- cgit v1.2.3 From 7246e3c1affdd29bbb177578d169213972f46a9e Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 2 Oct 2016 10:44:41 +0200 Subject: qtquickcontrols2plugin.cpp: cleanup includes Change-Id: I5c1b3a911972b61562d8d7e9b1e07cbde0bef78f Reviewed-by: J-P Nurmi --- src/imports/controls/qtquickcontrols2plugin.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/imports/controls') diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp index 153d61f7..8e41a58c 100644 --- a/src/imports/controls/qtquickcontrols2plugin.cpp +++ b/src/imports/controls/qtquickcontrols2plugin.cpp @@ -34,20 +34,12 @@ ** ****************************************************************************/ -#include -#include -#include -#include #include - #include -#include -#include -#include -#include #include #include #include +#include #include "qquickbusyindicatorring_p.h" #include "qquickdialring_p.h" -- cgit v1.2.3 From 30bfa894d977e42d16d0ad88a023681818a11dc8 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 2 Oct 2016 11:59:57 +0200 Subject: Doc: cleanup the mention of 'indicator' in 'Customizing ItemDelegate' The explicit mention 'indicator' in the ItemDelegate customization docs is a remainder from the early days when it still had a check indicator built into. Then at some point we decided to provide separate type of checkable delegates. Change-Id: I710318d3828ffae1ceb0877a67fe128460653bc1 Reviewed-by: J-P Nurmi --- src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/imports/controls') diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc index 852a1e03..f37519de 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc @@ -433,8 +433,8 @@ \section2 Customizing ItemDelegate - ItemDelegate consists of three visual items: \l {Control::background}{background}, - \l {Control::contentItem}{content item} and \l {AbstractButton::indicator}{indicator}. + ItemDelegate consists of two visual items: \l {Control::background}{background} + and \l {Control::contentItem}{content item}. \image qtquickcontrols2-itemdelegate-custom.png -- cgit v1.2.3 From 4fb88d0f34e030223c75fc8903ef5d8325b649ed Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sat, 1 Oct 2016 23:02:43 +0200 Subject: Fix ComboBox to scroll to the highlighted item Change-Id: I57fefd8ba47796118e71902c6882e9918d462920 Tasl-number: QTBUG-55030 Reviewed-by: J-P Nurmi --- src/imports/controls/ComboBox.qml | 2 ++ src/imports/controls/material/ComboBox.qml | 2 ++ src/imports/controls/universal/ComboBox.qml | 2 ++ 3 files changed, 6 insertions(+) (limited to 'src/imports/controls') diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml index 5bffbb35..09930aad 100644 --- a/src/imports/controls/ComboBox.qml +++ b/src/imports/controls/ComboBox.qml @@ -115,6 +115,8 @@ T.ComboBox { implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex + highlightRangeMode: ListView.ApplyRange + highlightMoveDuration: 0 Rectangle { z: 10 diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index 9d51f13b..05981baa 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -140,6 +140,8 @@ T.ComboBox { implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex + highlightRangeMode: ListView.ApplyRange + highlightMoveDuration: 0 T.ScrollIndicator.vertical: ScrollIndicator { } } diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml index 929232ab..bb816fc1 100644 --- a/src/imports/controls/universal/ComboBox.qml +++ b/src/imports/controls/universal/ComboBox.qml @@ -120,6 +120,8 @@ T.ComboBox { implicitHeight: contentHeight model: control.popup.visible ? control.delegateModel : null currentIndex: control.highlightedIndex + highlightRangeMode: ListView.ApplyRange + highlightMoveDuration: 0 T.ScrollIndicator.vertical: ScrollIndicator { } } -- cgit v1.2.3