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 --- .../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 +++++++++ 198 files changed, 4696 insertions(+), 4696 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/doc/snippets') 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 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-popup-custom.qml (limited to 'src/imports/controls/doc/snippets') 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] +} -- cgit v1.2.3