From 730bf7b256f0f06c39f92dad064869f5d1368c62 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 23 Apr 2013 11:19:39 +0200 Subject: fixed up the demo suite Change-Id: I42dfba551b26f66b8de41dad3df2a5e120c82fb8 Reviewed-by: Eirik Aavitsland --- basicsuite/About Boot to Qt/AboutBoot2Qt.qml | 61 +++++ basicsuite/About Boot to Qt/Box.qml | 30 +++ basicsuite/About Boot to Qt/ContentText.qml | 8 + basicsuite/About Boot to Qt/QtForAndroid.qml | 48 ++++ basicsuite/About Boot to Qt/QtFramework.qml | 35 +++ basicsuite/About Boot to Qt/Title.qml | 8 + basicsuite/About Boot to Qt/codeless.png | Bin 0 -> 28581 bytes basicsuite/About Boot to Qt/description.txt | 3 + basicsuite/About Boot to Qt/icon.png | Bin 0 -> 13193 bytes basicsuite/About Boot to Qt/main.qml | 135 ++++++++++ basicsuite/About Boot to Qt/particle.png | Bin 0 -> 861 bytes basicsuite/About Boot to Qt/preview_l.jpg | Bin 0 -> 21072 bytes basicsuite/About Boot to Qt/qt-logo.png | Bin 0 -> 21659 bytes basicsuite/About Qt on Android/AboutBoot2Qt.qml | 57 ----- basicsuite/About Qt on Android/Box.qml | 30 --- basicsuite/About Qt on Android/ContentText.qml | 8 - basicsuite/About Qt on Android/QtForAndroid.qml | 48 ---- basicsuite/About Qt on Android/QtFramework.qml | 35 --- basicsuite/About Qt on Android/Title.qml | 8 - basicsuite/About Qt on Android/codeless.png | Bin 28581 -> 0 bytes basicsuite/About Qt on Android/icon.png | Bin 13193 -> 0 bytes basicsuite/About Qt on Android/main.qml | 135 ---------- basicsuite/About Qt on Android/particle.png | Bin 861 -> 0 bytes basicsuite/About Qt on Android/qt-logo.png | Bin 21659 -> 0 bytes basicsuite/Basic Qt Quick2 App/icon.png | Bin 15256 -> 0 bytes basicsuite/Basic Qt Quick2 App/main.qml | 37 --- basicsuite/Calculator/icon.png | Bin 11504 -> 0 bytes basicsuite/Calculator/main.qml | 16 -- basicsuite/Calendar/icon.png | Bin 7108 -> 0 bytes basicsuite/Calendar/main.qml | 16 -- basicsuite/Clock/icon.png | Bin 17245 -> 0 bytes basicsuite/Clock/main.qml | 16 -- basicsuite/Controls Layouts/description.txt | 3 + basicsuite/Controls Layouts/main.qml | 124 ++++++++++ basicsuite/Controls Layouts/preview_l.jpg | Bin 0 -> 11273 bytes .../Controls Touch/content/AndroidDelegate.qml | 92 +++++++ basicsuite/Controls Touch/content/ButtonPage.qml | 115 +++++++++ .../Controls Touch/content/ProgressBarPage.qml | 114 +++++++++ basicsuite/Controls Touch/content/SliderPage.qml | 106 ++++++++ basicsuite/Controls Touch/content/TabBarPage.qml | 101 ++++++++ .../Controls Touch/content/TextInputPage.qml | 106 ++++++++ basicsuite/Controls Touch/description.txt | 3 + basicsuite/Controls Touch/images/NOTICE.txt | 2 + .../Controls Touch/images/button_default.png | Bin 0 -> 1406 bytes .../Controls Touch/images/button_pressed.png | Bin 0 -> 1694 bytes .../Controls Touch/images/navigation_next_item.png | Bin 0 -> 1341 bytes .../images/navigation_previous_item.png | Bin 0 -> 1343 bytes basicsuite/Controls Touch/images/tab_selected.png | Bin 0 -> 217 bytes basicsuite/Controls Touch/images/tabs_standard.png | Bin 0 -> 1230 bytes basicsuite/Controls Touch/images/textinput.png | Bin 0 -> 4132 bytes basicsuite/Controls Touch/images/toolbar.png | Bin 0 -> 1643 bytes basicsuite/Controls Touch/main.qml | 154 ++++++++++++ basicsuite/Controls Touch/preview_l.jpg | Bin 0 -> 11179 bytes basicsuite/Game/icon.png | Bin 10217 -> 0 bytes basicsuite/Game/main.qml | 16 -- basicsuite/Hardware Specs/BackgroundSwirls.qml | 120 --------- basicsuite/Hardware Specs/SlideDeck.qml | 75 ------ basicsuite/Hardware Specs/SlideDeckRotated.qml | 57 ----- basicsuite/Hardware Specs/Swirl.qml | 108 -------- basicsuite/Hardware Specs/icon.png | Bin 8201 -> 0 bytes basicsuite/Hardware Specs/main.qml | 72 ------ basicsuite/Hardware Specs/particle.png | Bin 861 -> 0 bytes .../Launcher Settings/BrightnessController.qml | 8 + basicsuite/Launcher Settings/PoweroffAction.qml | 8 + basicsuite/Launcher Settings/RebootAction.qml | 8 + basicsuite/Launcher Settings/description.txt | 1 + basicsuite/Launcher Settings/main.qml | 119 +++++++++ basicsuite/Launcher Settings/preview_l.jpg | Bin 0 -> 10743 bytes basicsuite/Music/icon.png | Bin 10580 -> 0 bytes basicsuite/Music/main.qml | 16 -- basicsuite/Qt5 Cinematic Demo/description.txt | 5 + basicsuite/Qt5 Cinematic Demo/preview_l.jpg | Bin 0 -> 36830 bytes basicsuite/Qt5 Launch Presentation/CameraSlide.qml | 2 +- basicsuite/Qt5 Launch Presentation/CanvasSlide.qml | 2 +- .../Qt5 Launch Presentation/EffectsSlide.qml | 2 +- .../Qt5 Launch Presentation/ExamplesSlide.qml | 2 +- basicsuite/Qt5 Launch Presentation/FontSlide.qml | 2 +- .../OpacityTransitionPresentation.qml | 2 +- .../Qt5 Launch Presentation/ParticleSlide.qml | 2 +- basicsuite/Qt5 Launch Presentation/ShaderSlide.qml | 2 +- basicsuite/Qt5 Launch Presentation/SlideDeck.qml | 7 +- basicsuite/Qt5 Launch Presentation/VideoSlide.qml | 2 +- basicsuite/Qt5 Launch Presentation/WebkitSlide.qml | 2 +- .../Qt5 Launch Presentation/WidgetsSlide.qml | 2 +- basicsuite/Qt5 Launch Presentation/description.txt | 6 + basicsuite/Qt5 Launch Presentation/main_lofi.qml | 4 +- .../Qt5 Launch Presentation/presentation/Clock.qml | 77 ++++++ .../presentation/CodeSlide.qml | 162 ++++++++++++ .../presentation/Presentation.qml | 196 +++++++++++++++ .../Qt5 Launch Presentation/presentation/Slide.qml | 186 ++++++++++++++ .../presentation/SlideCounter.qml | 61 +++++ basicsuite/Qt5 Launch Presentation/preview_l.jpg | Bin 0 -> 16252 bytes basicsuite/Shader Effects/BGColorPicker.qml | 132 ++++++++++ basicsuite/Shader Effects/CheckBox.qml | 83 +++++++ basicsuite/Shader Effects/ColorPicker.qml | 272 +++++++++++++++++++++ basicsuite/Shader Effects/ColorSlider.qml | 132 ++++++++++ basicsuite/Shader Effects/Control.qml | 111 +++++++++ basicsuite/Shader Effects/ImageSource.qml | 71 ++++++ basicsuite/Shader Effects/Label.qml | 80 ++++++ basicsuite/Shader Effects/LevelSlider.qml | 201 +++++++++++++++ basicsuite/Shader Effects/PositionPicker.qml | 72 ++++++ basicsuite/Shader Effects/ProgressBar.qml | 113 +++++++++ basicsuite/Shader Effects/RadioButton.qml | 81 ++++++ basicsuite/Shader Effects/RadioButtonColumn.qml | 70 ++++++ basicsuite/Shader Effects/RgbaColorPicker.qml | 115 +++++++++ basicsuite/Shader Effects/Slider.qml | 143 +++++++++++ basicsuite/Shader Effects/TestBedModel.qml | 70 ++++++ basicsuite/Shader Effects/TestBlend.qml | 216 ++++++++++++++++ .../Shader Effects/TestBrightnessContrast.qml | 108 ++++++++ basicsuite/Shader Effects/TestCaseTemplate.qml | 142 +++++++++++ basicsuite/Shader Effects/TestColorOverlay.qml | 100 ++++++++ basicsuite/Shader Effects/TestColorize.qml | 102 ++++++++ basicsuite/Shader Effects/TestConicalGradient.qml | 146 +++++++++++ basicsuite/Shader Effects/TestDesaturate.qml | 100 ++++++++ basicsuite/Shader Effects/TestDirectionalBlur.qml | 124 ++++++++++ basicsuite/Shader Effects/TestDisplace.qml | 143 +++++++++++ basicsuite/Shader Effects/TestDropShadow.qml | 155 ++++++++++++ basicsuite/Shader Effects/TestFastBlur.qml | 106 ++++++++ basicsuite/Shader Effects/TestGammaAdjust.qml | 101 ++++++++ basicsuite/Shader Effects/TestGaussianBlur.qml | 123 ++++++++++ basicsuite/Shader Effects/TestGlow.qml | 137 +++++++++++ basicsuite/Shader Effects/TestHueSaturation.qml | 117 +++++++++ basicsuite/Shader Effects/TestInnerShadow.qml | 155 ++++++++++++ basicsuite/Shader Effects/TestLevelAdjust.qml | 161 ++++++++++++ basicsuite/Shader Effects/TestLinearGradient.qml | 156 ++++++++++++ basicsuite/Shader Effects/TestMaskedBlur.qml | 153 ++++++++++++ basicsuite/Shader Effects/TestOpacityMask.qml | 95 +++++++ basicsuite/Shader Effects/TestRadialBlur.qml | 132 ++++++++++ basicsuite/Shader Effects/TestRadialGradient.qml | 161 ++++++++++++ basicsuite/Shader Effects/TestRectangularGlow.qml | 138 +++++++++++ basicsuite/Shader Effects/TestRecursiveBlur.qml | 119 +++++++++ basicsuite/Shader Effects/TestThresholdMask.qml | 114 +++++++++ basicsuite/Shader Effects/TestZoomBlur.qml | 132 ++++++++++ basicsuite/Shader Effects/description.txt | 3 + basicsuite/Shader Effects/images/background.png | Bin 0 -> 149 bytes basicsuite/Shader Effects/images/bug.jpg | Bin 0 -> 376684 bytes basicsuite/Shader Effects/images/butterfly.png | Bin 0 -> 36912 bytes .../Shader Effects/images/checkbox_inner.png | Bin 0 -> 236 bytes .../Shader Effects/images/checkbox_outer.png | Bin 0 -> 227 bytes basicsuite/Shader Effects/images/checker.png | Bin 0 -> 1202 bytes basicsuite/Shader Effects/images/collapse.png | Bin 0 -> 336 bytes .../Shader Effects/images/color_selection_hl.png | Bin 0 -> 533 bytes .../Shader Effects/images/color_selection_mask.png | Bin 0 -> 231 bytes basicsuite/Shader Effects/images/expand.png | Bin 0 -> 343 bytes basicsuite/Shader Effects/images/fog.png | Bin 0 -> 225653 bytes basicsuite/Shader Effects/images/glass_normal.png | Bin 0 -> 13489 bytes basicsuite/Shader Effects/images/group_bottom.png | Bin 0 -> 157 bytes basicsuite/Shader Effects/images/group_top.png | Bin 0 -> 167 bytes basicsuite/Shader Effects/images/icon_blend.png | Bin 0 -> 2940 bytes basicsuite/Shader Effects/images/icon_blur.png | Bin 0 -> 303 bytes basicsuite/Shader Effects/images/icon_color.png | Bin 0 -> 3021 bytes .../Shader Effects/images/icon_distortion.png | Bin 0 -> 229 bytes .../Shader Effects/images/icon_drop_shadow.png | Bin 0 -> 160 bytes basicsuite/Shader Effects/images/icon_glow.png | Bin 0 -> 285 bytes basicsuite/Shader Effects/images/icon_gradient.png | Bin 0 -> 182 bytes basicsuite/Shader Effects/images/icon_mask.png | Bin 0 -> 2837 bytes .../Shader Effects/images/icon_motion_blur.png | Bin 0 -> 304 bytes .../Shader Effects/images/radiobutton_inner.png | Bin 0 -> 274 bytes .../Shader Effects/images/radiobutton_outer.png | Bin 0 -> 347 bytes basicsuite/Shader Effects/images/slider_handle.png | Bin 0 -> 409 bytes .../Shader Effects/images/slider_handle_b.png | Bin 0 -> 1031 bytes .../Shader Effects/images/slider_handle_black.png | Bin 0 -> 390 bytes .../Shader Effects/images/slider_handle_g.png | Bin 0 -> 1851 bytes .../Shader Effects/images/slider_handle_gray.png | Bin 0 -> 401 bytes .../images/slider_handle_pressed.png | Bin 0 -> 387 bytes .../Shader Effects/images/slider_handle_r.png | Bin 0 -> 1842 bytes .../Shader Effects/images/slider_handle_white.png | Bin 0 -> 373 bytes basicsuite/Shader Effects/images/slider_track.png | Bin 0 -> 198 bytes .../Shader Effects/images/slider_track_filled.png | Bin 0 -> 153 bytes .../Shader Effects/images/slider_track_left.png | Bin 0 -> 1163 bytes .../Shader Effects/images/slider_track_right.png | Bin 0 -> 1149 bytes basicsuite/Shader Effects/images/title.png | Bin 0 -> 160 bytes basicsuite/Shader Effects/images/workarea_left.png | Bin 0 -> 123 bytes .../Shader Effects/images/workarea_right.png | Bin 0 -> 157 bytes basicsuite/Shader Effects/main.qml | 168 +++++++++++++ basicsuite/Shader Effects/preview_l.jpg | Bin 0 -> 24373 bytes basicsuite/Social/icon.png | Bin 18325 -> 0 bytes basicsuite/Social/main.qml | 16 -- basicsuite/Text Input/description.txt | 6 + basicsuite/Text Input/preview_l.jpg | Bin 0 -> 16465 bytes basicsuite/Web/icon.png | Bin 16261 -> 0 bytes basicsuite/Web/main.qml | 16 -- basicsuite/Wifi/main.qml | 157 ------------ experimental/Wifi/main.qml | 157 ++++++++++++ 184 files changed, 7618 insertions(+), 1075 deletions(-) create mode 100644 basicsuite/About Boot to Qt/AboutBoot2Qt.qml create mode 100644 basicsuite/About Boot to Qt/Box.qml create mode 100644 basicsuite/About Boot to Qt/ContentText.qml create mode 100644 basicsuite/About Boot to Qt/QtForAndroid.qml create mode 100644 basicsuite/About Boot to Qt/QtFramework.qml create mode 100644 basicsuite/About Boot to Qt/Title.qml create mode 100644 basicsuite/About Boot to Qt/codeless.png create mode 100644 basicsuite/About Boot to Qt/description.txt create mode 100755 basicsuite/About Boot to Qt/icon.png create mode 100644 basicsuite/About Boot to Qt/main.qml create mode 100644 basicsuite/About Boot to Qt/particle.png create mode 100644 basicsuite/About Boot to Qt/preview_l.jpg create mode 100644 basicsuite/About Boot to Qt/qt-logo.png delete mode 100644 basicsuite/About Qt on Android/AboutBoot2Qt.qml delete mode 100644 basicsuite/About Qt on Android/Box.qml delete mode 100644 basicsuite/About Qt on Android/ContentText.qml delete mode 100644 basicsuite/About Qt on Android/QtForAndroid.qml delete mode 100644 basicsuite/About Qt on Android/QtFramework.qml delete mode 100644 basicsuite/About Qt on Android/Title.qml delete mode 100644 basicsuite/About Qt on Android/codeless.png delete mode 100755 basicsuite/About Qt on Android/icon.png delete mode 100644 basicsuite/About Qt on Android/main.qml delete mode 100644 basicsuite/About Qt on Android/particle.png delete mode 100644 basicsuite/About Qt on Android/qt-logo.png delete mode 100755 basicsuite/Basic Qt Quick2 App/icon.png delete mode 100644 basicsuite/Basic Qt Quick2 App/main.qml delete mode 100755 basicsuite/Calculator/icon.png delete mode 100644 basicsuite/Calculator/main.qml delete mode 100755 basicsuite/Calendar/icon.png delete mode 100644 basicsuite/Calendar/main.qml delete mode 100755 basicsuite/Clock/icon.png delete mode 100644 basicsuite/Clock/main.qml create mode 100644 basicsuite/Controls Layouts/description.txt create mode 100644 basicsuite/Controls Layouts/main.qml create mode 100644 basicsuite/Controls Layouts/preview_l.jpg create mode 100644 basicsuite/Controls Touch/content/AndroidDelegate.qml create mode 100644 basicsuite/Controls Touch/content/ButtonPage.qml create mode 100644 basicsuite/Controls Touch/content/ProgressBarPage.qml create mode 100644 basicsuite/Controls Touch/content/SliderPage.qml create mode 100644 basicsuite/Controls Touch/content/TabBarPage.qml create mode 100644 basicsuite/Controls Touch/content/TextInputPage.qml create mode 100644 basicsuite/Controls Touch/description.txt create mode 100644 basicsuite/Controls Touch/images/NOTICE.txt create mode 100644 basicsuite/Controls Touch/images/button_default.png create mode 100644 basicsuite/Controls Touch/images/button_pressed.png create mode 100644 basicsuite/Controls Touch/images/navigation_next_item.png create mode 100644 basicsuite/Controls Touch/images/navigation_previous_item.png create mode 100644 basicsuite/Controls Touch/images/tab_selected.png create mode 100644 basicsuite/Controls Touch/images/tabs_standard.png create mode 100644 basicsuite/Controls Touch/images/textinput.png create mode 100644 basicsuite/Controls Touch/images/toolbar.png create mode 100644 basicsuite/Controls Touch/main.qml create mode 100644 basicsuite/Controls Touch/preview_l.jpg delete mode 100755 basicsuite/Game/icon.png delete mode 100644 basicsuite/Game/main.qml delete mode 100644 basicsuite/Hardware Specs/BackgroundSwirls.qml delete mode 100644 basicsuite/Hardware Specs/SlideDeck.qml delete mode 100644 basicsuite/Hardware Specs/SlideDeckRotated.qml delete mode 100644 basicsuite/Hardware Specs/Swirl.qml delete mode 100755 basicsuite/Hardware Specs/icon.png delete mode 100644 basicsuite/Hardware Specs/main.qml delete mode 100644 basicsuite/Hardware Specs/particle.png create mode 100644 basicsuite/Launcher Settings/BrightnessController.qml create mode 100644 basicsuite/Launcher Settings/PoweroffAction.qml create mode 100644 basicsuite/Launcher Settings/RebootAction.qml create mode 100644 basicsuite/Launcher Settings/description.txt create mode 100644 basicsuite/Launcher Settings/main.qml create mode 100644 basicsuite/Launcher Settings/preview_l.jpg delete mode 100755 basicsuite/Music/icon.png delete mode 100644 basicsuite/Music/main.qml create mode 100644 basicsuite/Qt5 Cinematic Demo/description.txt create mode 100644 basicsuite/Qt5 Cinematic Demo/preview_l.jpg create mode 100644 basicsuite/Qt5 Launch Presentation/description.txt create mode 100644 basicsuite/Qt5 Launch Presentation/presentation/Clock.qml create mode 100644 basicsuite/Qt5 Launch Presentation/presentation/CodeSlide.qml create mode 100644 basicsuite/Qt5 Launch Presentation/presentation/Presentation.qml create mode 100644 basicsuite/Qt5 Launch Presentation/presentation/Slide.qml create mode 100644 basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml create mode 100644 basicsuite/Qt5 Launch Presentation/preview_l.jpg create mode 100644 basicsuite/Shader Effects/BGColorPicker.qml create mode 100644 basicsuite/Shader Effects/CheckBox.qml create mode 100755 basicsuite/Shader Effects/ColorPicker.qml create mode 100755 basicsuite/Shader Effects/ColorSlider.qml create mode 100644 basicsuite/Shader Effects/Control.qml create mode 100644 basicsuite/Shader Effects/ImageSource.qml create mode 100644 basicsuite/Shader Effects/Label.qml create mode 100644 basicsuite/Shader Effects/LevelSlider.qml create mode 100644 basicsuite/Shader Effects/PositionPicker.qml create mode 100644 basicsuite/Shader Effects/ProgressBar.qml create mode 100644 basicsuite/Shader Effects/RadioButton.qml create mode 100644 basicsuite/Shader Effects/RadioButtonColumn.qml create mode 100644 basicsuite/Shader Effects/RgbaColorPicker.qml create mode 100644 basicsuite/Shader Effects/Slider.qml create mode 100644 basicsuite/Shader Effects/TestBedModel.qml create mode 100644 basicsuite/Shader Effects/TestBlend.qml create mode 100644 basicsuite/Shader Effects/TestBrightnessContrast.qml create mode 100644 basicsuite/Shader Effects/TestCaseTemplate.qml create mode 100644 basicsuite/Shader Effects/TestColorOverlay.qml create mode 100644 basicsuite/Shader Effects/TestColorize.qml create mode 100644 basicsuite/Shader Effects/TestConicalGradient.qml create mode 100644 basicsuite/Shader Effects/TestDesaturate.qml create mode 100644 basicsuite/Shader Effects/TestDirectionalBlur.qml create mode 100644 basicsuite/Shader Effects/TestDisplace.qml create mode 100644 basicsuite/Shader Effects/TestDropShadow.qml create mode 100644 basicsuite/Shader Effects/TestFastBlur.qml create mode 100644 basicsuite/Shader Effects/TestGammaAdjust.qml create mode 100644 basicsuite/Shader Effects/TestGaussianBlur.qml create mode 100644 basicsuite/Shader Effects/TestGlow.qml create mode 100644 basicsuite/Shader Effects/TestHueSaturation.qml create mode 100644 basicsuite/Shader Effects/TestInnerShadow.qml create mode 100644 basicsuite/Shader Effects/TestLevelAdjust.qml create mode 100644 basicsuite/Shader Effects/TestLinearGradient.qml create mode 100644 basicsuite/Shader Effects/TestMaskedBlur.qml create mode 100644 basicsuite/Shader Effects/TestOpacityMask.qml create mode 100644 basicsuite/Shader Effects/TestRadialBlur.qml create mode 100644 basicsuite/Shader Effects/TestRadialGradient.qml create mode 100644 basicsuite/Shader Effects/TestRectangularGlow.qml create mode 100644 basicsuite/Shader Effects/TestRecursiveBlur.qml create mode 100644 basicsuite/Shader Effects/TestThresholdMask.qml create mode 100644 basicsuite/Shader Effects/TestZoomBlur.qml create mode 100644 basicsuite/Shader Effects/description.txt create mode 100644 basicsuite/Shader Effects/images/background.png create mode 100755 basicsuite/Shader Effects/images/bug.jpg create mode 100644 basicsuite/Shader Effects/images/butterfly.png create mode 100644 basicsuite/Shader Effects/images/checkbox_inner.png create mode 100644 basicsuite/Shader Effects/images/checkbox_outer.png create mode 100644 basicsuite/Shader Effects/images/checker.png create mode 100644 basicsuite/Shader Effects/images/collapse.png create mode 100644 basicsuite/Shader Effects/images/color_selection_hl.png create mode 100644 basicsuite/Shader Effects/images/color_selection_mask.png create mode 100644 basicsuite/Shader Effects/images/expand.png create mode 100644 basicsuite/Shader Effects/images/fog.png create mode 100755 basicsuite/Shader Effects/images/glass_normal.png create mode 100644 basicsuite/Shader Effects/images/group_bottom.png create mode 100644 basicsuite/Shader Effects/images/group_top.png create mode 100644 basicsuite/Shader Effects/images/icon_blend.png create mode 100644 basicsuite/Shader Effects/images/icon_blur.png create mode 100644 basicsuite/Shader Effects/images/icon_color.png create mode 100644 basicsuite/Shader Effects/images/icon_distortion.png create mode 100644 basicsuite/Shader Effects/images/icon_drop_shadow.png create mode 100644 basicsuite/Shader Effects/images/icon_glow.png create mode 100644 basicsuite/Shader Effects/images/icon_gradient.png create mode 100644 basicsuite/Shader Effects/images/icon_mask.png create mode 100644 basicsuite/Shader Effects/images/icon_motion_blur.png create mode 100644 basicsuite/Shader Effects/images/radiobutton_inner.png create mode 100644 basicsuite/Shader Effects/images/radiobutton_outer.png create mode 100644 basicsuite/Shader Effects/images/slider_handle.png create mode 100755 basicsuite/Shader Effects/images/slider_handle_b.png create mode 100755 basicsuite/Shader Effects/images/slider_handle_black.png create mode 100755 basicsuite/Shader Effects/images/slider_handle_g.png create mode 100755 basicsuite/Shader Effects/images/slider_handle_gray.png create mode 100644 basicsuite/Shader Effects/images/slider_handle_pressed.png create mode 100755 basicsuite/Shader Effects/images/slider_handle_r.png create mode 100755 basicsuite/Shader Effects/images/slider_handle_white.png create mode 100644 basicsuite/Shader Effects/images/slider_track.png create mode 100644 basicsuite/Shader Effects/images/slider_track_filled.png create mode 100755 basicsuite/Shader Effects/images/slider_track_left.png create mode 100755 basicsuite/Shader Effects/images/slider_track_right.png create mode 100644 basicsuite/Shader Effects/images/title.png create mode 100644 basicsuite/Shader Effects/images/workarea_left.png create mode 100644 basicsuite/Shader Effects/images/workarea_right.png create mode 100644 basicsuite/Shader Effects/main.qml create mode 100644 basicsuite/Shader Effects/preview_l.jpg delete mode 100755 basicsuite/Social/icon.png delete mode 100644 basicsuite/Social/main.qml create mode 100644 basicsuite/Text Input/description.txt create mode 100644 basicsuite/Text Input/preview_l.jpg delete mode 100755 basicsuite/Web/icon.png delete mode 100644 basicsuite/Web/main.qml delete mode 100644 basicsuite/Wifi/main.qml create mode 100644 experimental/Wifi/main.qml diff --git a/basicsuite/About Boot to Qt/AboutBoot2Qt.qml b/basicsuite/About Boot to Qt/AboutBoot2Qt.qml new file mode 100644 index 0000000..66346c1 --- /dev/null +++ b/basicsuite/About Boot to Qt/AboutBoot2Qt.qml @@ -0,0 +1,61 @@ +import QtQuick 2.0 + +Column { + + id: root + + width: parent.width + + spacing: engine.smallFontSize() + + Title { + id: title + text: "Boot to Qt" + } + + ContentText { + id: brief + width: parent.width + text: '

Boot to Qt is the working name for a light-weight UI stack for embedded linux, + based on the Qt Framework by Digia. Boot to Qt places Qt on top of an Android + kernel/baselayer and offers an elegant means of developing beautiful and + performant embedded devices. + +

Boot to Qt is a commercial-only SDK offering which includes a ready-made stack + with full Qt Creator integration. The SDK allows building and running on device + with just a button. Embedded development has never been this easy!' + } + + Column { + id: diagram + spacing: 1 + width: parent.width * 0.5 + anchors.horizontalCenter: parent.horizontalCenter + Box { text: "Application"; accentColor: "coral" } + Box { text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } + Box { text: "Android Baselayer"; accentColor: "steelblue" } + Box { text: "Embedded Hardware"; accentColor: "steelblue"} + } + + ContentText { + id: description + + width: parent.width + + text: '

Boot to Qt runs on top of Android 4.0 based kernels and has been tested and verified on + a number of different hardware configurations, including: +

+ Rough minimal requirements for running Boot to Qt are: + + ' + } +} diff --git a/basicsuite/About Boot to Qt/Box.qml b/basicsuite/About Boot to Qt/Box.qml new file mode 100644 index 0000000..cfbb995 --- /dev/null +++ b/basicsuite/About Boot to Qt/Box.qml @@ -0,0 +1,30 @@ +import QtQuick 2.0 + +Rectangle { + id: root + + width: parent.width + height: label.font.pixelSize * 3 + + radius: 4 + + antialiasing: true + + property alias text: label.text; + + property color accentColor: "palegreen" + + gradient: Gradient { + GradientStop { position: 0; color: root.accentColor; } + GradientStop { position: 1; color: "black"; } + } + + Text { + id: label + font.pixelSize: engine.smallFontSize() + font.bold: true; + color: "white" + anchors.centerIn: parent + } + +} diff --git a/basicsuite/About Boot to Qt/ContentText.qml b/basicsuite/About Boot to Qt/ContentText.qml new file mode 100644 index 0000000..ed95064 --- /dev/null +++ b/basicsuite/About Boot to Qt/ContentText.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +Text { + color: "white" + font.pixelSize: engine.smallFontSize() + textFormat: Text.RichText + wrapMode: Text.WordWrap +} diff --git a/basicsuite/About Boot to Qt/QtForAndroid.qml b/basicsuite/About Boot to Qt/QtForAndroid.qml new file mode 100644 index 0000000..2eac080 --- /dev/null +++ b/basicsuite/About Boot to Qt/QtForAndroid.qml @@ -0,0 +1,48 @@ +import QtQuick 2.0 + +Column { + id: root + + width: parent.width + + spacing: engine.smallFontSize() + + Title { + text: "Boot2Qt vs Qt for Android" + } + + ContentText { + width: parent.width + text: '

Qt for Android is a port of the Qt Framework to be used + for application development on the Android platform. Its + purpose is to enable development of applications that + can run on Android devices. For developers writing applications + for the Android ecosystem, Qt for Android is the right choice. + +

Boot2Qt tries to strip down the Android stack to the bare minimum, + relying only on basic Linux features. The majority of the Android stack, + such as SurfaceFlinger or DalvikVM is not running in + Boot2Qt, resulting in faster startup times, lower memory consumption + and overall better performance. + ' + } + + Column { + id: diagram + spacing: 1 + width: parent.width * 0.66 + anchors.horizontalCenter: parent.horizontalCenter + Box { text: "Application"; accentColor: "coral" } + Box { text: "Qt for Android"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } + Row { + width: parent.width + height: b.height + Box { id: b; width: parent.width / 2; text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } + Box { width: parent.width / 2; text: "Android (Dalvik)"; accentColor: "steelblue" } + } + + Box { text: "Android Baselayer"; accentColor: "steelblue" } + Box { text: "Embedded Hardware"; accentColor: "steelblue"} + } + +} diff --git a/basicsuite/About Boot to Qt/QtFramework.qml b/basicsuite/About Boot to Qt/QtFramework.qml new file mode 100644 index 0000000..3cb2f10 --- /dev/null +++ b/basicsuite/About Boot to Qt/QtFramework.qml @@ -0,0 +1,35 @@ +import QtQuick 2.0 + +Column { + id: root + + width: parent.width + + spacing: engine.smallFontSize() + + Title { + text: "Qt Framework" + } + + ContentText { + id: brief + width: parent.width + text: '

Qt is a full development framework with tools designed to streamline + the creation of applications and user interfaces for desktop, embedded + and mobile platforms. +

+

With Qt, you can reuse code efficiently to target multiple platforms + with one code base. The modular C++ class library and developer tools + easily enables developers to create applications for one platform and + easily build and run to deploy on another platform.' + } + + +} diff --git a/basicsuite/About Boot to Qt/Title.qml b/basicsuite/About Boot to Qt/Title.qml new file mode 100644 index 0000000..8fb13cc --- /dev/null +++ b/basicsuite/About Boot to Qt/Title.qml @@ -0,0 +1,8 @@ +import QtQuick 2.0 + +Text { + font.pixelSize: engine.titleFontSize() + font.italic: true + color: "white" + anchors.horizontalCenter: parent.horizontalCenter +} diff --git a/basicsuite/About Boot to Qt/codeless.png b/basicsuite/About Boot to Qt/codeless.png new file mode 100644 index 0000000..53e4806 Binary files /dev/null and b/basicsuite/About Boot to Qt/codeless.png differ diff --git a/basicsuite/About Boot to Qt/description.txt b/basicsuite/About Boot to Qt/description.txt new file mode 100644 index 0000000..f546387 --- /dev/null +++ b/basicsuite/About Boot to Qt/description.txt @@ -0,0 +1,3 @@ +The "About Boot to Qt" provides an introduction to what Boot to Qt is all about. + +It talks briefly about how the software stack is built up, rough hardware requirements and how Boot to Qt from the more traditional Qt editions. diff --git a/basicsuite/About Boot to Qt/icon.png b/basicsuite/About Boot to Qt/icon.png new file mode 100755 index 0000000..4e84cd5 Binary files /dev/null and b/basicsuite/About Boot to Qt/icon.png differ diff --git a/basicsuite/About Boot to Qt/main.qml b/basicsuite/About Boot to Qt/main.qml new file mode 100644 index 0000000..6586811 --- /dev/null +++ b/basicsuite/About Boot to Qt/main.qml @@ -0,0 +1,135 @@ +import QtQuick 2.0 +import QtQuick.Particles 2.0 + +Item { + id: root + + width: 1280 + height: 800 + +// Rectangle { +// anchors.fill: parent +// color: "black" +// } + + Flickable { + id: flick + property real inertia: 0.4 + + property real cellWidth; + property real cellHeight; + + width: parent.width + height: parent.height + anchors.horizontalCenter: parent.horizontalCenter + + contentHeight: content.height + + flickableDirection: Flickable.VerticalFlick + + property real topOvershoot: Math.max(0, contentItem.y); + property real bottomOvershoot: Math.max(0, root.height - (contentItem.height + contentItem.y)); +// onTopOvershootChanged: print("Top Overshoot:", topOvershoot); +// onBottomOvershootChanged: print("Bottom Overshoot:", bottomOvershoot); + + Item { + id: shiftTrickery + + width: flick.width + height: content.height + + Column { + id: content; + + y: -flick.contentItem.y + offsetY; + width: flick.width * 2 / 3 + anchors.horizontalCenter: parent.horizontalCenter + + property real offsetY: 0; + property real inertia: flick.inertia; + property real t; + NumberAnimation on t { + id: animation; + from: 0; + to: 1; + duration: 1000; + loops: Animation.Infinite + running: Math.abs(content.y) > 0.001 || Math.abs(content.x) > 0.001 + } + + onTChanged: { + offsetY += (flick.contentItem.y - offsetY) * inertia + } + + + spacing: engine.smallFontSize() * 2 + + Item { width: 1; height: engine.smallFontSize() } + AboutBoot2Qt { } + QtFramework { } + QtForAndroid { } + Image { + id: codeLessImage + source: "codeless.png" + anchors.horizontalCenter: parent.horizontalCenter + } + Item { width: 1; height: engine.smallFontSize() } + } + + } + } + + ParticleSystem { + + anchors.fill: parent + + ImageParticle { + id: imageParticle + source: "particle.png" + color: "#80c342" + alpha: 0 + colorVariation: 0.3 + entryEffect: ImageParticle.None + } + + Emitter { + id: topEmitter + width: root.width + height: 1 + x: 0 + y: -1 + shape: EllipseShape { fill: true } + + emitRate: 300 + lifeSpan: 1000 + size: 20 + sizeVariation: 4 + endSize: 0 + + enabled: flick.topOvershoot > 0 + + velocity: PointDirection { xVariation: 10; yVariation: 50; y: Math.sqrt(flick.topOvershoot) * 10; } + acceleration: PointDirection { y: 50 } + } + + Emitter { + id: bottomEmitter + width: root.width + height: 1 + x: 0 + y: root.height + 1 + shape: EllipseShape { fill: true } + + emitRate: 300 + lifeSpan: 1000 + size: 20 + sizeVariation: 4 + endSize: 0 + + enabled: flick.bottomOvershoot > 0 + + velocity: PointDirection { xVariation: 10; yVariation: -50; y: Math.sqrt(flick.bottomOvershoot) * -10; } + acceleration: PointDirection { y: -50 } + } + } +} diff --git a/basicsuite/About Boot to Qt/particle.png b/basicsuite/About Boot to Qt/particle.png new file mode 100644 index 0000000..5c83896 Binary files /dev/null and b/basicsuite/About Boot to Qt/particle.png differ diff --git a/basicsuite/About Boot to Qt/preview_l.jpg b/basicsuite/About Boot to Qt/preview_l.jpg new file mode 100644 index 0000000..84fcb5d Binary files /dev/null and b/basicsuite/About Boot to Qt/preview_l.jpg differ diff --git a/basicsuite/About Boot to Qt/qt-logo.png b/basicsuite/About Boot to Qt/qt-logo.png new file mode 100644 index 0000000..748392d Binary files /dev/null and b/basicsuite/About Boot to Qt/qt-logo.png differ diff --git a/basicsuite/About Qt on Android/AboutBoot2Qt.qml b/basicsuite/About Qt on Android/AboutBoot2Qt.qml deleted file mode 100644 index 6ffac40..0000000 --- a/basicsuite/About Qt on Android/AboutBoot2Qt.qml +++ /dev/null @@ -1,57 +0,0 @@ -import QtQuick 2.0 - -Column { - - id: root - - width: parent.width - - spacing: engine.smallFontSize() - - Title { - id: title - text: "Boot2Qt" - } - - ContentText { - id: brief - width: parent.width - text: "Boot2Qt is the working name for a light-weight UI stack for embedded linux, - based on the Qt Framework by Digia. Boot2Qt places Qt on top of an Android - kernel/baselayer and offers an elegant means of developing beautiful and - performant embedded devices." - } - - Column { - id: diagram - spacing: 1 - width: parent.width * 0.5 - anchors.horizontalCenter: parent.horizontalCenter - Box { text: "Application"; accentColor: "coral" } - Box { text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } - Box { text: "Android Baselayer"; accentColor: "steelblue" } - Box { text: "Embedded Hardware"; accentColor: "steelblue"} - } - - ContentText { - id: description - - width: parent.width - - text: "Boot2Qt runs on top of Android 4.0 based kernels and has been tested and verified on - a number of different hardware configurations, including: -

- Rough minimal requirements for running Boot2Qt are: - - " - } -} diff --git a/basicsuite/About Qt on Android/Box.qml b/basicsuite/About Qt on Android/Box.qml deleted file mode 100644 index cfbb995..0000000 --- a/basicsuite/About Qt on Android/Box.qml +++ /dev/null @@ -1,30 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - id: root - - width: parent.width - height: label.font.pixelSize * 3 - - radius: 4 - - antialiasing: true - - property alias text: label.text; - - property color accentColor: "palegreen" - - gradient: Gradient { - GradientStop { position: 0; color: root.accentColor; } - GradientStop { position: 1; color: "black"; } - } - - Text { - id: label - font.pixelSize: engine.smallFontSize() - font.bold: true; - color: "white" - anchors.centerIn: parent - } - -} diff --git a/basicsuite/About Qt on Android/ContentText.qml b/basicsuite/About Qt on Android/ContentText.qml deleted file mode 100644 index ed95064..0000000 --- a/basicsuite/About Qt on Android/ContentText.qml +++ /dev/null @@ -1,8 +0,0 @@ -import QtQuick 2.0 - -Text { - color: "white" - font.pixelSize: engine.smallFontSize() - textFormat: Text.RichText - wrapMode: Text.WordWrap -} diff --git a/basicsuite/About Qt on Android/QtForAndroid.qml b/basicsuite/About Qt on Android/QtForAndroid.qml deleted file mode 100644 index a1ab010..0000000 --- a/basicsuite/About Qt on Android/QtForAndroid.qml +++ /dev/null @@ -1,48 +0,0 @@ -import QtQuick 2.0 - -Column { - id: root - - width: parent.width - - spacing: engine.smallFontSize() - - Title { - text: "Boot2Qt vs Qt for Android" - } - - ContentText { - width: parent.width - text: "

Qt for Android is a port of the Qt Framework to be used - for application development on the Android platform. Its - purpose is to enable development of applications that - can run on Android devices. For developers writing applications - for the Android ecosystem, Qt for Android is the right choice. - -

Boot2Qt tries to strip down the Android stack to the bare minimum, - relying only on basic Linux features. The majority of the Android stack, - such as SurfaceFlinger or DalvikVM is not running in - Boot2Qt, resulting in faster startup times, lower memory consumption - and overall better performance. - " - } - - Column { - id: diagram - spacing: 1 - width: parent.width * 0.66 - anchors.horizontalCenter: parent.horizontalCenter - Box { text: "Application"; accentColor: "coral" } - Box { text: "Qt for Android"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } - Row { - width: parent.width - height: b.height - Box { id: b; width: parent.width / 2; text: "Qt Framework"; accentColor: Qt.rgba(0.64, 0.82, 0.15) } - Box { width: parent.width / 2; text: "Android (Dalvik)"; accentColor: "steelblue" } - } - - Box { text: "Android Baselayer"; accentColor: "steelblue" } - Box { text: "Embedded Hardware"; accentColor: "steelblue"} - } - -} diff --git a/basicsuite/About Qt on Android/QtFramework.qml b/basicsuite/About Qt on Android/QtFramework.qml deleted file mode 100644 index 6e549ab..0000000 --- a/basicsuite/About Qt on Android/QtFramework.qml +++ /dev/null @@ -1,35 +0,0 @@ -import QtQuick 2.0 - -Column { - id: root - - width: parent.width - - spacing: engine.smallFontSize() - - Title { - text: "Qt Framework" - } - - ContentText { - id: brief - width: parent.width - text: "Qt is a full development framework with tools designed to streamline - the creation of applications and user interfaces for desktop, embedded - and mobile platforms. -

- With Qt, you can reuse code efficiently to target multiple platforms - with one code base. The modular C++ class library and developer tools - easily enables developers to create applications for one platform and - easily build and run to deploy on another platform." - } - - -} diff --git a/basicsuite/About Qt on Android/Title.qml b/basicsuite/About Qt on Android/Title.qml deleted file mode 100644 index 8fb13cc..0000000 --- a/basicsuite/About Qt on Android/Title.qml +++ /dev/null @@ -1,8 +0,0 @@ -import QtQuick 2.0 - -Text { - font.pixelSize: engine.titleFontSize() - font.italic: true - color: "white" - anchors.horizontalCenter: parent.horizontalCenter -} diff --git a/basicsuite/About Qt on Android/codeless.png b/basicsuite/About Qt on Android/codeless.png deleted file mode 100644 index 53e4806..0000000 Binary files a/basicsuite/About Qt on Android/codeless.png and /dev/null differ diff --git a/basicsuite/About Qt on Android/icon.png b/basicsuite/About Qt on Android/icon.png deleted file mode 100755 index 4e84cd5..0000000 Binary files a/basicsuite/About Qt on Android/icon.png and /dev/null differ diff --git a/basicsuite/About Qt on Android/main.qml b/basicsuite/About Qt on Android/main.qml deleted file mode 100644 index 6586811..0000000 --- a/basicsuite/About Qt on Android/main.qml +++ /dev/null @@ -1,135 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - id: root - - width: 1280 - height: 800 - -// Rectangle { -// anchors.fill: parent -// color: "black" -// } - - Flickable { - id: flick - property real inertia: 0.4 - - property real cellWidth; - property real cellHeight; - - width: parent.width - height: parent.height - anchors.horizontalCenter: parent.horizontalCenter - - contentHeight: content.height - - flickableDirection: Flickable.VerticalFlick - - property real topOvershoot: Math.max(0, contentItem.y); - property real bottomOvershoot: Math.max(0, root.height - (contentItem.height + contentItem.y)); -// onTopOvershootChanged: print("Top Overshoot:", topOvershoot); -// onBottomOvershootChanged: print("Bottom Overshoot:", bottomOvershoot); - - Item { - id: shiftTrickery - - width: flick.width - height: content.height - - Column { - id: content; - - y: -flick.contentItem.y + offsetY; - width: flick.width * 2 / 3 - anchors.horizontalCenter: parent.horizontalCenter - - property real offsetY: 0; - property real inertia: flick.inertia; - property real t; - NumberAnimation on t { - id: animation; - from: 0; - to: 1; - duration: 1000; - loops: Animation.Infinite - running: Math.abs(content.y) > 0.001 || Math.abs(content.x) > 0.001 - } - - onTChanged: { - offsetY += (flick.contentItem.y - offsetY) * inertia - } - - - spacing: engine.smallFontSize() * 2 - - Item { width: 1; height: engine.smallFontSize() } - AboutBoot2Qt { } - QtFramework { } - QtForAndroid { } - Image { - id: codeLessImage - source: "codeless.png" - anchors.horizontalCenter: parent.horizontalCenter - } - Item { width: 1; height: engine.smallFontSize() } - } - - } - } - - ParticleSystem { - - anchors.fill: parent - - ImageParticle { - id: imageParticle - source: "particle.png" - color: "#80c342" - alpha: 0 - colorVariation: 0.3 - entryEffect: ImageParticle.None - } - - Emitter { - id: topEmitter - width: root.width - height: 1 - x: 0 - y: -1 - shape: EllipseShape { fill: true } - - emitRate: 300 - lifeSpan: 1000 - size: 20 - sizeVariation: 4 - endSize: 0 - - enabled: flick.topOvershoot > 0 - - velocity: PointDirection { xVariation: 10; yVariation: 50; y: Math.sqrt(flick.topOvershoot) * 10; } - acceleration: PointDirection { y: 50 } - } - - Emitter { - id: bottomEmitter - width: root.width - height: 1 - x: 0 - y: root.height + 1 - shape: EllipseShape { fill: true } - - emitRate: 300 - lifeSpan: 1000 - size: 20 - sizeVariation: 4 - endSize: 0 - - enabled: flick.bottomOvershoot > 0 - - velocity: PointDirection { xVariation: 10; yVariation: -50; y: Math.sqrt(flick.bottomOvershoot) * -10; } - acceleration: PointDirection { y: -50 } - } - } -} diff --git a/basicsuite/About Qt on Android/particle.png b/basicsuite/About Qt on Android/particle.png deleted file mode 100644 index 5c83896..0000000 Binary files a/basicsuite/About Qt on Android/particle.png and /dev/null differ diff --git a/basicsuite/About Qt on Android/qt-logo.png b/basicsuite/About Qt on Android/qt-logo.png deleted file mode 100644 index 748392d..0000000 Binary files a/basicsuite/About Qt on Android/qt-logo.png and /dev/null differ diff --git a/basicsuite/Basic Qt Quick2 App/icon.png b/basicsuite/Basic Qt Quick2 App/icon.png deleted file mode 100755 index 706137b..0000000 Binary files a/basicsuite/Basic Qt Quick2 App/icon.png and /dev/null differ diff --git a/basicsuite/Basic Qt Quick2 App/main.qml b/basicsuite/Basic Qt Quick2 App/main.qml deleted file mode 100644 index 4b57ab3..0000000 --- a/basicsuite/Basic Qt Quick2 App/main.qml +++ /dev/null @@ -1,37 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 600 - height: 400 - - gradient: Gradient { - GradientStop { position: 0; color: "aquamarine" } - GradientStop { position: 1; color: "black" } - } - - Text { - anchors.centerIn: parent - text: "Basic Application" - font.pixelSize: parent.height * 0.1 - color: "white" - style: Text.Raised - } - - Rectangle { - border.width: 1 - border.color: "lightsteelblue" - color: "steelblue" - - antialiasing: true - - width: 100 - height: 100 - - anchors.bottom: parent.bottom - anchors.left: parent.left - - anchors.margins: 100 - - NumberAnimation on rotation { from: 0; to: 360; duration: 5000; loops: Animation.Infinite } - } -} diff --git a/basicsuite/Calculator/icon.png b/basicsuite/Calculator/icon.png deleted file mode 100755 index 803c895..0000000 Binary files a/basicsuite/Calculator/icon.png and /dev/null differ diff --git a/basicsuite/Calculator/main.qml b/basicsuite/Calculator/main.qml deleted file mode 100644 index 13183d7..0000000 --- a/basicsuite/Calculator/main.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 200 - color: "black" - - Text { - anchors.fill: parent - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "More to come..." - font.pixelSize: Math.min(width, height) * 0.03 - } -} diff --git a/basicsuite/Calendar/icon.png b/basicsuite/Calendar/icon.png deleted file mode 100755 index 086963c..0000000 Binary files a/basicsuite/Calendar/icon.png and /dev/null differ diff --git a/basicsuite/Calendar/main.qml b/basicsuite/Calendar/main.qml deleted file mode 100644 index 13183d7..0000000 --- a/basicsuite/Calendar/main.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 200 - color: "black" - - Text { - anchors.fill: parent - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "More to come..." - font.pixelSize: Math.min(width, height) * 0.03 - } -} diff --git a/basicsuite/Clock/icon.png b/basicsuite/Clock/icon.png deleted file mode 100755 index d200bbf..0000000 Binary files a/basicsuite/Clock/icon.png and /dev/null differ diff --git a/basicsuite/Clock/main.qml b/basicsuite/Clock/main.qml deleted file mode 100644 index 13183d7..0000000 --- a/basicsuite/Clock/main.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 200 - color: "black" - - Text { - anchors.fill: parent - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "More to come..." - font.pixelSize: Math.min(width, height) * 0.03 - } -} diff --git a/basicsuite/Controls Layouts/description.txt b/basicsuite/Controls Layouts/description.txt new file mode 100644 index 0000000..393f0dd --- /dev/null +++ b/basicsuite/Controls Layouts/description.txt @@ -0,0 +1,3 @@ +The "Controls Layout" demonstration aims to show some of the features available in the layout system of the Qt Quick Controls. The layout system in Qt Quick Controls adds GridLayout, RowLayout and ColumnLayout which interact with size-hints from individual controls, making it possible to create interfaces that adapt to various dimensions and still look good. + +The example has been adapted slightly to run inside this launcher, the original is available in the Qt Quick Controls repository. diff --git a/basicsuite/Controls Layouts/main.qml b/basicsuite/Controls Layouts/main.qml new file mode 100644 index 0000000..7ed3323 --- /dev/null +++ b/basicsuite/Controls Layouts/main.qml @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Layouts 1.0 + +Rectangle { + + gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 1; color: "lightgray" } + } + + property int margin: 11 + + width: 1280 + height: 720 + + ColumnLayout { + id: mainLayout + anchors.fill: parent + anchors.margins: margin + GroupBox { + id: rowBox + title: "Row layout" + contentWidth: rowLayout.implicitWidth + contentHeight: rowLayout.implicitHeight + Layout.fillWidth: true + + RowLayout { + id: rowLayout + anchors.fill: parent + TextField { + placeholderText: "This wants to grow horizontally" + Layout.fillWidth: true + } + Button { + text: "Button" + } + } + } + + GroupBox { + id: gridBox + title: "Grid layout" + contentWidth: gridLayout.implicitWidth + contentHeight: gridLayout.implicitHeight + Layout.fillWidth: true + + GridLayout { + id: gridLayout + rows: 3 + flow: GridLayout.TopToBottom + anchors.fill: parent + + Label { text: "Line 1" } + Label { text: "Line 2" } + Label { text: "Line 3" } + + TextField { } + TextField { } + TextField { } + + TextArea { + text: "This widget spans over three rows in the GridLayout.\n" + + "All items in the GridLayout are implicitly positioned from top to bottom." + Layout.rowSpan: 3 + Layout.fillHeight: true + Layout.fillWidth: true + } + } + } + TextArea { + id: t3 + text: "This fills the whole cell" + width: 200 + height: 400 + Layout.fillHeight: true + Layout.fillWidth: true + } + } +} diff --git a/basicsuite/Controls Layouts/preview_l.jpg b/basicsuite/Controls Layouts/preview_l.jpg new file mode 100644 index 0000000..03df43a Binary files /dev/null and b/basicsuite/Controls Layouts/preview_l.jpg differ diff --git a/basicsuite/Controls Touch/content/AndroidDelegate.qml b/basicsuite/Controls Touch/content/AndroidDelegate.qml new file mode 100644 index 0000000..36a439a --- /dev/null +++ b/basicsuite/Controls Touch/content/AndroidDelegate.qml @@ -0,0 +1,92 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 + +Item { + id: root + width: parent.width + height: 88 + + property alias text: textitem.text + signal clicked + + Rectangle { + anchors.fill: parent + color: "#11ffffff" + visible: mouse.pressed + } + + Text { + id: textitem + color: "white" + font.pixelSize: 32 + text: modelData + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 30 + } + + Rectangle { + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 15 + height: 1 + color: "#424246" + } + + Image { + anchors.right: parent.right + anchors.rightMargin: 20 + anchors.verticalCenter: parent.verticalCenter + source: "../images/navigation_next_item.png" + } + + MouseArea { + id: mouse + anchors.fill: parent + onClicked: root.clicked() + + } +} diff --git a/basicsuite/Controls Touch/content/ButtonPage.qml b/basicsuite/Controls Touch/content/ButtonPage.qml new file mode 100644 index 0000000..cc5925c --- /dev/null +++ b/basicsuite/Controls Touch/content/ButtonPage.qml @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + Button { + anchors.margins: 20 + text: "Press me" + style: touchStyle + } + + Button { + anchors.margins: 20 + style: touchStyle + text: "Press me too" + } + + Button { + anchors.margins: 20 + style: touchStyle + text: "Dont press me" + onClicked: if (pageStack) pageStack.pop() + } + + } + + Component { + id: touchStyle + ButtonStyle { + background: Item { + implicitHeight: 50 + implicitWidth: 320 + BorderImage { + anchors.fill: parent + antialiasing: true + border.bottom: 8 + border.top: 8 + border.left: 8 + border.right: 8 + anchors.margins: control.pressed ? -4 : 0 + source: control.pressed ? "../images/button_pressed.png" : "../images/button_default.png" + } + } + foregroundColor: "white" + font.pixelSize: 23 + } + } +} diff --git a/basicsuite/Controls Touch/content/ProgressBarPage.qml b/basicsuite/Controls Touch/content/ProgressBarPage.qml new file mode 100644 index 0000000..86a46b6 --- /dev/null +++ b/basicsuite/Controls Touch/content/ProgressBarPage.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + ProgressBar { + anchors.margins: 20 + style: touchStyle + width: 400 + value: progress + } + + ProgressBar { + anchors.margins: 20 + style: touchStyle + width: 400 + value: 1 - progress + } + + ProgressBar { + anchors.margins: 20 + style: touchStyle + value: 1 + width: 400 + } + + } + + Component { + id: touchStyle + ProgressBarStyle { + background: Rectangle { + implicitHeight: 15 + implicitWidth: 400 + color: "#444" + opacity: 0.8 + Rectangle { + antialiasing: true + radius: 1 + color: "#468bb7" + height: parent.height + width: parent.width * control.value / control.maximumValue + } + } + } + } +} diff --git a/basicsuite/Controls Touch/content/SliderPage.qml b/basicsuite/Controls Touch/content/SliderPage.qml new file mode 100644 index 0000000..8d9ff0b --- /dev/null +++ b/basicsuite/Controls Touch/content/SliderPage.qml @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + Column { + spacing: 12 + anchors.centerIn: parent + + Slider { + anchors.margins: 20 + style: touchStyle + value: 0 + } + Slider { + anchors.margins: 20 + style: touchStyle + value: 0.5 + } + Slider { + anchors.margins: 20 + style: touchStyle + value: 1.0 + } + + } + + Component { + id: touchStyle + SliderStyle { + handle: Rectangle { + width: 30 + height: 30 + radius: height + antialiasing: true + color: Qt.lighter("#468bb7", 1.2) + } + + background: Item { + implicitHeight: 50 + implicitWidth: 400 + Rectangle { + height: 8 + width: parent.width + anchors.verticalCenter: parent.verticalCenter + color: "#444" + opacity: 0.8 + Rectangle { + antialiasing: true + radius: 1 + color: "#468bb7" + height: parent.height + width: parent.width * control.value / control.maximumValue + } + } + } + } + } +} diff --git a/basicsuite/Controls Touch/content/TabBarPage.qml b/basicsuite/Controls Touch/content/TabBarPage.qml new file mode 100644 index 0000000..41de782 --- /dev/null +++ b/basicsuite/Controls Touch/content/TabBarPage.qml @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + TabView { + anchors.fill: parent + style: touchStyle + Tab { + title: "Buttons" + ButtonPage{ visible: true } + } + Tab { + title: "Sliders" + SliderPage{ visible: true } + } + Tab { + title: "Progress" + ProgressBarPage{ visible: true } + } + } + + Component { + id: touchStyle + TabViewStyle { + tabBarAlignment: "center" + frame: Item { } + tab: Item { + implicitWidth: control.width/control.count + implicitHeight: 50 + BorderImage { + anchors.fill: parent + border.bottom: 8 + border.top: 8 + source: tab.selected ? "../images/tab_selected.png":"../images/tabs_standard.png" + Text { + anchors.centerIn: parent + color: "white" + text: tab.title.toUpperCase() + font.pixelSize: 16 + } + Rectangle { + visible: index > 0 + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.margins: 10 + width:1 + color: "#3a3a3a" + } + } + } + } + } +} diff --git a/basicsuite/Controls Touch/content/TextInputPage.qml b/basicsuite/Controls Touch/content/TextInputPage.qml new file mode 100644 index 0000000..3f408d4 --- /dev/null +++ b/basicsuite/Controls Touch/content/TextInputPage.qml @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import QtQuick.Controls.Styles 1.0 + +Item { + width: parent.width + height: parent.height + + property real progress: 0 + SequentialAnimation on progress { + loops: Animation.Infinite + running: true + NumberAnimation { + from: 0 + to: 1 + duration: 3000 + } + NumberAnimation { + from: 1 + to: 0 + duration: 3000 + } + } + + Column { + spacing: 40 + anchors.centerIn: parent + + TextField { + anchors.margins: 20 + text: "Text input" + style: touchStyle + } + + TextField { + anchors.margins: 20 + text: "Readonly Text input" + style: touchStyle + readOnly: true + } + } + Component { + id: touchStyle + + TextFieldStyle { + foregroundColor: "white" + font.pixelSize: 28 + background: Item { + implicitHeight: 50 + implicitWidth: 320 + BorderImage { + source: "../images/textinput.png" + border.left: 8 + border.right: 8 + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + } + } + } + } +} diff --git a/basicsuite/Controls Touch/description.txt b/basicsuite/Controls Touch/description.txt new file mode 100644 index 0000000..5106dff --- /dev/null +++ b/basicsuite/Controls Touch/description.txt @@ -0,0 +1,3 @@ +The purpose of this example is to show Qt Quick Controls in practice. The example uses a StackView to navigate between pages and illustrates the use of many of the controls provided by Qt Quick Control, including Button, Slider, ProgressBar, TabBar and TextInput types. The style in the example is a custom style made to look like the Android theme, it is written purely in QML. + +The example has been adapted slightly to run inside this launcher, the original is available in the Qt Quick Controls repository. diff --git a/basicsuite/Controls Touch/images/NOTICE.txt b/basicsuite/Controls Touch/images/NOTICE.txt new file mode 100644 index 0000000..93a9afc --- /dev/null +++ b/basicsuite/Controls Touch/images/NOTICE.txt @@ -0,0 +1,2 @@ +Notice some of these images are derived from Google applications resources. They were provided under the following license: +You may use the materials in this directory without restriction to develop your apps and to use in your apps. diff --git a/basicsuite/Controls Touch/images/button_default.png b/basicsuite/Controls Touch/images/button_default.png new file mode 100644 index 0000000..6d6cfd9 Binary files /dev/null and b/basicsuite/Controls Touch/images/button_default.png differ diff --git a/basicsuite/Controls Touch/images/button_pressed.png b/basicsuite/Controls Touch/images/button_pressed.png new file mode 100644 index 0000000..ab78b6e Binary files /dev/null and b/basicsuite/Controls Touch/images/button_pressed.png differ diff --git a/basicsuite/Controls Touch/images/navigation_next_item.png b/basicsuite/Controls Touch/images/navigation_next_item.png new file mode 100644 index 0000000..6665c9d Binary files /dev/null and b/basicsuite/Controls Touch/images/navigation_next_item.png differ diff --git a/basicsuite/Controls Touch/images/navigation_previous_item.png b/basicsuite/Controls Touch/images/navigation_previous_item.png new file mode 100644 index 0000000..f8be011 Binary files /dev/null and b/basicsuite/Controls Touch/images/navigation_previous_item.png differ diff --git a/basicsuite/Controls Touch/images/tab_selected.png b/basicsuite/Controls Touch/images/tab_selected.png new file mode 100644 index 0000000..2345f7a Binary files /dev/null and b/basicsuite/Controls Touch/images/tab_selected.png differ diff --git a/basicsuite/Controls Touch/images/tabs_standard.png b/basicsuite/Controls Touch/images/tabs_standard.png new file mode 100644 index 0000000..7140ab7 Binary files /dev/null and b/basicsuite/Controls Touch/images/tabs_standard.png differ diff --git a/basicsuite/Controls Touch/images/textinput.png b/basicsuite/Controls Touch/images/textinput.png new file mode 100644 index 0000000..b0256db Binary files /dev/null and b/basicsuite/Controls Touch/images/textinput.png differ diff --git a/basicsuite/Controls Touch/images/toolbar.png b/basicsuite/Controls Touch/images/toolbar.png new file mode 100644 index 0000000..e9eba4c Binary files /dev/null and b/basicsuite/Controls Touch/images/toolbar.png differ diff --git a/basicsuite/Controls Touch/main.qml b/basicsuite/Controls Touch/main.qml new file mode 100644 index 0000000..18b26e9 --- /dev/null +++ b/basicsuite/Controls Touch/main.qml @@ -0,0 +1,154 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Quick Controls module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + + + +import QtQuick 2.1 +import QtQuick.Controls 1.0 +import "content" + +Item { + width: 800 + height: 1280 + + Rectangle { + color: "#212126" + anchors.fill: parent + } + + // Implements back key navigation + Keys.onReleased: { + if (event.key === Qt.Key_Back) { + if (pageStack.depth > 1) { + pageStack.pop(); + event.accepted = true; + } else { Qt.quit(); } + } + } + + BorderImage { + id: toolbar + border.bottom: 8 + source: "images/toolbar.png" + width: parent.width + height: 100 + + Rectangle { + id: backButton + width: opacity ? 60 : 0 + anchors.left: parent.left + anchors.leftMargin: 20 + opacity: pageStack.depth > 1 ? 1 : 0 + anchors.verticalCenter: parent.verticalCenter + antialiasing: true + height: 60 + radius: 4 + color: backmouse.pressed ? "#222" : "transparent" + Behavior on opacity { NumberAnimation{} } + Image { + anchors.verticalCenter: parent.verticalCenter + source: "images/navigation_previous_item.png" + } + MouseArea { + id: backmouse + anchors.fill: parent + anchors.margins: -10 + onClicked: pageStack.pop() + } + } + + Text { + font.pixelSize: 42 + Behavior on x { NumberAnimation{ easing.type: Easing.OutCubic} } + x: backButton.x + backButton.width + 20 + anchors.verticalCenter: parent.verticalCenter + color: "white" + text: "Widget Gallery" + } + } + + ListModel { + id: pageModel + ListElement { + title: "Buttons" + page: "content/ButtonPage.qml" + } + ListElement { + title: "Sliders" + page: "content/SliderPage.qml" + } + ListElement { + title: "ProgressBar" + page: "content/ProgressBarPage.qml" + } + ListElement { + title: "Tabs" + page: "content/TabBarPage.qml" + } + ListElement { + title: "TextInput" + page: "content/TextInputPage.qml" + } + } + + StackView { + id: pageStack + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + anchors.top: toolbar.bottom + + initialItem: Item { + width: parent.width + height: parent.height + ListView { + model: pageModel + anchors.fill: parent + delegate: AndroidDelegate { + text: title + onClicked: pageStack.push(Qt.resolvedUrl(page)) + } + } + } + } + +} diff --git a/basicsuite/Controls Touch/preview_l.jpg b/basicsuite/Controls Touch/preview_l.jpg new file mode 100644 index 0000000..c57eac3 Binary files /dev/null and b/basicsuite/Controls Touch/preview_l.jpg differ diff --git a/basicsuite/Game/icon.png b/basicsuite/Game/icon.png deleted file mode 100755 index 20eb782..0000000 Binary files a/basicsuite/Game/icon.png and /dev/null differ diff --git a/basicsuite/Game/main.qml b/basicsuite/Game/main.qml deleted file mode 100644 index 13183d7..0000000 --- a/basicsuite/Game/main.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 200 - color: "black" - - Text { - anchors.fill: parent - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "More to come..." - font.pixelSize: Math.min(width, height) * 0.03 - } -} diff --git a/basicsuite/Hardware Specs/BackgroundSwirls.qml b/basicsuite/Hardware Specs/BackgroundSwirls.qml deleted file mode 100644 index 7214cf6..0000000 --- a/basicsuite/Hardware Specs/BackgroundSwirls.qml +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Digia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 -import QtQuick.Particles 2.0 - -Item { - anchors.fill: parent - - Rectangle { - anchors.fill: parent - gradient: Gradient { - GradientStop { position: 0; color: "lightsteelblue" } - GradientStop { position: 1; color: "black" } - } - } - - Rectangle { - id: colorTableItem - width: 16 - height: 16 - anchors.fill: parent - - property color color1: Qt.rgba(0.8, 0.8, 1, 0.3) - property color color2: Qt.rgba(0.8, 0.8, 1, 0.3) - - gradient: Gradient { - GradientStop { position: 0.0; color: "transparent"} - GradientStop { position: 0.05; color: colorTableItem.color1 } - GradientStop { position: 0.3; color: "transparent" } - GradientStop { position: 0.7; color: "transparent" } - GradientStop { position: 0.95; color: colorTableItem.color2 } - GradientStop { position: 1.0; color: "transparent" } - } - - visible: false - } - - ShaderEffectSource { - id: colorTableSource - sourceItem: colorTableItem - smooth: true - } - - Repeater { - model: 4 - Swirl { - - width: parent.width - anchors.bottom: parent.bottom - height: parent.height / (2 + index) - opacity: 0.3 - speed: (index + 1) / 5 - colorTable: colorTableSource - } - } - - ParticleSystem{ - id: particles - } - ImageParticle{ - anchors.fill: parent - system: particles - source: "particle.png" - alpha: 0 - colorVariation: 0.3 - } - - Emitter{ - anchors.fill: parent - system: particles - emitRate: Math.sqrt(parent.width * parent.height) / 30 - lifeSpan: 2000 - size: 4 - sizeVariation: 2 - - acceleration: AngleDirection { angle: 90; angleVariation: 360; magnitude: 20; } - velocity: AngleDirection { angle: -90; angleVariation: 360; magnitude: 10; } - } - -} diff --git a/basicsuite/Hardware Specs/SlideDeck.qml b/basicsuite/Hardware Specs/SlideDeck.qml deleted file mode 100644 index d9490b6..0000000 --- a/basicsuite/Hardware Specs/SlideDeck.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Digia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 - -import Qt.labs.presentation 1.0 - -Presentation { - width: 1280 - height: 720 - - BackgroundSwirls {} - - textColor: "white" - - Slide { - centeredText: "Animated Background" - fontScale: 2 - } - - Slide { - title: "Composition" - content: [ - "Gradient Rectangle", - "Swirls using ShaderEffect", - " Movement using a vertexShader", - " Colorized using a gradient rect converted to a texture", - " Controlled using QML properties and animations", - "Snow", - " Using 'QtQuick.Particles 2.0'", - " Emitter", - " ImageParticle" - ] - } - -} diff --git a/basicsuite/Hardware Specs/SlideDeckRotated.qml b/basicsuite/Hardware Specs/SlideDeckRotated.qml deleted file mode 100644 index ef6cfee..0000000 --- a/basicsuite/Hardware Specs/SlideDeckRotated.qml +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Digia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 - -Item -{ - height: 640 - width: 360 - Item { - rotation: 90 - SlideDeck { - y: -360 - width: 640 - height: 360 - } - } -} diff --git a/basicsuite/Hardware Specs/Swirl.qml b/basicsuite/Hardware Specs/Swirl.qml deleted file mode 100644 index 02f2187..0000000 --- a/basicsuite/Hardware Specs/Swirl.qml +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Digia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 - -ShaderEffect { - id: shader - - width: 400 - height: 300 - - property real speed: 1 - - property color d: Qt.rgba(Math.random() * 0.7, - Math.random() * 0.5, - Math.random() * 0.7, - Math.random() * 0.5) - property real tx - NumberAnimation on tx { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - property real ty - NumberAnimation on ty { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - property real tz - NumberAnimation on tz { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - property real tw - NumberAnimation on tw { from: 0; to: Math.PI * 2; duration: (Math.random() * 30 + 30) * 1000 / speed; loops: Animation.Infinite } - - property real amplitude: height / 2 - - property variant colorTable: ShaderEffectSource { sourceItem: Rectangle { width: 4; height: 4; color: "steelblue" } } - - fragmentShader: " - uniform lowp float qt_Opacity; - uniform lowp sampler2D colorTable; - varying highp vec2 qt_TexCoord0; - - void main() { - gl_FragColor = texture2D(colorTable, qt_TexCoord0); - gl_FragColor.w *= qt_Opacity; - } - " - - vertexShader: " - uniform lowp vec4 d; - uniform highp float tx; - uniform highp float ty; - uniform highp float tz; - uniform highp float tw; - uniform highp float amplitude; - uniform highp mat4 qt_Matrix; - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - varying highp vec2 qt_TexCoord0; - - void main() { - highp vec4 pos = qt_Vertex; - - highp float y1 = sin(tx + d.x * qt_MultiTexCoord0.x * 17. + 2. * d.y) + sin(ty + d.z * qt_MultiTexCoord0.x * 11. + 5. * d.w); - highp float y2 = sin(tz + d.w * qt_MultiTexCoord0.x * 7. + 3. * d.z) + sin(tw + d.y * qt_MultiTexCoord0.x * 19. + 3. * d.x); - - pos.y += mix(y1, y2, qt_MultiTexCoord0.y) * amplitude * 0.5; - - gl_Position = qt_Matrix * pos; - qt_TexCoord0 = qt_MultiTexCoord0; - } - " - - mesh: GridMesh { resolution: Qt.size(width / 10, 4) } - -} diff --git a/basicsuite/Hardware Specs/icon.png b/basicsuite/Hardware Specs/icon.png deleted file mode 100755 index fb888ed..0000000 Binary files a/basicsuite/Hardware Specs/icon.png and /dev/null differ diff --git a/basicsuite/Hardware Specs/main.qml b/basicsuite/Hardware Specs/main.qml deleted file mode 100644 index d38522c..0000000 --- a/basicsuite/Hardware Specs/main.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QML Presentation System. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Digia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -import QtQuick 2.0 - -import Qt.labs.presentation 1.0 - -Presentation { - width: 1280 - height: 720 - - BackgroundSwirls {} - - textColor: "white" - - - Slide { - title: "Hardware Specs" - content: [ - "Asus/Google Nexus 7 tablet", - " System-on-Chip: Nvidia Tegra 3", - " CPU: 1.3 GHz quad-core Cortex-A9 (T30L)", - " GPU: 416 MHz 12-core Nvidia GeForce ULP", - " RAM: 1 GB DDR3L", - "Texas Instruments BeagleBoard-xM", - " System-on-Chip: Texas Instruments OMAP3530", - " CPU: 1 GHz ARM Cortex-A8 core (TI DM3730)", - " GPU: Imagination Technologies PowerVR SGX 2D/3D", - " RAM: 512 MB LPDDR", - ] - } - -} diff --git a/basicsuite/Hardware Specs/particle.png b/basicsuite/Hardware Specs/particle.png deleted file mode 100644 index 5c83896..0000000 Binary files a/basicsuite/Hardware Specs/particle.png and /dev/null differ diff --git a/basicsuite/Launcher Settings/BrightnessController.qml b/basicsuite/Launcher Settings/BrightnessController.qml new file mode 100644 index 0000000..d4d2386 --- /dev/null +++ b/basicsuite/Launcher Settings/BrightnessController.qml @@ -0,0 +1,8 @@ +import QtDroid.Utils 1.0 + +QtObject { + function setBrightness(value) + { + DroidUtils.setDisplayBrightness(value) + } +} diff --git a/basicsuite/Launcher Settings/PoweroffAction.qml b/basicsuite/Launcher Settings/PoweroffAction.qml new file mode 100644 index 0000000..fd0e215 --- /dev/null +++ b/basicsuite/Launcher Settings/PoweroffAction.qml @@ -0,0 +1,8 @@ +import QtQuick.Controls 1.0 +import QtDroid.Utils 1.0 + +Action +{ + text: "Power Off!" + onTriggered: DroidUtils.powerOffSystem()(); +} diff --git a/basicsuite/Launcher Settings/RebootAction.qml b/basicsuite/Launcher Settings/RebootAction.qml new file mode 100644 index 0000000..cdf84a5 --- /dev/null +++ b/basicsuite/Launcher Settings/RebootAction.qml @@ -0,0 +1,8 @@ +import QtQuick.Controls 1.0 +import QtDroid.Utils 1.0 + +Action +{ + text: "Reboot" + onTriggered: DroidUtils.rebootSystem(); +} diff --git a/basicsuite/Launcher Settings/description.txt b/basicsuite/Launcher Settings/description.txt new file mode 100644 index 0000000..98ce6f6 --- /dev/null +++ b/basicsuite/Launcher Settings/description.txt @@ -0,0 +1 @@ +This demo uses the Qt Quick Controls to give a couple of options for the launcher itself. diff --git a/basicsuite/Launcher Settings/main.qml b/basicsuite/Launcher Settings/main.qml new file mode 100644 index 0000000..af64a26 --- /dev/null +++ b/basicsuite/Launcher Settings/main.qml @@ -0,0 +1,119 @@ +import QtQuick 2.0 + +import QtQuick.Controls 1.0 +import QtQuick.Layouts 1.0 + +Rectangle { + id: root; + + gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 1; color: "lightgray" } + } + + width: 1280 + height: 800 + + property int margin: 10 + + Loader { + id: rebootActionLoader + source: "RebootAction.qml" + } + + Loader { + id: poweroffActionLoader + source: "PoweroffAction.qml" + } + + Loader { + id: brightnessControllerLoader + source: "BrightnessController.qml" + } + + Flickable { + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + anchors.margins: margin + anchors.topMargin: 50 + height: parent.height + width: mainLayout.width + + contentHeight: mainLayout.height + contentWidth: mainLayout.width + + ColumnLayout { + id: mainLayout + + height: implicitHeight; + width: Math.min(root.width, root.height); + + GroupBox { + id: powerOptions + title: "Power Options" + + Layout.fillWidth: true + + contentWidth: powerButtonColumn.implicitWidth + contentHeight: powerButtonColumn.implicitHeight + + RowLayout { + id: powerButtonColumn + + anchors.fill: parent + + Button { + text: "Shut Down" + Layout.fillWidth: true + action: poweroffActionLoader.item; + enabled: action != undefined + } + + Button { + text: "Reboot" + Layout.fillWidth: true + action: rebootActionLoader.item; + enabled: action != undefined + } + } + + } + + GroupBox { + id: displayOptions + title: "Display Options" + + Layout.fillWidth: true + + contentWidth: displayGrid.implicitWidth + contentHeight: displayGrid.implicitHeight + + GridLayout { + id: displayGrid + + rows: 2 + flow: GridLayout.TopToBottom + anchors.fill: parent + + Label { text: "Brightness: " } + Label { text: "Display FPS: " } + + Slider { + maximumValue: 255 + minimumValue: 1 + value: 255 + Layout.fillWidth: true + onValueChanged: { + if (brightnessControllerLoader.item != undefined) { + brightnessControllerLoader.item.setBrightness(value); + } + } + } + CheckBox { + onCheckedChanged: engine.fpsEnabled(checked); + } + } + } + } + } +} diff --git a/basicsuite/Launcher Settings/preview_l.jpg b/basicsuite/Launcher Settings/preview_l.jpg new file mode 100644 index 0000000..bdfafee Binary files /dev/null and b/basicsuite/Launcher Settings/preview_l.jpg differ diff --git a/basicsuite/Music/icon.png b/basicsuite/Music/icon.png deleted file mode 100755 index a8bee63..0000000 Binary files a/basicsuite/Music/icon.png and /dev/null differ diff --git a/basicsuite/Music/main.qml b/basicsuite/Music/main.qml deleted file mode 100644 index 13183d7..0000000 --- a/basicsuite/Music/main.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 200 - color: "black" - - Text { - anchors.fill: parent - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "More to come..." - font.pixelSize: Math.min(width, height) * 0.03 - } -} diff --git a/basicsuite/Qt5 Cinematic Demo/description.txt b/basicsuite/Qt5 Cinematic Demo/description.txt new file mode 100644 index 0000000..449cc28 --- /dev/null +++ b/basicsuite/Qt5 Cinematic Demo/description.txt @@ -0,0 +1,5 @@ +The Qt5 Cinematic Experience is a demo by "QUIt Coding", a small group of talented individuals enjoying software development with cutting edge technologies. They are official members of the Qt Ambassador Program. + +The demo shows off a number features of Qt Quick 2.0. A nicely styled list control with movie covers with lighting effects. Particles and transitions. The information roll-down curvy curtain and is implemented using inline GLSL in the QML file. + +The source code for this demo and more awesome looking Qt Quick stuff is available from quitcoding.com. diff --git a/basicsuite/Qt5 Cinematic Demo/preview_l.jpg b/basicsuite/Qt5 Cinematic Demo/preview_l.jpg new file mode 100644 index 0000000..21bb2f9 Binary files /dev/null and b/basicsuite/Qt5 Cinematic Demo/preview_l.jpg differ diff --git a/basicsuite/Qt5 Launch Presentation/CameraSlide.qml b/basicsuite/Qt5 Launch Presentation/CameraSlide.qml index e6b4d97..564b467 100644 --- a/basicsuite/Qt5 Launch Presentation/CameraSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/CameraSlide.qml @@ -40,7 +40,7 @@ import QtQuick 2.0 import QtMultimedia 5 -import Qt.labs.presentation 1.0 +import "presentation" import QtGraphicalEffects 1.0 diff --git a/basicsuite/Qt5 Launch Presentation/CanvasSlide.qml b/basicsuite/Qt5 Launch Presentation/CanvasSlide.qml index c60a643..d972b41 100644 --- a/basicsuite/Qt5 Launch Presentation/CanvasSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/CanvasSlide.qml @@ -40,7 +40,7 @@ import QtQuick 2.0 import QtQuick.Particles 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { id: slide diff --git a/basicsuite/Qt5 Launch Presentation/EffectsSlide.qml b/basicsuite/Qt5 Launch Presentation/EffectsSlide.qml index 016ad54..0355284 100644 --- a/basicsuite/Qt5 Launch Presentation/EffectsSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/EffectsSlide.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 import QtGraphicalEffects 1.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { id: slide diff --git a/basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml b/basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml index bb3192e..4540532 100644 --- a/basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/ExamplesSlide.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { diff --git a/basicsuite/Qt5 Launch Presentation/FontSlide.qml b/basicsuite/Qt5 Launch Presentation/FontSlide.qml index 12106fa..ce98779 100644 --- a/basicsuite/Qt5 Launch Presentation/FontSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/FontSlide.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { id: fontSlide; diff --git a/basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml b/basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml index 1fbe17e..dc7cc02 100644 --- a/basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml +++ b/basicsuite/Qt5 Launch Presentation/OpacityTransitionPresentation.qml @@ -40,7 +40,7 @@ import QtQuick 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Presentation { diff --git a/basicsuite/Qt5 Launch Presentation/ParticleSlide.qml b/basicsuite/Qt5 Launch Presentation/ParticleSlide.qml index b630a34..2569a17 100644 --- a/basicsuite/Qt5 Launch Presentation/ParticleSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/ParticleSlide.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { diff --git a/basicsuite/Qt5 Launch Presentation/ShaderSlide.qml b/basicsuite/Qt5 Launch Presentation/ShaderSlide.qml index 593af6d..206cd9e 100644 --- a/basicsuite/Qt5 Launch Presentation/ShaderSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/ShaderSlide.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { diff --git a/basicsuite/Qt5 Launch Presentation/SlideDeck.qml b/basicsuite/Qt5 Launch Presentation/SlideDeck.qml index d265008..969b1b1 100644 --- a/basicsuite/Qt5 Launch Presentation/SlideDeck.qml +++ b/basicsuite/Qt5 Launch Presentation/SlideDeck.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 import QtGraphicalEffects 1.0 -import Qt.labs.presentation 1.0 +import "presentation" OpacityTransitionPresentation { id: presentation @@ -89,7 +89,10 @@ It is an application written with Qt Quick, based on Qt 5. The source code is av https://qt.gitorious.org/qt-labs/qt5-launch-demo -We hope you will enjoy Qt 5 as much as we have enjoyed creating it." +We hope you will enjoy Qt 5 as much as we have enjoyed creating it. + + + [tap to advance]" // Image { // source: "images/qt-logo.png" diff --git a/basicsuite/Qt5 Launch Presentation/VideoSlide.qml b/basicsuite/Qt5 Launch Presentation/VideoSlide.qml index 95479ef..d5abd89 100644 --- a/basicsuite/Qt5 Launch Presentation/VideoSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/VideoSlide.qml @@ -40,7 +40,7 @@ import QtQuick 2.0 import QtMultimedia 5 -import Qt.labs.presentation 1.0 +import "presentation" import QtGraphicalEffects 1.0 diff --git a/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml b/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml index 5ff70b2..edb8e4c 100644 --- a/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/WebkitSlide.qml @@ -1,5 +1,5 @@ import QtQuick 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { id: slide diff --git a/basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml b/basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml index 4a28382..20f0770 100644 --- a/basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml +++ b/basicsuite/Qt5 Launch Presentation/WidgetsSlide.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import Qt.labs.presentation 1.0 +import "presentation" Slide { id: slide diff --git a/basicsuite/Qt5 Launch Presentation/description.txt b/basicsuite/Qt5 Launch Presentation/description.txt new file mode 100644 index 0000000..48d03f3 --- /dev/null +++ b/basicsuite/Qt5 Launch Presentation/description.txt @@ -0,0 +1,6 @@ +The following is a quick tour of what is new in Qt 5. + +It is an application written with Qt Quick, based on Qt 5. The source code is available from: https://qt.gitorious.org/qt-labs/qt5-launch-demo +The demo makes use of the QML Presentation System, available from: ssh://codereview.qt-project.org/qt-labs/qml-presentation-system.git + +The demo has been modified slightly to run in this launcher. diff --git a/basicsuite/Qt5 Launch Presentation/main_lofi.qml b/basicsuite/Qt5 Launch Presentation/main_lofi.qml index 47e7f82..7ff60a1 100644 --- a/basicsuite/Qt5 Launch Presentation/main_lofi.qml +++ b/basicsuite/Qt5 Launch Presentation/main_lofi.qml @@ -44,7 +44,5 @@ DemoMain { height: 480 useDropShadow: false; - useSimpleGradient: true; - - autorun: true +// useSimpleGradient: true; } diff --git a/basicsuite/Qt5 Launch Presentation/presentation/Clock.qml b/basicsuite/Qt5 Launch Presentation/presentation/Clock.qml new file mode 100644 index 0000000..d4c97ce --- /dev/null +++ b/basicsuite/Qt5 Launch Presentation/presentation/Clock.qml @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QML Presentation System. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Digia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + + +import QtQuick 2.0 + +Text { + id: clock + + property real fontSize: parent.height * 0.05 + property real fontScale: 0.5 + property color textColor: parent.textColor != undefined ? parent.textColor : "black" + property string fontFamily: parent.fontFamily != undefined ? parent.fontFamily : "Helvetica" + + text: currentTime(); + + function currentTime() { + var d = new Date(); + var m = d.getMinutes(); + if (m < 10) m = "0" + m; + return d.getHours() + ":" + m; + } + + color: textColor; + font.family: fontFamily; + font.pixelSize: fontSize * fontScale; + + anchors.bottom: parent.bottom; + anchors.left: parent.left; + anchors.margins: font.pixelSize; + + Timer { + interval: 60000; + repeat: true; + running: true + onTriggered: clock.text = clock.currentTime(); + } +} diff --git a/basicsuite/Qt5 Launch Presentation/presentation/CodeSlide.qml b/basicsuite/Qt5 Launch Presentation/presentation/CodeSlide.qml new file mode 100644 index 0000000..ba8626b --- /dev/null +++ b/basicsuite/Qt5 Launch Presentation/presentation/CodeSlide.qml @@ -0,0 +1,162 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QML Presentation System. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Digia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 + +Slide { + id: slide; + + property string codeFontFamily: parent.codeFontFamily; + property string code; + property real codeFontSize: baseFontSize * 0.6; + + + + Rectangle { + id: background + anchors.fill: parent + radius: height / 10; + gradient: Gradient { + GradientStop { position: 0; color: Qt.rgba(0.8, 0.8, 0.8, 0.5); } + GradientStop { position: 1; color: Qt.rgba(0.2, 0.2, 0.2, 0.5); } + } + border.color: slide.textColor; + border.width: height / 250; + antialiasing: true + } + + onCodeChanged: { + listModel.clear(); + var codeLines = slide.code.split("\n"); + for (var i=0; i 0) { + root.currentSlide = 0; + root.slides[root.currentSlide].visible = true; + } + } + + function switchSlides(from, to, forward) { + from.visible = false + to.visible = true + return true + } + + function goToNextSlide() { + root._userNum = 0 + if (_faded) + return + if (root.currentSlide + 1 < root.slides.length) { + var from = slides[currentSlide] + var to = slides[currentSlide + 1] + if (switchSlides(from, to, true)) { + currentSlide = currentSlide + 1; + root.focus = true; + } + } + } + + function goToPreviousSlide() { + root._userNum = 0 + if (root._faded) + return + if (root.currentSlide - 1 >= 0) { + var from = slides[currentSlide] + var to = slides[currentSlide - 1] + if (switchSlides(from, to, false)) { + currentSlide = currentSlide - 1; + root.focus = true; + } + } + } + + function goToUserSlide() { + --_userNum; + if (root._faded || _userNum >= root.slides.length) + return + if (_userNum < 0) + goToNextSlide() + else if (root.currentSlide != _userNum) { + var from = slides[currentSlide] + var to = slides[_userNum] + if (switchSlides(from, to, _userNum > currentSlide)) { + currentSlide = _userNum; + root.focus = true; + } + } + } + + focus: true + + Keys.onSpacePressed: goToNextSlide() + Keys.onRightPressed: goToNextSlide() + Keys.onDownPressed: goToNextSlide() + Keys.onLeftPressed: goToPreviousSlide() + Keys.onUpPressed: goToPreviousSlide() + Keys.onEscapePressed: Qt.quit() + Keys.onPressed: { + if (event.key >= Qt.Key_0 && event.key <= Qt.Key_9) + _userNum = 10 * _userNum + (event.key - Qt.Key_0) + else { + if (event.key == Qt.Key_Return || event.key == Qt.Key_Enter) + goToUserSlide(); + else if (event.key == Qt.Key_Backspace) + goToPreviousSlide(); + else if (event.key == Qt.Key_C) + root._faded = !root._faded; + _userNum = 0; + } + } + + Rectangle { + z: 1000 + color: "black" + anchors.fill: parent + opacity: root._faded ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: 250 } } + } + + MouseArea { + id: mouseArea + anchors.fill: parent + acceptedButtons: Qt.LeftButton | Qt.RightButton + onClicked: { + if (mouse.button == Qt.RightButton) + goToPreviousSlide() + else + goToNextSlide() + } + onPressAndHold: goToPreviousSlide(); //A back mechanism for touch only devices + } + + Window { + id: notesWindow; + width: 400 + height: 300 + + title: "QML Presentation: Notes" + visible: root.showNotes + + Text { + anchors.fill: parent + anchors.margins: parent.height * 0.1; + + font.pixelSize: 16 + wrapMode: Text.WordWrap + + property string notes: root.slides[root.currentSlide].notes; + text: notes == "" ? "Slide has no notes..." : notes; + font.italic: notes == ""; + } + } +} diff --git a/basicsuite/Qt5 Launch Presentation/presentation/Slide.qml b/basicsuite/Qt5 Launch Presentation/presentation/Slide.qml new file mode 100644 index 0000000..339298d --- /dev/null +++ b/basicsuite/Qt5 Launch Presentation/presentation/Slide.qml @@ -0,0 +1,186 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QML Presentation System. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Digia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 + +Item { + /* + Slides can only be instantiated as a direct child of a Presentation {} as they rely on + several properties there. + */ + + id: slide + + property bool isSlide: true; + + property string title; + property variant content: [] + property string centeredText + property string writeInText; + property string notes; + + property real fontSize: parent.height * 0.05 + property real fontScale: 1 + + property real baseFontSize: fontSize * fontScale + property real titleFontSize: fontSize * 1.2 * fontScale + property real bulletSpacing: 1 + + property real contentWidth: width + + // Define the slide to be the "content area" + x: parent.width * 0.05 + y: parent.height * 0.2 + width: parent.width * 0.9 + height: parent.height * 0.7 + + property real masterWidth: parent.width + property real masterHeight: parent.height + + property color titleColor: parent.titleColor; + property color textColor: parent.textColor; + property string fontFamily: parent.fontFamily; + + visible: false + + Text { + id: titleText + font.pixelSize: titleFontSize + text: title; + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.top + anchors.bottomMargin: parent.fontSize * 1.5 + font.bold: true; + font.family: slide.fontFamily + color: slide.titleColor + horizontalAlignment: Text.Center + z: 1 + } + + Text { + id: centeredId + width: parent.width + anchors.centerIn: parent + anchors.verticalCenterOffset: - parent.y / 3 + text: centeredText + horizontalAlignment: Text.Center + font.pixelSize: baseFontSize + font.family: slide.fontFamily + color: slide.textColor + wrapMode: Text.Wrap + } + + Text { + id: writeInTextId + property int length; + font.family: slide.fontFamily + font.pixelSize: baseFontSize + color: slide.textColor + + anchors.fill: parent; + wrapMode: Text.Wrap + + text: slide.writeInText.substring(0, length); + + NumberAnimation on length { + from: 0; + to: slide.writeInText.length; + duration: slide.writeInText.length * 30; + running: slide.visible && parent.visible && slide.writeInText.length > 0 + } + + visible: slide.writeInText != undefined; + } + + + Column { + id: contentId + anchors.fill: parent + + Repeater { + model: content.length + + Row { + id: row + + function decideIndentLevel(s) { return s.charAt(0) == " " ? 1 + decideIndentLevel(s.substring(1)) : 0 } + property int indentLevel: decideIndentLevel(content[index]) + property int nextIndentLevel: index < content.length - 1 ? decideIndentLevel(content[index+1]) : 0 + property real indentFactor: (10 - row.indentLevel * 2) / 10; + + height: text.height + (nextIndentLevel == 0 ? 1 : 0.3) * slide.baseFontSize * slide.bulletSpacing + x: slide.baseFontSize * indentLevel + + Rectangle { + id: dot + y: baseFontSize * row.indentFactor / 2 + width: baseFontSize / 4 + height: baseFontSize / 4 + color: slide.textColor + radius: width / 2 + smooth: true + opacity: text.text.length == 0 ? 0 : 1 + } + + Rectangle { + id: space + width: dot.width * 2 + height: 1 + color: "#00ffffff" + } + + Text { + id: text + width: slide.contentWidth - parent.x - dot.width - space.width + font.pixelSize: baseFontSize * row.indentFactor + text: content[index] + textFormat: Text.PlainText + wrapMode: Text.WordWrap + color: slide.textColor + horizontalAlignment: Text.AlignLeft + font.family: slide.fontFamily + } + } + } + } + +} diff --git a/basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml b/basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml new file mode 100644 index 0000000..06e7542 --- /dev/null +++ b/basicsuite/Qt5 Launch Presentation/presentation/SlideCounter.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QML Presentation System. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Digia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + + +import QtQuick 2.0 + +Text { + id: counter; + + property real fontSize: parent.height * 0.05 + property real fontScale: 0.5; + property color textColor: parent.textColor != undefined ? parent.textColor : "black" + property string fontFamily: parent.fontFamily != undefined ? parent.fontFamily : "Helvetica" + + text: "# " + (parent.currentSlide + 1) + " / " + parent.slides.length; + color: counter.textColor; + font.family: counter.fontFamily; + font.pixelSize: fontSize * fontScale; + + anchors.right: parent.right; + anchors.bottom: parent.bottom; + anchors.margins: font.pixelSize; +} diff --git a/basicsuite/Qt5 Launch Presentation/preview_l.jpg b/basicsuite/Qt5 Launch Presentation/preview_l.jpg new file mode 100644 index 0000000..8decd76 Binary files /dev/null and b/basicsuite/Qt5 Launch Presentation/preview_l.jpg differ diff --git a/basicsuite/Shader Effects/BGColorPicker.qml b/basicsuite/Shader Effects/BGColorPicker.qml new file mode 100644 index 0000000..7ee85bc --- /dev/null +++ b/basicsuite/Shader Effects/BGColorPicker.qml @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Label { + id: bgColorPicker + property color color: "#242424" + caption: "Background color" + + Row { + id: selection + x: -3 + y: 3 + spacing: 4 + Rectangle { width: 16; height: 16; color: "#ffffff" + Image { + anchors.centerIn: parent + source: "images/color_selection_mask.png" + } + MouseArea { + anchors.fill: parent + anchors.margins: -3 + onClicked: { + bgColorPicker.color = parent.color + highlight.x = parent.x - 3 + } + } + } + Rectangle { width: 16; height: 16; color: "#ababab" + Image { + anchors.centerIn: parent + source: "images/color_selection_mask.png" + } + MouseArea { + anchors.fill: parent + anchors.margins: -3 + onClicked: { + bgColorPicker.color = parent.color + highlight.x = parent.x - 3 + } + } + } + Rectangle { id: initial; width: 16; height: 16; color: "#242424" + Image { + anchors.centerIn: parent + source: "images/color_selection_mask.png" + } + MouseArea { + anchors.fill: parent + anchors.margins: -3 + onClicked: { + bgColorPicker.color = parent.color + highlight.x = parent.x - 3 + } + } + } + Rectangle { width: 16; height: 16; color: "#000000" + Image { + anchors.centerIn: parent + source: "images/color_selection_mask.png" + } + MouseArea { + anchors.fill: parent + anchors.margins: -3 + onClicked: { + bgColorPicker.color = parent.color + highlight.x = parent.x - 3 + } + } + } + Image { source: "images/background.png" + width: 16; height: 16; + Image { + anchors.centerIn: parent + source: "images/color_selection_mask.png" + } + MouseArea { + anchors.fill: parent + anchors.margins: -3 + onClicked: { + bgColorPicker.color = "#010101" + highlight.x = parent.x - 3 + } + } + } + } + + Image { + id: highlight + source: "images/color_selection_hl.png" + x: initial.x - (highlight.width - initial.width) * 0.5 + y: selection.y - (highlight.height - selection.height) * 0.5 + } +} diff --git a/basicsuite/Shader Effects/CheckBox.qml b/basicsuite/Shader Effects/CheckBox.qml new file mode 100644 index 0000000..0c675a4 --- /dev/null +++ b/basicsuite/Shader Effects/CheckBox.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: checkBox + property string caption: "" + property bool selected: true + property bool pressed: mouse.pressed + anchors {left: parent.left; right: parent.right} + height: 20 + + Text { + id: captionText + width: 110 + anchors.verticalCenter: parent.verticalCenter + horizontalAlignment: Text.AlignRight + text: checkBox.caption + ':' + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + } + + Image { + id: button + anchors {left: captionText.right; leftMargin: 5; verticalCenter: parent.verticalCenter} + source: "images/checkbox_outer.png" + smooth: true + Image { + id: buttonFill + anchors.centerIn: parent + source: "images/checkbox_inner.png" + smooth: true + visible: checkBox.selected + } + } + + MouseArea { + id: mouse + anchors.fill: parent + anchors.rightMargin: 160 + onClicked: checkBox.selected = !checkBox.selected + preventStealing: true + } +} diff --git a/basicsuite/Shader Effects/ColorPicker.qml b/basicsuite/Shader Effects/ColorPicker.qml new file mode 100755 index 0000000..30b77b9 --- /dev/null +++ b/basicsuite/Shader Effects/ColorPicker.qml @@ -0,0 +1,272 @@ +/***************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Add-On Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +*****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: root + property color color: Qt.hsla(hue, saturation, lightness, alpha) + property alias hue: hueSlider.value + property alias saturation: saturationSlider.value + property alias lightness: lightnessSlider.value + property alias alpha: alphaSlider.value + property bool showAlphaSlider: true + + width: parent.width + height: 100 + + Image { + anchors.fill: map + source: "images/background.png" + fillMode: Image.Tile + } + + Rectangle { + id: colorBox + anchors.fill: map + color: root.color + } + + ShaderEffect { + id: map + anchors.left: parent.left + anchors.leftMargin: 10 + anchors.top: parent.top + anchors.topMargin: 5 + width: 68 + height: width + opacity: 0.01 + property real hue: root.hue + + fragmentShader: " + varying mediump vec2 qt_TexCoord0; + uniform highp float qt_Opacity; + uniform highp float hue; + + highp float hueToIntensity(highp float v1, highp float v2, highp float h) { + h = fract(h); + if (h < 1.0 / 6.0) + return v1 + (v2 - v1) * 6.0 * h; + else if (h < 1.0 / 2.0) + return v2; + else if (h < 2.0 / 3.0) + return v1 + (v2 - v1) * 6.0 * (2.0 / 3.0 - h); + + return v1; + } + + highp vec3 HSLtoRGB(highp vec3 color) { + highp float h = color.x; + highp float l = color.z; + highp float s = color.y; + + if (s < 1.0 / 256.0) + return vec3(l, l, l); + + highp float v1; + highp float v2; + if (l < 0.5) + v2 = l * (1.0 + s); + else + v2 = (l + s) - (s * l); + + v1 = 2.0 * l - v2; + + highp float d = 1.0 / 3.0; + highp float r = hueToIntensity(v1, v2, h + d); + highp float g = hueToIntensity(v1, v2, h); + highp float b = hueToIntensity(v1, v2, h - d); + return vec3(r, g, b); + } + + void main() { + lowp vec4 c = vec4(1.0); + c.rgb = HSLtoRGB(vec3(hue, 1.0 - qt_TexCoord0.t, qt_TexCoord0.s)); + gl_FragColor = c * qt_Opacity; + } + " + + MouseArea { + id: mapMouseArea + anchors.fill: parent + hoverEnabled: true + preventStealing: true + onPositionChanged: { + if (pressed) { + var xx = Math.max(0, Math.min(mouse.x, parent.width)) + var yy = Math.max(0, Math.min(mouse.y, parent.height)) + root.saturation = 1.0 - yy / parent.height + root.lightness = xx / parent.width + } + } + onPressed: positionChanged(mouse) + + onEntered: map.opacity = 1 + onReleased: { + if (mouse.x < 0 || mouse.x > parent.width || mouse.y < 0 || mouse.y > parent.height) { + map.opacity = 0.01; + } + } + onExited: { + if (!pressed) { + map.opacity = 0.01; + } + } + } + + Image { + id: crosshair + source: "images/slider_handle.png" + x: root.lightness * parent.width - width / 2 + y: (1.0 - root.saturation) * parent.height - height / 2 + } + } + + Column { + anchors.left: parent.left + anchors.right: parent.right + + ColorSlider { + id: hueSlider + minimum: 0.0 + maximum: 1.0 + value: 0.5 + caption: "H" + trackItem: Rectangle { + width: parent.height + height: parent.width - 10 + color: "red" + rotation: -90 + transformOrigin: Item.TopLeft + y: width + x: 5 + gradient: Gradient { + GradientStop {position: 0.000; color: Qt.rgba(1, 0, 0, 1)} + GradientStop {position: 0.167; color: Qt.rgba(1, 1, 0, 1)} + GradientStop {position: 0.333; color: Qt.rgba(0, 1, 0, 1)} + GradientStop {position: 0.500; color: Qt.rgba(0, 1, 1, 1)} + GradientStop {position: 0.667; color: Qt.rgba(0, 0, 1, 1)} + GradientStop {position: 0.833; color: Qt.rgba(1, 0, 1, 1)} + GradientStop {position: 1.000; color: Qt.rgba(1, 0, 0, 1)} + } + } + } + + ColorSlider { + id: saturationSlider + minimum: 0.0 + maximum: 1.0 + value: 1.0 + caption: "S" + handleOpacity: 1.5 - map.opacity + trackItem: Rectangle { + width: parent.height + height: parent.width - 10 + color: "red" + rotation: -90 + transformOrigin: Item.TopLeft + y: width + x: 5 + gradient: Gradient { + GradientStop { position: 0; color: Qt.hsla(root.hue, 0.0, root.lightness, 1.0) } + GradientStop { position: 1; color: Qt.hsla(root.hue, 1.0, root.lightness, 1.0) } + } + } + } + + ColorSlider { + id: lightnessSlider + minimum: 0.0 + maximum: 1.0 + value: 0.5 + caption: "L" + handleOpacity: 1.5 - map.opacity + trackItem: Rectangle { + width: parent.height + height: parent.width - 10 + color: "red" + rotation: -90 + transformOrigin: Item.TopLeft + y: width + x: 5 + gradient: Gradient { + GradientStop { position: 0; color: 'black' } + GradientStop { position: 0.5; color: Qt.hsla(root.hue, root.saturation, 0.5, 1.0) } + GradientStop { position: 1; color: 'white' } + } + } + } + + ColorSlider { + id: alphaSlider + minimum: 0.0 + maximum: 1.0 + value: 1.0 + caption: "A" + opacity: showAlphaSlider ? 1.0 : 0.0 + trackItem:Item { + anchors.fill: parent + Image { + anchors {fill: parent; leftMargin: 5; rightMargin: 5} + source: "images/background.png" + fillMode: Image.TileHorizontally + } + Rectangle { + width: parent.height + height: parent.width - 10 + color: "red" + rotation: -90 + transformOrigin: Item.TopLeft + y: width + x: 5 + gradient: Gradient { + GradientStop { position: 0; color: "transparent" } + GradientStop { position: 1; color: Qt.hsla(root.hue, root.saturation, root.lightness, 1.0) } + } + } + } + } + + Label { + caption: "ARGB" + text: "#" + ((Math.ceil(root.alpha * 255) + 256).toString(16).substr(1, 2) + root.color.toString().substr(1, 6)).toUpperCase(); + } + } +} diff --git a/basicsuite/Shader Effects/ColorSlider.qml b/basicsuite/Shader Effects/ColorSlider.qml new file mode 100755 index 0000000..1dc2145 --- /dev/null +++ b/basicsuite/Shader Effects/ColorSlider.qml @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: colorSlider + + property real value: 1 + property real maximum: 1 + property real minimum: 0 + property string caption: "" + property bool pressed: mouseArea.pressed + property bool integer: false + property string handleSource: "images/slider_handle.png" + property real handleOpacity: 1.0 + property alias trackItem: track.children + + width: parent.width + height: 20 + + function updatePos() { + if (maximum > minimum) { + var pos = (track.width - 10) * (value - minimum) / (maximum - minimum) + 5; + return Math.min(Math.max(pos, 5), track.width - 5) - 10; + } else { + return 5; + } + } + + Text { + id: captionText + width: 110 + anchors.verticalCenter: parent.verticalCenter + horizontalAlignment: Text.AlignRight + text: colorSlider.caption + ':' + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + } + + Text { + id: valueCaption + anchors.left: captionText.right + anchors.leftMargin: 11 + anchors.verticalCenter: parent.verticalCenter + width: 35 + horizontalAlignment: Text.AlignLeft + text: colorSlider.value.toFixed(1) + font.family: "Arial" + font.pixelSize: 11 + color: "#999999" + } + + Item { + id: track + height: 4 + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: parent.width / 2 + anchors.right: parent.right + anchors.rightMargin: 10 + + Image { + id: handle; + anchors.verticalCenter: parent.verticalCenter + smooth: true + source: mouseArea.pressed ? 'images/slider_handle_pressed.png' : colorSlider.handleSource + opacity: colorSlider.handleOpacity + x: updatePos() + z: 1 + } + + MouseArea { + id: mouseArea + anchors {left: parent.left; right: parent.right; leftMargin: 5; rightMargin: 5; verticalCenter: parent.verticalCenter} + height: 8 + preventStealing: true + + onPressed: { + var handleX = Math.max(0, Math.min(mouseX, mouseArea.width)) + var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum; + value = colorSlider.integer ? Math.round(realValue) : realValue; + } + + onPositionChanged: { + if (pressed) { + var handleX = Math.max(0, Math.min(mouseX, mouseArea.width)) + var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum; + value = colorSlider.integer ? Math.round(realValue) : realValue; + } + } + } + } +} diff --git a/basicsuite/Shader Effects/Control.qml b/basicsuite/Shader Effects/Control.qml new file mode 100644 index 0000000..32ff172 --- /dev/null +++ b/basicsuite/Shader Effects/Control.qml @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: control + property string caption: "" + default property alias children: controlsColumn.children + property bool last: false + + property bool __hide: caption == "advanced" + + anchors {left: parent.left; right: parent.right} + height: __hide ? 30 : controlsColumn.height + 40 + + Behavior on height { + id: heightBehavior + enabled: false + NumberAnimation { duration: 100 } + } + + Image { + source: "images/group_top.png" + anchors {top: parent.top; left: parent.left; right: parent.right} + } + + Image { + source: "images/group_bottom.png" + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + smooth: true + visible: !last || __hide + } + + Text { + id: sectionText + anchors {left: parent.left; top: parent.top; leftMargin: 11; topMargin: 8} + color: "white" + font.family: "Arial" + font.bold: true + font.pixelSize: 12 + text: caption + } + + Image { + anchors {right: parent.right; rightMargin: 5; top: parent.top} + source: __hide ? "images/expand.png" : "images/collapse.png" + } + + MouseArea { + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + height: 30 + onClicked: { + heightBehavior.enabled = true + control.__hide = !control.__hide + } + } + + Column { + id: controlsColumn + anchors.top: parent.top + anchors.topMargin: 30 + anchors.left: parent.left + anchors.right: parent.right + opacity: !__hide + Behavior on opacity { + NumberAnimation { duration: 100 } + } + } +} diff --git a/basicsuite/Shader Effects/ImageSource.qml b/basicsuite/Shader Effects/ImageSource.qml new file mode 100644 index 0000000..69dc011 --- /dev/null +++ b/basicsuite/Shader Effects/ImageSource.qml @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Image { + id: is + source: "images/bug.jpg" + smooth: true + anchors.fill: parent + fillMode: Image.PreserveAspectFit + sourceSize: width > height ? Qt.size(0, parent.height) : Qt.size(parent.width, 0) + //visible: !enabledCheckBox.selected + opacity: enabledCheckBox.selected ? 0.0 : 1.0 + + property bool forcedUpdateAnimationRunning: updateCheckBox.selected + Text { + x: is.width - 10 - width + y: 10 + text: "Qt" + font.pixelSize: 20 + color: "white" + visible: is.forcedUpdateAnimationRunning + + NumberAnimation on rotation { + id: dd + running: is.forcedUpdateAnimationRunning + loops: Animation.Infinite + duration: 5000 + from: 0.0 + to: 360.0 + } + } +} diff --git a/basicsuite/Shader Effects/Label.qml b/basicsuite/Shader Effects/Label.qml new file mode 100644 index 0000000..72cd7f4 --- /dev/null +++ b/basicsuite/Shader Effects/Label.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: label + property string caption: "" + property string text: "" + default property alias children: childrenItem.children + anchors {left: parent.left; right: parent.right} + height: Math.max(20, childrenItem.height) + + Text { + id: captionText + width: 110 + height: 20 + horizontalAlignment: Text.AlignRight + verticalAlignment: Text.AlignVCenter + text: label.caption + ':' + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + } + + Text { + id: valueText + anchors {left: captionText.right; right: parent.right; leftMargin: 11; verticalCenter: parent.verticalCenter} + height: 20 + verticalAlignment: Text.AlignVCenter + text: label.text + font.family: "Arial" + font.pixelSize: 11 + color: "#999999" + visible: label.text.length > 0 + } + + Item { + id: childrenItem + anchors {left: captionText.right; leftMargin: 11; right: parent.right} + height: childrenRect.height + } +} diff --git a/basicsuite/Shader Effects/LevelSlider.qml b/basicsuite/Shader Effects/LevelSlider.qml new file mode 100644 index 0000000..995ecf8 --- /dev/null +++ b/basicsuite/Shader Effects/LevelSlider.qml @@ -0,0 +1,201 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: slider + + width: parent.width + height: 30 + + property real midPointValue: 0.5 + property real blackPointValue: 0.0 + property real whitePointValue: 1.0 + property real maximum: 1 + property real minimum: 0 + property real gamma: Math.min(10.0, Math.max(0.1, 1/(Math.log(0.5) / Math.log(midPointValue)))) + property string caption: "" + property bool integer: false + property bool showMidPoint: true + + Text { + id: captionText + width: 110 + anchors.bottom: parent.bottom + anchors.bottomMargin: 13 + horizontalAlignment: Text.AlignRight + text: slider.caption + ':' + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + } + + Item { + id: track + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: parent.width / 2 - 30 + anchors.right: parent.right + anchors.rightMargin: 10 + + BorderImage { + id: trackImage + source: "images/slider_track.png" + anchors.left: parent.left + anchors.right: parent.right + border.right: 2 + width: parent.width + } + + BorderImage { + id: trackFilled + anchors.left: blackpointHandle.x < whitePointHandle.x ? blackpointHandle.right : whitePointHandle.right + anchors.right: blackpointHandle.x < whitePointHandle.x ? whitePointHandle.left : blackpointHandle.left + anchors.margins: -10 + source: "images/slider_track_filled.png" + border.left: 3 + border.right: 3 + } + + Image { + id: blackpointHandle; + smooth: true + source: blackpointMouseArea.pressed ? "images/slider_handle_pressed.png" : "images/slider_handle_black.png" + x: trackImage.x - width/2 + 5 + width: 20 + onXChanged: { + blackPointValue = minimum + maximum * ((x + 5) / (track.width - 10)) + midpointHandle.x = blackpointHandle.x + ((whitePointHandle.x - blackpointHandle.x) * midPointValue) + } + } + + Image { + id: midpointHandle; + smooth: true + source: midpointMouseArea.pressed ? "images/slider_handle_pressed.png" : "images/slider_handle_gray.png" + x: blackpointHandle.x + ((whitePointHandle.x - blackpointHandle.x) * 0.5) + visible: showMidPoint + width: 20 + onXChanged: { + if (midpointMouseArea.pressed) { + midPointValue = (x - Math.min(whitePointHandle.x, blackpointHandle.x)) / Math.abs(whitePointHandle.x - blackpointHandle.x) + } + } + } + + Image { + id: whitePointHandle; + smooth: true + source: whitepointMouseArea.pressed ? "images/slider_handle_pressed.png" : "images/slider_handle_white.png" + x: trackImage.x + trackImage.width - width/2 - 5 + width: 20 + onXChanged: { + whitePointValue = minimum + maximum * ((x + 5) / (track.width - 10)) + midpointHandle.x = blackpointHandle.x + ((whitePointHandle.x - blackpointHandle.x) * midPointValue) + } + } + + MouseArea { + id: blackpointMouseArea + anchors.fill: blackpointHandle + anchors.margins: -5 + drag.target: blackpointHandle + drag.axis: Drag.XAxis + drag.minimumX: -5 + drag.maximumX: trackImage.width - blackpointHandle.width + 5 + } + + MouseArea { + id: whitepointMouseArea + anchors.fill: whitePointHandle + anchors.margins: -5 + drag.target: whitePointHandle + drag.axis: Drag.XAxis + drag.minimumX: -5 + drag.maximumX: trackImage.width - whitePointHandle.width + 5 + } + + MouseArea { + id: midpointMouseArea + anchors.fill: midpointHandle + anchors.margins: -5 + drag.target: midpointHandle + drag.axis: Drag.XAxis + drag.minimumX: Math.min(blackpointHandle.x, whitePointHandle.x) + drag.maximumX: Math.max(whitePointHandle.x, blackpointHandle.x) + } + } + + Text { + id: blackPointValueCaption + anchors.bottom: track.bottom + anchors.left: track.left + text: slider.blackPointValue.toFixed(1) + font.family: "Arial" + font.pixelSize: 11 + color: "#999999" + } + + Text { + id: midPointValueCaption + anchors.bottom: track.bottom + anchors.left: track.left + anchors.right: track.right + horizontalAlignment: Text.AlignHCenter + width: track.width + text: slider.gamma.toFixed(1) + font.family: "Arial" + font.pixelSize: 11 + color: "#999999" + visible: showMidPoint + } + + Text { + id: whitePointValueCaption + anchors.bottom: track.bottom + anchors.right: track.right + text: slider.whitePointValue.toFixed(1) + font.family: "Arial" + font.pixelSize: 11 + color: "#999999" + } +} diff --git a/basicsuite/Shader Effects/PositionPicker.qml b/basicsuite/Shader Effects/PositionPicker.qml new file mode 100644 index 0000000..f3f58e4 --- /dev/null +++ b/basicsuite/Shader Effects/PositionPicker.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Image { + id: positionPicker + property real xValue: 0 + property real yValue: 0 + + x: parent.width * xValue - positionPicker.width / 2 + y: parent.height * yValue - positionPicker.height / 2 + + property alias pressed: mouseArea.pressed + + source: pressed ? "images/slider_handle_pressed.png" : "images/slider_handle.png" + + MouseArea { + id: mouseArea + + property real startX + property real startY + + anchors.fill: parent + onPressed: { + startX = mouseX; + startY = mouseY; + } + + onPositionChanged: { + xValue = (positionPicker.x + positionPicker.width / 2 + mouseX - startX) / positionPicker.parent.width; + yValue = (positionPicker.y + positionPicker.height / 2 + mouseY - startY) / positionPicker.parent.height; + } + } +} diff --git a/basicsuite/Shader Effects/ProgressBar.qml b/basicsuite/Shader Effects/ProgressBar.qml new file mode 100644 index 0000000..9cc6a9d --- /dev/null +++ b/basicsuite/Shader Effects/ProgressBar.qml @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: slider + + property real value: 1 + property real maximum: 1 + property real minimum: 0 + property string caption: "" + property bool integer: false + + width: parent.width + height: 20 + + function updatePos() { + if (maximum > minimum) { + var pos = (track.width) * (value - minimum) / (maximum - minimum); + return Math.min(Math.max(pos, 0), track.width); + } else { + return 0; + } + } + + Text { + id: captionText + width: 110 + anchors.verticalCenter: parent.verticalCenter + horizontalAlignment: Text.AlignRight + text: slider.caption + ':' + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + } + + Text { + id: valueCaption + anchors.left: captionText.right + anchors.leftMargin: 11 + anchors.verticalCenter: parent.verticalCenter + width: 35 + horizontalAlignment: Text.AlignLeft + text: slider.value.toFixed(1) + font.family: "Arial" + font.pixelSize: 11 + color: "#999999" + } + + Item { + id: track + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: parent.width / 2 + anchors.right: parent.right + anchors.rightMargin: 10 + + BorderImage { + source: "images/slider_track.png" + anchors.left: parent.left + anchors.right: parent.right + border.right: 2 + } + + BorderImage { + id: trackFilled + anchors.left: parent.left + width: updatePos() + source: "images/slider_track_filled.png" + border.left: 3 + border.right: 3 + } + } +} diff --git a/basicsuite/Shader Effects/RadioButton.qml b/basicsuite/Shader Effects/RadioButton.qml new file mode 100644 index 0000000..4e527d4 --- /dev/null +++ b/basicsuite/Shader Effects/RadioButton.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: radioButton + property string caption: "" + property bool selected: false + property bool pressed: mouse.pressed + anchors {left: parent.left; right: parent.right} + height: 20 + + Text { + id: captionText + anchors {left: parent.horizontalCenter; leftMargin: -5; right: parent.right; verticalCenter: parent.verticalCenter} + horizontalAlignment: Text.AlignLeft + text: radioButton.caption + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + } + + Image { + id: button + anchors {right: captionText.left; rightMargin: 10; verticalCenter: parent.verticalCenter} + source: "images/radiobutton_outer.png" + smooth: true + Image { + id: buttonFill + anchors.centerIn: parent + source: "images/radiobutton_inner.png" + smooth: true + visible: radioButton.selected + } + } + + MouseArea { + id: mouse + anchors.fill: parent + anchors.leftMargin: 115 + preventStealing: true + } +} diff --git a/basicsuite/Shader Effects/RadioButtonColumn.qml b/basicsuite/Shader Effects/RadioButtonColumn.qml new file mode 100644 index 0000000..fa3f4ff --- /dev/null +++ b/basicsuite/Shader Effects/RadioButtonColumn.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: radioButtoncolumn + property string value: "" + property string prefixCaption: "" + default property alias children: buttons.children + property string caption: "" + + width: parent.width + height: buttons.height + + Text { + id: captionText + anchors {top: parent.top; topMargin: 4} + width: 110 + horizontalAlignment: Text.AlignRight + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + text: radioButtoncolumn.caption + ':' + } + + Column { + id: buttons + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + } +} diff --git a/basicsuite/Shader Effects/RgbaColorPicker.qml b/basicsuite/Shader Effects/RgbaColorPicker.qml new file mode 100644 index 0000000..6346a11 --- /dev/null +++ b/basicsuite/Shader Effects/RgbaColorPicker.qml @@ -0,0 +1,115 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: rgbaSlider + property color color: Qt.rgba(rValue, gValue, bValue, aValue) + + property alias rValue: rSlider.value + property alias gValue: gSlider.value + property alias bValue: bSlider.value + property alias aValue: aSlider.value + property bool pressed: rSlider.pressed || gSlider.pressed || bSlider.pressed || aSlider.pressed + + width: parent.width + height: childrenRect.height + + function dec2hex(i) + { + if (i <= 15) + return "0" + i.toString(16); + else + return i.toString(16); + } + + Rectangle { + id: colorRect + width: 50; height: 50 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.verticalCenter: sliders.verticalCenter + color: Qt.rgba(rgbaSlider.rValue, rgbaSlider.gValue, rgbaSlider.bValue, rgbaSlider.aValue) + } + Column { + id: sliders + anchors {left: parent.left; right: parent.right} + Slider { + id: aSlider + minimum: 0 + maximum: 1 + value: 1.0 + caption: 'A' + } + Slider { + id: rSlider + minimum: 0 + maximum: 1 + value: 1.0 + caption: 'R' + } + Slider { + id: gSlider + minimum: 0 + maximum: 1 + value: 1.0 + caption: 'G' + } + Slider { + id: bSlider + minimum: 0 + maximum: 1 + value: 1.0 + caption: 'B' + } + + } +// Text { +// anchors.top: colorRect.bottom +// anchors.topMargin: 5 +// anchors.horizontalCenter: colorRect.horizontalCenter +// horizontalAlignment: Text.AlignHCenter +// text: "#" + dec2hex(Math.round(rgbaSlider.aValue * 255)) + dec2hex(Math.round(rgbaSlider.rValue * 255)) + dec2hex(Math.round(rgbaSlider.gValue * 255)) + dec2hex(Math.round(rgbaSlider.bValue * 255)) +// font.capitalization: Font.AllUppercase +// color: "#999999" +// font.pixelSize: 11 +// } +} diff --git a/basicsuite/Shader Effects/Slider.qml b/basicsuite/Shader Effects/Slider.qml new file mode 100644 index 0000000..4b937a4 --- /dev/null +++ b/basicsuite/Shader Effects/Slider.qml @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: slider + + property real value: 1 + property real maximum: 1 + property real minimum: 0 + property string caption: "" + property bool pressed: mouseArea.pressed + property bool integer: false + property string handleSource: "images/slider_handle.png" + + width: parent.width + height: 20 + + function updatePos() { + if (maximum > minimum) { + var pos = (track.width - 10) * (value - minimum) / (maximum - minimum) + 5; + return Math.min(Math.max(pos, 5), track.width - 5) - 10; + } else { + return 5; + } + } + + Text { + id: captionText + width: 110 + anchors.verticalCenter: parent.verticalCenter + horizontalAlignment: Text.AlignRight + text: slider.caption + ':' + font.family: "Arial" + font.pixelSize: 11 + color: "#B3B3B3" + } + + Text { + id: valueCaption + anchors.left: captionText.right + anchors.leftMargin: 11 + anchors.verticalCenter: parent.verticalCenter + width: 35 + horizontalAlignment: Text.AlignLeft + text: integer ? slider.value.toFixed(0) : slider.value.toFixed(1) + font.family: "Arial" + font.pixelSize: 11 + color: "#999999" + } + + Item { + id: track + height: parent.height + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: parent.width / 2 + anchors.right: parent.right + anchors.rightMargin: 10 + + BorderImage { + source: "images/slider_track.png" + anchors.left: parent.left + anchors.right: parent.right + border.right: 2 + } + + BorderImage { + id: trackFilled + anchors.left: minimum == -maximum ? (value < 0 ? handle.horizontalCenter : parent.horizontalCenter) : parent.left + anchors.right: minimum == -maximum && value < 0 ? parent.horizontalCenter : handle.horizontalCenter + source: "images/slider_track_filled.png" + border.left: 3 + border.right: 3 + } + + Image { + id: handle; + smooth: true + source: mouseArea.pressed ? 'images/slider_handle_pressed.png' : slider.handleSource + x: updatePos() + } + + MouseArea { + id: mouseArea + anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter } + height: 16 + preventStealing: true + + onPressed: { + var handleX = Math.max(0, Math.min(mouseX, mouseArea.width)) + var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum; + value = slider.integer ? Math.round(realValue) : realValue; + } + + onPositionChanged: { + if (pressed) { + var handleX = Math.max(0, Math.min(mouseX, mouseArea.width)) + var realValue = (maximum - minimum) * handleX / mouseArea.width + minimum; + value = slider.integer ? Math.round(realValue) : realValue; + } + } + } + } +} diff --git a/basicsuite/Shader Effects/TestBedModel.qml b/basicsuite/Shader Effects/TestBedModel.qml new file mode 100644 index 0000000..f612a0c --- /dev/null +++ b/basicsuite/Shader Effects/TestBedModel.qml @@ -0,0 +1,70 @@ +/***************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Add-On Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +*****************************************************************************/ + +import QtQuick 2.0 + +ListModel { + id: testcaseModel + ListElement { name: "TestBlend.qml"; group: "Blend"; last: true } + ListElement { name: "TestDisplace.qml"; group: "Distortion"; last: true } + ListElement { name: "TestOpacityMask.qml"; group: "Mask" } + ListElement { name: "TestThresholdMask.qml"; group: "Mask"; last: true } + ListElement { name: "TestGlow.qml"; group: "Glow" } + ListElement { name: "TestRectangularGlow.qml"; group: "Glow"; last: true } + ListElement { name: "TestFastBlur.qml"; group: "Blur" } + ListElement { name: "TestGaussianBlur.qml"; group: "Blur" } + ListElement { name: "TestMaskedBlur.qml"; group: "Blur" } + ListElement { name: "TestRecursiveBlur.qml"; group: "Blur"; last: true } + ListElement { name: "TestDirectionalBlur.qml"; group: "Motion Blur"; } + ListElement { name: "TestRadialBlur.qml"; group: "Motion Blur"; } + ListElement { name: "TestZoomBlur.qml"; group: "Motion Blur"; last: true } + ListElement { name: "TestDropShadow.qml"; group: "Drop Shadow" } + ListElement { name: "TestInnerShadow.qml"; group: "Drop Shadow"; last: true } + ListElement { name: "TestLinearGradient.qml"; group: "Gradient" } + ListElement { name: "TestConicalGradient.qml"; group: "Gradient" } + ListElement { name: "TestRadialGradient.qml"; group: "Gradient"; last: true } + ListElement { name: "TestColorize.qml"; group: "Color" } + ListElement { name: "TestColorOverlay.qml"; group: "Color" } + ListElement { name: "TestHueSaturation.qml"; group: "Color" } + ListElement { name: "TestBrightnessContrast.qml"; group: "Color" } + ListElement { name: "TestDesaturate.qml"; group: "Color" } + ListElement { name: "TestLevelAdjust.qml"; group: "Color" } + ListElement { name: "TestGammaAdjust.qml"; group: "Color"; last: true } +} diff --git a/basicsuite/Shader Effects/TestBlend.qml b/basicsuite/Shader Effects/TestBlend.qml new file mode 100644 index 0000000..38f1ba3 --- /dev/null +++ b/basicsuite/Shader Effects/TestBlend.qml @@ -0,0 +1,216 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource1 + source: "images/bug.jpg" + } + + ImageSource { + id: imageSource2 + source: "images/butterfly.png" + } + + Blend { + id: effect + anchors.fill: imageSource1 + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource1 + foregroundSource: imageSource2 + mode: blendMode.value + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + + RadioButtonColumn { + id: blendMode + value: "normal" + caption: "mode" + RadioButton { + caption: "normal" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "addition" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "average" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "color" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "colorBurn" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "colorDodge" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "darken" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "darkerColor" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "difference" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "divide" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "exclusion" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "hardLight" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "hue" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "lighten" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "lighterColor" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "lightness" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "multiply" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "negation" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "saturation" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "screen" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "softlight" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + RadioButton { + caption: "subtract" + selected: caption == blendMode.value + onPressedChanged: blendMode.value = caption + } + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestBrightnessContrast.qml b/basicsuite/Shader Effects/TestBrightnessContrast.qml new file mode 100644 index 0000000..1538a3e --- /dev/null +++ b/basicsuite/Shader Effects/TestBrightnessContrast.qml @@ -0,0 +1,108 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + } + + BrightnessContrast { + id: effect + anchors.fill: imageSource + brightness: brigthnessSlider.value + contrast: contrastSlider.value + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: brigthnessSlider + minimum: -1.0 + maximum: 1.0 + value: 0.0 + caption: "brightness" + } + Slider { + id: contrastSlider + minimum: -1.0 + maximum: 1.0 + value: 0.0 + caption: "contrast" + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestCaseTemplate.qml b/basicsuite/Shader Effects/TestCaseTemplate.qml new file mode 100644 index 0000000..04377f2 --- /dev/null +++ b/basicsuite/Shader Effects/TestCaseTemplate.qml @@ -0,0 +1,142 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: main + + property real imageSize: Math.min(height, width - 220) + default property alias testItem : testItemContainer.children + property alias controls: controlsColumn.children + property string currentTest: "" + property string fps: "nan" + property color bgColor: "black" + + property int dummy: 0 + property int fpsCount: 0 + + anchors.fill: parent + + onDummyChanged: fpsCount++; + + NumberAnimation on dummy { + duration: 500 + from: 0 + to: 10000 + loops: Animation.Infinite + } + + Timer { + interval: 1000 + repeat: true + running: true + onTriggered: { + fps = "" + fpsCount; + fpsCount = 0; + } + } + + Rectangle { + id: backgroundColor + anchors.fill: testItemContainer + color: bgColor + } + + Image { + id: background + anchors.fill: testItemContainer + fillMode: Image.Tile + source: bgColor.toString() == "#010101" ? "images/background.png" : "" + } + + Item { + id: testItemContainer + property real margin: 0 + x: (parent.width - testParameterContainer.width - width) / 2 + anchors.verticalCenter: parent.verticalCenter + anchors.top: undefined + width: Math.min(parent.height - 20, parent.width - testParameterContainer.width - 20) + height: width + } + + Image { + id: titlebar + source: "images/title.png" + anchors.top: parent.top + anchors.right: parent.right + width: 300 + + Text { + id: effectsListTitle + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + text: currentTest + color: "white" + font.family: "Arial" + font.bold: true + font.pixelSize: 12 + } + } + + Rectangle { + id: testParameterContainer + anchors.top: titlebar.bottom + anchors.bottom: parent.bottom + anchors.right: parent.right + width: 300 + color: "#171717" + + Flickable { + id: slidersFlickable + anchors.fill: parent + contentHeight: controlsColumn.height + interactive: contentHeight > height + clip: true + + Column { + id: controlsColumn + anchors.left: parent.left + anchors.right: parent.right + } + } + } +} diff --git a/basicsuite/Shader Effects/TestColorOverlay.qml b/basicsuite/Shader Effects/TestColorOverlay.qml new file mode 100644 index 0000000..cc75dba --- /dev/null +++ b/basicsuite/Shader Effects/TestColorOverlay.qml @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/butterfly.png" + } + + ColorOverlay { + id: effect + anchors.fill: imageSource + color: colorPicker.color + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "color" + ColorPicker { + id: colorPicker + hue: 0.5 + saturation: 0.5 + lightness: 0.5 + alpha: 0.5 + } + }, + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestColorize.qml b/basicsuite/Shader Effects/TestColorize.qml new file mode 100644 index 0000000..2301e54 --- /dev/null +++ b/basicsuite/Shader Effects/TestColorize.qml @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + forcedUpdateAnimationRunning: updateCheckBox.selected + } + + Colorize { + id: effect + anchors.fill: imageSource + hue: colorPicker.hue + saturation: colorPicker.saturation + lightness: colorPicker.lightness + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + ColorPicker { + id: colorPicker + hue: 0.5 + saturation: 0.5 + lightness: 0.5 + showAlphaSlider: false + } + }, + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestConicalGradient.qml b/basicsuite/Shader Effects/TestConicalGradient.qml new file mode 100644 index 0000000..19405c9 --- /dev/null +++ b/basicsuite/Shader Effects/TestConicalGradient.qml @@ -0,0 +1,146 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: maskImage + source: "images/butterfly.png" + } + + + ConicalGradient { + id: effect + anchors.fill: parent + cached: cachedCheckBox.selected + visible: enabledCheckBox.selected + source: maskCheckBox.selected ? maskImage : undefined + horizontalOffset: (offsetPicker.xValue - 0.5) * width + verticalOffset: (offsetPicker.yValue - 0.5) * height + gradient: Gradient { + GradientStop {position: 0.0; color: gradientBeginColorSlider.color} + GradientStop {position: 1.0; color: gradientEndColorSlider.color} + } + angle: startAngleSlider.value + } + + PositionPicker { + id: offsetPicker + xValue: 0.5 + yValue: 0.5 + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Label { + caption: "horizontalOffset" + text: effect.horizontalOffset.toFixed(1) + } + Label { + caption: "verticalOffset" + text: effect.verticalOffset.toFixed(1) + } + Slider { + id: startAngleSlider + caption: "angle" + minimum: -360 + maximum: 360 + value: 0 + } + CheckBox { + id: maskCheckBox + caption: "Use Mask" + } + }, + + Control { + caption: "gradient begin color" + ColorPicker { + id: gradientBeginColorSlider + hue: 0.67 + saturation: 1.0 + lightness: 0.5 + } + }, + + Control { + caption: "gradient end color" + ColorPicker { + id: gradientEndColorSlider + hue: 0.5 + saturation: 1.0 + lightness: 0.5 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestDesaturate.qml b/basicsuite/Shader Effects/TestDesaturate.qml new file mode 100644 index 0000000..8b375d8 --- /dev/null +++ b/basicsuite/Shader Effects/TestDesaturate.qml @@ -0,0 +1,100 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + } + + Desaturate { + id: effect + anchors.fill: imageSource + desaturation: grayscaleSlider.value + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: grayscaleSlider + minimum: 0 + maximum: 1.0 + value: 1.0 + caption: "desaturation" + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestDirectionalBlur.qml b/basicsuite/Shader Effects/TestDirectionalBlur.qml new file mode 100644 index 0000000..794b734 --- /dev/null +++ b/basicsuite/Shader Effects/TestDirectionalBlur.qml @@ -0,0 +1,124 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/butterfly.png" + } + + DirectionalBlur { + id: effect + anchors.fill: imageSource + transparentBorder: transparentBorderCheckBox.selected + angle: angleSlider.value + length: lengthSlider.value + samples: samplesSlider.value + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: angleSlider + minimum: -180.0 + maximum: 180.0 + value: 90.0 + caption: "angle" + } + Slider { + id: lengthSlider + minimum: 0.0 + maximum: 64.0 + value: 32.0 + caption: "length" + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 32 + value: 32 + caption: "samples" + integer: true + } + CheckBox { + id: transparentBorderCheckBox + caption: "transparentBorder" + selected: false + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestDisplace.qml b/basicsuite/Shader Effects/TestDisplace.qml new file mode 100644 index 0000000..6c6a30a --- /dev/null +++ b/basicsuite/Shader Effects/TestDisplace.qml @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + + ImageSource { + id: imageSource + source: "images/bug.jpg" + } + + Rectangle { + id: displacementMapSource + visible: !enabledCheckBox.selected + color: "#8080ff" + smooth: true + anchors.fill: parent + Image { + id: di + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + sourceSize: Qt.size(128, 128) + source: "images/glass_normal.png" + smooth: true + } + } + + Displace { + id: effect + anchors.fill: imageSource + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + displacementSource: displacementMapSource + displacement: displacementScaleSlider.value + smooth: true + MouseArea { + anchors.fill: parent + onClicked: { di.x = mouseX - di.width/2; di.y = mouseY - di.height/2; } + onPositionChanged: { if (pressed) { di.x = mouseX - di.width/2; di.y = mouseY - di.height/2; } } + } + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: displacementScaleSlider + caption: "displacement" + minimum: -0.5 + maximum: 0.5 + value: 0.1 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + RadioButtonColumn { + id: sourceType + value: "shaderEffectSource" + caption: "source type" + RadioButton { + caption: "shaderEffectSource" + selected: caption == sourceType.value + onPressedChanged: sourceType.value = caption + } + RadioButton { + caption: "image" + selected: caption == sourceType.value + onPressedChanged: { + sourceType.value = caption + updateCheckBox.selected = false + } + } + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestDropShadow.qml b/basicsuite/Shader Effects/TestDropShadow.qml new file mode 100644 index 0000000..28f963d --- /dev/null +++ b/basicsuite/Shader Effects/TestDropShadow.qml @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + + ImageSource { + id: imageSource + source: "images/butterfly.png" + anchors.centerIn: parent + } + + DropShadow { + id: effect + horizontalOffset: (offsetPicker.xValue - 0.5) * width + verticalOffset: (offsetPicker.yValue - 0.5) * height + anchors.fill: imageSource + radius: radiusSlider.value + spread: spreadSlider.value + samples: samplesSlider.value + color: colorPicker.color + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + fast: fastCheckBox.selected + } + + PositionPicker { + id: offsetPicker + xValue: 0.51 + yValue: 0.51 + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Label { + caption: "horizontalOffset" + text: effect.horizontalOffset.toFixed(1) + } + Label { + caption: "verticalOffset" + text: effect.verticalOffset.toFixed(1) + } + Slider { + id: radiusSlider + minimum: 0 + maximum: 64 + value: 8 + caption: "radius" + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 32 + value: 32 + integer: true + caption: "samples" + } + Slider { + id: spreadSlider + minimum: 0 + maximum: 1.0 + value: 0.0 + caption: "spread" + } + CheckBox { + id: fastCheckBox + caption: "fast" + selected: false + } + }, + + Control { + caption: "color" + ColorPicker { + id: colorPicker + hue: 0 + saturation: 0 + lightness: 0 + alpha: 0.5 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + color: "#ababab" + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestFastBlur.qml b/basicsuite/Shader Effects/TestFastBlur.qml new file mode 100644 index 0000000..a1bfb52 --- /dev/null +++ b/basicsuite/Shader Effects/TestFastBlur.qml @@ -0,0 +1,106 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource; + } + + FastBlur { + id: effect + anchors.fill: imageSource + radius: blurSlider.value + transparentBorder: transparentBorderCheckBox.selected + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: blurSlider + minimum: 0.0 + maximum: 64.0 + value: 32 + caption: "radius" + } + CheckBox { + id: transparentBorderCheckBox + caption: "transparentBorder" + selected: false + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestGammaAdjust.qml b/basicsuite/Shader Effects/TestGammaAdjust.qml new file mode 100644 index 0000000..e601f09 --- /dev/null +++ b/basicsuite/Shader Effects/TestGammaAdjust.qml @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/butterfly.png" + } + + GammaAdjust { + id: effect + anchors.fill: imageSource + gamma: gammaSlider.value + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: gammaSlider + minimum: 0 + maximum: 2.0 + value: 1.0 + caption: "gamma" + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestGaussianBlur.qml b/basicsuite/Shader Effects/TestGaussianBlur.qml new file mode 100644 index 0000000..c1d2655 --- /dev/null +++ b/basicsuite/Shader Effects/TestGaussianBlur.qml @@ -0,0 +1,123 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + } + + GaussianBlur { + id: effect + anchors.fill: imageSource + radius: radiusSlider.value + samples: samplesSlider.value + deviation: deviationSlider.value + transparentBorder: transparentBorderCheckBox.selected + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: radiusSlider + minimum: 0.0 + maximum: 16.0 + value: 8.0 + caption: "radius" + } + Slider { + id: deviationSlider + minimum: 0 + maximum: 16 + value: (effect.radius + 1) / 3.3333 + caption: "deviation" + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 32 + value: 32 + integer: true + caption: "samples" + } + CheckBox { + id: transparentBorderCheckBox + caption: "transparentBorder" + selected: false + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestGlow.qml b/basicsuite/Shader Effects/TestGlow.qml new file mode 100644 index 0000000..6499c44 --- /dev/null +++ b/basicsuite/Shader Effects/TestGlow.qml @@ -0,0 +1,137 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + + ImageSource { + id: imageSource + source: "images/butterfly.png" + anchors.centerIn: parent + } + + Glow { + id: effect + anchors.fill: imageSource + color: colorPicker.color + spread: spreadSlider.value + radius: radiusSlider.value + samples: samplesSlider.value + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + fast: fastCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: radiusSlider + minimum: 0.0 + maximum: 16.0 + value: 8.0 + caption: "radius" + } + Slider { + id: spreadSlider + caption: "spread" + minimum: 0.0 + maximum: 1.0 + value: 0.3 + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 32 + value: 32 + integer: true + caption: "samples" + } + CheckBox { + id: fastCheckBox + caption: "fast" + selected: false + } + }, + + Control { + caption: "color" + ColorPicker { + id: colorPicker + hue: 0 + saturation: 1 + lightness: 1 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestHueSaturation.qml b/basicsuite/Shader Effects/TestHueSaturation.qml new file mode 100644 index 0000000..ff75e01 --- /dev/null +++ b/basicsuite/Shader Effects/TestHueSaturation.qml @@ -0,0 +1,117 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/butterfly.png" + } + + HueSaturation { + id: effect + anchors.fill: imageSource + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + hue: hueSlider.value + saturation: saturationSlider.value + lightness: lightnessSlider.value + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: hueSlider + caption: "hue" + minimum: -1.0 + maximum: 1.0 + value: 0.0 + } + Slider { + id: saturationSlider + caption: "saturation" + minimum: -1.0 + maximum: 1.0 + value: 0.0 + } + Slider { + id: lightnessSlider + caption: "lightness" + minimum: -1.0 + maximum: 1.0 + value: 0.0 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestInnerShadow.qml b/basicsuite/Shader Effects/TestInnerShadow.qml new file mode 100644 index 0000000..091c4fa --- /dev/null +++ b/basicsuite/Shader Effects/TestInnerShadow.qml @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + + ImageSource { + id: imageSource + source: "images/butterfly.png" + anchors.centerIn: parent + } + + InnerShadow { + id: effect + anchors.fill: imageSource + horizontalOffset: (offsetPicker.xValue - 0.5) * width + verticalOffset: (offsetPicker.yValue - 0.5) * height + samples: samplesSlider.value + radius: radiusSlider.value + spread: spreadSlider.value + color: colorPicker.color + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + fast: fastCheckBox.selected + source: imageSource + } + + PositionPicker { + id: offsetPicker + xValue: 0.50 + yValue: 0.51 + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Label { + caption: "horizontalOffset" + text: effect.horizontalOffset.toFixed(1) + } + Label { + caption: "verticalOffset" + text: effect.verticalOffset.toFixed(1) + } + Slider { + id: radiusSlider + minimum: 0 + maximum: 16 + value: 8 + caption: "radius" + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 32 + value: 32 + integer: true + caption: "samples" + } + Slider { + id: spreadSlider + minimum: 0 + maximum: 1.0 + value: 0.0 + caption: "spread" + } + CheckBox { + id: fastCheckBox + caption: "fast" + selected: false + } + }, + + Control { + caption: "color" + ColorPicker { + id: colorPicker + hue: 0 + saturation: 0 + lightness: 0 + alpha: 0.75 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + color: "#ababab" + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestLevelAdjust.qml b/basicsuite/Shader Effects/TestLevelAdjust.qml new file mode 100644 index 0000000..f9653a4 --- /dev/null +++ b/basicsuite/Shader Effects/TestLevelAdjust.qml @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/butterfly.png" + } + + LevelAdjust { + id: effect + anchors.fill: imageSource + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + + minimumInput: Qt.rgba(redInput.blackPointValue + valueInput.blackPointValue * (redInput.whitePointValue - redInput.blackPointValue), greenInput.blackPointValue + valueInput.blackPointValue * (greenInput.whitePointValue - greenInput.blackPointValue), blueInput.blackPointValue + valueInput.blackPointValue * (blueInput.whitePointValue - blueInput.blackPointValue), alphaInput.blackPointValue) + maximumInput: Qt.rgba(redInput.whitePointValue - (1.0 - valueInput.whitePointValue) * (redInput.whitePointValue - redInput.blackPointValue), greenInput.whitePointValue - (1.0 - valueInput.whitePointValue) * (greenInput.whitePointValue - greenInput.blackPointValue), blueInput.whitePointValue - (1.0 - valueInput.whitePointValue) * (blueInput.whitePointValue - blueInput.blackPointValue), alphaInput.whitePointValue) + minimumOutput: Qt.rgba(redOutput.blackPointValue + valueOutput.blackPointValue * (redOutput.whitePointValue - redOutput.blackPointValue), greenOutput.blackPointValue + valueOutput.blackPointValue * (greenOutput.whitePointValue - greenOutput.blackPointValue), blueOutput.blackPointValue + valueOutput.blackPointValue * (blueOutput.whitePointValue - blueOutput.blackPointValue), alphaOutput.blackPointValue) + maximumOutput: Qt.rgba(redOutput.whitePointValue - (1.0 - valueOutput.whitePointValue) * (redOutput.whitePointValue - redOutput.blackPointValue), greenOutput.whitePointValue - (1.0 - valueOutput.whitePointValue) * (greenOutput.whitePointValue - greenOutput.blackPointValue), blueOutput.whitePointValue - (1.0 - valueOutput.whitePointValue) * (blueOutput.whitePointValue - blueOutput.blackPointValue), alphaOutput.whitePointValue) + + gamma: Qt.vector3d((redInput.gamma * valueInput.gamma), (greenInput.gamma * valueInput.gamma), (blueInput.gamma * valueInput.gamma)) + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "RGB" + LevelSlider { + id: valueInput + caption: "Input" + } + LevelSlider { + id: valueOutput + showMidPoint: false + caption: "Output" + } + }, + Control { + caption: "Red" + __hide: true + LevelSlider { + id: redInput + caption: "Input" + } + LevelSlider { + id: redOutput + showMidPoint: false + caption: "Output" + } + }, + Control { + caption: "Green" + __hide: true + LevelSlider { + id: greenInput + caption: "Input" + } + LevelSlider { + id: greenOutput + showMidPoint: false + caption: "Output" + } + }, + Control { + caption: "Blue" + __hide: true + LevelSlider { + id: blueInput + caption: "Input" + } + LevelSlider { + id: blueOutput + showMidPoint: false + caption: "Output" + } + }, + Control { + caption: "Alpha" + __hide: true + LevelSlider { + id: alphaInput + showMidPoint: false + caption: "Input" + } + LevelSlider { + id: alphaOutput + showMidPoint: false + caption: "Output" + } + }, + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestLinearGradient.qml b/basicsuite/Shader Effects/TestLinearGradient.qml new file mode 100644 index 0000000..5ed27b8 --- /dev/null +++ b/basicsuite/Shader Effects/TestLinearGradient.qml @@ -0,0 +1,156 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: maskImage + source: "images/butterfly.png" + } + + LinearGradient { + id: effect + anchors.fill: parent + cached: cachedCheckBox.selected + visible: enabledCheckBox.selected + source: maskCheckBox.selected ? maskImage : undefined + start: Qt.point(startPicker.xValue * width, startPicker.yValue * height) + end: Qt.point(endPicker.xValue * width, endPicker.yValue * height) + gradient: Gradient { + GradientStop { + position: 0.0 + color: gradientBeginColorSlider.color + } + GradientStop { + position: 1.0 + color: gradientEndColorSlider.color + } + } + } + + PositionPicker { + id: startPicker + xValue: 0.2 + yValue: 0.2 + } + PositionPicker { + id: endPicker + xValue: 0.8 + yValue: 0.8 + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Label { + caption: "startX" + text: startPicker.xValue.toFixed(1) + } + Label { + caption: "startY" + text: startPicker.yValue.toFixed(1) + } + Label { + caption: "endX" + text: endPicker.xValue.toFixed(1) + } + Label { + caption: "endY" + text: endPicker.yValue.toFixed(1) + } + CheckBox { + id: maskCheckBox + caption: "Use Mask" + } + }, + + Control { + caption: "gradient begin color" + ColorPicker { + id: gradientBeginColorSlider + hue: 0.67 + saturation: 1.0 + lightness: 0.5 + } + }, + + Control { + caption: "gradient end color" + ColorPicker { + id: gradientEndColorSlider + hue: 0.5 + saturation: 1.0 + lightness: 0.5 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestMaskedBlur.qml b/basicsuite/Shader Effects/TestMaskedBlur.qml new file mode 100644 index 0000000..1144252 --- /dev/null +++ b/basicsuite/Shader Effects/TestMaskedBlur.qml @@ -0,0 +1,153 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + } + + Item { + id: maskSource + anchors.fill: imageSource + visible: false + Rectangle { + rotation: -90 + anchors.fill: parent + gradient: Gradient { + GradientStop { position: 0.2; color: Qt.rgba(maskAlphaBeginSlider.value, maskAlphaBeginSlider.value, maskAlphaBeginSlider.value, maskAlphaBeginSlider.value) } + GradientStop { position: 0.5; color: Qt.rgba(maskAlphaEndSlider.value, maskAlphaEndSlider.value, maskAlphaEndSlider.value, maskAlphaEndSlider.value) } + } + } + } + + MaskedBlur { + id: effect + anchors.fill: imageSource + radius: radiusSlider.value + samples: samplesSlider.value + transparentBorder: transparentBorderCheckBox.selected + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + fast: fastCheckBox.selected + source: imageSource + maskSource: maskSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: radiusSlider + minimum: 0.0 + maximum: 32.0 + value: 16.0 + caption: "radius" + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 32 + value: 32 + integer: true + caption: "samples" + } + CheckBox { + id: transparentBorderCheckBox + caption: "transparentBorder" + selected: false + } + CheckBox { + id: fastCheckBox + caption: "fast" + selected: false + } + }, + Control { + caption: "maskSource gradient" + Slider { + id: maskAlphaBeginSlider + minimum: 0.0 + maximum: 1.0 + value: 1.0 + caption: "opacity begin" + } + Slider { + id: maskAlphaEndSlider + minimum: 0.0 + maximum: 1.0 + value: 0.0 + caption: "opacity end" + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestOpacityMask.qml b/basicsuite/Shader Effects/TestOpacityMask.qml new file mode 100644 index 0000000..488353e --- /dev/null +++ b/basicsuite/Shader Effects/TestOpacityMask.qml @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/bug.jpg" + forcedUpdateAnimationRunning: false + } + ImageSource { + id: maskSource + source: "images/butterfly.png" + } + + OpacityMask { + id: effect + anchors.fill: imageSource + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + maskSource: maskSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestRadialBlur.qml b/basicsuite/Shader Effects/TestRadialBlur.qml new file mode 100644 index 0000000..1f6c755 --- /dev/null +++ b/basicsuite/Shader Effects/TestRadialBlur.qml @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/butterfly.png" + } + + RadialBlur { + id: effect + anchors.fill: imageSource + transparentBorder: transparentBorderCheckBox.selected + angle: lengthSlider.value + samples: samplesSlider.value + horizontalOffset: (offsetPicker.xValue - 0.5) * width + verticalOffset: (offsetPicker.yValue - 0.5) * height + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + PositionPicker { + id: offsetPicker + xValue: 0.5 + yValue: 0.5 + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: lengthSlider + minimum: 0.0 + maximum: 360.0 + value: 15.0 + caption: "angle" + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 64 + value: 32 + caption: "samples" + integer: true + } + CheckBox { + id: transparentBorderCheckBox + caption: "transparentBorder" + selected: false + } + Label { + caption: "horizontalOffset" + text: effect.horizontalOffset.toFixed(1) + } + Label { + caption: "verticalOffset" + text: effect.verticalOffset.toFixed(1) + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestRadialGradient.qml b/basicsuite/Shader Effects/TestRadialGradient.qml new file mode 100644 index 0000000..da03ef0 --- /dev/null +++ b/basicsuite/Shader Effects/TestRadialGradient.qml @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: maskImage + source: "images/butterfly.png" + } + + RadialGradient { + id: effect + anchors.fill: parent + cached: cachedCheckBox.selected + visible: enabledCheckBox.selected + source: maskCheckBox.selected ? maskImage : undefined + horizontalOffset: (offsetPicker.xValue - 0.5) * width + verticalOffset: (offsetPicker.yValue - 0.5) * height + horizontalRadius: horizontalRadiusSlider.value + verticalRadius: verticalRadiusSlider.value + angle: angleSlider.value + gradient: Gradient { + GradientStop {position: 0.0; color: gradientBeginColorSlider.color} + GradientStop {position: 1.0; color: gradientEndColorSlider.color} + } + } + + PositionPicker { + id: offsetPicker + xValue: 0.5 + yValue: 0.5 + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Label { + caption: "horizontalOffset" + text: effect.horizontalOffset.toFixed(1) + } + Label { + caption: "verticalOffset" + text: effect.verticalOffset.toFixed(1) + } + Slider { + id: horizontalRadiusSlider + minimum: 0 + maximum: effect.width + value: effect.width / 2 + caption: "horizontalRadius" + } + Slider { + id: verticalRadiusSlider + minimum: 0 + maximum: effect.height + value: effect.height / 2 + caption: "verticalRadius" + } + Slider { + id: angleSlider + minimum: 0 + maximum: 360 + value: 0 + caption: "angle" + } + CheckBox { + id: maskCheckBox + caption: "Use Mask" + } + }, + + Control { + caption: "gradient begin color" + ColorPicker { + id: gradientBeginColorSlider + hue: 0.67 + saturation: 1.0 + lightness: 0.5 + } + }, + + Control { + caption: "gradient end color" + ColorPicker { + id: gradientEndColorSlider + hue: 0.5 + saturation: 1.0 + lightness: 0.5 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestRectangularGlow.qml b/basicsuite/Shader Effects/TestRectangularGlow.qml new file mode 100644 index 0000000..233854e --- /dev/null +++ b/basicsuite/Shader Effects/TestRectangularGlow.qml @@ -0,0 +1,138 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + + RectangularGlow { + id: effect + anchors.fill: rectSource + color: colorPicker.color + spread: spreadSlider.value + glowRadius: sizeSlider.value + visible: enabledCheckBox.selected + opacity: opacitySlider.value + cornerRadius: radiusSlider.value + cached: cachedCheckBox.selected + } + + Rectangle { + id: rectSource + visible: true + anchors.centerIn: parent + width: Math.round(parent.width / 1.5) + height: Math.round(parent.height / 2) + radius: 25 + color: "black" + smooth: true + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: spreadSlider + caption: "spread" + minimum: 0.0 + maximum: 1.0 + value: 0.5 + } + Slider { + id: sizeSlider + minimum: 0 + maximum: rectSource.width / 2.0 + value: 10.0 + caption: "glowRadius" + onValueChanged: radiusSlider.value = Math.max(0, Math.min(radiusSlider.value, radiusSlider.maximum)) + } + Slider { + id: radiusSlider + minimum: 0 + maximum: Math.min(effect.width, effect.height) / 2 + effect.glowRadius; + caption: "cornerRadius" + value: rectSource.radius + effect.glowRadius + } + Slider { + id: opacitySlider + minimum: 0 + maximum: 1.0 + value: 1.0 + caption: "opacity" + } + }, + + Control { + caption: "color" + ColorPicker { + id: colorPicker + hue: 0 + saturation: 1 + lightness: 1 + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestRecursiveBlur.qml b/basicsuite/Shader Effects/TestRecursiveBlur.qml new file mode 100644 index 0000000..bdbbdbc --- /dev/null +++ b/basicsuite/Shader Effects/TestRecursiveBlur.qml @@ -0,0 +1,119 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + + ImageSource { + id: imageSource + forcedUpdateAnimationRunning: false + } + + RecursiveBlur { + id: effect + loops: iterationSlider.value + anchors.fill: imageSource + radius: radiusSlider.value + transparentBorder: transparentBorderCheckBox.selected + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: iterationSlider + minimum: 0 + maximum: 20 + value: 0 + integer: true + caption: "loops" + } + Slider { + id: radiusSlider + minimum: 0.0 + maximum: 16.0 + value: 7.5 + caption: "radius" + } + CheckBox { + id: transparentBorderCheckBox + caption: "transparentBorder" + selected: false + } + ProgressBar { + id: progressSlider + minimum: 0 + maximum: 1.0 + value: effect.progress + caption: "progress" + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestThresholdMask.qml b/basicsuite/Shader Effects/TestThresholdMask.qml new file mode 100644 index 0000000..bbf2915 --- /dev/null +++ b/basicsuite/Shader Effects/TestThresholdMask.qml @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/bug.jpg" + } + ImageSource { + id: maskSource + source: "images/fog.png" + } + + ThresholdMask { + id: effect + anchors.fill: imageSource + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + maskSource: maskSource + threshold: thresholdSlider.value + spread: fringeSlider.value + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: thresholdSlider + minimum: 0.0 + maximum: 1.0 + value: 0.4 + caption: "threshold" + } + Slider { + id: fringeSlider + minimum: 0.0 + maximum: 1.0 + value: 0.2 + caption: "spread" + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/TestZoomBlur.qml b/basicsuite/Shader Effects/TestZoomBlur.qml new file mode 100644 index 0000000..7dcfbd0 --- /dev/null +++ b/basicsuite/Shader Effects/TestZoomBlur.qml @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtGraphicalEffects 1.0 + +TestCaseTemplate { + ImageSource { + id: imageSource + source: "images/butterfly.png" + } + + ZoomBlur { + id: effect + anchors.fill: imageSource + transparentBorder: transparentBorderCheckBox.selected + length: lengthSlider.value + samples: samplesSlider.value + horizontalOffset: (offsetPicker.xValue - 0.5) * width + verticalOffset: (offsetPicker.yValue - 0.5) * height + visible: enabledCheckBox.selected + cached: cachedCheckBox.selected + source: imageSource + } + + PositionPicker { + id: offsetPicker + xValue: 0.5 + yValue: 0.5 + } + + bgColor: bgColorPicker.color + controls: [ + Control { + caption: "general" + Slider { + id: lengthSlider + minimum: 0.0 + maximum: 64.0 + value: 32.0 + caption: "length" + } + Slider { + id: samplesSlider + minimum: 0 + maximum: 32 + value: 32 + caption: "samples" + integer: true + } + CheckBox { + id: transparentBorderCheckBox + caption: "transparentBorder" + selected: false + } + Label { + caption: "horizontalOffset" + text: effect.horizontalOffset.toFixed(1) + } + Label { + caption: "verticalOffset" + text: effect.verticalOffset.toFixed(1) + } + }, + + Control { + caption: "advanced" + last: true + Label { + caption: "Effect size" + text: effect.width + "x" + effect.height + } + Label { + caption: "FPS" + text: fps + } + CheckBox { + id: cachedCheckBox + caption: "cached" + } + CheckBox { + id: enabledCheckBox + caption: "enabled" + } + CheckBox { + id: updateCheckBox + caption: "animated" + selected: false + } + BGColorPicker { + id: bgColorPicker + } + } + ] +} diff --git a/basicsuite/Shader Effects/description.txt b/basicsuite/Shader Effects/description.txt new file mode 100644 index 0000000..645aa99 --- /dev/null +++ b/basicsuite/Shader Effects/description.txt @@ -0,0 +1,3 @@ +This example shows the QtGraphicalEffect module. Qt Quick 2.0 provides the ability to use inline GLSL in your Qt Quick applications to create stunning visual effects. However, as UIs typically reuse many of the same effects, the QtGraphicalEffects module provides a set of predefined, commonly used effects. This includes blur, drop-shadows, glow, blending, opacity maskes and more. + +The example is taken from the manual testbed application in the qtgraphicaleffects module. It has been adapted slightly to run in the launcher. diff --git a/basicsuite/Shader Effects/images/background.png b/basicsuite/Shader Effects/images/background.png new file mode 100644 index 0000000..458d33d Binary files /dev/null and b/basicsuite/Shader Effects/images/background.png differ diff --git a/basicsuite/Shader Effects/images/bug.jpg b/basicsuite/Shader Effects/images/bug.jpg new file mode 100755 index 0000000..43e3676 Binary files /dev/null and b/basicsuite/Shader Effects/images/bug.jpg differ diff --git a/basicsuite/Shader Effects/images/butterfly.png b/basicsuite/Shader Effects/images/butterfly.png new file mode 100644 index 0000000..ce544f2 Binary files /dev/null and b/basicsuite/Shader Effects/images/butterfly.png differ diff --git a/basicsuite/Shader Effects/images/checkbox_inner.png b/basicsuite/Shader Effects/images/checkbox_inner.png new file mode 100644 index 0000000..52dce9c Binary files /dev/null and b/basicsuite/Shader Effects/images/checkbox_inner.png differ diff --git a/basicsuite/Shader Effects/images/checkbox_outer.png b/basicsuite/Shader Effects/images/checkbox_outer.png new file mode 100644 index 0000000..6efa85f Binary files /dev/null and b/basicsuite/Shader Effects/images/checkbox_outer.png differ diff --git a/basicsuite/Shader Effects/images/checker.png b/basicsuite/Shader Effects/images/checker.png new file mode 100644 index 0000000..b7f067b Binary files /dev/null and b/basicsuite/Shader Effects/images/checker.png differ diff --git a/basicsuite/Shader Effects/images/collapse.png b/basicsuite/Shader Effects/images/collapse.png new file mode 100644 index 0000000..1b1259e Binary files /dev/null and b/basicsuite/Shader Effects/images/collapse.png differ diff --git a/basicsuite/Shader Effects/images/color_selection_hl.png b/basicsuite/Shader Effects/images/color_selection_hl.png new file mode 100644 index 0000000..eeb9181 Binary files /dev/null and b/basicsuite/Shader Effects/images/color_selection_hl.png differ diff --git a/basicsuite/Shader Effects/images/color_selection_mask.png b/basicsuite/Shader Effects/images/color_selection_mask.png new file mode 100644 index 0000000..9a7e8f8 Binary files /dev/null and b/basicsuite/Shader Effects/images/color_selection_mask.png differ diff --git a/basicsuite/Shader Effects/images/expand.png b/basicsuite/Shader Effects/images/expand.png new file mode 100644 index 0000000..49f9c15 Binary files /dev/null and b/basicsuite/Shader Effects/images/expand.png differ diff --git a/basicsuite/Shader Effects/images/fog.png b/basicsuite/Shader Effects/images/fog.png new file mode 100644 index 0000000..f462222 Binary files /dev/null and b/basicsuite/Shader Effects/images/fog.png differ diff --git a/basicsuite/Shader Effects/images/glass_normal.png b/basicsuite/Shader Effects/images/glass_normal.png new file mode 100755 index 0000000..ba360ef Binary files /dev/null and b/basicsuite/Shader Effects/images/glass_normal.png differ diff --git a/basicsuite/Shader Effects/images/group_bottom.png b/basicsuite/Shader Effects/images/group_bottom.png new file mode 100644 index 0000000..08961d0 Binary files /dev/null and b/basicsuite/Shader Effects/images/group_bottom.png differ diff --git a/basicsuite/Shader Effects/images/group_top.png b/basicsuite/Shader Effects/images/group_top.png new file mode 100644 index 0000000..210a57f Binary files /dev/null and b/basicsuite/Shader Effects/images/group_top.png differ diff --git a/basicsuite/Shader Effects/images/icon_blend.png b/basicsuite/Shader Effects/images/icon_blend.png new file mode 100644 index 0000000..4112515 Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_blend.png differ diff --git a/basicsuite/Shader Effects/images/icon_blur.png b/basicsuite/Shader Effects/images/icon_blur.png new file mode 100644 index 0000000..f0c6f5e Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_blur.png differ diff --git a/basicsuite/Shader Effects/images/icon_color.png b/basicsuite/Shader Effects/images/icon_color.png new file mode 100644 index 0000000..649cf75 Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_color.png differ diff --git a/basicsuite/Shader Effects/images/icon_distortion.png b/basicsuite/Shader Effects/images/icon_distortion.png new file mode 100644 index 0000000..11bbece Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_distortion.png differ diff --git a/basicsuite/Shader Effects/images/icon_drop_shadow.png b/basicsuite/Shader Effects/images/icon_drop_shadow.png new file mode 100644 index 0000000..77b2f88 Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_drop_shadow.png differ diff --git a/basicsuite/Shader Effects/images/icon_glow.png b/basicsuite/Shader Effects/images/icon_glow.png new file mode 100644 index 0000000..019b4b5 Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_glow.png differ diff --git a/basicsuite/Shader Effects/images/icon_gradient.png b/basicsuite/Shader Effects/images/icon_gradient.png new file mode 100644 index 0000000..0d836b3 Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_gradient.png differ diff --git a/basicsuite/Shader Effects/images/icon_mask.png b/basicsuite/Shader Effects/images/icon_mask.png new file mode 100644 index 0000000..ceca052 Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_mask.png differ diff --git a/basicsuite/Shader Effects/images/icon_motion_blur.png b/basicsuite/Shader Effects/images/icon_motion_blur.png new file mode 100644 index 0000000..89ceb66 Binary files /dev/null and b/basicsuite/Shader Effects/images/icon_motion_blur.png differ diff --git a/basicsuite/Shader Effects/images/radiobutton_inner.png b/basicsuite/Shader Effects/images/radiobutton_inner.png new file mode 100644 index 0000000..e77ccc4 Binary files /dev/null and b/basicsuite/Shader Effects/images/radiobutton_inner.png differ diff --git a/basicsuite/Shader Effects/images/radiobutton_outer.png b/basicsuite/Shader Effects/images/radiobutton_outer.png new file mode 100644 index 0000000..6568c65 Binary files /dev/null and b/basicsuite/Shader Effects/images/radiobutton_outer.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle.png b/basicsuite/Shader Effects/images/slider_handle.png new file mode 100644 index 0000000..633bbe9 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle_b.png b/basicsuite/Shader Effects/images/slider_handle_b.png new file mode 100755 index 0000000..c7d2540 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle_b.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle_black.png b/basicsuite/Shader Effects/images/slider_handle_black.png new file mode 100755 index 0000000..43bbeb8 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle_black.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle_g.png b/basicsuite/Shader Effects/images/slider_handle_g.png new file mode 100755 index 0000000..86decaf Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle_g.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle_gray.png b/basicsuite/Shader Effects/images/slider_handle_gray.png new file mode 100755 index 0000000..1b07aad Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle_gray.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle_pressed.png b/basicsuite/Shader Effects/images/slider_handle_pressed.png new file mode 100644 index 0000000..10e5ed9 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle_pressed.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle_r.png b/basicsuite/Shader Effects/images/slider_handle_r.png new file mode 100755 index 0000000..1bc1614 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle_r.png differ diff --git a/basicsuite/Shader Effects/images/slider_handle_white.png b/basicsuite/Shader Effects/images/slider_handle_white.png new file mode 100755 index 0000000..4f4f551 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_handle_white.png differ diff --git a/basicsuite/Shader Effects/images/slider_track.png b/basicsuite/Shader Effects/images/slider_track.png new file mode 100644 index 0000000..3ab0d21 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_track.png differ diff --git a/basicsuite/Shader Effects/images/slider_track_filled.png b/basicsuite/Shader Effects/images/slider_track_filled.png new file mode 100644 index 0000000..045e6c8 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_track_filled.png differ diff --git a/basicsuite/Shader Effects/images/slider_track_left.png b/basicsuite/Shader Effects/images/slider_track_left.png new file mode 100755 index 0000000..b1cc989 Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_track_left.png differ diff --git a/basicsuite/Shader Effects/images/slider_track_right.png b/basicsuite/Shader Effects/images/slider_track_right.png new file mode 100755 index 0000000..2936c7c Binary files /dev/null and b/basicsuite/Shader Effects/images/slider_track_right.png differ diff --git a/basicsuite/Shader Effects/images/title.png b/basicsuite/Shader Effects/images/title.png new file mode 100644 index 0000000..e3110a2 Binary files /dev/null and b/basicsuite/Shader Effects/images/title.png differ diff --git a/basicsuite/Shader Effects/images/workarea_left.png b/basicsuite/Shader Effects/images/workarea_left.png new file mode 100644 index 0000000..3b8bb71 Binary files /dev/null and b/basicsuite/Shader Effects/images/workarea_left.png differ diff --git a/basicsuite/Shader Effects/images/workarea_right.png b/basicsuite/Shader Effects/images/workarea_right.png new file mode 100644 index 0000000..4954781 Binary files /dev/null and b/basicsuite/Shader Effects/images/workarea_right.png differ diff --git a/basicsuite/Shader Effects/main.qml b/basicsuite/Shader Effects/main.qml new file mode 100644 index 0000000..0d02e71 --- /dev/null +++ b/basicsuite/Shader Effects/main.qml @@ -0,0 +1,168 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: main + + width: 950 + height: 620 + color: '#171717' + + ListView { + id: testCaseList + width: 160 + anchors.top: titlebar.bottom + anchors.left: parent.left + anchors.bottom: parent.bottom + + model: TestBedModel {} + delegate: delegateItem + + section.property: "group" + section.criteria: ViewSection.FullString + section.delegate: sectionHeading + + } + + Image { + id: titlebar + source: "images/title.png" + anchors.top: parent.top + anchors.left: parent.left + width: 160 + + Text { + id: effectsListTitle + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + text: "Effects" + color: "white" + font.family: "Arial" + font.bold: true + font.pixelSize: 12 + } + } + + Loader { + id: testLoader + anchors {left: testCaseList.right; right: parent.right; top: parent.top; bottom: parent.bottom} + } + + Image { + anchors {right: testLoader.right; rightMargin: 300; top: parent.top; bottom: parent.bottom} + source: "images/workarea_right.png" + } + + Image { + anchors {left: testLoader.left; top: parent.top; bottom: parent.bottom} + source: "images/workarea_left.png" + } + + + Component { + id: sectionHeading + Item { + width: parent.width + height: 23 + Image { + source: "images/group_top.png" + width: parent.width + } + Image { + id: icon + source: "images/icon_" + section.replace(/ /g, "_").toLowerCase() + ".png" + anchors {top: parent.top; topMargin: 6; left: parent.left; leftMargin: 6} + } + Text { + id: sectionText + text: section + anchors {fill: parent; leftMargin: 25; topMargin: 3} + color: "white" + verticalAlignment: Text.AlignVCenter + font.family: "Arial" + font.bold: true + font.pixelSize: 12 + } + } + } + + Component { + id: delegateItem + Item { + width: ListView.view.width + height: last ? 27 : 20 + + Image { + source: "images/group_bottom.png" + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + smooth: true + visible: last && index != 20 ? 1 : 0 + } + + Rectangle { + width: parent.width + color: "#323232" + height: 20 + visible: (testLoader.source.toString().search(name) != -1) + } + Text { + id: delegateText; + anchors {fill: parent; leftMargin: 25; topMargin: 3} + text: name.slice(4, name.indexOf(".")) + font.family: "Arial" + font.pixelSize: 12 + color: delegateMouseArea.pressed ? "white" : "#CCCCCC" + } + MouseArea { + id: delegateMouseArea + anchors.fill: parent; + onClicked: { + testLoader.source = name; + testLoader.item.currentTest = delegateText.text; + } + } + } + } +} diff --git a/basicsuite/Shader Effects/preview_l.jpg b/basicsuite/Shader Effects/preview_l.jpg new file mode 100644 index 0000000..d636692 Binary files /dev/null and b/basicsuite/Shader Effects/preview_l.jpg differ diff --git a/basicsuite/Social/icon.png b/basicsuite/Social/icon.png deleted file mode 100755 index d3d1a99..0000000 Binary files a/basicsuite/Social/icon.png and /dev/null differ diff --git a/basicsuite/Social/main.qml b/basicsuite/Social/main.qml deleted file mode 100644 index 13183d7..0000000 --- a/basicsuite/Social/main.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 200 - color: "black" - - Text { - anchors.fill: parent - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "More to come..." - font.pixelSize: Math.min(width, height) * 0.03 - } -} diff --git a/basicsuite/Text Input/description.txt b/basicsuite/Text Input/description.txt new file mode 100644 index 0000000..7c3b780 --- /dev/null +++ b/basicsuite/Text Input/description.txt @@ -0,0 +1,6 @@ +This examples illustrates how Qt can handle input on touch devices. + +The launcher loads a custom platform input context plugin and contains a virtual keyboard. When a text control in Qt Quick gets focus, the input context will trigger the virtual keyboard to show on screen and clicks in the virtual keyboard are delegated to the text control. + +Our demo virtual keyboard has support for english, finnish and arabic. The input context plugin API is plugin based and can be replaced with whatever the user desiers. Qt has a ready made plugin for Maliit, an open-source, cross-platform input method framework for mobile and embedded. + diff --git a/basicsuite/Text Input/preview_l.jpg b/basicsuite/Text Input/preview_l.jpg new file mode 100644 index 0000000..f415a86 Binary files /dev/null and b/basicsuite/Text Input/preview_l.jpg differ diff --git a/basicsuite/Web/icon.png b/basicsuite/Web/icon.png deleted file mode 100755 index f9ce002..0000000 Binary files a/basicsuite/Web/icon.png and /dev/null differ diff --git a/basicsuite/Web/main.qml b/basicsuite/Web/main.qml deleted file mode 100644 index 13183d7..0000000 --- a/basicsuite/Web/main.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 200 - color: "black" - - Text { - anchors.fill: parent - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "More to come..." - font.pixelSize: Math.min(width, height) * 0.03 - } -} diff --git a/basicsuite/Wifi/main.qml b/basicsuite/Wifi/main.qml deleted file mode 100644 index e01e6ee..0000000 --- a/basicsuite/Wifi/main.qml +++ /dev/null @@ -1,157 +0,0 @@ -import QtQuick 2.0 -import Qt.labs.wifi 0.1 - -Rectangle -{ - id: root - - color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1); - - QWifiManager { - id: wifiManager; - - Component.onCompleted: start(); - - onReadyChanged: { - print("QML: QWifiManager is now connected..."); - } - - onOnlineChanged: print(online ? "QML: WifiManager is online" : "QML: WifiManager is not online..."); - - scanning: ready && connectedSSID == ""; - } - - Component { - id: listDelegate - - Rectangle { - id: delegateBackground - property bool expanded: false - height: expanded ? 300 : 70 - clip: true // ### fixme - - Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } } - - width: parent.width - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 67 / delegateBackground.height; color: "lightgray" } - GradientStop { position: 1; color: "gray" } - } - - Text { - id: ssidLabel - anchors.top: parent.top - anchors.left: parent.left - anchors.margins: 10 - font.pixelSize: 24 - font.bold: true - text: network.ssid + (wifiManager.connectedSSID == network.ssid ? " (connected)" : ""); - } - - Text { - id: bssidLabel - anchors.top: ssidLabel.bottom - anchors.left: parent.left - anchors.margins: 5 - anchors.leftMargin: 40 - text: network.bssid - color: "gray" - font.pixelSize: ssidLabel.font.pixelSize * 0.5 - } - - Text { - id: flagsLabel - x: 200 - anchors.top: bssidLabel.top - text: (network.supportsWPA2 ? "WPA2 " : "") - + (network.supportsWPA ? "WPA " : "") - + (network.supportsWEP ? "WEP " : "") - + (network.supportsWPS ? "WPS " : ""); - color: "gray" - font.pixelSize: ssidLabel.font.pixelSize * 0.5 - font.italic: true - } - - Rectangle { - width: Math.max(100 + network.signalStrength, 0) / 100 * parent.width; - height: 20 - radius: 10 - antialiasing: true - anchors.margins: 20 - anchors.right: parent.right - anchors.top: parent.top - color: "white" - border.color: "lightgray" - } - - MouseArea { - anchors.fill: parent - onClicked: { - parent.expanded = !expanded - } - } - - Rectangle { - id: passwordInputBackground - anchors.fill: passwordInput - anchors.margins: -5 - color: "white" - radius: 5 - border.color: "gray" - } - - TextInput { - id: passwordInput - y: 100 - width: 300 - height: 50 - anchors.horizontalCenter: parent.horizontalCenter - font.pixelSize: 14 - } - - Rectangle { - id: connectButton - anchors.top: passwordInput.bottom - anchors.margins: 20 - anchors.horizontalCenter: parent.horizontalCenter - width: passwordInput.width - height: passwordInputBackground.height - - gradient: Gradient { - GradientStop { position: 0; color: "white" } - GradientStop { position: 1; color: buttonMouse.pressed ? "steelblue" : "lightsteelblue" } - } - - border.color: "gray" - - Text { - anchors.centerIn: parent - font.pixelSize: 24 - text: "Connect" - } - MouseArea { - id: buttonMouse - anchors.fill: parent - onClicked: wifiManager.connect(network, passwordInput.text); - } - } - - } - } - - ListView { - anchors.fill: root - model: wifiManager.networks - delegate: listDelegate; - } - - Image { - source: wifiManager.online ? "http://img3.imageshack.us/img3/9870/magepicture.jpg" : "" - anchors.bottom: parent.bottom - - width: parent.width - height: sourceSize.height * (width / sourceSize.width); - } -} diff --git a/experimental/Wifi/main.qml b/experimental/Wifi/main.qml new file mode 100644 index 0000000..e01e6ee --- /dev/null +++ b/experimental/Wifi/main.qml @@ -0,0 +1,157 @@ +import QtQuick 2.0 +import Qt.labs.wifi 0.1 + +Rectangle +{ + id: root + + color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1); + + QWifiManager { + id: wifiManager; + + Component.onCompleted: start(); + + onReadyChanged: { + print("QML: QWifiManager is now connected..."); + } + + onOnlineChanged: print(online ? "QML: WifiManager is online" : "QML: WifiManager is not online..."); + + scanning: ready && connectedSSID == ""; + } + + Component { + id: listDelegate + + Rectangle { + id: delegateBackground + property bool expanded: false + height: expanded ? 300 : 70 + clip: true // ### fixme + + Behavior on height { NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } } + + width: parent.width + + gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 67 / delegateBackground.height; color: "lightgray" } + GradientStop { position: 1; color: "gray" } + } + + Text { + id: ssidLabel + anchors.top: parent.top + anchors.left: parent.left + anchors.margins: 10 + font.pixelSize: 24 + font.bold: true + text: network.ssid + (wifiManager.connectedSSID == network.ssid ? " (connected)" : ""); + } + + Text { + id: bssidLabel + anchors.top: ssidLabel.bottom + anchors.left: parent.left + anchors.margins: 5 + anchors.leftMargin: 40 + text: network.bssid + color: "gray" + font.pixelSize: ssidLabel.font.pixelSize * 0.5 + } + + Text { + id: flagsLabel + x: 200 + anchors.top: bssidLabel.top + text: (network.supportsWPA2 ? "WPA2 " : "") + + (network.supportsWPA ? "WPA " : "") + + (network.supportsWEP ? "WEP " : "") + + (network.supportsWPS ? "WPS " : ""); + color: "gray" + font.pixelSize: ssidLabel.font.pixelSize * 0.5 + font.italic: true + } + + Rectangle { + width: Math.max(100 + network.signalStrength, 0) / 100 * parent.width; + height: 20 + radius: 10 + antialiasing: true + anchors.margins: 20 + anchors.right: parent.right + anchors.top: parent.top + color: "white" + border.color: "lightgray" + } + + MouseArea { + anchors.fill: parent + onClicked: { + parent.expanded = !expanded + } + } + + Rectangle { + id: passwordInputBackground + anchors.fill: passwordInput + anchors.margins: -5 + color: "white" + radius: 5 + border.color: "gray" + } + + TextInput { + id: passwordInput + y: 100 + width: 300 + height: 50 + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: 14 + } + + Rectangle { + id: connectButton + anchors.top: passwordInput.bottom + anchors.margins: 20 + anchors.horizontalCenter: parent.horizontalCenter + width: passwordInput.width + height: passwordInputBackground.height + + gradient: Gradient { + GradientStop { position: 0; color: "white" } + GradientStop { position: 1; color: buttonMouse.pressed ? "steelblue" : "lightsteelblue" } + } + + border.color: "gray" + + Text { + anchors.centerIn: parent + font.pixelSize: 24 + text: "Connect" + } + MouseArea { + id: buttonMouse + anchors.fill: parent + onClicked: wifiManager.connect(network, passwordInput.text); + } + } + + } + } + + ListView { + anchors.fill: root + model: wifiManager.networks + delegate: listDelegate; + } + + Image { + source: wifiManager.online ? "http://img3.imageshack.us/img3/9870/magepicture.jpg" : "" + anchors.bottom: parent.bottom + + width: parent.width + height: sourceSize.height * (width / sourceSize.width); + } +} -- cgit v1.2.3